diff options
Diffstat (limited to 'indra/llrender/llcubemaparray.cpp')
-rw-r--r-- | indra/llrender/llcubemaparray.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/indra/llrender/llcubemaparray.cpp b/indra/llrender/llcubemaparray.cpp index 03fbb90bf6..be69b997da 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) { 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) |