View Full Version : Display list & Multitexturing
02-02-2007, 03:28 AM
is it possible to use display lists when i am using multitexturing commands. I have a isometric game where the map is stored in a display list.
Is this wise to do by the way. ?
I first generate a vertex array containing all the vertices for the isometric textures. This vertex array is drawn using glDrawElements().I of course generate a texture array for the texture co-ordinates too. The multitexturing and drawing cmds all come inside the display list.
But an error pops up only if i try to use multitexturing there with the display list. Vertex arrays are accepted fine.How should i then optimize my maps which may become huge.Use only vertex arrays ?
02-02-2007, 04:11 AM
Consider using vertex buffer objects, they provide functionality to store vertex arrays directly in video memory.
02-02-2007, 10:27 PM
But is it definite that display lists cant be used with multitexturing. Are there any known issues with VBOs and multitexturing being used together ?
02-02-2007, 10:29 PM
But is it definite that display lists cant be used with multitexturing. Are there any known issues with VBOs and multitexturing being used together ? How much support is there for VBOs?
I never tested multitexturing with display lists. However, at first glance, I can't see why there cannot be used along with multitexturing (check that ActiveTextureUnit or ActiveTexture can be inserted into dl).
About vbos, or simple vertex arrays, there is full support. So no known issues AFAIK.
What Zengar said is that you won't gain anything with using vertex arrays inside dl. This works most of the time but that's all. So as far as you use vertex arrays, switching to vbos is far more interresting and much easy than keeping them all inside dl.
02-03-2007, 01:22 AM
I've had no problems with using multitexturing inside display lists. You just need to be careful that the OpenGL state is set up correctly. For example calling glClientActiveTexture(iUnit) and glEnableClientState(GL_TEXTURE_COORD_ARRAY) or glDisableClientState(GL_TEXTURE_COORD_ARRAY) as appropriate.
02-03-2007, 05:09 AM
Originally posted by jide:
What Zengar said is that you won't gain anything with using vertex arrays inside dl. This works most of the time but that's all. So as far as you use vertex arrays, switching to vbos is far more interresting and much easy than keeping them all inside dl. Well, not quite right... You can store vertex array in a display list, and you will likely get better performance (this is just like if you specify all the vertices in immediate mode)But VBO is much more straightforward in my opinion (and more flexible).
I never said we can't put vertex arrays in display lists. We can. I've done that years ago. But this didn't lead to better performances compared to 'simple' display lists.
Maybe we misunderstood... anyway, I guess he understood what I said and what you said :)
02-04-2007, 01:16 AM
Oh, sorry, I misunderstood what you said.
np, I have to explain what I mean in a more comprehensive way :D
Powered by vBulletin® Version 4.2.3 Copyright © 2017 vBulletin Solutions, Inc. All rights reserved.