OpenGL: Clear screen when resizing

This commit is contained in:
Jeffrey Pfau 2015-06-04 00:59:13 -07:00
parent d05e596b38
commit a21d773ae8
1 changed files with 4 additions and 0 deletions

View File

@ -58,6 +58,10 @@ static void GBAGLContextResized(struct VideoBackend* v, int w, int h) {
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);
}