Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: orxonox.OLD/trunk/src/lib/graphics/render2D/render_2d.h @ 5246

Last change on this file since 5246 was 4862, checked in by bensch, 19 years ago

orxonox/trunk: introducing Layers

File size: 1.1 KB
Line 
1/*!
2 * @file render_2d.h
3 * @brief Definition of the 2D-rendering engine singleton Class
4 * @todo implement Layer-rendering
5*/
6
7#ifndef _RENDER_2D_H
8#define _RENDER_2D_H
9
10#include "base_object.h"
11#include "element_2d.h"
12// FORWARD DEFINITION
13template <class T> class tList;
14
15//! A default singleton class.
16class Render2D : public BaseObject {
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 tick(float dt);
24  void draw(unsigned int layer) const;
25
26  void registerElement2D(Element2D* element2D);
27  void unregisterElement2D(Element2D* element2D);
28  void moveToLayer(Element2D* element2D, E2D_LAYER to);
29
30 private:
31  Render2D();
32  static Render2D*              singletonRef;                    //!< Reference to this class.
33
34//  tList<Element2D>*             element2DList;                   //!< List of all valid 2D-elements.
35  tList<Element2D>*             element2DList[E2D_LAYER_COUNT];  //!< List of all valid 2D-elements in the different Layers.
36};
37
38#endif /* _RENDER_2D_H */
Note: See TracBrowser for help on using the repository browser.