Why is it that this doesn't work in GameLoop:
Shouldn't the values of R, G and B be 23, 245 and 167 at the end of this code? It's not, but I don't get why. Help?!?
- Code:
DisplayDevice* display = GetDisplay();
display->Clear(Color(23, 245, 167));
Pixel myPixel = display->GetPixel(100, 100);
register int R = myPixel & RED_MASK;
register int G = myPixel & GREEN_MASK;
register int B = myPixel & BLUE_MASK;
R = R >> RED_SHIFT;
G = G >> (GREEN_SHIFT + 1);
B = B >> BLUE_SHIFT;
display->Update();
Shouldn't the values of R, G and B be 23, 245 and 167 at the end of this code? It's not, but I don't get why. Help?!?