Micropro's picture

Convert windows coordinates to opengl coordinates


how can i Convert windows coordinates to opengl coordinates

include (zoom , translationX, translationY)

please help..........................


Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
flopoloco's picture

Check this example from the OpenTK source

avc81's picture

you can't...or better you can project 2d coordinates to 3d coordinates specifying a plane (for example the x,y plane)

tksuoran's picture

You can unproject using depth read from pixel under mouse and you get a full 3D coordinate .

avc81's picture

that's true but usually not the 3d coordinates u expect.

Micropro's picture

my project is 2d the mouse position on windows form (X: 100 , Y: 50 )


i need get coordinates in opentk in this mouse position on windosform (X: 100 , Y: 50 )