|
||
|
GP Mailing List
ATXGPSIG List
|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: Dynamic arrays
For colors it depends on the way the actual bits in the frame buffer are interpreted by the hardware. Usually some number of bits are allocated for each of RGB. For example, if the machine supports 24 bit color then there are 8 bits for each of read, green, and blue. The value range for an 8 bit number is 0-255. When a color is specified as a float between 0 and 1 then the color value is mapped from the range 0.0-1.0 to 0-255. That means that if you specify a color value of 0 then the bits get set to zero and if you specify a color value of 1.0 the bits get set to 255. If you are using 15 bit color then each of red, green, and blue get 5 bits. Who ever told you that is not very well informed. Bob P. dakline@vassar.edu wrote: > > >OpenGL uses integers for their color. It's operators are overloaded so it > >can take nearly any value but behind the scene they are all converted to > >integers for their functions. > > > What are the ranges for these integers? I thought rgb values went from 0-1, > which makes for very simple colors if you can only use integers. > > ================================================================= > The GameProgrammer.Com mailing list is for the open discussion > of any topic related to the art, science, and business of > programming games. This list is especially tolerant of beginners. > We were all beginners once > > To SUBSCRIBE or UNSUBSCRIBE please visit: > http://gameprogrammer.com/mailinglist.html ================================================================= The GameProgrammer.Com mailing list is for the open discussion of any topic related to the art, science, and business of programming games. This list is especially tolerant of beginners. We were all beginners once To SUBSCRIBE or UNSUBSCRIBE please visit: http://gameprogrammer.com/mailinglist.html
|
|