Hi, Perfect, osgUtil::GLObjectsVisitor is just what I was looking for!
However, I still wonder about the first part of my question. Are VBOs inevitable when using State::setUseVertexAttributeAliasing? It seems that otherwise OSG is trying to call glVertexAttribPointer with a raw pointer rather than a VBO offset, ultimately failing to render the object ('invalid framebuffer operation' and the object does not show up). Cheers, Peter On Tue, Mar 5, 2013 at 9:55 AM, Sergey Polischuk <pol...@yandex.ru> wrote: > Hi > > you can use osgUtil::GLObjectsVisitor, it have option to enable vbos on > drawables. > > Cheers. > > 05.03.2013, 04:07, "peter klosowski" <klo...@gmail.com>: > > Hi, > > In order to use modern shaders (without built-in OpenGL > uniforms/attributes) it is necessary > call State::setUseModelViewAndProjectionUniforms and > State::setUseVertexAttributeAliasing. This provides a bridge to the old > fixed-function approach, using a well defined set of names for sending the > respective values to the shaders. Therefore, it is possible to seamlessly > use existing OSG classes (Transformations, Geometries etc.). > > However, my question is the following: Does > State::setUseVertexAttributeAliasing also require to enable VBOs via > Geometry::setUseVertexBufferObjects? In my attached example, failing to do > so produces a warning and the object is not drawn: > > Warning: detected OpenGL error 'invalid framebuffer operation' at After > Renderer::compile > > Is it really necessary to manually enable VBOs for each geometry that is > rendered using such a shader? In particular, what about 3d models that are > imported with osgDB? What would be an elegant way to enable VBOs for all > geometries? > > Cheers, > Peter > , > > _______________________________________________ > 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 > >
_______________________________________________ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org