OpenGL documentation fixes (included header files).

Also reformatted very long lines, removed trailing spaces.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12204 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
This commit is contained in:
Albrecht Schlosser 2017-03-17 16:05:26 +00:00
parent 83b5df04fb
commit 300e0b32a9

View File

@ -20,14 +20,14 @@ drawing your widgets. To do this you use the
\ref opengl_gl_finish "gl_finish()"
functions around your OpenGL code.
You must include FLTK's \p <FL/gl.h> header
file. It will include the file \p <GL/gl.h>, define
You must include FLTK's \p <FL/gl.h> header file. It will include
the file \p <GL/gl.h> (on macOS: \p <OpenGL/gl.h>), define
some extra drawing functions provided by FLTK, and include the
\p <windows.h> header file needed by WIN32
applications.
\p <windows.h> header file needed by WIN32 applications.
Some simple coding rules (see \ref osissues_retina) allow to write cross-platform code that will draw high resolution
OpenGL graphics if run on 'retina' displays with Mac OS X.
Some simple coding rules (see \ref osissues_retina) allow to write
cross-platform code that will draw high resolution
OpenGL graphics if run on 'retina' displays with MacOS.
\section opengl_subclass Making a Subclass of Fl_Gl_Window
@ -456,18 +456,23 @@ showing how to use OpenGL 3.0 (or higher versions) with FLTK in a cross-platform
It contains also OpenGL3-glut-test.cxx which shows how to use FLTK's GLUT compatibility
and OpenGL 3.
<b>On the MSWindows and Unix/Linux platforms</b>, FLTK creates contexts implementing
the highest OpenGL version supported by the hardware,
<b>On the MSWindows and Unix/Linux platforms</b>, FLTK creates contexts
implementing the highest OpenGL version supported by the hardware,
which are also compatible with lower OpenGL versions. Thus, FLTK allows
source code targeting any version of OpenGL. Access to functions from OpenGL versions above 1.1 requires to load function pointers at runtime on these platforms. FLTK recommends to use the GLEW library to perform this. It is therefore
necessary to install the GLEW library (see below). <b>On the Mac OS X platform</b>,
source code targeting any version of OpenGL. Access to functions from OpenGL
versions above 1.1 requires to load function pointers at runtime on these platforms.
FLTK recommends to use the GLEW library to perform this. It is therefore
necessary to install the GLEW library (see below). <b>On the macOS platform</b>,
FLTK creates by default contexts implementing OpenGL versions 1 or 2.
To access OpenGL 3.0 (or higher versions), use the <tt>FL_OPENGL3</tt> flag (see below).
Mac OS 10.7 or above is required; GLEW is possible but not necessary.
\par GLEW installation (Unix/Linux and MSWindows platforms)
GLEW is available as a package for most Linux distributions and in source form at http://glew.sourceforge.net/.
For the MSWindows platform, a Visual Studio static library (glew32.lib) can be downloaded from the same web site; a MinGW-style static library (libglew32.a) can be built from source with the make command.
GLEW is available as a package for most Linux distributions and in source
form at http://glew.sourceforge.net/.
For the MSWindows platform, a Visual Studio static library (glew32.lib) can
be downloaded from the same web site; a MinGW-style static library (libglew32.a)
can be built from source with the make command.
\par Source-level changes for OpenGL 3:
\li Put this in all OpenGL-using source files (instead of \#include <FL/gl.h>,
@ -484,8 +489,8 @@ and before \#include <FL/glut.h> if you use GLUT):
\endcode
\li Add the <tt>FL_OPENGL3</tt> flag when calling Fl_Gl_Window::mode(int a)
or glutInitDisplayMode().
\li Put this in the <tt>handle(int event)</tt> member function of the first to be created
among your Fl_Gl_Window-derived classes:
\li Put this in the <tt>handle(int event)</tt> member function of the first
to be created among your Fl_Gl_Window-derived classes:
\code
#ifndef __APPLE__
static int first = 1;