From 4f26fe6430cd12914b0d6edf33baabe19829d014 Mon Sep 17 00:00:00 2001 From: Erik Kundiman Date: Sat, 12 Oct 2024 16:39:32 +0800 Subject: Preprocess eTextureType like sGLTextureType (cause eTextureType seems to have been designed to mirror sGLTextureType) otherwise you'd get a GL error of invalid enum of the first argument for glTexImage2D. --- indra/llrender/llrendertarget.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'indra/llrender/llrendertarget.cpp') diff --git a/indra/llrender/llrendertarget.cpp b/indra/llrender/llrendertarget.cpp index 2674fa1ec6..1ff0dec23a 100644 --- a/indra/llrender/llrendertarget.cpp +++ b/indra/llrender/llrendertarget.cpp @@ -255,12 +255,14 @@ bool LLRenderTarget::addColorAttachment(U32 color_fmt) stop_glerror(); } +#if GL_VERSION_3_1 if (mUsage != LLTexUnit::TT_RECT_TEXTURE) { gGL.getTexUnit(0)->setTextureAddressMode(LLTexUnit::TAM_MIRROR); stop_glerror(); } else +#endif { // ATI doesn't support mirrored repeat for rectangular textures. gGL.getTexUnit(0)->setTextureAddressMode(LLTexUnit::TAM_CLAMP); -- cgit v1.2.3