PDA

View Full Version : Color palette



Clark
10-17-2001, 05:49 AM
Hi!

I'm currently trying to do a simple "Paint" program using OpenGL with Microsoft Visual C++.
My questions are:
1. How do I make a color palette with 256 colors?

2. How can I change the current color by clicking on a point in the palette?

Thankful for answer.

/Clark

spidey
10-17-2001, 07:25 AM
I believe you need to use something called 'color index mode'. It's documented in the red book.

Clark
10-17-2001, 11:53 PM
Thank you.

But how can I change the color by clicking on a pixel with the mouse? Any ideas would be helpful.

/Clark