Is it just me or (display lists)
BlitzMax Forums/OpenGL Module/Is it just me or (display lists)
| ||
Are display lists slower than just spitting out geometry? The above code would suggest so.... Strange, they say display lists are faster. |
| ||
wont run with out that image, contains more than 1 frame?? |
| ||
nope, just one frame http://www.mattsbigbrownbox.com/code_issues/cube.bmp Kit key 1 to toggle between the Display lists and the "intermediate mode" drawing.. You should note that display lists are slower |
| ||
No commercial game that I've ever worked on has used display lists. Just stick with vertex buffers/triangle lists and you'll be fine. |
| ||
So stay away from intermediate mode and go with vertex buffers? |
| ||
It really depends what you're using them for. The example you've got there isn't suited for display list processing - display lists are more geared up for high poly geometry. Try this code & see if you notice the difference. |
| ||
PJames: Flip 0 shows the correct FPS Dark Half, try this. Set the path to your texture. Your demo used the wrong consts for backbuffer & depthbuffer, in max it's GRAPHICS_BACKBUFFER | GRAPHICS_DEPTHBUFFER VBOs offer a slight increase over arrays (at least on my card they do, I'm wondering if vertex arrays are just plain fast on this card?), but probably aren't as flexible. They're best used for large maps (static geometry!) Arrays are much faster than lists though! Also look into glDrawElements(), with that command you can draw indexed geometry. |
| ||
alright, thanks tom, I have been looking for VBO and VA code for a few days now :-) Thanks a TON! |
| ||
Don't use display lists. They are complicated, and a waste of time. Use vertex arrays. For rendering batches of identical geometry, use vertex buffer objects, when available. Compiled vertex arrays may increase speed for unique geometry. Note that VBO's do absolutely nothing for geometry you only render once. You are supposed to set the VBO, then render all instances of that mesh. So to sum up: Unique geometry -compiled vertex array Instanced geometry (static meshes) -vertex buffer object Fall back on regular vertex arrays when either of those options are unavailable. Use regular vertex arrays on any geometry that has moving vertices, like characters. |
| ||
Ok a couple of points... 1] display lists are not complex + represent a decent way to compile common state changes together. They also improve performance when rendering static meshes, compared with straight array based immediate mode rendering - on some systems anyway. 2] VBO's are great, but only really in cases such as those described by halo and for very large vertex collections. And though i havent tried it yet - i imagine they are perfect for shader based skeleton animation. basically do everything halo said - but consider supporting display lists...on my system, packing vertex arrays into displays lists improves performance by a huge amount.. jst keep in mind that the compiled list data is static, if you need to edit anything..you will have to rebuild the entire list.. You might want to test which version of windows is being used - though VBO's are a better choice for large collections of static verts - older operating systems, or those with iffy drivers may not support them. I know that win98 ATI drivers are mangled, vbos only partially work. Display Lists provide a semi decent fallback..sorta.. |
| ||
glLockArrays() - noel found this, its a 1.1 extension or something - i didnt know about it..but supposedly, this will essentially act like a compiled array...handy to know. |