Re: [osg-users] Slow rendering with displaylist.
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" : > 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
Re: [osg-users] Slow rendering with displaylist.
Also be aware that on some architectures display lists are just plain faster for static geometry in many cases. I've certainly seen that on NVIDIA. Glenn Waldron / @glennwaldron On Tue, Feb 28, 2012 at 8:29 AM, Luc Frauciel wrote: > Hi Martin, > > Be aware that for some combinaison of driver/hardware, VBO just don't work > properly. > I've encoutered the case on some Intel/ATI chipsets. > A simple terrain created with VPB couldn't be loaded. > With VBO OFF, everything was OK. > > Be also aware that if you use small geometries, there is a high overhead > with VBO at initialization. > > It could be a good idea to make VBO you default implementation, but don't > forget to have fallbacks when things will go wrong (especially if you have > no control over target hardware) > > > http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/2011-July/052968.html > > http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/2008-August/015543.html > >Luc > > > De :"Martin Großer" A :OpenSceneGraph Users < > osg-users@lists.openscenegraph.org>Date:28/02/2012 13:01Objet :Re: > [osg-users] Slow rendering with displaylist.Envoyé par : > osg-users-boun...@lists.openscenegraph.org > -- > > > > Hello, > > thanks to you, it was very helpful. Now I will only use VBOs. > > Greetings, > Martin > > > -------- Original-Nachricht > > Datum: Tue, 28 Feb 2012 12:44:15 +0100 > > Von: Daniel Trstenjak > > An: OpenSceneGraph Users > > Betreff: Re: [osg-users] Slow rendering with displaylist. > > > > > Hi Martin, > > > > > That is basically true. I want to get a feeling about DisplayLists and > > > VBOs. I know that the display list is a precompiled sequence of OpenGL > > > commands. That is the reason that I tought the display lists should be > > > faster. But the question isn't the comparison, but the slow render > > > performance when I want to use display lists. I think everything is > > > wrong in my implementation. But I don't know what. > > > > My point about system/graphics card memory is wrong. I thought > > about glVertexPointer, but this call isn't even compiled into > > a display list and shouldn't be used with one. > > > > So OSG will most likely use glBegin/glEnd to put the vertex data into > > the display list. > > > > It boils down to what Mathias ;) said, it's an implementation issue, > > dirty corner cases and driver developers don't optimize the > > display lists anymore, because they're deprecated and just not used > > that much anymore. > > > > > > Greetings, > > Daniel > > > > -- > > > > > > > Daniel Trstenjak Tel : +49 (0)7071-9457-264 > > science + computing ag FAX : +49 (0)7071-9457-511 > > Hagellocher Weg 73 mailto: daniel.trsten...@science-computing.de > > D-72070 Tübingen WWW : http://www.science-computing.de/ > > > > -- > > Vorstand/Board of Management: > > Dr. Bernd Finkbeiner, Michael Heinrichs, > > Dr. Roland Niemeier, Dr. Arno Steitz, Dr. Ingrid Zech > > Vorsitzender des Aufsichtsrats/ > > Chairman of the Supervisory Board: > > Philippe Miltin > > Sitz/Registered Office: Tuebingen > > Registergericht/Registration Court: Stuttgart > > Registernummer/Commercial Register No.: HRB 382196 > > > > ___ > > osg-users mailing list > > osg-users@lists.openscenegraph.org > > > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org > > -- > NEU: FreePhone 3-fach-Flat mit kostenlosem Smartphone! > > Jetzt informieren: http://mobile.1und1.de/?ac=OM.PW.PW003K20328T7073a > ___ > 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 > > ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Slow rendering with displaylist.
Hi Martin, Be aware that for some combinaison of driver/hardware, VBO just don't work properly. I've encoutered the case on some Intel/ATI chipsets. A simple terrain created with VPB couldn't be loaded. With VBO OFF, everything was OK. Be also aware that if you use small geometries, there is a high overhead with VBO at initialization. It could be a good idea to make VBO you default implementation, but don't forget to have fallbacks when things will go wrong (especially if you have no control over target hardware) http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/2011-July/052968.html http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/2008-August/015543.html Luc De : "Martin Großer" A : OpenSceneGraph Users Date: 28/02/2012 13:01 Objet : Re: [osg-users] Slow rendering with displaylist. Envoyé par : osg-users-boun...@lists.openscenegraph.org Hello, thanks to you, it was very helpful. Now I will only use VBOs. Greetings, Martin Original-Nachricht > Datum: Tue, 28 Feb 2012 12:44:15 +0100 > Von: Daniel Trstenjak > An: OpenSceneGraph Users > Betreff: Re: [osg-users] Slow rendering with displaylist. > > Hi Martin, > > > That is basically true. I want to get a feeling about DisplayLists and > > VBOs. I know that the display list is a precompiled sequence of OpenGL > > commands. That is the reason that I tought the display lists should be > > faster. But the question isn't the comparison, but the slow render > > performance when I want to use display lists. I think everything is > > wrong in my implementation. But I don't know what. > > My point about system/graphics card memory is wrong. I thought > about glVertexPointer, but this call isn't even compiled into > a display list and shouldn't be used with one. > > So OSG will most likely use glBegin/glEnd to put the vertex data into > the display list. > > It boils down to what Mathias ;) said, it's an implementation issue, > dirty corner cases and driver developers don't optimize the > display lists anymore, because they're deprecated and just not used > that much anymore. > > > Greetings, > Daniel > > -- > > > Daniel Trstenjak Tel : +49 (0)7071-9457-264 > science + computing ag FAX : +49 (0)7071-9457-511 > Hagellocher Weg 73 mailto: daniel.trsten...@science-computing.de > D-72070 Tübingen WWW : http://www.science-computing.de/ > > -- > Vorstand/Board of Management: > Dr. Bernd Finkbeiner, Michael Heinrichs, > Dr. Roland Niemeier, Dr. Arno Steitz, Dr. Ingrid Zech > Vorsitzender des Aufsichtsrats/ > Chairman of the Supervisory Board: > Philippe Miltin > Sitz/Registered Office: Tuebingen > Registergericht/Registration Court: Stuttgart > Registernummer/Commercial Register No.: HRB 382196 > > ___ > osg-users mailing list > osg-users@lists.openscenegraph.org > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org -- NEU: FreePhone 3-fach-Flat mit kostenlosem Smartphone! Jetzt informieren: http://mobile.1und1.de/?ac=OM.PW.PW003K20328T7073a ___ 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
Re: [osg-users] Slow rendering with displaylist.
Hello, thanks to you, it was very helpful. Now I will only use VBOs. Greetings, Martin Original-Nachricht > Datum: Tue, 28 Feb 2012 12:44:15 +0100 > Von: Daniel Trstenjak > An: OpenSceneGraph Users > Betreff: Re: [osg-users] Slow rendering with displaylist. > > Hi Martin, > > > That is basically true. I want to get a feeling about DisplayLists and > > VBOs. I know that the display list is a precompiled sequence of OpenGL > > commands. That is the reason that I tought the display lists should be > > faster. But the question isn't the comparison, but the slow render > > performance when I want to use display lists. I think everything is > > wrong in my implementation. But I don't know what. > > My point about system/graphics card memory is wrong. I thought > about glVertexPointer, but this call isn't even compiled into > a display list and shouldn't be used with one. > > So OSG will most likely use glBegin/glEnd to put the vertex data into > the display list. > > It boils down to what Mathias ;) said, it's an implementation issue, > dirty corner cases and driver developers don't optimize the > display lists anymore, because they're deprecated and just not used > that much anymore. > > > Greetings, > Daniel > > -- > > > Daniel Trstenjak Tel : +49 (0)7071-9457-264 > science + computing ag FAX : +49 (0)7071-9457-511 > Hagellocher Weg 73 mailto: daniel.trsten...@science-computing.de > D-72070 Tübingen WWW : http://www.science-computing.de/ > > -- > Vorstand/Board of Management: > Dr. Bernd Finkbeiner, Michael Heinrichs, > Dr. Roland Niemeier, Dr. Arno Steitz, Dr. Ingrid Zech > Vorsitzender des Aufsichtsrats/ > Chairman of the Supervisory Board: > Philippe Miltin > Sitz/Registered Office: Tuebingen > Registergericht/Registration Court: Stuttgart > Registernummer/Commercial Register No.: HRB 382196 > > ___ > osg-users mailing list > osg-users@lists.openscenegraph.org > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org -- NEU: FreePhone 3-fach-Flat mit kostenlosem Smartphone! Jetzt informieren: http://mobile.1und1.de/?ac=OM.PW.PW003K20328T7073a ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Slow rendering with displaylist.
Hi Martin, > That is basically true. I want to get a feeling about DisplayLists and > VBOs. I know that the display list is a precompiled sequence of OpenGL > commands. That is the reason that I tought the display lists should be > faster. But the question isn't the comparison, but the slow render > performance when I want to use display lists. I think everything is > wrong in my implementation. But I don't know what. My point about system/graphics card memory is wrong. I thought about glVertexPointer, but this call isn't even compiled into a display list and shouldn't be used with one. So OSG will most likely use glBegin/glEnd to put the vertex data into the display list. It boils down to what Mathias ;) said, it's an implementation issue, dirty corner cases and driver developers don't optimize the display lists anymore, because they're deprecated and just not used that much anymore. Greetings, Daniel -- Daniel Trstenjak Tel : +49 (0)7071-9457-264 science + computing ag FAX : +49 (0)7071-9457-511 Hagellocher Weg 73 mailto: daniel.trsten...@science-computing.de D-72070 Tübingen WWW : http://www.science-computing.de/ -- Vorstand/Board of Management: Dr. Bernd Finkbeiner, Michael Heinrichs, Dr. Roland Niemeier, Dr. Arno Steitz, Dr. Ingrid Zech Vorsitzender des Aufsichtsrats/ Chairman of the Supervisory Board: Philippe Miltin Sitz/Registered Office: Tuebingen Registergericht/Registration Court: Stuttgart Registernummer/Commercial Register No.: HRB 382196 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Slow rendering with displaylist.
Hello Daniel, That is basically true. I want to get a feeling about DisplayLists and VBOs. I know that the display list is a precompiled sequence of OpenGL commands. That is the reason that I tought the display lists should be faster. But the question isn't the comparison, but the slow render performance when I want to use display lists. I think everything is wrong in my implementation. But I don't know what. Cheers Martin Original-Nachricht > Datum: Tue, 28 Feb 2012 11:37:36 +0100 > Von: Daniel Trstenjak > An: OpenSceneGraph Users > Betreff: Re: [osg-users] Slow rendering with displaylist. > > Hi Martin, > > > 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: > > I think what you're testing is the performance difference between vertex > data on system memory and vertex data on graphics card memory. > > It doesn't makes that much sense to compare displaylists with fbos, > because displaylists are about opengl commands and fbos about opengl data. > > > Greetings, > Daniel > > -- > > > Daniel Trstenjak Tel : +49 (0)7071-9457-264 > science + computing ag FAX : +49 (0)7071-9457-511 > Hagellocher Weg 73 mailto: daniel.trsten...@science-computing.de > D-72070 Tübingen WWW : http://www.science-computing.de/ > > -- > Vorstand/Board of Management: > Dr. Bernd Finkbeiner, Michael Heinrichs, > Dr. Roland Niemeier, Dr. Arno Steitz, Dr. Ingrid Zech > Vorsitzender des Aufsichtsrats/ > Chairman of the Supervisory Board: > Philippe Miltin > Sitz/Registered Office: Tuebingen > Registergericht/Registration Court: Stuttgart > Registernummer/Commercial Register No.: HRB 382196 > > ___ > osg-users mailing list > osg-users@lists.openscenegraph.org > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org -- NEU: FreePhone 3-fach-Flat mit kostenlosem Smartphone! Jetzt informieren: http://mobile.1und1.de/?ac=OM.PW.PW003K20328T7073a ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Slow rendering with displaylist.
Hi, On Tuesday 28 February 2012, Martin Großer wrote: > 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? Yes, that's possible. Plenty aspects of this: * GPUs just work in terms of vbos. That means when you program a gpu, you will set up some memory regions for different purposes. Including the vertex program inputs. You need a base pointer, some data types, stride etc... Then you set up some more memory for the fragment processors samplers tell the hardware the base pointer, the data types, strides, dimensions and whatnot. Then tell the setup unit that you want to draw some triangles using these arrays. This *is* basically what you do when you do buffer object draws. * DLists are implemented using vbos anyway. Thinking about how a gpu works in its own. Compiling just could mean to setup a set of vbo arrays and fire the draw on this. Dlist only provide a little more overhead in the sense that you can have degenerated display lists like glBegin(); glVertex(). This list could be combined with one just providing more vertices and containing a terminating glEnd. Which shows pretty fast that dlist handling can get pretty complicated in all its corner cases that are spect in old OpenGL standards valid and backward compatible up to today. * Dlists are deprecated. So driver writers assume since some time that the more optimized fast path should be the vbo/drawarray path. Greetings Mathias -- Dr. Mathias Fröhlich, science + computing ag, Software Solutions Hagellocher Weg 71-75, D-72070 Tuebingen, Germany Phone: +49 7071 9457-268, Fax: +49 7071 9457-511 -- Vorstand/Board of Management: Dr. Bernd Finkbeiner, Michael Heinrichs, Dr. Roland Niemeier, Dr. Arno Steitz, Dr. Ingrid Zech Vorsitzender des Aufsichtsrats/ Chairman of the Supervisory Board: Philippe Miltin Sitz/Registered Office: Tuebingen Registergericht/Registration Court: Stuttgart Registernummer/Commercial Register No.: HRB 382196 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Slow rendering with displaylist.
Hi Martin, > 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: I think what you're testing is the performance difference between vertex data on system memory and vertex data on graphics card memory. It doesn't makes that much sense to compare displaylists with fbos, because displaylists are about opengl commands and fbos about opengl data. Greetings, Daniel -- Daniel Trstenjak Tel : +49 (0)7071-9457-264 science + computing ag FAX : +49 (0)7071-9457-511 Hagellocher Weg 73 mailto: daniel.trsten...@science-computing.de D-72070 Tübingen WWW : http://www.science-computing.de/ -- Vorstand/Board of Management: Dr. Bernd Finkbeiner, Michael Heinrichs, Dr. Roland Niemeier, Dr. Arno Steitz, Dr. Ingrid Zech Vorsitzender des Aufsichtsrats/ Chairman of the Supervisory Board: Philippe Miltin Sitz/Registered Office: Tuebingen Registergericht/Registration Court: Stuttgart Registernummer/Commercial Register No.: HRB 382196 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] Slow rendering with displaylist.
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