Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: orxonox.OLD/orxonox/trunk/src/lib/graphics/graphics_engine.h @ 3790

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

orxonox/trunk: merged the textEngine back into the trunk.
merged with command:
svn merge -r 3681:HEAD branches/textEngine/ trunk/

conflicts in:
world.cc/h orxonox.cc NEWS
changed in favor of the trunk

File size: 1.2 KB
RevLine 
[3245]1/*!
[3610]2    \file graphics_engine.h
3   
4    \brief defines a Interface between orxonox and graphical input
[3329]5
[3610]6    handles graphical SDL-initialisation, textures, resolutions, and so on
[3245]7*/
[1853]8
[3610]9#ifndef _GRAPHICS_ENGINE_H
10#define _GRAPHICS_ENGINE_H
[1853]11
[3611]12#include "glincl.h"
[3610]13
[3543]14#include "base_object.h"
[1853]15
[3543]16// FORWARD DEFINITION \\
17
18
[3610]19class GraphicsEngine : public BaseObject
20{
[1904]21 public:
[3610]22  static GraphicsEngine* getInstance();
23  virtual ~GraphicsEngine();
[1853]24
[3611]25  int initVideo();
[3617]26  int setGLattribs(void);
[3619]27  int setResolution(int width, int height, int bpp);
[3790]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;}
[3619]34  int resolutionChanged(SDL_ResizeEvent* resizeInfo);
[3617]35  void listModes(void);
[3611]36
37  static bool texturesEnabled;
38
[3790]39  static void enter2DMode(void);
40  static void leave2DMode(void);
41
[3245]42 private:
[3610]43  GraphicsEngine();
44  static GraphicsEngine* singletonRef;
[3245]45
[3610]46
47  SDL_Surface* screen;
[3611]48  int resolutionX;
49  int resolutionY;
50  int bitsPerPixel;
51  bool fullscreen;
52  Uint32 videoFlags;
[3617]53
54  SDL_Rect **videoModes;
[1853]55};
56
[3610]57#endif /* _GRAPHICS_ENGINE_H */
Note: See TracBrowser for help on using the repository browser.