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!

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,

Originally posted by meez:
[b]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,[/b]

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

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

while your at it - how do you do the “quotes” ?

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…

Originally posted by Allan Walton:
[b]while your at it - how do you do the “quotes” ?

[img]http://www.opengl.org/discussion_boards/ubb/smile.gif[/img]

Cheers,

Allan[/b]

Click on this

or use the quote tags QUOTE and /QUOTE within and copy and paste.

[This message has been edited by shinpaughp (edited 05-13-2003).]

Originally posted by Allan Walton:
[b]
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)?

[/b]

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

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. (unless it was rubbish in which case )

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