From 27474060e1287a67c45cd790d29b9095b35b2bdf Mon Sep 17 00:00:00 2001 From: ShizZy Date: Thu, 29 Aug 2013 23:35:09 -0400 Subject: adding initial project layout --- externals/glew-1.10.0/doc/basic.html | 283 +++++++++++++++++++++++++++++++++++ 1 file changed, 283 insertions(+) create mode 100644 externals/glew-1.10.0/doc/basic.html (limited to 'externals/glew-1.10.0/doc/basic.html') diff --git a/externals/glew-1.10.0/doc/basic.html b/externals/glew-1.10.0/doc/basic.html new file mode 100644 index 000000000..4419b33b0 --- /dev/null +++ b/externals/glew-1.10.0/doc/basic.html @@ -0,0 +1,283 @@ + + + + + + +GLEW: The OpenGL Extension Wrangler Library + + + + + + + + +
+ + + + + + + + +
+ + + + + + + +
Latest Release: 1.10.0

GLEW Logo

+ + + + + + + + + + + +
Download
Usage
Building
Installation
Source Generation
Credits & Copyright
Change Log
Project Page
Mailing Lists
Bug Tracker
+

+
+ + + + + +
Last Update: 07-22-13
+ OpenGL Logo + SourceForge Logo +
+
+
+ +

The OpenGL Extension Wrangler Library

+ + + + +

Initializing GLEW

+

+First you need to create a valid OpenGL rendering context and call +glewInit() to initialize the extension entry points. If +glewInit() returns GLEW_OK, the initialization +succeeded and you can use the available extensions as well as core +OpenGL functionality. For example: +

+ +

+#include <GL/glew.h>
+#include <GL/glut.h>
+...
+glutInit(&argc, argv);
+glutCreateWindow("GLEW Test");
+GLenum err = glewInit();
+if (GLEW_OK != err)
+{
+  /* Problem: glewInit failed, something is seriously wrong. */
+  fprintf(stderr, "Error: %s\n", glewGetErrorString(err));
+  ...
+}
+fprintf(stdout, "Status: Using GLEW %s\n", glewGetString(GLEW_VERSION));
+

+ +

Checking for Extensions

+ +

+Starting from GLEW 1.1.0, you can find out if a particular extension +is available on your platform by querying globally defined variables +of the form GLEW_{extension_name}: +

+ +

+if (GLEW_ARB_vertex_program)
+{
+  /* It is safe to use the ARB_vertex_program extension here. */
+  glGenProgramsARB(...);
+}
+

+ +

+In GLEW 1.0.x, a global structure was used for this task. To ensure +binary compatibility between releases, the struct was replaced with a +set of variables. +

+ +

+You can also check for core OpenGL functionality. For example, to +see if OpenGL 1.3 is supported, do the following: +

+ +

+if (GLEW_VERSION_1_3)
+{
+  /* Yay! OpenGL 1.3 is supported! */
+}
+

+ +

+In general, you can check if GLEW_{extension_name} or +GLEW_VERSION_{version} is true or false. +

+ +

+It is also possible to perform extension checks from string +input. Starting from the 1.3.0 release, use glewIsSupported +to check if the required core or extension functionality is +available: +

+ +

+if (glewIsSupported("GL_VERSION_1_4  GL_ARB_point_sprite"))
+{
+  /* Great, we have OpenGL 1.4 + point sprites. */
+}
+

+ +

+For extensions only, glewGetExtension provides a slower alternative +(GLEW 1.0.x-1.2.x). Note that in the 1.3.0 release +glewGetExtension was replaced with +glewIsSupported. +

+ +

+if (glewGetExtension("GL_ARB_fragment_program"))
+{
+  /* Looks like ARB_fragment_program is supported. */
+}
+

+ +

Experimental Drivers

+ +

+GLEW obtains information on the supported extensions from the graphics +driver. Experimental or pre-release drivers, however, might not +report every available extension through the standard mechanism, in +which case GLEW will report it unsupported. To circumvent this +situation, the glewExperimental global switch can be turned +on by setting it to GL_TRUE before calling +glewInit(), which ensures that all extensions with valid +entry points will be exposed. +

+ +

Platform Specific Extensions

+ +

+Platform specific extensions are separated into two header files: +wglew.h and glxew.h, which define the available +WGL and GLX extensions. To determine if a certain +extension is supported, query WGLEW_{extension name} or +GLXEW_{extension_name}. For example: +

+ +

+#include <GL/wglew.h>
+
+if (WGLEW_ARB_pbuffer)
+{
+  /* OK, we can use pbuffers. */
+}
+else
+{
+  /* Sorry, pbuffers will not work on this platform. */
+}
+

+ +

+Alternatively, use wglewIsSupported or +glxewIsSupported to check for extensions from a string: +

+ +

+if (wglewIsSupported("WGL_ARB_pbuffer"))
+{
+  /* OK, we can use pbuffers. */
+}
+

+ +

Utilities

+ +

+GLEW provides two command-line utilities: one for creating a list of +available extensions and visuals; and another for verifying extension +entry points. +

+ +

visualinfo: extensions and visuals

+ +

+visualinfo is an extended version of glxinfo. The +Windows version creates a file called visualinfo.txt, which +contains a list of available OpenGL, WGL, and GLU extensions as well +as a table of visuals aka. pixel formats. Pbuffer and MRT capable +visuals are also included. For additional usage information, type +visualinfo -h. +

+ +

glewinfo: extension verification utility

+ +

+glewinfo allows you to verify the entry points for the +extensions supported on your platform. The Windows version +reports the results to a text file called glewinfo.txt. The +Unix version prints the results to stdout. +

+ +

Windows usage:

+
glewinfo [-pf <id>]
+ +

where <id> is the pixel format 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.

+ + +
+ + -- cgit v1.2.3