View Full Version : vertex data into display list
Hi, Just wondering if anyone can help me regarding display lists. It is sort of similar to a previously listed topic 'display list'. Anyway, I am new to this and want to know how to store a LOT of vertex data into a display list. It will be used for static geometry that is being rendered every frame in my programm. Also, where do i declare this? That is where in my code would i create the list?
I am drawing a static grid, but the vertex data is currently obtained by going through a set of 'for' loops. I am trying to make my program more efficient.
I know i am not explaining myself very well, but i am not too sure how to explain this problem in full detail. If anyone thinks they may be able to help PLEASE let me know what i should do.
Thanks everyone!
Allan Walton
05-13-2003, 03:07 AM
If it's static geometry use a compiled interleaved vertex array instead...
look up the GL_EXT_compiled_vertex_array extension and interleaved arrays in the red book...
Cheers,
Allan
Allan,
Cheers mate. I have red book here now so i'll check it out. I'll get back to you if i get stuck again!
Cheers,
velco
05-13-2003, 03:49 AM
Originally posted by meez:
Allan,
Cheers mate. I have red book here now so i'll check it out. I'll get back to you if i get stuck again!
Cheers,
There's absolutely no reason for display lists to be slower than CVA. I'd rather expect display lists to have a bit higher or comparable perfomance to VBO/VAO/VAR.
~velco
Allan Walton
05-13-2003, 04:04 AM
Good point.
i didnt actually say there faster (although i can't imagine they'd be slower) BUT
meez says that (s)he wants to store a LOT of vertex data - having a single display list with tonnes of vertex data in it can be slow (sort of - e.g. a friend once had a display list with absolutely loads of vertices - breaking it up into 8 smaller ones tripled performance - this may not be an option)
and meez also says that (s)he's new to this -IMO compiled vertex arrays are v.easy to get going (one of the great things about gl)
just a quick question, Locking the array pulls it onto gfx card memory (doesnt it?) - i wouldnt have thought you'd be able to get much faster than that? provided it was in a sensible format (interleaved array, indexxed into)?
correct me if i'm wrong...
Allan
Allan Walton
05-13-2003, 04:05 AM
while your at it - how do you do the "quotes" ?
http://www.opengl.org/discussion_boards/ubb/smile.gif
Cheers,
Allan
Thanks everyone, I really think that your discussions together have helped me out. I am going to try using an array like the ones mentioned.
By the way, to do the quotes just click the icon that looks like a sheet of paper with a red arrow pointing off to the right, this allows you to reply with a quote.
Thanks again fella's
Allan,
You aren't the Allan that made 'GL Asteroids' are you? Just wondering because i was just having a browse through some programms at GameDev and noticed it was done by someone called Allan. Anyway, just curious about development etc...
shinpaughp
05-13-2003, 07:26 PM
Originally posted by Allan Walton:
while your at it - how do you do the "quotes" ?
http://www.opengl.org/discussion_boards/ubb/smile.gif
Cheers,
Allan
Click on this http://www.opengl.org/discussion_boards/ubb/quote.gif
or use the quote tags QUOTE and /QUOTE within [] and copy and paste.
[This message has been edited by shinpaughp (edited 05-13-2003).]
velco
05-13-2003, 10:49 PM
Originally posted by Allan Walton:
just a quick question, Locking the array pulls it onto gfx card memory (doesnt it?) - i wouldnt have thought you'd be able to get much faster than that? provided it was in a sensible format (interleaved array, indexxed into)?
Yep, it (hopefully) does that, which means you have to do it rarely, i.e. not each frame or the coipying wull kill performance.
Likewise, display lists are "server side", i.e. they also can/should be stored in GART/video memory and also should not be compiled each frame.
FWIW, see http://www.fl-tw.com/opengl/GeomBench
which at least can provide some idea about the relative performance of VAR/VAO/display lists/immediate mode operation.
~velco
Allan Walton
05-13-2003, 11:25 PM
FWIW, see http://www.fl-tw.com/opengl/GeomBench
~velco[/B]
ah cheers - i'll look into it...
meez - no, im not the guy who did glAsteroids. http://www.opengl.org/discussion_boards/ubb/frown.gif (unless it was rubbish in which case http://www.opengl.org/discussion_boards/ubb/smile.gif ) http://www.opengl.org/discussion_boards/ubb/wink.gif
i was under the impression that you locked, called a draw func (eg gldrawelemets) and unlocked your array per frame...
is this not so? I'll have to look it up some more.
Cheers
Allan
Powered by vBulletin® Version 4.2.0 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.