1
0
Fork 0
mirror of https://github.com/gwm17/glfw.git synced 2024-11-23 02:38:52 -05:00

Added GLFW_INCLUDE_GLEXT for glext.h inclusion.

Closes #365.
This commit is contained in:
Camilla Berglund 2014-10-13 23:56:03 +02:00
parent 6a3779d635
commit b140606a49
5 changed files with 31 additions and 6 deletions

View File

@ -85,9 +85,14 @@ header. This is useful in combination with an extension loading library.
If none of the above inclusion macros are defined, the standard OpenGL `GL/gl.h`
header (`OpenGL/gl.h` on OS X) is included.
`GLFW_INCLUDE_GLEXT` makes the GLFW header include the appropriate extension
header for the OpenGL or OpenGL ES header selected above after and _in addition
to_ that header.
`GLFW_INCLUDE_GLU` makes the header include the GLU header _in addition to_ the
header selected above. This should only be used with legacy code. GLU has been
deprecated and should not be used in new code.
header selected above. This should only be used with the standard OpenGL header
and only for legacy code. GLU has been deprecated and should not be used in new
code.
@note GLFW does not provide any of the API headers mentioned above. They must
be provided by your development environment or your OpenGL or OpenGL ES SDK.

View File

@ -146,8 +146,13 @@ extern "C" {
#if defined(__APPLE_CC__)
#if defined(GLFW_INCLUDE_GLCOREARB)
#include <OpenGL/gl3.h>
#if defined(GLFW_INCLUDE_GLEXT)
#include <OpenGL/gl3ext.h>
#endif
#elif !defined(GLFW_INCLUDE_NONE)
#if !defined(GLFW_INCLUDE_GLEXT)
#define GL_GLEXT_LEGACY
#endif
#include <OpenGL/gl.h>
#endif
#if defined(GLFW_INCLUDE_GLU)
@ -158,14 +163,29 @@ extern "C" {
#include <GL/glcorearb.h>
#elif defined(GLFW_INCLUDE_ES1)
#include <GLES/gl.h>
#if defined(GLFW_INCLUDE_GLEXT)
#include <GLES/glext.h>
#endif
#elif defined(GLFW_INCLUDE_ES2)
#include <GLES2/gl2.h>
#if defined(GLFW_INCLUDE_GLEXT)
#include <GLES2/gl2ext.h>
#endif
#elif defined(GLFW_INCLUDE_ES3)
#include <GLES3/gl3.h>
#if defined(GLFW_INCLUDE_GLEXT)
#include <GLES3/gl2ext.h>
#endif
#elif defined(GLFW_INCLUDE_ES31)
#include <GLES3/gl31.h>
#if defined(GLFW_INCLUDE_GLEXT)
#include <GLES3/gl2ext.h>
#endif
#elif !defined(GLFW_INCLUDE_NONE)
#include <GL/gl.h>
#if defined(GLFW_INCLUDE_GLEXT)
#include <GL/glext.h>
#endif
#endif
#if defined(GLFW_INCLUDE_GLU)
#include <GL/glu.h>

View File

@ -29,8 +29,8 @@
//
//========================================================================
#define GLFW_INCLUDE_GLEXT
#include <GLFW/glfw3.h>
#include <GL/glext.h>
#include <stdio.h>
#include <stdlib.h>

View File

@ -29,8 +29,8 @@
//
//========================================================================
#define GLFW_INCLUDE_GLEXT
#include <GLFW/glfw3.h>
#include <GL/glext.h>
#include <stdio.h>
#include <stdlib.h>

View File

@ -29,8 +29,8 @@
//
//========================================================================
#define GLFW_INCLUDE_GLEXT
#include <GLFW/glfw3.h>
#include <GL/glext.h>
#include <stdio.h>
#include <stdlib.h>