OpenGL Display Lists -- updating real time

Started by
3 comments, last by _the_phantom_ 18 years, 8 months ago
i have a display that does the following.. .... glTexCoord1f(getColor(value)) glVertex3f(x,y, z) .... then i created a draw function in my class that executes the display list. this just sets up the colors of my texture and draws the quad itself. the getColor function basically just takes value sent in and returns a number that corresponds to the texture..so something like.. tex = (value - max)/(max - min); //return a value between 0.0 and 1.0 anyway my main point is, is that when i change the minimum and maximum number from the main program my display list doesnt seem to be updating.. i am getting the same texture colors..what could i be doing wrong? is the glCallList somehow not being called? thanks in advance!
heh
Advertisement
no, its being called but the values in a display list are fixed at the time of creation and are not changeable, todo so you would have to remake the display list.
The display list is compiled with the value returned from the 'getColor' at compile time. Executing the display list doesn't call the 'getColor' function again (how could it), it simply uses what value was initially passed to it (when compiled).

HTH
ok thanks i got it..and i know you have to rebuild it.. i guess i was just hoping for a way to update it faster without having to wait.. thats all..

and why was i rated down for asking a simple question? i know its just a number and i dont really care but the rating system on here is flawed to the max.
heh
you might not have been rated down for that question, it could well have been that someone was reading another thing you said at the time and decided to rate you down for it, just because something happens around the same time as you posted doesnt mean you are rated on that post... and if you care so little about it why mention it?

Thread closed to prevent this spiraling as the answer has been given.

This topic is closed to new replies.

Advertisement