Re: [osg-users] Enabling instancing should automatically disable display lists

2014-03-04 Thread Trystan Larey-Williams
If it's messy to automate the behavior, I think even a warning visible at a 
'warn' log level would suffice. I.e. pop the message on add/insert PrimitiveSet 
if the drawarray is instanced and display lists are enabled on the Geometry. 

If I can squirrel away some time soon, I'll go ahead and submit a fix.

-Trystan

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=58442#58442





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


[osg-users] Enabling instancing should automatically disable display lists

2014-03-03 Thread Trystan Larey-Williams
Hi all,

I found that OSG has display lists enabled by default on Geometry objects and 
it remains enabled even if instancing is enabled. This made for a fairly long 
and non-intuitive debug session as I was trying to figure out why my geometry 
failed to be drawn. Ultimately, I just had to setUseDisplayList( false ). 

According to the OpenGL spec. The error INVALID_OPERATION is generated if 
DrawArraysInstanced or DrawElementsInstanced is called during display list 
compilation, which is what finally clued me in. 

Wouldn't it makes sense to automatically disable display lists in the case 
instancing is enabled? Otherwise what is happening is very much hidden under 
the framework and not in a good way.  

Cheers,
Trystan

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=58413#58413





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


Re: [osg-users] Enabling instancing should automatically disable display lists

2014-03-03 Thread Paul Martz
How would you propose this work? Instancing is a property of the
PrimitiveSet, and display list usage is a property of the Geometry object.
Would you modify Geometry::addPrimitiveSet() to look for use of instancing,
and if detected, disable display lists? What if the instanced PrimitiveSets
are subsequently deleted? Would you need some way to save the original
setting of display lists so that it could be restored?
   -Paul

On Mon, Mar 3, 2014 at 12:09 PM, Trystan Larey-Williams trys...@trystan.org
 wrote:

 Wouldn't it makes sense to automatically disable display lists in the case
 instancing is enabled?


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