Open heyx3 opened 1 year ago
Another change that I made a while ago, which may have been important in making this work, is the use of GLFW.WindowHint(GLFW.OPENGL_DEBUG_CONTEXT, true)
when debug_mode
is true. Might be worth investigating the exact relationship between these two things.
The old code can be found at the bottom of GL/debugging.jl, below the new code. And the old code is enabled within the
GL.Context
constructor, under theif debug_mode
block.I was running into problems with hooking callbacks into OpenGL's error reporting. However, I later found out that I was doing C callbacks incorrectly. They have to be set up on
__init__
, not during precompilation, because you are allocating a function pointer and pointers are not going to be the same across different program runs.So now that I know why it wasn't working, we should revisit it! The older form of OpenGL error detection that I'm using is much uglier.