Reputation: 43417
When I issue glViewport
with my new resolution it does not seem to update the size of the (front and back) framebuffer. My FBO's seem to handle the resize just fine because I just re-create my FBO texture with the new size.
Is there something I'm missing, or is this sort of thing simply not supported on Linux? I'm trying to avoid calling SDL_SetVideoMode
so I can hold on to my OpenGL context.
Upvotes: 0
Views: 1582
Reputation: 473174
glViewport
does not affect the size of the window. Indeed, no OpenGL command can change the windows size. All glViewport
does is change the transform from normalized device coordinate space to window space. It effectively changes what part of the window you render to, not the size of the window itself.
The size of the window is managed by whatever system created the window. If SDL doesn't have a function to change the window's size, then the window's size cannot be changed.
Upvotes: 2