On Wed, Apr 16, 2008 at 3:30 PM, Jeremy Moles <[EMAIL PROTECTED]> wrote:
> My question, then, is twofold:
>
> 1. Given the above (and the fact that I am able to modify the
> osg::Array objects within the Widget directly and see immediate
> results), is it safe to say I am forcing the drawing implementation to
> use the slowest, "immediate" mode for rendering? I've always assumed
> this, and have been comfortable with that during development.
Immediate mode can still use vertex arrays, this will typically be
slower than using display lists. As long as you don't use per
primitive normals/colours and vertex indices you'll still be using
OpenGL fast paths (vertex arrays) rather than slow paths
(glBegin/glVertex/glEnd) so it needn't be a major issue.
Also one needs a bit of perspective, you are unlikely to have
thousands of GUI elements all on screen at one time - so cull and draw
dispatch are very unlikely to be bottlenecks - fill rate is much more
likely a limit with GUI's with the overdraw associated with building
up layers, even then its still not likely to impact performance too
much on modern machines.
> 2. If the above is true, consider the following situation: a user
> creates his interface element, positions, resizes, colors it, etc. When
> he's done with this he knows that, for the most part, this particular
> element will remain static and require no further updates. Thus, there
> could be some benefit then in asking this object to "reconfigure" itself
> to use display lists or VBOs. Is this possible? I'd call this method
> "locking" or similar, seeing as conceptually it would prevent you from
> making any direction geometry modifications as long as the object was
> static. However, I'm not entirely sure I have a full understanding of
> the process. Is it as easy as calling:
>
> setDataVariance()
> set{UseVertextBufferObjects/UseDisplayList}()
>
> ...or is there something more complicated required?
Are you not overcomplicating things. If people use the code correctly
it'll work correctly, if they abuse it then the results are undefined.
Trying to add extra complexities to try and avoid all eventualities
can lead to far more problems than it solves.
> P. S. Is it lunch time yet? :)
That's a third question. And yes, it's almost always lunch time
somewhere in the world ;-)
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org