Hi,

On Tuesday, June 04, 2013 14:12:21 Robert Osfield wrote:
> > May be this is also an opportunity to throw out the deprecated dlists?
> 
> I don't reason a need to drop display lists in osg::Geometry, at least
> at this point.  Display lists are rather orthogonal to the rest of the
> API.
> 
> One thing the clean up will mean is a simpler internal implementation
> that will have a lower CPU overhead so the cost on non display listing
> will be lower so more models that presently work best with display
> lists will now be better without.  I do still expect display lists to
> work best for some models and OpenGL drivers though.

This is definitely orthogonal.
The reason is more that users already need to change their geomertry for this 
particular change. So may be it's a good time to clean up a little more than 
to annoy these people again in say two years with some more changes in this 
area.
But that's just a thought ...

> > Also to get good 'fast path' performance, handlling of primitive restart
> > would be good. I know there were discussions about that. But was there a
> > final outcome how you want to have this implemented?
> 
> Ooo I'm a bit cold on primitive restart, I vaguely recall some
> discussion previous about it but it's long enough ago for me to not
> have a clear idea.
> 
> In general I'd say with a clean up osg::Geometry will be in better
> place to look at implementing the new OpenGL features, these will be
> focused on the new Geometry implementation with GeometryDepercated
> being specifically for backwards compatible slow path usage without
> attempting to update it to latest OpenGL features.  This approach will
> free us from some of the sticky bits of implementation - the
> glBegin/glEnd emulation is an example of this.

Well, primitive restart allows you to merge a lot of indexed primitive sets 
into a single one for triangle strips for example. Without you need to emit a 
lot of extra draws for each strip. That means this takes a whole lot of cpu 
cycles to do the draw setup on the gpu for a few triangles in the strip. this 
in turn make strips basically unusable if you are draw bound. Or you will get 
draw bound because of that. Primitive restart allows you to specify a 'magic 
index' that can be placed in the index array to signal the GPU that a new 
strip begins. By that you get back huger bunches of draws scheduled with a 
single OpenGL draw call doing the GPU setup just this single time.

Conceptually this is an OpenGL state like any other StateAttribute you already 
implemented. So the easiest would be to add an other StateAttribute for this.

The bad thing is that you cannot rely on this to be present as an OpenGL 
extension but requires the geometry to be built in a different way. So the 
additional code path to do is more or less intrusive. The good thing is that a 
whole lot of gpu's do handle primitive restart.

May be an optimizer pass that spits primitive restart draw element calls could 
be useful for this.

Anyway, that's also kind of orthogonal.
But once people need to change their geometries for this renewed Geometry 
class it might be also a natural point for somebody using osg to move to 
restarted strips if this is possible.

Greetings

Mathias
_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to