I have simple 2D textured rects on which I want to put other textured rect as button. I tried to write something like:
void setPosition(float x, float y)
method, so that when the user sets the points as:
mButton1.setPosition(240, 120);
the button to be drawn at this point. Now, setting x and y in the opengl world via gluUnProject never works correctly, there are always some incorrect values. Any other simpler way to do this? I tried this: http://steinsoft.net/index.php?site=Programming/Code%20Snippets/OpenGL/no8
Thanks