From 09533ab9379a675a89638132fb6831b420ebb8f4 Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Fri, 16 Jan 2026 02:53:57 +0000 Subject: Add glDebugScope Wrapper for glPushDebugGroup/glPopDebugGroup which allows neatly grouping OpenGL calls in diagnostic tools. --- gfx/gl/shadowStenciller.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'gfx/gl/shadowStenciller.cpp') diff --git a/gfx/gl/shadowStenciller.cpp b/gfx/gl/shadowStenciller.cpp index 86b77e4..a6124f5 100644 --- a/gfx/gl/shadowStenciller.cpp +++ b/gfx/gl/shadowStenciller.cpp @@ -1,5 +1,4 @@ #include "shadowStenciller.h" -#include "gfx/gl/program.h" #include "gfx/gl/shaders/fs-shadowStencil.h" #include "gfx/gl/shaders/gs-shadowStencil.h" #include "gfx/gl/shaders/vs-shadowStencil.h" @@ -7,12 +6,14 @@ #include "gfx/models/mesh.h" #include "glArrays.h" #include "gl_traits.h" +#include "gldebug.h" #include "maths.h" #include ShadowStenciller::ShadowStenciller() : shadowCaster {shadowStencil_vs, shadowStencil_gs, shadowStencil_fs}, viewProjections {} { + glDebugScope _ {fbo}; glBindFramebuffer(GL_FRAMEBUFFER, fbo); glDrawBuffer(GL_NONE); glReadBuffer(GL_NONE); @@ -50,6 +51,7 @@ ShadowStenciller::createStencilTexture(GLsizei width, GLsizei height) void ShadowStenciller::renderStencil(const glTexture & stencil, const MeshBase & mesh, const Texture::AnyPtr texture) const { + glDebugScope _ {fbo}; glBindFramebuffer(GL_FRAMEBUFFER, fbo); glFramebufferTexture(GL_FRAMEBUFFER, GL_DEPTH_ATTACHMENT, stencil, 0); if (glCheckFramebufferStatus(GL_FRAMEBUFFER) != GL_FRAMEBUFFER_COMPLETE) { -- cgit v1.2.3