From 0e18b146055efd18029c4ac5553fd1e53dfbbfc8 Mon Sep 17 00:00:00 2001 From: user Date: Thu, 14 Dec 2017 11:44:48 +0100 Subject: added debug-event-markers for opengl so that you're able to set markers for renderdoc or other gpu debuggers what your program is currently doing --- src/rlgl.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/rlgl.c') diff --git a/src/rlgl.c b/src/rlgl.c index 5db6f1cc..e34e48da 100644 --- a/src/rlgl.c +++ b/src/rlgl.c @@ -307,6 +307,8 @@ static PFNGLDELETEVERTEXARRAYSOESPROC glDeleteVertexArrays; //static PFNGLISVERTEXARRAYOESPROC glIsVertexArray; // NOTE: Fails in WebGL, omitted #endif +static bool debugMarkerSupported = false; + // Compressed textures support flags static bool texCompDXTSupported = false; // DDS texture compression support static bool texNPOTSupported = false; // NPOT textures full support @@ -1135,6 +1137,10 @@ void rlglInit(int width, int height) glGetFloatv(0x84FF, &maxAnisotropicLevel); // GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT } + if(strcmp(extList[i], (const char *)"GL_EXT_debug_marker") == 0) { + debugMarkerSupported = true; + } + // Clamp mirror wrap mode supported if (strcmp(extList[i], (const char *)"GL_EXT_texture_mirror_clamp") == 0) texClampMirrorSupported = true; } @@ -1160,6 +1166,8 @@ void rlglInit(int width, int height) if (texAnisotropicFilterSupported) TraceLog(LOG_INFO, "[EXTENSION] Anisotropic textures filtering supported (max: %.0fX)", maxAnisotropicLevel); if (texClampMirrorSupported) TraceLog(LOG_INFO, "[EXTENSION] Clamp mirror wrap texture mode supported"); + if (debugMarkerSupported) TraceLog(LOG_INFO, "[EXTENSION] Debug Marker supported"); + // Initialize buffers, default shaders and default textures //---------------------------------------------------------- -- cgit v1.2.3