View Full Version : "GlEnum mode" argument in osg::DrawElements

06-15-2010, 06:11 AM
Hi I am using OpenSceneGraph to create simple graphics programs. I have a small issue on this constructor:

osg::DrawElements::DrawElements (Type primType = PrimitiveType, GLenum mode = 0, int numInstances = 0)

What does the GLenum mode = 0 part of the constructor mean? I have tried Google for the answer but I couldn't find a straightforward answer.



carsten neumann
06-15-2010, 08:57 AM
You should ask questions about OpenSceneGraph on that projects forums/mailing lists.

From a quick look at OpenSceneGraphs code it looks as if the mode argument has the same meaning as for the glDrawElements() OpenGL function: it chooses what type of geometry is to be draw (points, lines, triangles, etc.).

Dark Photon
06-15-2010, 05:38 PM
What does the GLenum mode = 0 part of the constructor mean?
carsten got you on this one. In the future, use the source, Luke.
http://www.openscenegraph.org/svn/osg/Op...rimitiveSet.cpp (http://www.openscenegraph.org/svn/osg/OpenSceneGraph/tags/OpenSceneGraph-2.9.6/src/osg/PrimitiveSet.cpp)

That's what it's there for. Or get their Quick Start Guide.