Display Lists or Vertex Arrays with texturing
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.
I hope my question is clear!
Thanks.
Jericho
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...
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...
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?
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
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!
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.
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.
Ah, got it. Thanks for your help, guys.
Jericho
Possibly Related Threads...
| Thread: | Author | Replies: | Views: | Last Post | |
| ? Export Vertex Arrays from Gfx App ? | Elphaba | 2 | 2,502 |
Jun 11, 2009 12:39 PM Last Post: Elphaba |
|
| Display Lists and Obj. File Loader Problems | merrill541 | 0 | 1,657 |
Oct 17, 2008 06:42 PM Last Post: merrill541 |
|
| VBOs and Vertex Arrays in OpenGL not working | Talyn | 6 | 5,240 |
Jul 8, 2008 01:14 PM Last Post: Fenris |
|
| Slowing Frame Rates and Display Lists | Nick | 4 | 2,690 |
Mar 27, 2005 06:08 AM Last Post: wadesworld |
|
| More display lists not working... | SOUR-Monkey | 1 | 2,143 |
Dec 8, 2004 09:11 PM Last Post: SOUR-Monkey |
|

