Last change
on this file since 5517 was
5420,
checked in by bensch, 19 years ago
|
orxonox/trunk: Font is now Right, and the Rendering 'should be' faster.
|
File size:
982 bytes
|
Line | |
---|
1 | /*! |
---|
2 | * @file render_2d.h |
---|
3 | * @brief Definition of the 2D-rendering engine singleton Class |
---|
4 | */ |
---|
5 | |
---|
6 | #ifndef _RENDER_2D_H |
---|
7 | #define _RENDER_2D_H |
---|
8 | |
---|
9 | #include "base_object.h" |
---|
10 | #include "element_2d.h" |
---|
11 | // FORWARD DECLARATION |
---|
12 | template <class T> class tList; |
---|
13 | |
---|
14 | //! A default singleton class. |
---|
15 | class Render2D : public BaseObject { |
---|
16 | friend class Element2D; |
---|
17 | |
---|
18 | public: |
---|
19 | virtual ~Render2D(); |
---|
20 | /** @returns a Pointer to the only object of this Class */ |
---|
21 | inline static Render2D* getInstance() { if (!singletonRef) singletonRef = new Render2D(); return singletonRef; }; |
---|
22 | |
---|
23 | void toggleNodesVisibility() { this->showNodes = !this->showNodes; }; |
---|
24 | |
---|
25 | void update(float dt); |
---|
26 | void tick(float dt); |
---|
27 | void draw(short layer) const; |
---|
28 | |
---|
29 | private: |
---|
30 | Render2D(); |
---|
31 | static Render2D* singletonRef; //!< Reference to this class. |
---|
32 | |
---|
33 | bool showNodes; //!< If the debug-Nodes should be visible |
---|
34 | }; |
---|
35 | |
---|
36 | #endif /* _RENDER_2D_H */ |
---|
Note: See
TracBrowser
for help on using the repository browser.