I am working on a color picking program with two windows.
There’s a cube (from which you pick the color) in the main window. Once the user picks a color, the second window has to make it’s background color into the color that was picked.
to get the color. I have a global char array that stores this color.
I know this is working because I display the color’s RGB value in the console window and the correct values are printed.
In the new window, other than the initialization things, all I have is a
in the display function. The values in the glClearColor are from the global array that I mentioned earlier. So, (with my limited knowledge) I am not sure where I’m going wrong.
The color in the new window is always black and never changes to the picked color.
How can I fix this?