Jump to content

  • Log In with Google      Sign In   
  • Create Account


Display Lists


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
2 replies to this topic

#1 Ertai   Members   -  Reputation: 122

Like
Likes
Like

Posted 28 September 2001 - 08:34 AM

Hey all, display lists seem great, but what if you, for example have a displau list to dray a number of tiles to screen, popping matrices for positioning from the GL_MODELVIEW_MATRIX stack, but you want all the tile to have different textures ... i tried specifying the texture names that should be bound with pointers, but the values are read from the pointers when the display list is compiled ... isn''t there some stack one could pop texture names from or something, than i could draw a whole load of tiles by filling up de GL_MODELVIEW_MATRIX and this namestack and just calling one display list ... i hope someone will understand what i mean ... thx in advance

Sponsor:

#2 Dodger   Members   -  Reputation: 122

Like
Likes
Like

Posted 28 September 2001 - 04:09 PM

You can bind the textures outside of the display lists. Meaning, instead of

list = glGenLists(1);
glNewList(...);
glBindTexture(...);
glBegin();
...
glEnd();
glEndList();

for(all_my_tiles){
glCallList(...);
}

do


list = glGenLists(1);
glNewList(...);
glBegin()
...
glEnd();
glEndList();

for(all_my_tiles){
glBindTexture(...);
glCallList(...);
}

That what you meant?


#3 Ertai   Members   -  Reputation: 122

Like
Likes
Like

Posted 01 October 2001 - 12:12 AM

well, yeah, that would be one solution to the problem, but i allready thought of that myself ... but i was hoping for a faster / more elegant solution .. it would be great to be binding textures from within the display lists .. is there not something like a stack in opengl from wich you can pop Gl texture/list names ? Then you could draw all textures by just calling one display list ... very very fast i think ...




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS