Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: orxonox.OLD/orxonox/branches/textEngine/src/lib/graphics/graphics_engine.h @ 3768

Last change on this file since 3768 was 3716, checked in by bensch, 20 years ago

orxonox/branches/textEngine: now the text is really placed on top of a given world-entity

File size: 1.2 KB
Line 
1/*!
2    \file graphics_engine.h
3   
4    \brief defines a Interface between orxonox and graphical input
5
6    handles graphical SDL-initialisation, textures, resolutions, and so on
7*/
8
9#ifndef _GRAPHICS_ENGINE_H
10#define _GRAPHICS_ENGINE_H
11
12#include "glincl.h"
13
14#include "base_object.h"
15
16// FORWARD DEFINITION \\
17
18
19class GraphicsEngine : public BaseObject
20{
21 public:
22  static GraphicsEngine* getInstance();
23  virtual ~GraphicsEngine();
24
25  int initVideo();
26  int setGLattribs(void);
27  int setResolution(int width, int height, int bpp);
28  /** \returns the x resolution */
29  inline int getResolutionX(void) {return this->resolutionX;}
30  /** \returns the y resolution */
31  inline int getResolutionY(void) {return this->resolutionY;}
32  /** \returns the Bits Per Pixel */
33  inline int getbbp(void) {return this->bitsPerPixel;}
34  int resolutionChanged(SDL_ResizeEvent* resizeInfo);
35  void listModes(void);
36
37  static bool texturesEnabled;
38
39 private:
40  GraphicsEngine();
41  static GraphicsEngine* singletonRef;
42
43
44  SDL_Surface* screen;
45  int resolutionX;
46  int resolutionY;
47  int bitsPerPixel;
48  bool fullscreen;
49  Uint32 videoFlags;
50
51  SDL_Rect **videoModes;
52};
53
54#endif /* _GRAPHICS_ENGINE_H */
Note: See TracBrowser for help on using the repository browser.