Skip to content

Commit 90a2b0d

Browse files
committed
opengl: set viewport size to window size
The OpenGL specification says that the initial values for the OpenGL viewport should match the window size.
1 parent 5874423 commit 90a2b0d

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

src/video/ogc/SDL_ogcgl.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,7 @@ SDL_GLContext SDL_OGC_GL_CreateContext(_THIS, SDL_Window * window)
8484
context->window = window;
8585
context->swap_interval = 1;
8686
ogx_initialize();
87+
glViewport(0, 0, window->w, window->h);
8788
if (_this->gl_config.stencil_size > 0) {
8889
OgxStencilFlags flags = 0; /* Don't care if Z gets dirty on discarded fragments */
8990
if (_this->gl_config.stencil_size > 4) flags |= OGX_STENCIL_8BIT;

0 commit comments

Comments
 (0)