Jump to content
  • Advertisement
Sign in to follow this  
OpenGL_Guru

OpenGL OpenGL Display Lists -- updating real time

This topic is 4889 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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!

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites

This topic is 4889 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Guest
This topic is now closed to further replies.
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!