From 16cc8961be0d6c494a68b65317ccfe7076bebc6e Mon Sep 17 00:00:00 2001 From: unknown Date: Sat, 6 Jun 2009 14:24:36 +0100 Subject: [PATCH] fix GL error handling on Windows --- src/OpenGL.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/OpenGL.cpp b/src/OpenGL.cpp index 01ef831..1caafff 100644 --- a/src/OpenGL.cpp +++ b/src/OpenGL.cpp @@ -350,6 +350,9 @@ bool OpenGL::IsTextureSizeSupported(int width, int height, int ncols, GLenum for bool OpenGL::InitGL() { + // Clear any error bit (this seems to be required on Windows??) + glGetError(); + // Set options glShadeModel(GL_SMOOTH); // Enable smooth shading glClearColor(0.0f, 0.0f, 0.0f, 0.0f); // Black background -- 2.39.2