OpenMW
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
sdlvideowrapper.hpp
Go to the documentation of this file.
1 #ifndef OPENMW_COMPONENTS_SDLUTIL_SDLVIDEOWRAPPER_H
2 #define OPENMW_COMPONENTS_SDLUTIL_SDLVIDEOWRAPPER_H
3 
4 #include <osg/ref_ptr>
5 
6 #include <SDL_types.h>
7 
8 struct SDL_Window;
9 
10 namespace osgViewer
11 {
12  class Viewer;
13 }
14 
15 namespace SDLUtil
16 {
17 
19  {
20  public:
21  VideoWrapper(SDL_Window* window, osg::ref_ptr<osgViewer::Viewer> viewer);
22  ~VideoWrapper();
23 
24  void setSyncToVBlank(bool sync);
25 
26  void setGammaContrast(float gamma, float contrast);
27 
28  void setVideoMode(int width, int height, bool fullscreen, bool windowBorder);
29 
30  private:
31  SDL_Window* mWindow;
32  osg::ref_ptr<osgViewer::Viewer> mViewer;
33 
34  float mGamma;
35  float mContrast;
37 
38  // Store system gamma ramp on window creation. Restore system gamma ramp on exit
39  Uint16 mOldSystemGammaRamp[256*3];
40  };
41 
42 }
43 
44 #endif
void setSyncToVBlank(bool sync)
Definition: sdlvideowrapper.cpp:31
Definition: sdlvideowrapper.hpp:18
bool mHasSetGammaContrast
Definition: sdlvideowrapper.hpp:36
~VideoWrapper()
Definition: sdlvideowrapper.cpp:22
float mContrast
Definition: sdlvideowrapper.hpp:35
VideoWrapper(SDL_Window *window, osg::ref_ptr< osgViewer::Viewer > viewer)
Definition: sdlvideowrapper.cpp:12
Uint16 mOldSystemGammaRamp[256 *3]
Definition: sdlvideowrapper.hpp:39
void setGammaContrast(float gamma, float contrast)
Definition: sdlvideowrapper.cpp:44
SDL_Window * mWindow
Definition: sdlvideowrapper.hpp:31
float mGamma
Definition: sdlvideowrapper.hpp:34
void setVideoMode(int width, int height, bool fullscreen, bool windowBorder)
Definition: sdlvideowrapper.cpp:71
osg::ref_ptr< osgViewer::Viewer > mViewer
Definition: sdlvideowrapper.hpp:32