Hi

From my own experience, display lists runs with good speed when:
1) vertex number is at most like 100k, with huge vertices count per drawable 
vbos tends to be faster
2) display lists works best with triangle strips \ indexed list

both display lists and vbos performance can greatly vary with different data 
types in vertex attributes (f.e. ushort indices is generally faster then ubyte 
and uint,  texcoords\ vertex colors works best with float or ushort etc) and 
vertex attributes count, in some combinations vbos faster, in others dls.

As a side note, you'd better use triangles instead of quads, as they can work 
quite a bit slower than triangles

Cheers.

28.02.2012, 14:20, "Martin Groer" <grosser.mar...@gmx.de>:
> Hello,
>
> I am surprised about my little test program. I would like compare 
> displaylists with frame buffer objects. Because, I suppose that the 
> displaylists have to be faster than the vbo, because the displaylists are 
> precompiled. But in my example I get another result:
>
> VBO: 225 FPS
> DL: 88 FPS
>
> Is that possible?
>
> Following a part of my code:
> --------------------------------
>
> // Geometry (Grid-Plane)
> ::osg::Geometry* geom = new osg::Geometry;
>
> // Vertex Array (Grid with 1000 x 1000 quads)
> ::osg::ref_ptr< ::osg::Vec3Array > v = new ::osg::Vec3Array();
> for(unsigned int x=0; x < 1000; x++)
> {
>   for(unsigned int y=0; y < 1000; y++)
>   {
>    // create points
>   }
> }
> geom->setVertexArray(v);
>
> #ifdef ENABLE_VBO
>   // Vertex Buffer Object
>   osg::VertexBufferObject* vbo = geom->getOrCreateVertexBufferObject();
>   vbo->setArray(0,v);
>   vbo->setUsage(GL_STATIC_DRAW);
>   geom->setUseVertexBufferObjects(true);
>   geom->setSupportsDisplayList(false);
>   geom->setUseDisplayList(false);
> #else
>   geom->setSupportsDisplayList(true);
>   geom->setUseDisplayList(true);
> #endif
>
> // Primitive
> ::osg::DrawArrays* da = new 
> ::osg::DrawArrays(::osg::PrimitiveSet::QUADS,0,v->size());
> geom->addPrimitiveSet(da);
>
> // Geometry Node
> ::osg::Geode* geode = new osg::Geode;
> geode->addDrawable(geom);
>
> ----------------------------------------
>
> Thanks
>
> Martin
>
> --
> Empfehlen Sie GMX DSL Ihren Freunden und Bekannten und wir
> belohnen Sie mit bis zu 50,- Euro! https://freundschaftswerbung.gmx.de
> _______________________________________________
> osg-users mailing list
> osg-users@lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to