fixes in Mac resizing example browser (if window size exceeds capability)
This commit is contained in:
@@ -695,8 +695,8 @@ bool OpenGLExampleBrowser::init(int argc, char* argv[])
|
||||
}
|
||||
|
||||
|
||||
int width = 1024;
|
||||
int height=768;
|
||||
int width = 1920;
|
||||
int height=1080;
|
||||
#ifndef NO_OPENGL3
|
||||
SimpleOpenGL3App* simpleApp=0;
|
||||
sUseOpenGL2 =args.CheckCmdLineFlag("opengl2");
|
||||
@@ -723,6 +723,8 @@ bool OpenGLExampleBrowser::init(int argc, char* argv[])
|
||||
char title[1024];
|
||||
sprintf(title,"%s using OpenGL3+. %s", appTitle,optMode);
|
||||
simpleApp = new SimpleOpenGL3App(title,width,height, gAllowRetina);
|
||||
|
||||
|
||||
s_app = simpleApp;
|
||||
}
|
||||
#endif
|
||||
@@ -734,7 +736,11 @@ bool OpenGLExampleBrowser::init(int argc, char* argv[])
|
||||
#endif
|
||||
|
||||
s_instancingRenderer = s_app->m_renderer;
|
||||
s_window = s_app->m_window;
|
||||
s_window = s_app->m_window;
|
||||
|
||||
width = s_window->getWidth();
|
||||
height = s_window->getHeight();
|
||||
|
||||
prevMouseMoveCallback = s_window->getMouseMoveCallback();
|
||||
s_window->setMouseMoveCallback(MyMouseMoveCallback);
|
||||
|
||||
@@ -817,9 +823,7 @@ bool OpenGLExampleBrowser::init(int argc, char* argv[])
|
||||
|
||||
///add some demos to the gAllExamples
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
int numDemos = gAllExamples->getNumRegisteredExamples();
|
||||
|
||||
//char nodeText[1024];
|
||||
@@ -924,7 +928,7 @@ bool OpenGLExampleBrowser::init(int argc, char* argv[])
|
||||
|
||||
gui->registerFileOpenCallback(fileOpenCallback);
|
||||
gui->registerQuitCallback(quitCallback);
|
||||
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user