Generate three arrays with random values, one each for R, G
and B.
(Blitz++ provides several random number generators.)
Use glPixelMap* to load the arrays before the call to
glPixelDraw.
Change glPixelDraw to use GL_COLOR_INDEX instead of
GL_LUMINANCE.
As an added bonus the gain/offset feature Lars requests
could be implemented when generating the arrays. Simply let
value lower/higher than the cutoff values be zero in _all_
of the arrays.
There should of course be a button which can generate a new
random colormap.
Page 319 in the Red Book has a nice illustration
demonstrating how the operations are applied.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Logged In: YES
user_id=623121
This can be done as follows:
Generate three arrays with random values, one each for R, G
and B.
(Blitz++ provides several random number generators.)
Use glPixelMap* to load the arrays before the call to
glPixelDraw.
Change glPixelDraw to use GL_COLOR_INDEX instead of
GL_LUMINANCE.
As an added bonus the gain/offset feature Lars requests
could be implemented when generating the arrays. Simply let
value lower/higher than the cutoff values be zero in _all_
of the arrays.
There should of course be a button which can generate a new
random colormap.
Page 319 in the Red Book has a nice illustration
demonstrating how the operations are applied.