Display Lists or Vertex Arrays with texturing

Member
Posts: 40
Joined: 2004.12
Post: #1
Is there is significant memory footprint for creating a display list with texture data embedded or is it better to create vertex arrays and texture using that data?

I hope my question is clear!

Thanks.

Jericho
Quote this message in a reply
Luminary
Posts: 5,143
Joined: 2002.04
Post: #2
Nope, I don't understand it at all...

It would be a very strange application where you wanted to store TexImage2D calls in a display list, and you can't store 'em in a vertex array...
Quote this message in a reply
Member
Posts: 144
Joined: 2004.07
Post: #3
OneSadCookie Wrote:Nope, I don't understand it at all...

It would be a very strange application where you wanted to store TexImage2D calls in a display list, and you can't store 'em in a vertex array...

I think he means glTexCoord**(). Seven, is that right?
Quote this message in a reply
Member
Posts: 40
Joined: 2004.12
Post: #4
lightbringer Wrote:I think he means glTexCoord**(). Seven, is that right?


Yeah, it seems my phrasology is totally screwed up.

Basically, I'm wondering how textures are applied to complex objects that are made of triangles in OpenGL. I can create a UV mapping (such as supported by Wings3D), and then export a .obj file with the vector, normal, texture and face data.

I could do a brute-force for() loop with calls to glNormal3**(), glVertex3**(), and glTexCoord**(). But there are significant improvements when using vertex arrays and display lists.

Maybe I don't understand the use of texture objects...

Jericho
Quote this message in a reply
Sage
Posts: 1,403
Joined: 2005.07
Post: #5
When you call texcoord it means that part of the current texture will be applied. So the texture isnt stored in the display list just the values from texcoord, which means you could have two of the same 3D model from the same display list just binding different textures before calling the list.

Sir, e^iπ + 1 = 0, hence God exists; reply!
Quote this message in a reply
Sage
Posts: 1,199
Joined: 2004.10
Post: #6
If the vertex or tex-coord data is unchanging for your model, using a display list is probably going to be fastest, since all the data will be stored on the video card, and invoking the display lists just plays it back, without any need for shuffling data between the CPU and the GPU.

Vertex arrays are better if your geometry will be changing dynamically. They're fast, but not as fast as display lists ( or at least that's my understanding ). I use vertex arrays for shadow volume projection since it's faster than loops of glVertex calls. I also use vertex arrays and tex coord arrays to draw my foliage, since it is constantly being generated as the camera moves about.

If all you're doing is drawing models, use a display lists to record your brute force loops of glNormal, glVertex and glTexCoord calls.
Quote this message in a reply
Member
Posts: 40
Joined: 2004.12
Post: #7
Ah, got it. Thanks for your help, guys.

Jericho
Quote this message in a reply
Post Reply 

Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  ? Export Vertex Arrays from Gfx App ? Elphaba 2 2,840 Jun 11, 2009 12:39 PM
Last Post: Elphaba
  Display Lists and Obj. File Loader Problems merrill541 0 1,897 Oct 17, 2008 06:42 PM
Last Post: merrill541
  VBOs and Vertex Arrays in OpenGL not working Talyn 6 6,238 Jul 8, 2008 01:14 PM
Last Post: Fenris
  Slowing Frame Rates and Display Lists Nick 4 2,962 Mar 27, 2005 06:08 AM
Last Post: wadesworld
  More display lists not working... SOUR-Monkey 1 2,322 Dec 8, 2004 09:11 PM
Last Post: SOUR-Monkey