From 40632c97b037bcd76089df3cbecb452d3585b4af Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Fri, 7 Jan 2005 19:00:40 +0000 Subject: [PATCH] From Tree, moved GL_ #define's out of osg namespaces --- include/osg/Drawable | 19 ++++++++++--------- include/osg/State | 4 ++-- include/osg/StateAttribute | 12 ++++++------ include/osg/TexEnvFilter | 4 ++-- include/osg/TexGen | 4 ++-- 5 files changed, 22 insertions(+), 21 deletions(-) diff --git a/include/osg/Drawable b/include/osg/Drawable index 6a430a23c..a26c072d4 100644 --- a/include/osg/Drawable +++ b/include/osg/Drawable @@ -20,15 +20,6 @@ #include #include -namespace osg { - - -class Vec2f; -class Vec3f; -class Vec4f; -class UByte4; -class Geometry; - #ifndef GL_ARB_vertex_buffer_object // for compatibility with gl.h headers that don't support VBO, @@ -98,6 +89,16 @@ class Geometry; #endif + +namespace osg { + + +class Vec2f; +class Vec3f; +class Vec4f; +class UByte4; +class Geometry; + // this is defined to alter the way display lists are compiled inside the // the draw method, it has been found that the NVidia drivers fail completely // to optimize COMPILE_AND_EXECUTE in fact make it go slower than for no display diff --git a/include/osg/State b/include/osg/State index c3b8ac729..31221882b 100644 --- a/include/osg/State +++ b/include/osg/State @@ -26,8 +26,6 @@ #include #include -namespace osg { - #ifndef GL_TEXTURE0 #define GL_TEXTURE0 0x84C0 #endif @@ -48,6 +46,8 @@ namespace osg { #endif #endif +namespace osg { + /** macro for use with osg::StateAttribute::apply methods for detecting and * reporting OpenGL error messages.*/ #define OSG_GL_DEBUG(message) \ diff --git a/include/osg/StateAttribute b/include/osg/StateAttribute index 70540d9d8..98ae40957 100644 --- a/include/osg/StateAttribute +++ b/include/osg/StateAttribute @@ -21,6 +21,12 @@ #include #include +// define for the GL_EXT_secondary_color extension, GL_COLOR_SUM is OpenGL +// mode to be used to enable and disable the second color. +#ifndef GL_COLOR_SUM +#define GL_COLOR_SUM 0x8458 +#endif + namespace osg { @@ -59,12 +65,6 @@ class StateSet; if (rhs.parameter #include -namespace osg { - #ifndef GL_EXT_texture_lod_bias #define GL_MAX_TEXTURE_LOD_BIAS_EXT 0x84FD #define GL_TEXTURE_FILTER_CONTROL_EXT 0x8500 #define GL_TEXTURE_LOD_BIAS_EXT 0x8501 #endif +namespace osg { + /** TexEnvFilter - encapsulates the OpenGL glTexEnv (GL_TEXTURE_FILTER_CONTROL) state.*/ class SG_EXPORT TexEnvFilter : public StateAttribute { diff --git a/include/osg/TexGen b/include/osg/TexGen index f4d53d0e6..5ce7f4361 100644 --- a/include/osg/TexGen +++ b/include/osg/TexGen @@ -17,8 +17,6 @@ #include #include -namespace osg { - #ifndef GL_NORMAL_MAP_ARB #define GL_NORMAL_MAP_ARB 0x8511 #endif @@ -27,6 +25,8 @@ namespace osg { #define GL_REFLECTION_MAP_ARB 0x8512 #endif +namespace osg { + /** TexGen encapsulates the OpenGL glTexGen (texture coordinate generation) * state.*/ class SG_EXPORT TexGen : public StateAttribute