hi
how can i Convert windows coordinates to opengl coordinates
include (zoom , translationX, translationY)
please help..........................
Check this example from the OpenTK source OpenTK\trunk\Source\Examples\OpenGL\1.x\Picking.cs
you can't...or better you can project 2d coordinates to 3d coordinates specifying a plane (for example the x,y plane)
You can unproject using depth read from pixel under mouse and you get a full 3D coordinate .
that's true but usually not the 3d coordinates u expect.
my project is 2d the mouse position on windows form (X: 100 , Y: 50 )
viewport(0,0,glcontrol.width,glcontrol.height) GL.Translation(0,0,0);
i need get coordinates in opentk in this mouse position on windosform (X: 100 , Y: 50 )
Comments
Re: Convert windows coordinates to opengl coordinates
Check this example from the OpenTK source
OpenTK\trunk\Source\Examples\OpenGL\1.x\Picking.cs
Re: Convert windows coordinates to opengl coordinates
you can't...or better you can project 2d coordinates to 3d coordinates specifying a plane (for example the x,y plane)
Re: Convert windows coordinates to opengl coordinates
You can unproject using depth read from pixel under mouse and you get a full 3D coordinate .
Re: Convert windows coordinates to opengl coordinates
that's true but usually not the 3d coordinates u expect.
Re: Convert windows coordinates to opengl coordinates
my project is 2d the mouse position on windows form (X: 100 , Y: 50 )
viewport(0,0,glcontrol.width,glcontrol.height)
GL.Translation(0,0,0);
i need get coordinates in opentk in this mouse position on windosform (X: 100 , Y: 50 )