1.9.4 and Vertex Colours

Hmm… I seem to have hit a snag:

I have a particular model that includes vertex colours. It worked as expected under the standard version of 1.9.4. Under my custom build, I seem to get white instead of the expected colours. Other objects seem to work as expected–although it’s possible that I’ve missed one or more that don’t.

Examination of the code and a quick experiment seem to indicate that the problem lies with the the first part of the “if”-statement below, from glShaderContext_src.cxx:

int num_elements, element_stride, divisor;
      bool normalized;
      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,
num_elements, element_stride)) {

That is, if I remove “(p != _color_attrib_index || color_attrib->get_color_type() == ColorAttrib::T_vertex) &&” from the above, I seem to get vertex colours as expected.

Given this, where do you think that the problem lies? Am I perhaps missing some other piece of code that would set something in that “if”-statement correctly?

I note that the problematic section doesn’t seem to have been present in baseline 1.9.4; would it be safe to simply omit it in my build, do you think?