cmlibs / zinc

Source code repository for OpenCMISS-Zinc
Mozilla Public License 2.0
15 stars 18 forks source link

Sceneviewer processSceneviewerinput queries OpenGL #170

Open rchristie opened 3 years ago

rchristie commented 3 years ago

This is an issue with PySide2 as the OpenGL context is not current when querying current projection matrix and other values from OpenGL. This causes translation drag to be incorrect as it unprojects mouse coordinates with incorrect matrices. Workaround is to call makeCurrent before calling Sceneviewer.processSceneviewerinput(). Longer term solution is to rewrite Scene_viewer_unproject without querying OpenGL, but note there are 2 other places calling: glGetDoublev(GL_MODELVIEW_MATRIX,modelview_matrix);