summaryrefslogtreecommitdiff
path: root/indra/llrender/llcubemaparray.cpp
diff options
context:
space:
mode:
authorDave Parks <davep@lindenlab.com>2024-05-07 09:47:37 -0500
committerGitHub <noreply@github.com>2024-05-07 09:47:37 -0500
commit155ddf23363f1d5c534c69f50505faf67e51948f (patch)
tree976912ed4fa3bc2af7b0b68201460f08614748b5 /indra/llrender/llcubemaparray.cpp
parentf79548ec68ebcef8f8f83705b65fd59da43c3e26 (diff)
parentf9473e8afcb624cc1b101195bf15943ec372b56f (diff)
Merge pull request #1421 from secondlife/DRTVWR-600-maint-A
Drtvwr 600 maint a
Diffstat (limited to 'indra/llrender/llcubemaparray.cpp')
-rw-r--r--indra/llrender/llcubemaparray.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/indra/llrender/llcubemaparray.cpp b/indra/llrender/llcubemaparray.cpp
index ed0ad07dc0..4f8d4015b6 100644
--- a/indra/llrender/llcubemaparray.cpp
+++ b/indra/llrender/llcubemaparray.cpp
@@ -42,6 +42,8 @@
//#pragma optimize("", off)
+using namespace LLImageGLMemory;
+
// MUST match order of OpenGL face-layers
GLenum LLCubeMapArray::sTargets[6] =
{
@@ -128,6 +130,8 @@ void LLCubeMapArray::allocate(U32 resolution, U32 components, U32 count, bool us
U32 mip = 0;
+ free_cur_tex_image();
+
while (resolution >= 1)
{
glTexImage3D(GL_TEXTURE_CUBE_MAP_ARRAY, mip, format, resolution, resolution, count * 6, 0,
@@ -141,6 +145,8 @@ void LLCubeMapArray::allocate(U32 resolution, U32 components, U32 count, bool us
++mip;
}
+ alloc_tex_image(resolution * 6, resolution, format);
+
mImage->setAddressMode(LLTexUnit::TAM_CLAMP);
if (use_mips)