From 44f8e8e32a07c083d9e55df47becd684d3fd1a9f Mon Sep 17 00:00:00 2001 From: Michael R Sweet Date: Mon, 1 Feb 1999 20:38:57 +0000 Subject: Added a section on damage() for widget writers. git-svn-id: file:///fltk/svn/fltk/trunk@266 ea41ed52-d2ee-0310-a9c1-e6b18d33e121 --- documentation/opengl.html | 27 ++++++++++++++++++++++----- 1 file changed, 22 insertions(+), 5 deletions(-) (limited to 'documentation') 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: