diff --git a/doc/README.html b/doc/README.html index 990b569..9e7c23e 100644 --- a/doc/README.html +++ b/doc/README.html @@ -35,6 +35,9 @@ GLEW: The OpenGL Extension Wrangler Library Separate Namespace + +Multiple Rendering Contexts (GLEW MX) + Known Issues Credits, Copyright Change Log @@ -49,14 +52,15 @@ GLEW: The OpenGL Extension Wrangler Library

Introduction

+ The goal of the OpenGL Extension Wrangler Library (GLEW) is to assist -C/C++ OpenGL developers with two tedious tasks: initializing and -using extensions and writing portable applications. GLEW provides -an efficient run-time mechanism to determine whether a certain -extension is supported by the driver or not. OpenGL core and -extension functionality is exposed via a single header file. GLEW -currently supports SGI systems and PCs with commodity graphics cards -on three operating systems: Windows, Linux, and IRIX. +C/C++ OpenGL developers with two tedious tasks: initializing and using +extensions and writing portable applications. GLEW provides an +efficient run-time mechanism to determine whether a certain extension +is supported by the driver or not. OpenGL core and extension +functionality is exposed via a single header file. GLEW currently +supports a variety of platforms and operating systems, including +Windows, Linux, Darwin, Irix, and Solaris.

@@ -385,9 +389,20 @@ href="wglinfo.txt">here. For additional usage information, type glewinfo allows you to verify the entry points for the extensions supported on your platform. It uses GLEW to find out which extensions and entry points are available. On Windows it reports the -results to a text file called glewinfo.txt, on Linux and IRIX -it prints them to stdout. +results to a text file called glewinfo.txt, on Unix it prints +them to stdout.

+Windows Usage:

glewinfo [-pf <id>]
+ +where <id> is the pixelformat id for which the +capabilities are displayed. + +

+Unix Usage: +

glewinfo [-display <dpy>] [-visual <id>]
+ +where <dpy> is the X11 display and <id> is +the visual id for which the capabilities are displayed.

@@ -401,7 +416,7 @@ it prints them to stdout.

Automatic Code Generation

-Starting from release 1.1.0, the source code and parts of the +Starting with release 1.1.0, the source code and parts of the documentation are automatically generated from the extension specifications via a two-step process. In the first step, specification files from the OpenGL registry are parsed and skeleton @@ -440,6 +455,50 @@ effect token and function pointer definitions. + + + + + +

Multiple Rendering +Contexts (GLEW MX)

+

+ +Starting with release 1.2.0, thread-safe support for multiple +rendering contexts (possibly with different capabilities) is +available. Since this is not required by most users, it is not added +to the binary releases to maintain compatibility between different +versions. To include multi-context support, you have to do the +following: + +

    +
  1. Compile and use GLEW with the GLEW_MX preprocessor token defined.
  2. +
  3. Replace the global glewInit() call with glewContextInit(GLEWContext* ctx). Note, that ctx has to reside in global or thread-local memory.
  4. +
  5. Define the glewGetContext() macro or function that retrieves the GLEW context for the thread from which the OpenGL/WGL/GLX call is issued. This dispatch mechanism is primitive, but generic.
  6. +
+ +

Note that according to WGL +documentation, you have to initialize the entry points for every +rendering context you create using pixel formats with different +capabilities (for example the pixel formats provided by the generic +software OpenGL implementation by Microsoft vs. the hardware +accelerated pixel formats). GLEW by default ignores this +requirement, and does not define per-context entry points (you can +however do this using the steps described above). Assuming a +global namespace for the entry points works in most situations, +because typically all hardware accelerated pixel formats provide the +same entry points and capabilities (and why would anyone want to use +the software renderer when hardware acceleration is available?). This +means that unless you use the multi-context version of GLEW, you need +to call glewInit() only once in your program, or more +precisely, once per process. + +

+ + + + @@ -448,17 +507,9 @@ effect token and function pointer definitions.

Known Issues

-GLEW requires GLX 1.2 to assure compatibility with GLUT. In addition, +GLEW requires GLX 1.2 to assure compatibility with GLUT. Also, the SGI GLX video extensions are currently not supported.

-Note that according to WGL documentation you have to initialize the entry points -for every rendering context you create. GLEW ignores this -requirement, and does not define per-context entry points. This means -that you need to call glewInit() only once in your program, -or more precisely, once per process. We have not noticed any problems -so far from ignoring the specification. -

@@ -482,8 +533,7 @@ Wimmer.

-GLEW is originally derived from the EXTGL project by Lev Povalahev. The +GLEW is originally derived from the EXTGL project by Lev Povalahev. The source code is licensed under the modified BSD license, the SGI Free Software License B, and the GLX Public License. The automatic code @@ -502,6 +552,16 @@ generation scripts are released under the GPL.