From Paul Martz, changes for compiling against OpenGL 3.x

This commit is contained in:
Robert Osfield
2009-11-03 16:34:54 +00:00
parent 8d67c9bb33
commit 72ff1f40f9
22 changed files with 87 additions and 32 deletions

View File

@@ -31,6 +31,11 @@
#define GL_CLAMP_FRAGMENT_COLOR GL_CLAMP_FRAGMENT_COLOR_ARB
#endif
#if defined(OSG_GL3_AVAILABLE)
#define GL_CLAMP_VERTEX_COLOR 0x891A
#define GL_CLAMP_FRAGMENT_COLOR 0x891B
#endif
namespace osg {
/** Encapsulates OpenGL ClampColor state. */

View File

@@ -87,6 +87,11 @@
#include <GLES2/gl2.h>
#elif defined(OSG_GL3_AVAILABLE)
#define GL3_PROTOTYPES 1
#include <GL3/gl3.h>
#else
#ifndef __gl_h_
@@ -145,12 +150,17 @@
#define GL_NONE 0x0
#endif
#if defined(OSG_GLES1_AVAILABLE) || defined(OSG_GLES2_AVAILABLE)
#if defined(OSG_GLES1_AVAILABLE) || defined(OSG_GLES2_AVAILABLE) || defined(OSG_GL3_AVAILABLE)
#define GL_POLYGON 0x0009
#define GL_QUADS 0x0007
#define GL_QUAD_STRIP 0x0008
#endif
#if defined(OSG_GL3_AVAILABLE)
#define GL_LUMINANCE 0x1909
#define GL_LUMINANCE_ALPHA 0x190A
#endif
#ifdef OSG_GLES1_AVAILABLE
inline void glColor4ubv(const GLubyte* c) { glColor4ub(c[0], c[1], c[2], c[3]); }
inline void glColor3fv(const GLfloat* c) { glColor4f(c[0], c[1], c[2], 1.0f); }

View File

@@ -17,7 +17,7 @@
#include <osg/Plane>
#include <osg/StateAttribute>
#if defined(OSG_GLES1_AVAILABLE) || defined(OSG_GLES2_AVAILABLE)
#if defined(OSG_GLES1_AVAILABLE) || defined(OSG_GLES2_AVAILABLE) || defined(OSG_GL3_AVAILABLE)
#define GL_OBJECT_LINEAR 0x2401
#define GL_EYE_LINEAR 0x2400
#define GL_SPHERE_MAP 0x2402