Added includes for OpenGL ES1 and ES2.

This commit is contained in:
Robert Osfield 2009-10-23 16:51:45 +00:00
parent 327b67a305
commit a7cb28b166

View File

@ -14,16 +14,9 @@
#ifndef OSG_GL
#define OSG_GL 1
#ifndef WIN32
#include <osg/Config>
// Non Windows, doesn't require nonsense as seen below :-)
#ifndef __gl_h_
#ifdef __APPLE__
#include <OpenGL/gl.h>
#else
#include <GL/gl.h>
#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 <GL/gl.h>
#endif
#endif // WIN32
#if defined(OSG_GLES1_AVAILABLE)
#include <GLES/gl.h>
#elif defined(OSG_GLES2_AVAILABLE)
#include <GLES2/gl2.h>
#else
#ifndef __gl_h_
#ifdef __APPLE__
#include <OpenGL/gl.h>
#else
#include <GL/gl.h>
#endif
#endif
#endif
#ifdef OSG_GL_MATRICES_AVAILABLE
inline void glLoadMatrix(const float* mat) { glLoadMatrixf(static_cast<const GLfloat*>(mat)); }
inline void glLoadMatrix(const double* mat) { glLoadMatrixd(static_cast<const GLdouble*>(mat)); }
inline void glMultMatrix(const float* mat) { glMultMatrixf(static_cast<const GLfloat*>(mat)); }
inline void glMultMatrix(const double* mat) { glMultMatrixd(static_cast<const GLdouble*>(mat)); }
#endif
#endif // __osgGL_h