Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

menasius

OpenGL Display Lists in Opengl, the anti-optimization at high poly counts?

This topic is 6763 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I''ve written a small LWO importer for OpenGL that basically loads the object into a rotating scene. Then to test out how much of an increase display lists are on the TNT2 chipset I ran a series of tests with ''brute force'' rendering and then display list rendering. Much to my dismay the display list actually got a worse framerate than the non display list version at high poly counts (~9000) and showed no gain when the poly count was low (~150). What gives, I thought that display lists couldnt hurt the performance. Makes me wonder if commercial products use display lists extensively and if so how much performance im loosing

Share this post


Link to post
Share on other sites
Advertisement
In my project I tried using a display list for my 5000-or-so-triangle object since it uses 3 passes. I didn''t get any noticeable performance gain or hit, actually. Are you sure you''re not accidentally building the list for each rendering pass or something? I can''t imagine why the performance would *drop* so significantly.

Can anyone out there say when display lists will actually do something significant?

Share this post


Link to post
Share on other sites
Im using a single pass render... no textures no G.Lighting, just flat poly''s to test if the geometry imported ok.

I benchmarked using a really primitive method that involved counting the number of succesful calls to display() and outputing that number every second (reseting it to zero at that point). with this the fps was around 260 for the display listed high poly count and 300 for the non-type, that In my mind is a noticable hit. If you are HW accelling with a TNT2U i guess Im doing something terribly wrong otherwise It might just be the chipset implementation

-menasius

Share this post


Link to post
Share on other sites
you don''t have any transform matrices in the display list code, do you? if so, this''ll slow it down. display lists are only for rigid bodies, not if you''re going to do some subobject animation, like filling in a variable for a vertex.

a2k

Share this post


Link to post
Share on other sites
Nope no transformations ... I do however have a for loop because the geometry has an undefined number of polys (until runtime ) so it loops through all the vertices

-menasius

Share this post


Link to post
Share on other sites
No transforms here, either. The only major question I have, then, is whether or not it''s correct to have glBegin/glEnd within glNewList/glEndList or not. I *do*, and I can''t recall why I''d done that other than that it got things working. I''m using a regular TNT. To say the least, this problem is strange. I wonder if any Direct3D people are having similar issues.

Share this post


Link to post
Share on other sites
When you are using display lists it is best if you only use one per object. When you say "loop through all the vertices", are you creating a seperate display list for each polygon? If you are you will find that the overhead per display list will drop your performance notably. If you aren''t then it is probably a driver issue, because display lists should be faster in most cases.

PreManDrake

Share this post


Link to post
Share on other sites
no no no Im not that idiotic... The loop looks like this

start the list...
loop through vertices of triangles..
end list

so its one list with a bunch of vertices in it and a glBegin and glEnd (although I''ve tried it without)



-menasius

"Quitters never win...
winners never quit...
but those who never win and never quit, are idiots"

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
Try using GL_COMPILE or GL_COMPILE_AND_EXECUTE to decrease render times for display list. These calls optimize the list before display and stores it in video memory(I believe). Also make sure you only call display() when absolutely necessary.

--Cauldron the Ancient

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
If I am not wrong, display list puts geometry and/or transformations into the video card that supports T&L.
I experienced steady speed increment by the dispaly list with a T&L supported board.

If the video board does not support T&L, display list may not have any advantage. When the memory allocation for the geometry/transformation is bad (jumping around?), you may suffer from speed delay.

HRS

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!