diff --git a/panda/src/crgsg/crGeomNodeContext.h b/panda/src/crgsg/crGeomNodeContext.h index a4cb8e3c12..9315b7cff6 100644 --- a/panda/src/crgsg/crGeomNodeContext.h +++ b/panda/src/crgsg/crGeomNodeContext.h @@ -37,7 +37,6 @@ #include "cr_glwrapper.h" #include "cr_applications.h" #include "cr_spu.h" -///////#include "cr_glstate.h" extern SPUDispatchTable chromium; #include diff --git a/panda/src/crgsg/crGraphicsStateGuardian.I b/panda/src/crgsg/crGraphicsStateGuardian.I index 44da35f91f..8e53352af8 100644 --- a/panda/src/crgsg/crGraphicsStateGuardian.I +++ b/panda/src/crgsg/crGraphicsStateGuardian.I @@ -1037,23 +1037,7 @@ get_current_alpha_scale() const { //////////////////////////////////////////////////////////////////// INLINE GLenum CRGraphicsStateGuardian::get_light_id(int index) const { - switch( index ) - { - case 0: return GL_LIGHT0; - case 1: return GL_LIGHT1; - case 2: return GL_LIGHT2; - case 3: return GL_LIGHT3; - case 4: return GL_LIGHT4; - case 5: return GL_LIGHT5; - case 6: return GL_LIGHT6; - case 7: return GL_LIGHT7; - default: - crgsg_cat.error() - << "get_light_id() - we don't currently support ids " - << "> 8" << endl; - break; - } - return GL_LIGHT0; + return GL_LIGHT0 + index; } //////////////////////////////////////////////////////////////////// @@ -1088,9 +1072,9 @@ get_clip_plane_id(int index) const { //////////////////////////////////////////////////////////////////// INLINE void CRGraphicsStateGuardian:: issue_scene_graph_color() { - if (_issued_color_stale) { + if (_scene_graph_color_stale) { issue_transformed_color(_scene_graph_color); - _issued_color_stale = false; + _scene_graph_color_stale = false; } } diff --git a/panda/src/crgsg/crGraphicsStateGuardian.cxx b/panda/src/crgsg/crGraphicsStateGuardian.cxx index 9d26a58e92..2ec5444351 100644 --- a/panda/src/crgsg/crGraphicsStateGuardian.cxx +++ b/panda/src/crgsg/crGraphicsStateGuardian.cxx @@ -2507,7 +2507,7 @@ issue_color_transform(const ColorMatrixTransition *attrib) { _color_transform_enabled = true; } - _issued_color_stale = _has_scene_graph_color; + _scene_graph_color_stale = _has_scene_graph_color; } //////////////////////////////////////////////////////////////////// @@ -2526,7 +2526,7 @@ issue_alpha_transform(const AlphaTransformTransition *attrib) { _alpha_transform_enabled = true; } - _issued_color_stale = _has_scene_graph_color; + _scene_graph_color_stale = _has_scene_graph_color; } //////////////////////////////////////////////////////////////////// @@ -2560,21 +2560,21 @@ issue_color(const ColorTransition *attrib) { _scene_graph_color = attrib->get_color(); _has_scene_graph_color = true; _vertex_colors_enabled = false; - _issued_color_stale = true; + _scene_graph_color_stale = true; } else { // The color attribute is "on" but not "real": it specifies that // no scene graph color is in effect, but vertex color is not // important either. _has_scene_graph_color = false; - _issued_color_stale = false; + _scene_graph_color_stale = false; _vertex_colors_enabled = false; } } else { // The color attribute is "off": it specifies that vertex color // should be revealed. _has_scene_graph_color = false; - _issued_color_stale = false; + _scene_graph_color_stale = false; _vertex_colors_enabled = true; } } diff --git a/panda/src/crgsg/crGraphicsStateGuardian.h b/panda/src/crgsg/crGraphicsStateGuardian.h index eb894bc8f7..17bc7620aa 100644 --- a/panda/src/crgsg/crGraphicsStateGuardian.h +++ b/panda/src/crgsg/crGraphicsStateGuardian.h @@ -53,7 +53,6 @@ #include "cr_glwrapper.h" #include "cr_applications.h" #include "cr_spu.h" -///////#include "cr_glstate.h" extern SPUDispatchTable chromium; @@ -61,7 +60,7 @@ extern SPUDispatchTable chromium; class PlaneNode; class Light; -#ifdef GSG_VERBOSE +#if !defined(WIN32) && defined(GSG_VERBOSE) ostream &output_cr_enum(ostream &out, GLenum v); INLINE ostream &operator << (ostream &out, GLenum v) { return output_cr_enum(out, v); diff --git a/panda/src/crgsg/crTextureContext.h b/panda/src/crgsg/crTextureContext.h index 734ddd7853..976a716f0f 100644 --- a/panda/src/crgsg/crTextureContext.h +++ b/panda/src/crgsg/crTextureContext.h @@ -37,7 +37,6 @@ #include "cr_glwrapper.h" #include "cr_applications.h" #include "cr_spu.h" -///////#include "cr_glstate.h" extern SPUDispatchTable chromium; #include diff --git a/panda/src/crgsg/create_crgsg.py b/panda/src/crgsg/create_crgsg.py index 73ec6df66b..6c880a1475 100755 --- a/panda/src/crgsg/create_crgsg.py +++ b/panda/src/crgsg/create_crgsg.py @@ -40,7 +40,6 @@ conversion=( #include "cr_glwrapper.h" #include "cr_applications.h" #include "cr_spu.h" -///////#include "cr_glstate.h" extern SPUDispatchTable chromium; """), ("(TypeHandle CRGraphicsStateGuardian::_type_handle;)", "\\1\nSPUDispatchTable chromium;"),