[osg-users] Mesh generation using Vertex Buffer and Index Buffer in OpenSceneGraph

Rajesh.R osgforum at tevs.eu
Thu Mar 12 07:25:36 PDT 2009


Assume that I have a Vertex Buffer and Index Buffer, Using OpenSceneGraph, Can I render a mesh, Similar to the way, we use 
glVertexBuffer and glIndexBuffer and glDrawElements in OpenGL,  to render a  mesh.  

or Using glVertex3fv in the following way


Code:


glBegin(GL_TRIANGLES);
for (i = 0; i < 20; i++) {
/* color information here */
glVertex3fv(&vdata[tindices[i][0]][0]);
glVertex3fv(&vdata[tindices[i][1]][0]);
glVertex3fv(&vdata[tindices[i][2]][0]);
}
glEnd();




Are there any commands, similar to glVertexBuffer,  glIndexBuffer glDrawElements and  glVertex3fv.

I tried with osgDeluanay, but not getting the correct output. 

Please consider this a newbie question.

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








More information about the osg-users mailing list