summaryrefslogtreecommitdiff
path: root/gfx/gl/shadowMapper.cpp
diff options
context:
space:
mode:
authorDan Goodliffe <dan@randomdan.homeip.net>2026-01-16 02:53:57 +0000
committerDan Goodliffe <dan@randomdan.homeip.net>2026-01-16 03:18:29 +0000
commit09533ab9379a675a89638132fb6831b420ebb8f4 (patch)
tree984985821bcad18e0d8d93831150407e0d5b1a8e /gfx/gl/shadowMapper.cpp
parentTidy thirdparty jam, use -isystem for thirdparty includes (diff)
downloadilt-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/shadowMapper.cpp')
-rw-r--r--gfx/gl/shadowMapper.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/gfx/gl/shadowMapper.cpp b/gfx/gl/shadowMapper.cpp
index 3cb73f7..486ba1c 100644
--- a/gfx/gl/shadowMapper.cpp
+++ b/gfx/gl/shadowMapper.cpp
@@ -16,6 +16,7 @@
#include "gfx/lightDirection.h"
#include "gfx/renderable.h"
#include "gl_traits.h"
+#include "gldebug.h"
#include "location.h"
#include "maths.h"
#include "sceneProvider.h"
@@ -32,6 +33,7 @@ ShadowMapper::ShadowMapper(const TextureAbsCoord & s) :
shadowDynamicPointInstWithTextures_fs},
size {s}
{
+ glDebugScope _ {depthMap};
glBindTexture(GL_TEXTURE_2D_ARRAY, depthMap);
glTexImage3D(
GL_TEXTURE_2D_ARRAY, 0, GL_DEPTH_COMPONENT, size.x, size.y, 4, 0, GL_DEPTH_COMPONENT, GL_FLOAT, nullptr);
@@ -83,6 +85,7 @@ ShadowMapper::getBandViewExtents(const Camera & camera, const glm::mat4 & lightV
ShadowMapper::Definitions
ShadowMapper::update(const SceneProvider & scene, const LightDirection & dir, const Camera & camera) const
{
+ glDebugScope _ {depthMap};
glCullFace(GL_FRONT);
glEnable(GL_DEPTH_TEST);