I'm trying to debug some OpenGL 3.3+ graphics code using RenderDoc and I would like to define some debug markers for render passes that can be recognised by RenderDoc.
I use GLEW and I tried to use glPushGroupMarkerEXT/glPopGroupMarkerEXT to define these markers but I get an access violation when I call glPushGroupMarkerEXT, so I guess that the extension that provides that functionality is not loaded. I also tried to check if the extension GL_EXT_debug_marker is available using glewIsSupported but that returns false.
Is this functionality not supported or am I not using it properly? Or is there any other way of achieving this?
EXT_debug_marker is not the extension you want to use. It is old and was never really widely supported. Its functionality was absorbed into KHR_debug, which is more widely supported and itself has been core OpenGL since 4.3 (aka: 5+ years ago).
Now, debug marker functionality is different between the two. KHR_debug makes markers into just another kind of user-defined debug notification. So, where you would have called glInsertEventMarkerEXT
, you instead call the more generic glDebugMessageInsert
, using the GL_DEBUG_TYPE_MARKER
as the message's type. Where you would use glPush/PopGroupMarkerEXT
, you instead use glPush/PopDebugGroup
, which is used for arbitrary scoping. Such groupings don't use the marker type; they use the GL_DEBUG_TYPE_PUSH/POP_GROUP
types, so that you can tell the difference between grouping and markers.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With