diff --git a/include/osg/GL b/include/osg/GL index 585343a70..17e95c5ed 100644 --- a/include/osg/GL +++ b/include/osg/GL @@ -37,14 +37,6 @@ #include #endif -#elif defined(OSG_GL3_AVAILABLE) - - #define GL3_PROTOTYPES 1 - #include - - #ifndef GL_APIENTRY - #define GL_APIENTRY APIENTRY - #endif // GL_APIENTRY #else @@ -111,14 +103,21 @@ #endif // WIN32 - #ifndef __gl_h_ - #ifdef __APPLE__ - #include - #else - #include + #if defined(OSG_GL3_AVAILABLE) + + #define GL3_PROTOTYPES 1 + #include + + #else + #ifndef __gl_h_ + #ifdef __APPLE__ + #include + #else + #include + #endif #endif #endif - + #ifndef GL_APIENTRY #define GL_APIENTRY APIENTRY #endif // GL_APIENTRY