尘羽泯
08-07-2011, 05:31 AM
Sorry,I am a programmer who is a Chinese. I cannot speak English very well.I hope you can understand me.
My question is:In win32,How to at any time change a OGL into fullscreen?
I saw Nehe's lesson,use ChangeDisplaySettings to change window into fullscreen.But if need at any time to change it,need to killwindow then createwindow.But that result the texture cannot show.
This is Nehe's lesson code.
if (keys[VK_F1])
{
keys[VK_F1]=FALSE;
KillGLWindow();
fullscreen=!fullscreen;
if (!CreateGLWindow("Nehe's OpenGL ",640,480,16,fullscreen))
{
return 0;
}
}
Though it can at any time change a OGL into fullscreen,texture that created before killwindow cannot show in new window.
Have any other ways to at any time change a OGL into fullscreen,isn't have?
My question is:In win32,How to at any time change a OGL into fullscreen?
I saw Nehe's lesson,use ChangeDisplaySettings to change window into fullscreen.But if need at any time to change it,need to killwindow then createwindow.But that result the texture cannot show.
This is Nehe's lesson code.
if (keys[VK_F1])
{
keys[VK_F1]=FALSE;
KillGLWindow();
fullscreen=!fullscreen;
if (!CreateGLWindow("Nehe's OpenGL ",640,480,16,fullscreen))
{
return 0;
}
}
Though it can at any time change a OGL into fullscreen,texture that created before killwindow cannot show in new window.
Have any other ways to at any time change a OGL into fullscreen,isn't have?