all repos — mgba @ a21d773ae8dd52b6e2e1e7b34f8bca4ec3d5b457

mGBA Game Boy Advance Emulator

OpenGL: Clear screen when resizing
Jeffrey Pfau jeffrey@endrift.com
Thu, 04 Jun 2015 00:59:13 -0700
commit

a21d773ae8dd52b6e2e1e7b34f8bca4ec3d5b457

parent

d05e596b380a4bc95c0cf76e0597940a7b0f431a

1 files changed, 4 insertions(+), 0 deletions(-)

jump to
M src/platform/opengl/gl.csrc/platform/opengl/gl.c

@@ -58,6 +58,10 @@ } else if (w * 2 < h * 3) {

drawH = w * 2 / 3; } } + glMatrixMode(GL_MODELVIEW); + glLoadIdentity(); + glClearColor(0, 0, 0, 0); + glClear(GL_COLOR_BUFFER_BIT); glViewport((w - drawW) / 2, (h - drawH) / 2, drawW, drawH); }