From 00fc3cb9b2c06026fab0e4760609fe02e027b6df Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Sun, 8 Mar 2026 16:02:56 +0000 Subject: Move all low level texture operations to DSA helpers in glTexture --- gfx/gl/shadowMapper.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'gfx/gl/shadowMapper.cpp') diff --git a/gfx/gl/shadowMapper.cpp b/gfx/gl/shadowMapper.cpp index fb57668..28ab360 100644 --- a/gfx/gl/shadowMapper.cpp +++ b/gfx/gl/shadowMapper.cpp @@ -24,6 +24,7 @@ #include #include #include +#include ShadowMapper::ShadowMapper(const TextureAbsCoord & s) : landmess {shadowLandmass_vert}, dynamicPointInst {shadowDynamicPointInst_vert}, @@ -32,9 +33,7 @@ ShadowMapper::ShadowMapper(const TextureAbsCoord & s) : size {s}, frustum {{}, {}, {}} { glDebugScope _ {depthMap}; - depthMap.bind(GL_TEXTURE_2D_ARRAY); - glTexImage3D( - GL_TEXTURE_2D_ARRAY, 0, GL_DEPTH_COMPONENT, size.x, size.y, 4, 0, GL_DEPTH_COMPONENT, GL_FLOAT, nullptr); + depthMap.storage(1, GL_DEPTH_COMPONENT16, size || static_cast(SHADOW_BANDS)); depthMap.parameter(GL_TEXTURE_MIN_FILTER, GL_NEAREST); depthMap.parameter(GL_TEXTURE_MAG_FILTER, GL_NEAREST); depthMap.parameter(GL_TEXTURE_WRAP_S, GL_CLAMP_TO_BORDER); -- cgit v1.3