From a7cb28b166a4263dac5b259f8f1fad8901292c14 Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Fri, 23 Oct 2009 16:51:45 +0000 Subject: [PATCH] Added includes for OpenGL ES1 and ES2. --- include/osg/GL | 39 +++++++++++++++++++++++++-------------- 1 file changed, 25 insertions(+), 14 deletions(-) diff --git a/include/osg/GL b/include/osg/GL index 78fc3a8fc..6f21c528f 100644 --- a/include/osg/GL +++ b/include/osg/GL @@ -14,16 +14,9 @@ #ifndef OSG_GL #define OSG_GL 1 -#ifndef WIN32 +#include - // Non Windows, doesn't require nonsense as seen below :-) - #ifndef __gl_h_ - #ifdef __APPLE__ - #include - #else - #include - #endif - #endif +#ifndef WIN32 // Required for compatibility with glext.h sytle function definitions of // OpenGL extensions, such as in src/osg/Point.cpp. @@ -84,16 +77,34 @@ #define _WCHAR_T_DEFINED #endif - #ifndef __gl_h_ - #include - #endif - #endif // WIN32 +#if defined(OSG_GLES1_AVAILABLE) + + #include + +#elif defined(OSG_GLES2_AVAILABLE) + + #include + +#else + + #ifndef __gl_h_ + #ifdef __APPLE__ + #include + #else + #include + #endif + #endif + +#endif + + +#ifdef OSG_GL_MATRICES_AVAILABLE inline void glLoadMatrix(const float* mat) { glLoadMatrixf(static_cast(mat)); } inline void glLoadMatrix(const double* mat) { glLoadMatrixd(static_cast(mat)); } inline void glMultMatrix(const float* mat) { glMultMatrixf(static_cast(mat)); } inline void glMultMatrix(const double* mat) { glMultMatrixd(static_cast(mat)); } - +#endif #endif // __osgGL_h