mouse over color

hallo everybody!

i wonder if there’s a simple way to check mouse-over against a certain color?!
i read about using fb-objects. no other way? i’m unexperienced with fbo.


you can use:

unsigned char[3] pixel;  

the positions from 0…2 in the pixel will be r,g,b

thank you very much, arturo!

unfortunately i get a very weird malfunction: glReadPixels returns rgb-values as if my screen was turned upsidedown! as you can see in the screenshot, the values at the position of the mouse-cursor relate to the rectacle in the lower half (= white).

also for drawn images i get upsidedown-output. might it be some kind of graphic-card-problem (using GeForce 9600 GT)?

have a nice day!

oh, no it’s actually something with OF, the standard for openGL is 0,0 at botom left but in OF is top left you just need to do:


huh, that’s almost funny! but works! thanks a lot!