Browse Source

glsl: fix issue with vertex colors not showing up

rdb 8 years ago
parent
commit
ce736ad093
1 changed files with 2 additions and 2 deletions
  1. 2 2
      panda/src/glstuff/glShaderContext_src.cxx

+ 2 - 2
panda/src/glstuff/glShaderContext_src.cxx

@@ -2194,7 +2194,7 @@ update_shader_vertex_arrays(ShaderContext *prev, bool force) {
     // Figure out which attributes to enable or disable.
     BitMask32 enabled_attribs = _enabled_attribs;
     if (_color_attrib_index != -1 &&
-        color_attrib->get_type() != ColorAttrib::T_vertex) {
+        color_attrib->get_color_type() != ColorAttrib::T_vertex) {
       // Vertex colours are disabled.
       enabled_attribs.clear_bit(_color_attrib_index);
 
@@ -2247,7 +2247,7 @@ update_shader_vertex_arrays(ShaderContext *prev, bool force) {
       // Don't apply vertex colors if they are disabled with a ColorAttrib.
       int num_elements, element_stride, divisor;
       bool normalized;
-      if ((p != _color_attrib_index || color_attrib->get_type() == ColorAttrib::T_vertex) &&
+      if ((p != _color_attrib_index || color_attrib->get_color_type() == ColorAttrib::T_vertex) &&
           _glgsg->_data_reader->get_array_info(name, array_reader,
                                                num_values, numeric_type,
                                                normalized, start, stride, divisor,