Last change
on this file since 8458 was
7840,
checked in by bensch, 18 years ago
|
trunk: Elements that are supposed to be on the Background stay there:
Changed:
Element2D: render from - to - LAYERS
Render2D: Renders from - to - LAYERS
GraphicsEngine: new function drawBackgroundElements
ObjectManager: new List OM_BACKGROUND
Skybox/sphere: in OM_LIST OM_BACKGROUND
@patrick: do you like it too ??
|
File size:
967 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 | |
---|
13 | //! A default singleton class. |
---|
14 | class Render2D : public BaseObject { |
---|
15 | friend class Element2D; |
---|
16 | |
---|
17 | public: |
---|
18 | virtual ~Render2D(); |
---|
19 | /** @returns a Pointer to the only object of this Class */ |
---|
20 | inline static Render2D* getInstance() { if (!singletonRef) singletonRef = new Render2D(); return singletonRef; }; |
---|
21 | |
---|
22 | void toggleNodesVisibility() { this->showNodes = !this->showNodes; }; |
---|
23 | |
---|
24 | void update(float dt); |
---|
25 | void tick(float dt); |
---|
26 | void draw(E2D_LAYER from, E2D_LAYER to) const; |
---|
27 | |
---|
28 | private: |
---|
29 | Render2D(); |
---|
30 | static Render2D* singletonRef; //!< Reference to this class. |
---|
31 | |
---|
32 | bool showNodes; //!< If the debug-Nodes should be visible |
---|
33 | }; |
---|
34 | |
---|
35 | #endif /* _RENDER_2D_H */ |
---|
Note: See
TracBrowser
for help on using the repository browser.