Robert,

Could you please explain what you mean by "slow path" in this case? I was
under the impression that glDrawElements and glDrawArrays were basically the
same except that the former expects indices and the latter assumes your
verts are in order.

Thanks for the clarification. -gw

On Nov 15, 2007 7:04 AM, Robert Osfield <[EMAIL PROTECTED]> wrote:

> Hi Joakim,
>
> Always prefer osg::DrawElements* over vertex indices and DrawArrays as
> the later will force the OSG to dispatch using OpenGL slow paths.
> glDrawElements/osg::DrawElements is by far the best way to dispatch
> data to OpenGL.
>
> Robert.
>
> On Nov 15, 2007 11:28 AM, Joakim Simonsson <[EMAIL PROTECTED]> wrote:
> >
> > Hi,
> >
> > I want to generate a grid. I have done this with triangle strips, but I
> > want to try to do it with the triangle primitive instead.
> >
> > Is it possible to define vertices in one array, and vertex-indices in
> > another array that forms the triangles, for example:
> >
> > The indices:
> >
> > 00 01 02 03
> > 04 05 06 07
> > 08 09 10 11
> > 12 13 14 15
> >
> > The index array: { 00, 04, 01, 01, 04, 05, ..., 11, 14, 15 }
> >
> > In the osgGeometry example this approach is not used. Is it because it
> is
> > not supported by OpenGL or OpenSceneGraph?
> >
> > How should I build up my grid in the best way when it comes to
> > performance? My grid is approx 100x100.
> >
> >
> > --
> > Joakim Simonsson
> > _______________________________________________
> > osg-users mailing list
> > [email protected]
> >
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
> >
> _______________________________________________
> osg-users mailing list
> [email protected]
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>



-- 
Glenn Waldron : Pelican Mapping : http://pelicanmapping.com : 703-652-4791
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to