Problem with gl_selection and multiple viewports.
Hi,
Im working on little 3d editor in opengl.
I have problem with object selection in opengl.
When i use single wievport (same size as my application window) everything is allrigh, and selection is working well. But when i try to modify glViewport size selection dies. :(
Check this :
--------------------
In Main()
glViewport (0, 0, Form1->Width, Form1->Height);
glOrtho( 0.0, Form1->Width, 0.0, Form1->Height,-0.5,2.5 )
In ProcessSelect()
glGetIntegerv(GL_VIEWPORT, viewport);
glOrtho( 0.0, Form1->Width, 0.0, Form1->Height,-0.5,2.5 );
-------------------
This works great.
--------------------
In Main()
glViewport (0, 0, Form1->Width/2, Form1->Height/2);
glOrtho( 0.0, Form1->Width/2, 0.0, Form1->Height/2,-0.5,2.5 )
In ProcessSelect()
glGetIntegerv(GL_VIEWPORT, viewport);
glOrtho( 0.0, Form1->Width/2, 0.0, Form1->Height/2,-0.5,2.5 );
-------------------
This one is not working at all :(
How to fix it? how to use opengl selection in multiple viewports?
Whats im do wrong?
Thanks for help!
/lar
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement