I know OpenGL isnt'' very good for 2d, but I''m going to do it anyway. Does anybody know of any good tutorials on this? I know there are some. I am planning on making a tile engine. please don''t respond saying that I shouldn''t use OpenGL, because I already know this. All I need help on is converting screen x,y coordinates to actual OpenGL x,y coordinates.
Thanks to any who dare,
OpenGL works fine in 2D (I''m making an isometric engine in it). What you should do is use an isometric projection matrix (one where distance from the origin has no effect on the 2D coordinate it produces). It goes something like this (copy/pasted from my engine):
glViewport(0,0,Width,Height); // <- H/W of screen
glOrtho(0.0f,Width,Height,0.0f,-1.0f,1.0f); // <- H/W of screen