diff options
| -rw-r--r-- | documentation/src/opengl.dox | 1 | ||||
| -rw-r--r-- | examples/OpenGL3test.cxx | 2 |
2 files changed, 3 insertions, 0 deletions
diff --git a/documentation/src/opengl.dox b/documentation/src/opengl.dox index 91983f0c9..633653cb7 100644 --- a/documentation/src/opengl.dox +++ b/documentation/src/opengl.dox @@ -503,6 +503,7 @@ to be created among your Fl_Gl_Window-derived classes: first = 0; make_current(); glewInit(); // defines pters to functions of OpenGL V 1.2 and above + redraw(); } #endif \endcode diff --git a/examples/OpenGL3test.cxx b/examples/OpenGL3test.cxx index ca880d22f..b8fe670d5 100644 --- a/examples/OpenGL3test.cxx +++ b/examples/OpenGL3test.cxx @@ -49,6 +49,7 @@ public: SimpleGL3Window(int x, int y, int w, int h) : Fl_Gl_Window(x, y, w, h) { mode(FL_RGB8 | FL_DOUBLE | FL_OPENGL3); shaderProgram = 0; + gl_version_major = 0; } void draw(void) { if (gl_version_major < 3) return; @@ -154,6 +155,7 @@ public: add_output("GL_VERSION=%s\n", glv); sscanf((const char *)glv, "%d", &gl_version_major); if (gl_version_major < 3) add_output("\nThis platform does not support OpenGL V3\n\n"); + redraw(); } if (event == FL_PUSH && gl_version_major >= 3) { |
