GLSL shader problem

I’d just like to clear up some things at this point:

All gl_Whatever inputs are supposed to work. They access the vertex attributes and state attributes that were set using the fixed-function pipeline.

p3d_Whatever inputs exist to support OpenGL profiles that do not support the fixed-function pipeline any more, and thus require custom vertex attributes (a ‘vertex’ column has no special meaning in a programmable pipeline, it depends on what you do with it in the shader). We use p3d_ prefix to mimic the analogous gl_ inputs, so that the user isn’t required setting all these matrices and vertex arrays using setShaderInput.
(For the record, though, the only profile that Panda currently supports that does not support FFP is OpenGL ES 2, which is only relevant for mobile devices, so one could go perfectly without p3d_ variables under regular OpenGL.)

Unlike GLSL, Cg does not provide access to the attributes that were set via the fixed-function pipeline. Well, it does in some profiles, but not universally, and I don’t think Panda even supports those kinds of syntaxes.

FFP vertex attributes (gl_Vertex, gl_Normal, glMultiTexCoord0, …) do not work any more as of 1.8.0, due to an unintended bug that I had spawned when fixing another.

Sometime before 1.8.0 was released, someone reported a bug that custom vertex arrays weren’t working. Naively, I thought that simply returning true from uses_custom_vertex_arrays would be the fix, but I did not realise that it would break vertex attributes that start with gl_.

Unfortunately, because gl_-prefixed inputs are not accessible to Panda, it looks like we’ll need to support both accessing all of the fixed-function attributes and also all of the custom stuff, ugh. I’ll look more into the issue as soon as I have the time.

gl_Texture0 is supposed to work, so I’ll look into that as well.