Re: [osg-users] Primitive Restart

2012-04-05 Thread Robert Osfield
Hi Felix, On 4 April 2012 20:11, Felix Nawothnig wrote: > Well, the methods I added to osg::State do lazy updating - a > StateAttribute would of course increase performance... but see below > for the problems... Lazy state updating done in osg::State is done using pointer comparisons so is very

Re: [osg-users] Primitive Restart

2012-04-05 Thread Robert Osfield
Hi Felix, On 4 April 2012 20:13, Felix Nawothnig wrote: > 2012/4/3 Robert Osfield : >> Is there any reason why you can't just connect the tri strips together >> using a repeated indices to create a degenerate triangle that connects >> two strips together. > > Of course you can do that - it just w

Re: [osg-users] Primitive Restart

2012-04-04 Thread Felix Nawothnig
2012/4/3 Robert Osfield : > Is there any reason why you can't just connect the tri strips together > using a repeated indices to create a degenerate triangle that connects > two strips together. Of course you can do that - it just wastes quite some memory for indices, considering that automaticall

Re: [osg-users] Primitive Restart

2012-04-04 Thread Felix Nawothnig
2012/4/4 Robert Osfield : > I have a quick look up on the GL primitive restart and understand it a > bit better now.  As this feature has to be enabled/disabled using > glEnable/glDisable it naturally would be an StateSet::setMode() rather > than something embedded in a DrawElements.  The > glPrimi

Re: [osg-users] Primitive Restart

2012-04-04 Thread Robert Osfield
Hi Frederic, I have a quick look up on the GL primitive restart and understand it a bit better now. As this feature has to be enabled/disabled using glEnable/glDisable it naturally would be an StateSet::setMode() rather than something embedded in a DrawElements. The glPrimitiveRestartIndex call

Re: [osg-users] Primitive Restart

2012-04-03 Thread Robert Osfield
Hi Fred, On 3 April 2012 16:21, Frederic Bouvier wrote: > as I understand it, this feature enables one to put unconnected > strips in a single primitive, while degenerated triangles may > add a line between the end of a strip and the next. You say "may" add a line, is this supposition or have yo

Re: [osg-users] Primitive Restart

2012-04-03 Thread Frederic Bouvier
ot; Envoyé: Mardi 3 Avril 2012 15:34:02 Objet: Re: [osg-users] Primitive Restart Hi Felix, Is there any reason why you can't just connect the tri strips together using a repeated indices to create a degenerate triangle that connects two strips together. This way you can put multiple

Re: [osg-users] Primitive Restart

2012-04-03 Thread Robert Osfield
Hi Felix, Is there any reason why you can't just connect the tri strips together using a repeated indices to create a degenerate triangle that connects two strips together. This way you can put multiple tri strips into a single DrawElementUShort and avoid the heavy cost of lots of separate OpenGL

[osg-users] Primitive Restart

2012-04-01 Thread Felix Nawothnig
Hey. Now comes a non-trivial one... :-) A while ago I added support for primitive restart to our internal build to stitch triangle strips - this greatly improved performance and VRAM usage for our very heavy CAD data. As primitive restart was included in GL core a while a ago I suppose this featu