开发者

Switching between fullscreen and windowed in Mac OS X

开发者 https://www.devze.com 2022-12-18 05:28 出处:网络
I have a project in the works with OpenGL and SDL. Users have the option of using a full-screen or windowed mode for the display.

I have a project in the works with OpenGL and SDL. Users have the option of using a full-screen or windowed mode for the display.

I use SDL_SetVideoMode to set up the window, but this solution destroys the original SDL_Su开发者_C百科rface context (so all my OpenGL textures get cleaned too).

How can I correctly switch between full-screen and windowed mode without textures cleaning?


You need to reload all your textures unfortunately. This is neccesary because SDL recreates the context. It's an SDL issue that is planned to be fixed someday.

More info here.

0

精彩评论

暂无评论...
验证码 换一张
取 消