Jump to content

  • Log In with Google      Sign In   
  • Create Account


RGB


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
4 replies to this topic

#1 manuelcc   Members   -  Reputation: 122

Like
Likes
Like

Posted 04 July 2001 - 11:26 AM

ok im pretty new at opengl programming, but im making a little test program but i want to be able to allow the user to enter a certian rgb color for the background of his choice, but when i make the clear color the rgb color that i entered it doesnt show up as the color i chose, for example: 55, 86, 93 is the color i entered but it doesnt show up as the dark green i chose, but in order to get that color to show up correctly i have to use: .02, .032, .035 is there a way to convert the two rgb colors or am i missing something? thanks in advance

Sponsor:

#2 flame_warrior   Members   -  Reputation: 122

Like
Likes
Like

Posted 04 July 2001 - 12:48 PM

Hi,
Try glColor3ub(55,86,93).

#3 manuelcc   Members   -  Reputation: 122

Like
Likes
Like

Posted 04 July 2001 - 01:14 PM

yeah that does work but im trying to make make the clear color (glClearColor) the rgb value the user specifies, any idea on how to do that? thanks for the help btw

#4 grady   Members   -  Reputation: 122

Like
Likes
Like

Posted 04 July 2001 - 01:58 PM

I think the clear color has to be a float you''ll have to divide you values by 255 to get the float i guess

#5 manuelcc   Members   -  Reputation: 122

Like
Likes
Like

Posted 04 July 2001 - 04:10 PM

thanks that was exactly what i was looking for :D




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