Open stolk opened 5 years ago
That's going to be hard to change. Core OpenGL assumes that applications are aware of the current state of the graphics pipeline so there is no need for these calls, but for GLInject I need to be able to save and restore the current state. The only alternative I see is to hook all calls to OpenGL functions that can change the state, so I can restore the last setting myself, but that sounds really painful and may have a significant performance impact. Or I could just reset the state to a sensible default state and hope that the application won't care, but that will probably break things for some applications.
If it is not needed, maybe skip it when you detect core profile? Or if that is not possible, add an ENV VAR, SSRCOREPROFILE, and when set by user, skip the gl calls?
On second thought, the latter option is safer, as it won’t alter default behavior.
Lastly, in my experience, what trips up Core Profile most, is setting glLinewidth, which is not allowed. If you do that in Ssr, maybe just skip that single setting on core profile runs?
The GL calls that ssr-glinject uses seem to be incompatible with a Core-Profile modern OpenGL driver.
It produces the error:
Function glPushAttrib is deprecated
To reproduce, you need an OpenGL application that enables the ARB_DEBUG_OUTPUT extension, using the glDebugMessageCallback() and glDebugMessageControl() calls, and doing a glEnable(GL_DEBUG_OUTPUT) call.
Version: 0.3.8-3
Platform: Ubuntu LTS.