Hi Fred, Am 25.03.2011 11:52, schrieb Fred Smith: > Things work if I call setVertexArray. I mean that I have to call > setVertexArray, in addition to setVertexAttribArray, even though my shader is > solely based on vertex attribute data and doesn't use GL2-style dedicated > vertex coordinates data. > > > Code: > // This line should not be needed but seems required > geom.setVertexArray(vertices); > > geom.setVertexAttribArray(verticesLoc, vertices); > > > > Is this expected? If I compile and use OSG with GL3 core profile support, > will this still be required (again, it shouldn't)?
This hints again to a faulty bounding box calculation. I you setup a VertexArray OSG uses this to calculate the bounding box. You already said that you provide the bounding box (callback) yourself, so maybe you still have some error there (it was not included in you original post). > On the GL trace side I don't see anything wrong when I don't call > setVertexArray: > > glVertexAttribPointer(...); > glDrawElements(...); > > When I also specify a vertex array the glVertexPointer call obviously seems > superfluous: > > glVertexPointer(...); // pointless > glVertexAttribPointer(...); // ok > glDrawElements(...); Can you compare the traces of the working and the non-working version? If so, can you spot differences in the values of osg_ModelViewProjectionMatrix? > Other custom vertex attributes that I tried to use to pass through color data > behave fine. Vertex coordinates seem to be treated specially in OSG. > > Cheers, > Fred Cheers, Peter -- Vorstand/Board of Management: Dr. Bernd Finkbeiner, Dr. Roland Niemeier, Dr. Arno Steitz, Dr. Ingrid Zech Vorsitzender des Aufsichtsrats/ Chairman of the Supervisory Board: Michel Lepert Sitz/Registered Office: Tuebingen Registergericht/Registration Court: Stuttgart Registernummer/Commercial Register No.: HRB 382196 _______________________________________________ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org