On 11/14/06, Robert Osfield <[EMAIL PROTECTED]> wrote:
It'll be interesting to see how the performance of osgLua/osgPython work
out. osgIntrospection itself adds an overhead too, but then any adaption
between different languages will have an overhead.
Method calls are pretty fast, but instance creation is really SLOW...
but we are on the way thinking how to cache osgIntrospection search
calls (getCompatibleMethod/getCompatibleConstructor) to improve
performance.
For example with osgLua, instance a viewer, load a cow, and rendering:
root = osg.Group()
root:addChild( osgLua.loadObjectFile("cow.osg") )
viewer = osgProducer.Viewer()
viewer:setSceneData(root)
viewer:setUpViewer(osgProducer.Viewer.ViewerOptions.STANDARD_SETTINGS)
viewer:realize()
while ( not viewer:done()) do
viewer:update()
viewer:frame()
viewer:sync()
end
runs as fast as osgviewer (~1000fps in my notebook) . The only
appreciable penalty is in the update ( 0.06 for osgLua, 0.02 for the
naive osgviewer)
using an empty callback ( but a callback written in lua ), the update
process gets 0.09 but still rendering at ~1000fps.
if we put some method calls in the callback. it works pretty well, but
if we create anything... for example:
c = osgLua.NodeCallback(
function(node, nodeVisitor)
v = osg.Vec3()
end)
root:setUpdateCallback(c)
Then the update rises to 3.25 and the fps drops to 280... so
creation/destruction is were we have probably the problem with
osgIntrospection.
Cheeers,
Jose L.
--
Jose L. Hidalgo ValiƱo (PpluX)
---- http://www.pplux.com ----
_______________________________________________
osg-users mailing list
[email protected]
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/