From 90a2b0d61eac5fdf7d8c201793b5be1826512598 Mon Sep 17 00:00:00 2001 From: Alberto Mardegan Date: Thu, 9 Apr 2026 21:50:24 +0300 Subject: [PATCH] opengl: set viewport size to window size The OpenGL specification says that the initial values for the OpenGL viewport should match the window size. --- src/video/ogc/SDL_ogcgl.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/video/ogc/SDL_ogcgl.c b/src/video/ogc/SDL_ogcgl.c index fd26d690e9acd..6299b5bd48ea4 100644 --- a/src/video/ogc/SDL_ogcgl.c +++ b/src/video/ogc/SDL_ogcgl.c @@ -84,6 +84,7 @@ SDL_GLContext SDL_OGC_GL_CreateContext(_THIS, SDL_Window * window) context->window = window; context->swap_interval = 1; ogx_initialize(); + glViewport(0, 0, window->w, window->h); if (_this->gl_config.stencil_size > 0) { OgxStencilFlags flags = 0; /* Don't care if Z gets dirty on discarded fragments */ if (_this->gl_config.stencil_size > 4) flags |= OGX_STENCIL_8BIT;