In panda/src/glstuff/glGraphicsStateGuardian_src.cxx GLGraphicsStateGuardian::begin_draw_primitives - it assumes this is a Cg shader and not GLSL if GLShaderContext ::uses_custom_vertex_arrays returns true.
if (_current_shader_context == 0 || !_current_shader_context->uses_custom_vertex_arrays()) {
// No shader, or a non-Cg shader.
if (_vertex_array_shader_context != 0) {
_vertex_array_shader_context->disable_shader_vertex_arrays(this);
}
if (!update_standard_vertex_arrays(force)) {
return false;
}
} else {
// Cg shader.
If I force uses_custom_vertex_arrays() to return false, the shader works. But if it uses a a texure (uniform sampler2D tex_0), the texture is all black. So something else seems to be broken with texture bindings when using GLSL.