summaryrefslogtreecommitdiff
path: root/indra/llrender/llcubemaparray.cpp
diff options
context:
space:
mode:
authorErik Kundiman <erik@megapahit.org>2024-07-27 15:17:57 +0800
committerErik Kundiman <erik@megapahit.org>2024-07-28 08:24:59 +0800
commit96a81b5ecbe3bffb582ded930752c0523df5e80a (patch)
treea87a0bd09fd980562e88150dbfea3819d28d9f12 /indra/llrender/llcubemaparray.cpp
parent06e8f0c443c1ba7858d000c6d695b7e988e02053 (diff)
parented73208eb96b862b97fa285036edea1e792ca3c6 (diff)
Merge remote-tracking branch 'secondlife/release/2024.06-atlasaurus' into 2024.06-atlasaurus
Diffstat (limited to 'indra/llrender/llcubemaparray.cpp')
-rw-r--r--indra/llrender/llcubemaparray.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/indra/llrender/llcubemaparray.cpp b/indra/llrender/llcubemaparray.cpp
index a758d7e22b..0242fe60ce 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] =
{
@@ -107,7 +109,7 @@ LLCubeMapArray::~LLCubeMapArray()
{
}
-void LLCubeMapArray::allocate(U32 resolution, U32 components, U32 count, BOOL use_mips)
+void LLCubeMapArray::allocate(U32 resolution, U32 components, U32 count, bool use_mips)
{
U32 texname = 0;
mWidth = resolution;
@@ -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)
{
#if GL_VERSION_4_0
@@ -143,6 +147,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)