In OpenGL, we can draw additional opengl things by hooking into OpenGL pipeline. However, this require exactly the same model-view-projection matrix to register different rendering in the same window.
In pre SU2017 release, SU uses the fix opengl pipeline for rendering the scene. And these matrices are easy to retrieve by just calling native opengl calls. But after SU2017, it changes to modern opengl pipeline, which uses shader for these stuffs.
Although I have found some workaround by hook the
glUniformMatrix4fv function to get a large number matrices and guess which are what matrices. This will in the most time get it correct, but especially when the camera is close to the group, it will fail.
I have seen the undet plugin do the same thing.
So my question is, if it is possible to retrieve these by API or other smart ways? Or better add an api to the Sketchup::Camera class. In fact, from current API, the near and far for projection matrix is the only thing missed.