diff --git a/documentation/opengl.html b/documentation/opengl.html index 807908a68..5ed567992 100644 --- a/documentation/opengl.html +++ b/documentation/opengl.html @@ -17,13 +17,31 @@ include the file <GL/gl.h>, define some extra drawing functions provided by FLTK, and include the <windows.h> header file needed by WIN32 applications.

Making a Subclass of Fl_Gl_Window

- To make a subclass of Fl_Gl_Window, you must provide: +To make a subclass of Fl_Gl_Window, you must provide: +If your subclass provides static controls in the window, they must be +redrawn whenever the FL_DAMAGE_ALL bit is set in the value +returned by damage(). For double-buffered windows you will +need to surround the drawing code with the following code to make sure +that both buffers are redrawn: + +Note: If you are using the Mesa graphics library, the call to +glDrawBuffer() is not required and will slow down drawing +considerably. The preprocessor instructions shown above will optimize +your code based upon the graphics library used.

Defining the Subclass

To define the subclass you just subclass the Fl_Gl_Window class: