I can get my square if vertices reside in attribute slot number 0, not 6.

But in this case, my shader needs to be:


Code:
// vertex shader
#version 150

uniform mat4 osg_ModelViewProjectionMatrix;
in vec3 in_vertex;

void main(void)
{
   gl_Position = osg_ModelViewProjectionMatrix * gl_Vertex; // gl_Vertex here, 
not 'in_vertex'
} 




My understanding is that gl_Vertex automatically maps to attribute index 0 with 
GL 2.x. What I do not understand, however, is why replacing 'gl_Vertex' with 
'in_vertex' does not work - it should do exactly the same.

My aim being to work with a GL3 context, I'm now going to test this code with 
OSG_GL3_AVAILABLE. There, I should not be able to use gl_Vertex at all, so I 
expect in_vertex to work. If it doesn't, I'll really, really be puzzled.

Fred

------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=37994#37994





_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to