source:
orxonox.OLD/trunk/src/lib/graphics/render2D/render_2d.h
@
5402
Last change on this file since 5402 was 5401, checked in by bensch, 20 years ago | |
---|---|
File size: 808 bytes |
Rev | Line | |
---|---|---|
[4838] | 1 | /*! |
[4839] | 2 | * @file render_2d.h |
3 | * @brief Definition of the 2D-rendering engine singleton Class | |
[4848] | 4 | * @todo implement Layer-rendering |
[3655] | 5 | */ |
6 | ||
[4839] | 7 | #ifndef _RENDER_2D_H |
8 | #define _RENDER_2D_H | |
[3655] | 9 | |
10 | #include "base_object.h" | |
[4848] | 11 | #include "element_2d.h" |
[3955] | 12 | // FORWARD DEFINITION |
[4840] | 13 | template <class T> class tList; |
[3655] | 14 | |
15 | //! A default singleton class. | |
[4839] | 16 | class Render2D : public BaseObject { |
[5397] | 17 | friend class Element2D; |
[3655] | 18 | |
[5397] | 19 | public: |
20 | virtual ~Render2D(); | |
21 | /** @returns a Pointer to the only object of this Class */ | |
22 | inline static Render2D* getInstance() { if (!singletonRef) singletonRef = new Render2D(); return singletonRef; }; | |
[3655] | 23 | |
[5397] | 24 | void tick(float dt); |
[5398] | 25 | void draw(E2D_LAYER layer) const; |
[4840] | 26 | |
[5397] | 27 | private: |
28 | Render2D(); | |
29 | static Render2D* singletonRef; //!< Reference to this class. | |
30 | ||
[5401] | 31 | }; |
[3655] | 32 | |
[4839] | 33 | #endif /* _RENDER_2D_H */ |
Note: See TracBrowser
for help on using the repository browser.