Closed aconstlink closed 4 months ago
Here it comes.
The problem is when a geometry object is used with multiple shaders, even is only one shader is uesed, where the vertex array object stores the bindings and in the second shader compiled, does not use an attribute, so the binding is invalidated and removed from the vertex array object.
There is only one solution to this. vertex array objects need to be stored per render object. A render object requires a shader and a geometry to work. So the binding of the vertex buffer attribute to the shader location should be stored there.
When using streamout/transform feedback, the order of the vertex buffer attributes seem to violate the order of bound location.
For example,
at program linkage those variables are coming in the opposite order but the locations are correct. glGetActiveAttrib gives the order
color
thenpos
like so0 ->
color
with location 1 1 ->pos
with location 0The violation is that somehow now the color in the vertex buffer is getting bound to pos in the shader.
In the test scenario, there is only one shader used which is the transform feedback test shader.