From aa7531e5e40d018695bca847b6a1e24d3e681b4c Mon Sep 17 00:00:00 2001 From: Rye Mutt <rye@alchemyviewer.org> Date: Sat, 12 Aug 2023 00:11:58 -0400 Subject: [PATCH] Decruft --- indra/llrender/llgl.cpp | 11 ----------- indra/llrender/llglstates.h | 27 --------------------------- indra/llrender/llshadermgr.cpp | 2 +- indra/newview/lldrawpool.cpp | 2 +- indra/newview/llviewerjointmesh.cpp | 2 -- indra/newview/llviewershadermgr.cpp | 6 +++--- indra/newview/pipeline.cpp | 2 +- 7 files changed, 6 insertions(+), 46 deletions(-) diff --git a/indra/llrender/llgl.cpp b/indra/llrender/llgl.cpp index 67a90a6b744..92b19ad8e09 100644 --- a/indra/llrender/llgl.cpp +++ b/indra/llrender/llgl.cpp @@ -1115,17 +1115,6 @@ bool LLGLManager::initGL() if (mGLVersion >= 2.f) { parse_glsl_version(mGLSLVersionMajor, mGLSLVersionMinor); - -#if 0 && LL_DARWIN - // TODO maybe switch to using a core profile for GL 3.2? - // https://stackoverflow.com/a/19868861 - //never use GLSL greater than 1.20 on OSX - if (mGLSLVersionMajor > 1 || mGLSLVersionMinor > 30) - { - mGLSLVersionMajor = 1; - mGLSLVersionMinor = 30; - } -#endif } if (mGLVersion >= 2.1f && LLImageGL::sCompressTextures) diff --git a/indra/llrender/llglstates.h b/indra/llrender/llglstates.h index 930c5e3ed78..c9cdf29f36f 100644 --- a/indra/llrender/llglstates.h +++ b/indra/llrender/llglstates.h @@ -166,31 +166,4 @@ class LLGLSTracker //---------------------------------------------------------------------------- -class LLGLSSpecular -{ -public: - F32 mShininess; - LLGLSSpecular(const LLColor4& color, F32 shininess) - { - mShininess = shininess; - if (mShininess > 0.0f) - { - glMaterialfv(GL_FRONT_AND_BACK, GL_SPECULAR, color.mV); - S32 shiny = (S32)(shininess*128.f); - shiny = llclamp(shiny,0,128); - glMateriali(GL_FRONT_AND_BACK, GL_SHININESS, shiny); - } - } - ~LLGLSSpecular() - { - if (mShininess > 0.f) - { - glMaterialfv(GL_FRONT_AND_BACK, GL_SPECULAR, LLColor4(0.f,0.f,0.f,0.f).mV); - glMateriali(GL_FRONT_AND_BACK, GL_SHININESS, 0); - } - } -}; - -//---------------------------------------------------------------------------- - #endif diff --git a/indra/llrender/llshadermgr.cpp b/indra/llrender/llshadermgr.cpp index f923fc86d0e..ad335e937fa 100644 --- a/indra/llrender/llshadermgr.cpp +++ b/indra/llrender/llshadermgr.cpp @@ -641,7 +641,7 @@ GLuint LLShaderMgr::loadShaderFile(const std::string& filename, S32 & shader_lev } } - if (type == GL_FRAGMENT_SHADER_ARB) + if (type == GL_FRAGMENT_SHADER) { extra_code_text[extra_code_count++] = strdup("#define FRAGMENT_SHADER 1\n"); } diff --git a/indra/newview/lldrawpool.cpp b/indra/newview/lldrawpool.cpp index 2e1c206d405..b3ba516a1c9 100644 --- a/indra/newview/lldrawpool.cpp +++ b/indra/newview/lldrawpool.cpp @@ -357,7 +357,7 @@ void LLFacePool::LLOverrideFaceColor::setColor(const LLColor4& color) void LLFacePool::LLOverrideFaceColor::setColor(const LLColor4U& color) { - glColor4ubv(color.mV); + gGL.diffuseColor4ubv(color.mV); } void LLFacePool::LLOverrideFaceColor::setColor(F32 r, F32 g, F32 b, F32 a) diff --git a/indra/newview/llviewerjointmesh.cpp b/indra/newview/llviewerjointmesh.cpp index 4525d273479..e52cc043ef0 100644 --- a/indra/newview/llviewerjointmesh.cpp +++ b/indra/newview/llviewerjointmesh.cpp @@ -235,8 +235,6 @@ U32 LLViewerJointMesh::drawShape( F32 pixelArea, BOOL first_pass, BOOL is_dummy) gGL.diffuseColor4fv(mColor.mV); stop_glerror(); - - LLGLSSpecular specular(LLColor4(1.f,1.f,1.f,1.f), 0.f); //---------------------------------------------------------------- // setup current texture diff --git a/indra/newview/llviewershadermgr.cpp b/indra/newview/llviewershadermgr.cpp index 182438c1c30..0ab9e94fe6d 100644 --- a/indra/newview/llviewershadermgr.cpp +++ b/indra/newview/llviewershadermgr.cpp @@ -3119,11 +3119,11 @@ BOOL LLViewerShaderMgr::loadShadersDeferred() gRlvSphereProgram.mName = "RLVa Sphere Post Processing Shader"; gRlvSphereProgram.mFeatures.isDeferred = true; gRlvSphereProgram.mShaderFiles.clear(); - gRlvSphereProgram.mShaderFiles.push_back(make_pair("deferred/rlvV.glsl", GL_VERTEX_SHADER_ARB)); + gRlvSphereProgram.mShaderFiles.push_back(make_pair("deferred/rlvV.glsl", GL_VERTEX_SHADER)); if (gGLManager.mGLVersion >= 4.5f) - gRlvSphereProgram.mShaderFiles.push_back(make_pair("deferred/rlvF.glsl", GL_FRAGMENT_SHADER_ARB)); + gRlvSphereProgram.mShaderFiles.push_back(make_pair("deferred/rlvF.glsl", GL_FRAGMENT_SHADER)); else - gRlvSphereProgram.mShaderFiles.push_back(make_pair("deferred/rlvFLegacy.glsl", GL_FRAGMENT_SHADER_ARB)); + gRlvSphereProgram.mShaderFiles.push_back(make_pair("deferred/rlvFLegacy.glsl", GL_FRAGMENT_SHADER)); gRlvSphereProgram.mShaderLevel = mShaderLevel[SHADER_DEFERRED]; gRlvSphereProgram.createShader(NULL, NULL); } diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp index 554f3b72f76..15a975e4103 100644 --- a/indra/newview/pipeline.cpp +++ b/indra/newview/pipeline.cpp @@ -6790,7 +6790,7 @@ void LLPipeline::renderFullbrightMaskedObjects(U32 type, bool texture, bool batc void validate_framebuffer_object() { GLenum status; - status = glCheckFramebufferStatus(GL_FRAMEBUFFER_EXT); + status = glCheckFramebufferStatus(GL_FRAMEBUFFER); switch(status) { case GL_FRAMEBUFFER_COMPLETE: -- GitLab