Translating 2d coords to 3d
Can someone help me to translate DirectInput coords so that i can use them in OpenGL??
Since the mouse coords starts at 320,240 (Center of screen)
and the OpenGL coords are 0,0 in the centre....os did i misunderstand the whole thing?
Ethereal
Just subtract the amount that''s wrong.
For instance, if 320,240 is 0,0 then just use
xcoord=xcoord-320
ycoord=ycoord-240
I don''t have any opengl experience, but I doubt that one change in mouse coord will represent one pixel in opengl, so you will have to change the updating a bit more.
Or am I missing something important here? Tell so.
(it looks rather simple)
Newbie
/Mankind gave birth to God.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement