OpenGL: Clear screen when resizing
Jeffrey Pfau jeffrey@endrift.com
Thu, 04 Jun 2015 00:59:13 -0700
1 files changed,
4 insertions(+),
0 deletions(-)
jump to
M
src/platform/opengl/gl.c
→
src/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); }