I am makeing a library to deal with all my opengl general stuff, and i need help with my mouse interface.
See windows assumes that 0,0 is the upper left corner, and OpenGL assumes its the lower left. so i need to flip the y axis value.
it is stored here
loc.cur.y
ive been trying, and have this, but it dosent work
int tempy;
if(loc.cur.y > (glh.height/2)) tempy = (glh.height/2) - (loc.cur.y - (glh.height/2));
if(loc.cur.x < (glh.height/2)) tempy = (glh.height/2) + (loc.cur.y - (glh.height/2));
I have attached a simple program to demonstrate the problem.
just click on a sector to turn the floating box that color.
Given a 600 y resolution, if the mouse is at 500, it needs to be at 100.