diff options
| author | Dan Goodliffe <dan.goodliffe@octal.co.uk> | 2026-03-02 13:17:28 +0000 |
|---|---|---|
| committer | Dan Goodliffe <dan.goodliffe@octal.co.uk> | 2026-03-02 13:17:28 +0000 |
| commit | 64ede41ebaade64ad6705f7f55ca4a778a156481 (patch) | |
| tree | 6d2fbc64cd28d272fe3f5bbf79ddd41ecc5e2626 /gfx/gl/shadowStenciller.cpp | |
| parent | Refactor glArrays to better expose underlying types (diff) | |
| download | ilt-64ede41ebaade64ad6705f7f55ca4a778a156481.tar.bz2 ilt-64ede41ebaade64ad6705f7f55ca4a778a156481.tar.xz ilt-64ede41ebaade64ad6705f7f55ca4a778a156481.zip | |
Fixes previously hard coded billboard texture size.
Diffstat (limited to 'gfx/gl/shadowStenciller.cpp')
| -rw-r--r-- | gfx/gl/shadowStenciller.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/gfx/gl/shadowStenciller.cpp b/gfx/gl/shadowStenciller.cpp index aee7161..7a0fc9b 100644 --- a/gfx/gl/shadowStenciller.cpp +++ b/gfx/gl/shadowStenciller.cpp @@ -1,7 +1,6 @@ #include "shadowStenciller.h" #include "gfx/lightDirection.h" #include "gfx/models/mesh.h" -#include "glArrays.h" #include "gl_traits.h" #include "gldebug.h" #include "maths.h" @@ -34,7 +33,7 @@ glTexture ShadowStenciller::createStencilTexture(GLsizei width, GLsizei height) { glTexture stencil; - glBindTexture(GL_TEXTURE_2D_ARRAY, stencil); + stencil.bind(GL_TEXTURE_2D_ARRAY); glPixelStorei(GL_UNPACK_ALIGNMENT, 1); glTexParameter(GL_TEXTURE_2D_ARRAY, GL_TEXTURE_MIN_FILTER, GL_LINEAR); @@ -62,7 +61,7 @@ ShadowStenciller::renderStencil(const glTexture & stencil, const MeshBase & mesh } glUseProgram(shadowCaster); glClear(GL_DEPTH_BUFFER_BIT); - const auto stencilSize = Texture::getSize(stencil); + const auto stencilSize = stencil.getSize(); glViewport(0, 0, stencilSize.x, stencilSize.y); const auto & centre = mesh.getDimensions().centre; const auto & size = mesh.getDimensions().size; |
