7

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?

bishopp
  • 113
  • 8
  • You should look up the various extension naming conventions. IIRC `EXT` are less than `ARB` but higher than manufacturer extensions. While most cards support ARB's declared before the cards production, they are less likely to support EXT's. Most likely your card doesn’t support the extension, if there is an ARB for it, that may have better support. – vandench Jan 20 '19 at 16:53
  • Someone made a list of the cards and OS's that support this extension, the only OS that supports it is OSX (the extension was proposed by Apple), there is some minor support for Android. If you’re using Windows it is highly unlikely that you’ll get support for this. https://feedback.wildfiregames.com/report/opengl/feature/GL_EXT_debug_marker – vandench Jan 20 '19 at 17:01
  • You are right. I found it mentioned in a post about OSX. It's available for my card but only on OSX (I am using Windows) – bishopp Jan 20 '19 at 17:05
  • @vandench glPushGroupMarkerEXT() is supported on Linux as well. It is not MacOS only. – Bram May 15 '19 at 01:43

1 Answers1

8

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.

Nicol Bolas
  • 449,505
  • 63
  • 781
  • 982