- allow changes to video resolution and fullscreen mode without restart

This commit is contained in:
Mark Vejvoda
2013-01-01 02:24:23 +00:00
parent 5643cc67a4
commit 9275debe2d
10 changed files with 171 additions and 33 deletions

View File

@@ -213,7 +213,7 @@ string extractExtension(const string& filename);
void getFullscreenVideoModes(vector<ModeInfo> *modeinfos,bool isFullscreen);
void getFullscreenVideoInfo(int &colorBits,int &screenWidth,int &screenHeight,bool isFullscreen);
bool changeVideoMode(int resH, int resW, int colorBits, int refreshFrequency);
void changeVideoModeFullScreen(bool value);
void restoreVideoMode(bool exitingApp=false);
bool StartsWith(const std::string &str, const std::string &key);

View File

@@ -143,6 +143,10 @@ public:
Window();
virtual ~Window();
virtual bool ChangeVideoMode(bool preserveContext,int resWidth, int resHeight,
bool fullscreenWindow, int colorBits, int depthBits, int stencilBits,
bool hardware_acceleration, bool fullscreen_anti_aliasing,
float gammaValue) = 0;
//static void setMasterserverMode(bool value) { Window::masterserverMode = value;}
//static bool getMasterserverMode() { return Window::masterserverMode;}

View File

@@ -35,6 +35,11 @@ public:
void makeCurrentGl();
void swapBuffersGl();
void setGamma(float gammaValue){context.setGammaValue(gammaValue);}
virtual bool ChangeVideoMode(bool preserveContext, int resWidth, int resHeight,
bool fullscreenWindow, int colorBits, int depthBits, int stencilBits,
bool hardware_acceleration, bool fullscreen_anti_aliasing,
float gammaValue);
};
}}//end namespace