diff options
| author | Dan Goodliffe <dan@randomdan.homeip.net> | 2026-01-16 02:53:57 +0000 |
|---|---|---|
| committer | Dan Goodliffe <dan@randomdan.homeip.net> | 2026-01-16 03:18:29 +0000 |
| commit | 09533ab9379a675a89638132fb6831b420ebb8f4 (patch) | |
| tree | 984985821bcad18e0d8d93831150407e0d5b1a8e /gfx/gl/shadowStenciller.cpp | |
| parent | Tidy thirdparty jam, use -isystem for thirdparty includes (diff) | |
| download | ilt-09533ab9379a675a89638132fb6831b420ebb8f4.tar.bz2 ilt-09533ab9379a675a89638132fb6831b420ebb8f4.tar.xz ilt-09533ab9379a675a89638132fb6831b420ebb8f4.zip | |
Add glDebugScope
Wrapper for glPushDebugGroup/glPopDebugGroup which allows neatly
grouping OpenGL calls in diagnostic tools.
Diffstat (limited to 'gfx/gl/shadowStenciller.cpp')
| -rw-r--r-- | gfx/gl/shadowStenciller.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
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 <stdexcept> 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) { |
