The SDL forums have moved to discourse.libsdl.org.
This is just a read-only archive of the previous forums, to keep old links working.


SDL Forum Index
SDL
Simple Directmedia Layer Forums
A trap while changing window size
BleedingChips


Joined: 27 Sep 2014
Posts: 1
I use SDL to create a window, and also create a GLContext, everything is fine, but after i used SDL_SetWindowSize to change my window, the GL context would not change. It means when i use 400*400 first and changes to 600*400, the center of glFrustum would not location at the center of window anymore, and the top of 200*400 extra could not draw by the GL, the only way to do is delete old context and create a new context with the new window, that means the texture you bind in gl will be lost.

by the way: after deleting the gl context, is the SDL will delete the all the texture bind in this gl context?