Re: [osg-users] Multiple MatrixTransforms, single geometry

2012-05-22 Thread Fred Smith
Thanks, I will just do this. I'm a bit fuzzy as to what is or isn't part of the state in OSG (osg::StateSet, things deriving from osg::StateAttribute, which buffer objects aren't). I guess the rule is that everything that IS part of the state in OpenGL also is part of the state in OSG. Fred

Re: [osg-users] Multiple MatrixTransforms, single geometry

2012-05-22 Thread Robert Osfield
Hi Fred, On 22 May 2012 06:53, Fred Smith osgfo...@tevs.eu wrote: I'm a bit fuzzy as to what is or isn't part of the state in OSG (osg::StateSet, things deriving from osg::StateAttribute, which buffer objects aren't). I guess the rule is that everything that IS part of the state in OpenGL

[osg-users] Multiple MatrixTransforms, single geometry

2012-05-21 Thread Fred Smith
Hi, I have some geometry that is making use of a VBO. The VBO contains an extremely large number of vertices. Similarly, I have an element buffer (EBO) that contains a large amount of indices. I need to render some objects that reference selected vertices of the VBO and selected indices of the

Re: [osg-users] Multiple MatrixTransforms, single geometry

2012-05-21 Thread David Callu
Hi Fred Take a look to osg::Array::setVertexBufferObject to assign VertexBufferObject to an array, and to osg::Geometry::get(Vertex | Color | ... | Attrib)Array() to get access to arrays then Take a look to osg::DrawElement::setElementBufferObject to assign ElementBufferObject and

Re: [osg-users] Multiple MatrixTransforms, single geometry

2012-05-21 Thread Fred Smith
Hi David, Thanks for the quick reply! ledocc wrote: I already have to do this kind of optimization, I have used a NodeVisitor to traverse the graph and assign VBO and EBO to geometries. Sounds like you are reusing the same VBO/EBO for all geometries. Did you check that OSG is indeed not

Re: [osg-users] Multiple MatrixTransforms, single geometry

2012-05-21 Thread David Callu
Hi Fred ledocc wrote: I already have to do this kind of optimization, I have used a NodeVisitor to traverse the graph and assign VBO and EBO to geometries. Sounds like you are reusing the same VBO/EBO for all geometries. Yes I did Did you check that OSG is indeed not