From 712007d8fccae219154a69c83827413025ca08be Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Sat, 7 Mar 2026 11:59:24 +0000 Subject: Don't create and then replace shadow and billboard textures --- gfx/gl/shadowStenciller.cpp | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'gfx/gl/shadowStenciller.cpp') diff --git a/gfx/gl/shadowStenciller.cpp b/gfx/gl/shadowStenciller.cpp index 19c8bef..cc25f30 100644 --- a/gfx/gl/shadowStenciller.cpp +++ b/gfx/gl/shadowStenciller.cpp @@ -36,10 +36,9 @@ ShadowStenciller::getLightDirection() const return lightDir; } -glTexture -ShadowStenciller::createStencilTexture(GLsizei width, GLsizei height) +void +ShadowStenciller::configureStencilTexture(glTexture & stencil, GLsizei width, GLsizei height) { - glTexture stencil; stencil.bind(GL_TEXTURE_2D_ARRAY); glPixelStorei(GL_UNPACK_ALIGNMENT, 1); @@ -50,8 +49,6 @@ ShadowStenciller::createStencilTexture(GLsizei width, GLsizei height) glTexImage3D(GL_TEXTURE_2D_ARRAY, 0, GL_DEPTH_COMPONENT, width, height, STENCIL_ANGLES, 0, GL_DEPTH_COMPONENT, GL_UNSIGNED_BYTE, nullptr); - - return stencil; } void -- cgit v1.3