Hi Paul,
Thanks for the input. 

I use my own camera class, which handles the view and projection matrices so 
they should be ok (I even stepped through the OSG code to verify that they are 
actually being used and that seems to be the case). Also, I use 
DO_NOT_COMPUTE_NEAR_FAR for the viewer's camera so that I can determine that 
myself.

As for the bounding volume of the drawable, that should be taken care of by the 
solution above. Just in case, I set the initial bound (and overrode the 
computeBounds() method) to a nice big box. This resulted in no change, however 
:/

Basically, in the current puzzling state, this works in OSG:


Code:

glEnableClientState(GL_VERTEX_ARRAY);
glVertexPointer(4, GL_FLOAT, 0, vertices);
glDrawArrays(GL_POINTS, 0, numPrims);
glDisableClientState(GL_VERTEX_ARRAY);




while this does not


Code:

extensions->glBindBuffer(GL_ARRAY_BUFFER_ARB, vbo);

glEnableClientState(GL_VERTEX_ARRAY);
glVertexPointer(4, GL_FLOAT, 0, 0);
glDrawArrays(GL_POINTS, 0, numPrims);
glDisableClientState(GL_VERTEX_ARRAY);

extensions->glBindBuffer(GL_ARRAY_BUFFER_ARB, 0);




even though the only real difference is that the second version includes 
binding and unbinding of a vertex buffer object. What this has to do with the 
view/projection matrices is beyond me... Of course, it is quite likely that I 
am missing a tiny but very significant detail :D

Regards,
Mattias

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





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

Reply via email to