Hi James,

On 14 January 2014 22:37, James Turner <[email protected]> wrote:

> What is the mechanism by which the compile step happens for a Geometry (or
> any Drawable) added to the scene after setSceneData and the
> CompileOnNextDraw mechanism? Because I’m not seeing it from a static
> reading of the code (but of course I can have missed it), and the runtime
> result I observe suggests it’s not occurring either.
>

A compile traversal doesn't happen every frame, it happens by default on
the first frame of rendering and when the pager uses the
osgDB::IncrementalCompileOperator.  It's the compile traversal that calls
the compileGLObjects() method.


> (Of course, if the compile step isn’t necessary for VBOs to work, this is
> a red-herring anyway)
>

If compile traversal isn't called for an object it'll just compile what is
required when the geometry is rendered, so there is no functional need to
force a compile traversal.  One uses a compile traversal for performance
and load balancing reasons, something that is usually only critical for
real-time visualization applications such as games and simulators.


>
> The meta-point is that I don’t see any performance change when enabling
> VBOs, and the profiler results on Mac suggest that the Geometry in question
> is still on the traditional (non-VBO) glDrawArrays path. In my specific
> case VBOs may or may not help a particular performance problem, but most of
> the ways I can imagine to fix my user-level issue will work much better if
> VBOs are actually working as expected.
>

glDrawArrays can be used when using VBO's without any problems, they are
completely compatible in OpenGL and the OSG.

Robert.
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to