From 77465730d2b67c21cee1bfa1b7fe217fff44a662 Mon Sep 17 00:00:00 2001 From: Rye Mutt <rye@bred.dog> Date: Sun, 16 Aug 2020 21:35:48 -0400 Subject: [PATCH] Use glGenerateMip on 3.0+ contexts --- indra/llrender/llcubemap.cpp | 12 ++++++------ indra/llrender/llglstates.h | 2 +- indra/llrender/llimagegl.cpp | 4 ++-- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/indra/llrender/llcubemap.cpp b/indra/llrender/llcubemap.cpp index 5947bca6700..41cf726f603 100644 --- a/indra/llrender/llcubemap.cpp +++ b/indra/llrender/llcubemap.cpp @@ -51,12 +51,12 @@ LLCubeMap::LLCubeMap(bool init_as_srgb) mMatrixStage(0), mIssRGB(init_as_srgb) { - mTargets[0] = GL_TEXTURE_CUBE_MAP_NEGATIVE_X_ARB; - mTargets[1] = GL_TEXTURE_CUBE_MAP_POSITIVE_X_ARB; - mTargets[2] = GL_TEXTURE_CUBE_MAP_NEGATIVE_Y_ARB; - mTargets[3] = GL_TEXTURE_CUBE_MAP_POSITIVE_Y_ARB; - mTargets[4] = GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_ARB; - mTargets[5] = GL_TEXTURE_CUBE_MAP_POSITIVE_Z_ARB; + mTargets[0] = GL_TEXTURE_CUBE_MAP_NEGATIVE_X; + mTargets[1] = GL_TEXTURE_CUBE_MAP_POSITIVE_X; + mTargets[2] = GL_TEXTURE_CUBE_MAP_NEGATIVE_Y; + mTargets[3] = GL_TEXTURE_CUBE_MAP_POSITIVE_Y; + mTargets[4] = GL_TEXTURE_CUBE_MAP_NEGATIVE_Z; + mTargets[5] = GL_TEXTURE_CUBE_MAP_POSITIVE_Z; } LLCubeMap::~LLCubeMap() diff --git a/indra/llrender/llglstates.h b/indra/llrender/llglstates.h index a4924eba14d..27ab1429256 100644 --- a/indra/llrender/llglstates.h +++ b/indra/llrender/llglstates.h @@ -75,7 +75,7 @@ class LLGLSDefault mLineStipple(GL_LINE_STIPPLE), mNormalize(GL_NORMALIZE), mPolygonSmooth(GL_POLYGON_SMOOTH), - mGLMultisample(GL_MULTISAMPLE_ARB) + mGLMultisample(GL_MULTISAMPLE) { } }; diff --git a/indra/llrender/llimagegl.cpp b/indra/llrender/llimagegl.cpp index 7cc749dfbf7..729aae60d7b 100644 --- a/indra/llrender/llimagegl.cpp +++ b/indra/llrender/llimagegl.cpp @@ -776,7 +776,7 @@ BOOL LLImageGL::setImage(const U8* data_in, BOOL data_hasmips) //use legacy mipmap generation mode (note: making this condional can cause rendering issues) // -- but making it not conditional triggers deprecation warnings when core profile is enabled // (some rendering issues while core profile is enabled are acceptable at this point in time) - if (!LLRender::sGLCoreProfile) + if (gGLManager.mGLVersion < 3.f) { glTexParameteri(mTarget, GL_GENERATE_MIPMAP, GL_TRUE); } @@ -796,7 +796,7 @@ BOOL LLImageGL::setImage(const U8* data_in, BOOL data_hasmips) stop_glerror(); } - if (LLRender::sGLCoreProfile) + if (gGLManager.mGLVersion >= 3.f) { glGenerateMipmap(mTarget); } -- GitLab