diff options
| author | Dan Goodliffe <dan@randomdan.homeip.net> | 2026-03-07 11:59:24 +0000 |
|---|---|---|
| committer | Dan Goodliffe <dan@randomdan.homeip.net> | 2026-03-07 11:59:24 +0000 |
| commit | 712007d8fccae219154a69c83827413025ca08be (patch) | |
| tree | d4a983b4896d7d05870294b4f38de182fe55ec35 /gfx/gl/shadowStenciller.cpp | |
| parent | Merge branch 'glalloc' (diff) | |
| download | ilt-712007d8fccae219154a69c83827413025ca08be.tar.bz2 ilt-712007d8fccae219154a69c83827413025ca08be.tar.xz ilt-712007d8fccae219154a69c83827413025ca08be.zip | |
Don't create and then replace shadow and billboard textures
Diffstat (limited to 'gfx/gl/shadowStenciller.cpp')
| -rw-r--r-- | gfx/gl/shadowStenciller.cpp | 7 |
1 files changed, 2 insertions, 5 deletions
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<GLint>, 0, GL_DEPTH_COMPONENT, GL_UNSIGNED_BYTE, nullptr); - - return stencil; } void |
