Re: [osg-users] setUseVertexBufferObjects(true) has no effect

2010-07-27 Thread Fred Smith
Robert, OK, this works fine with the osg::Geometry I'm using now.
Paul, thanks, I'll have a look.

Cheers,
Fred

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





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] setUseVertexBufferObjects(true) has no effect

2010-07-26 Thread Fred Smith
Hi,

setUseVertexBufferObjects(true) has no effect for me with the code below:


Code:
osg::Geode* geode = new osg::Geode();
geode-addDrawable(new osg::ShapeDrawable(new 
osg::Cylinder(osg::Vec3(4.4f,0.0f,0.0f),1.0f,1.4f)));
geode-getDrawable(0)-setUseVertexBufferObjects(true);




When I run this code with an OpenGL API tracer, I can see display lists are 
still being used (glNewList to build the display list, then glCallList to use 
it).

This test is easy to reproduce with the osgShaders sample, in GL2Scene.cpp, 
CreateModel() can be changed to reflect the above code.

I guess I must be doing something wrong to make use of VBOs.

Any idea?

Cheers,
Fred

[/code]

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





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] setUseVertexBufferObjects(true) has no effect

2010-07-26 Thread Robert Osfield
Hi Fred,

ShapeDrawable does not support vertex buffer objects as the vertex
data is created on demand.

Robert.

On Mon, Jul 26, 2010 at 4:02 PM, Fred Smith osgfo...@tevs.eu wrote:
 Hi,

 setUseVertexBufferObjects(true) has no effect for me with the code below:


 Code:
 osg::Geode* geode = new osg::Geode();
 geode-addDrawable(new osg::ShapeDrawable(new 
 osg::Cylinder(osg::Vec3(4.4f,0.0f,0.0f),1.0f,1.4f)));
 geode-getDrawable(0)-setUseVertexBufferObjects(true);




 When I run this code with an OpenGL API tracer, I can see display lists are 
 still being used (glNewList to build the display list, then glCallList to use 
 it).

 This test is easy to reproduce with the osgShaders sample, in GL2Scene.cpp, 
 CreateModel() can be changed to reflect the above code.

 I guess I must be doing something wrong to make use of VBOs.

 Any idea?

 Cheers,
 Fred

 [/code]

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





 ___
 osg-users mailing list
 osg-users@lists.openscenegraph.org
 http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] setUseVertexBufferObjects(true) has no effect

2010-07-26 Thread Paul Martz
Hi Fred -- If you want some basic shape support combined with use of buffer 
objects, you should consider osgworks.googlecode.com, which contains convenience 
functions to create some basic shapes using osg::Geometry objects (which 
supports use of buffer objects). If you need shape metadata (sphere radius, box 
extents, etc) you can store that information as UserData on the Geometry objects.

   -Paul


Fred Smith wrote:

Hi,

setUseVertexBufferObjects(true) has no effect for me with the code below:


Code:
osg::Geode* geode = new osg::Geode();
geode-addDrawable(new osg::ShapeDrawable(new 
osg::Cylinder(osg::Vec3(4.4f,0.0f,0.0f),1.0f,1.4f)));
geode-getDrawable(0)-setUseVertexBufferObjects(true);




When I run this code with an OpenGL API tracer, I can see display lists are 
still being used (glNewList to build the display list, then glCallList to use 
it).

This test is easy to reproduce with the osgShaders sample, in GL2Scene.cpp, 
CreateModel() can be changed to reflect the above code.

I guess I must be doing something wrong to make use of VBOs.

Any idea?

Cheers,
Fred

[/code]

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





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org





--
  -Paul Martz  Skew Matrix Software
   http://www.skew-matrix.com/
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org