diff options
author | Howard Stearns <howard.stearns@gmail.com> | 2022-09-01 10:58:27 -0700 |
---|---|---|
committer | Howard Stearns <howard.stearns@gmail.com> | 2022-09-01 10:58:27 -0700 |
commit | 2082443220fe344bb027c3acbf50fea0a99159c3 (patch) | |
tree | bc10ed9eda1d18ebf6d6388b999c39ed3bc0dde1 /indra/llrender/llglslshader.cpp | |
parent | 3b70c9d49c2a963439b3811e80d24576f390552b (diff) |
SL-17967 - Git rid of ARB that is in core
Diffstat (limited to 'indra/llrender/llglslshader.cpp')
-rw-r--r-- | indra/llrender/llglslshader.cpp | 154 |
1 files changed, 77 insertions, 77 deletions
diff --git a/indra/llrender/llglslshader.cpp b/indra/llrender/llglslshader.cpp index 67f82c9c5e..db70ba0c60 100644 --- a/indra/llrender/llglslshader.cpp +++ b/indra/llrender/llglslshader.cpp @@ -37,7 +37,7 @@ #include "OpenGL/OpenGL.h" #endif -// Print-print list of shader included source files that are linked together via glAttachObjectARB() +// Print-print list of shader included source files that are linked together via glAttachShader() // i.e. On macOS / OSX the AMD GLSL linker will display an error if a varying is left in an undefined state. #define DEBUG_SHADER_INCLUDES 0 @@ -47,7 +47,7 @@ using std::pair; using std::make_pair; using std::string; -GLhandleARB LLGLSLShader::sCurBoundShader = 0; +GLuint LLGLSLShader::sCurBoundShader = 0; LLGLSLShader* LLGLSLShader::sCurBoundShaderPtr = NULL; S32 LLGLSLShader::sIndexedTextureChannels = 0; bool LLGLSLShader::sProfileEnabled = false; @@ -227,11 +227,11 @@ void LLGLSLShader::stopProfile(U32 count, U32 mode) void LLGLSLShader::placeProfileQuery() { -#if !LL_DARWIN +#if 1 || !LL_DARWIN if (mTimerQuery == 0) { - glGenQueriesARB(1, &mSamplesQuery); - glGenQueriesARB(1, &mTimerQuery); + glGenQueries(1, &mSamplesQuery); + glGenQueries(1, &mTimerQuery); } if (!mTextureStateFetched) @@ -267,16 +267,16 @@ void LLGLSLShader::placeProfileQuery() } - glBeginQueryARB(GL_SAMPLES_PASSED, mSamplesQuery); - glBeginQueryARB(GL_TIME_ELAPSED, mTimerQuery); + glBeginQuery(GL_SAMPLES_PASSED, mSamplesQuery); + glBeginQuery(GL_TIME_ELAPSED, mTimerQuery); #endif } void LLGLSLShader::readProfileQuery(U32 count, U32 mode) { #if !LL_DARWIN - glEndQueryARB(GL_TIME_ELAPSED); - glEndQueryARB(GL_SAMPLES_PASSED); + glEndQuery(GL_TIME_ELAPSED); + glEndQuery(GL_SAMPLES_PASSED); U64 time_elapsed = 0; glGetQueryObjectui64v(mTimerQuery, GL_QUERY_RESULT, &time_elapsed); @@ -347,30 +347,30 @@ void LLGLSLShader::unloadInternal() if (mProgramObject) { - GLhandleARB obj[1024]; + GLuint obj[1024]; GLsizei count; - glGetAttachedObjectsARB(mProgramObject, 1024, &count, obj); + glGetAttachedShaders(mProgramObject, 1024, &count, obj); for (GLsizei i = 0; i < count; i++) { - glDetachObjectARB(mProgramObject, obj[i]); - glDeleteObjectARB(obj[i]); + glDetachShader(mProgramObject, obj[i]); + glDeleteShader(obj[i]); } - glDeleteObjectARB(mProgramObject); + glDeleteProgram(mProgramObject); mProgramObject = 0; } if (mTimerQuery) { - glDeleteQueriesARB(1, &mTimerQuery); + glDeleteQueries(1, &mTimerQuery); mTimerQuery = 0; } if (mSamplesQuery) { - glDeleteQueriesARB(1, &mSamplesQuery); + glDeleteQueries(1, &mSamplesQuery); mSamplesQuery = 0; } @@ -401,7 +401,7 @@ BOOL LLGLSLShader::createShader(std::vector<LLStaticHashedString> * attributes, llassert_always(!mShaderFiles.empty()); // Create program - mProgramObject = glCreateProgramObjectARB(); + mProgramObject = glCreateProgram(); if (mProgramObject == 0) { // Shouldn't happen if shader related extensions, like ARB_vertex_shader, exist. @@ -425,7 +425,7 @@ BOOL LLGLSLShader::createShader(std::vector<LLStaticHashedString> * attributes, vector< pair<string,GLenum> >::iterator fileIter = mShaderFiles.begin(); for ( ; fileIter != mShaderFiles.end(); fileIter++ ) { - GLhandleARB shaderhandle = LLShaderMgr::instance()->loadShaderFile((*fileIter).first, mShaderLevel, (*fileIter).second, &mDefines, mFeatures.mIndexedTextureChannels); + GLuint shaderhandle = LLShaderMgr::instance()->loadShaderFile((*fileIter).first, mShaderLevel, (*fileIter).second, &mDefines, mFeatures.mIndexedTextureChannels); LL_DEBUGS("ShaderLoading") << "SHADER FILE: " << (*fileIter).first << " mShaderLevel=" << mShaderLevel << LL_ENDL; if (shaderhandle) { @@ -505,20 +505,20 @@ BOOL LLGLSLShader::createShader(std::vector<LLStaticHashedString> * attributes, } #if DEBUG_SHADER_INCLUDES -void dumpAttachObject( const char *func_name, GLhandleARB program_object, const std::string &object_path ) +void dumpAttachObject( const char *func_name, GLuint program_object, const std::string &object_path ) { - GLcharARB* info_log; + GLchar* info_log; GLint info_len_expect = 0; GLint info_len_actual = 0; - glGetObjectParameterivARB(program_object, GL_OBJECT_INFO_LOG_LENGTH_ARB, &info_len_expect); + glGetShaderiv(program_object, GL_INFO_LOG_LENGTH,, &info_len_expect); fprintf(stderr, " * %-20s(), log size: %d, %s\n", func_name, info_len_expect, object_path.c_str()); if (info_len_expect > 0) { fprintf(stderr, " ========== %s() ========== \n", func_name); - info_log = new GLcharARB [ info_len_expect ]; - glGetInfoLogARB(program_object, info_len_expect, &info_len_actual, info_log); + info_log = new GLchar [ info_len_expect ]; + glGetProgramInfoLog(program_object, info_len_expect, &info_len_actual, info_log); fprintf(stderr, "%s\n", info_log); delete [] info_log; } @@ -530,7 +530,7 @@ BOOL LLGLSLShader::attachVertexObject(std::string object_path) if (LLShaderMgr::instance()->mVertexShaderObjects.count(object_path) > 0) { stop_glerror(); - glAttachObjectARB(mProgramObject, LLShaderMgr::instance()->mVertexShaderObjects[object_path]); + glAttachShader(mProgramObject, LLShaderMgr::instance()->mVertexShaderObjects[object_path]); #if DEBUG_SHADER_INCLUDES dumpAttachObject("attachVertexObject", mProgramObject, object_path); #endif // DEBUG_SHADER_INCLUDES @@ -549,7 +549,7 @@ BOOL LLGLSLShader::attachFragmentObject(std::string object_path) if (LLShaderMgr::instance()->mFragmentShaderObjects.count(object_path) > 0) { stop_glerror(); - glAttachObjectARB(mProgramObject, LLShaderMgr::instance()->mFragmentShaderObjects[object_path]); + glAttachShader(mProgramObject, LLShaderMgr::instance()->mFragmentShaderObjects[object_path]); #if DEBUG_SHADER_INCLUDES dumpAttachObject("attachFragmentObject", mProgramObject, object_path); #endif // DEBUG_SHADER_INCLUDES @@ -563,12 +563,12 @@ BOOL LLGLSLShader::attachFragmentObject(std::string object_path) } } -void LLGLSLShader::attachObject(GLhandleARB object) +void LLGLSLShader::attachObject(GLuint object) { if (object != 0) { stop_glerror(); - glAttachObjectARB(mProgramObject, object); + glAttachShader(mProgramObject, object); #if DEBUG_SHADER_INCLUDES std::string object_path("???"); dumpAttachObject("attachObject", mProgramObject, object_path); @@ -581,7 +581,7 @@ void LLGLSLShader::attachObject(GLhandleARB object) } } -void LLGLSLShader::attachObjects(GLhandleARB* objects, S32 count) +void LLGLSLShader::attachObjects(GLuint* objects, S32 count) { for (S32 i = 0; i < count; i++) { @@ -597,7 +597,7 @@ BOOL LLGLSLShader::mapAttributes(const std::vector<LLStaticHashedString> * attri for (U32 i = 0; i < LLShaderMgr::instance()->mReservedAttribs.size(); i++) { const char* name = LLShaderMgr::instance()->mReservedAttribs[i].c_str(); - glBindAttribLocationARB(mProgramObject, i, (const GLcharARB *) name); + glBindAttribLocation(mProgramObject, i, (const GLchar *) name); } //link the program @@ -620,7 +620,7 @@ BOOL LLGLSLShader::mapAttributes(const std::vector<LLStaticHashedString> * attri for (U32 i = 0; i < LLShaderMgr::instance()->mReservedAttribs.size(); i++) { const char* name = LLShaderMgr::instance()->mReservedAttribs[i].c_str(); - S32 index = glGetAttribLocationARB(mProgramObject, (const GLcharARB *)name); + S32 index = glGetAttribLocation(mProgramObject, (const GLchar *)name); if (index != -1) { #if LL_RELEASE_WITH_DEBUG_INFO @@ -637,7 +637,7 @@ BOOL LLGLSLShader::mapAttributes(const std::vector<LLStaticHashedString> * attri for (U32 i = 0; i < numAttributes; i++) { const char* name = (*attributes)[i].String().c_str(); - S32 index = glGetAttribLocationARB(mProgramObject, name); + S32 index = glGetAttribLocation(mProgramObject, name); if (index != -1) { mAttribute[LLShaderMgr::instance()->mReservedAttribs.size() + i] = index; @@ -668,7 +668,7 @@ void LLGLSLShader::mapUniform(GLint index, const vector<LLStaticHashedString> * name[0] = 0; - glGetActiveUniformARB(mProgramObject, index, 1024, &length, &size, &type, (GLcharARB *)name); + glGetActiveUniform(mProgramObject, index, 1024, &length, &size, &type, (GLchar *)name); #if !LL_DARWIN if (size > 0) { @@ -713,7 +713,7 @@ void LLGLSLShader::mapUniform(GLint index, const vector<LLStaticHashedString> * } #endif - S32 location = glGetUniformLocationARB(mProgramObject, name); + S32 location = glGetUniformLocation(mProgramObject, name); if (location != -1) { //chop off "[0]" so we can always access the first element @@ -779,14 +779,14 @@ GLint LLGLSLShader::mapUniformTextureChannel(GLint location, GLenum type, GLint { LL_PROFILE_ZONE_SCOPED_CATEGORY_SHADER; - if ((type >= GL_SAMPLER_1D_ARB && type <= GL_SAMPLER_2D_RECT_SHADOW_ARB) || + if ((type >= GL_SAMPLER_1D && type <= GL_SAMPLER_2D_RECT_SHADOW) || type == GL_SAMPLER_2D_MULTISAMPLE || - type == GL_SAMPLER_CUBE_MAP_ARRAY_ARB) + type == GL_SAMPLER_CUBE_MAP_ARRAY) { //this here is a texture GLint ret = mActiveTextureChannels; if (size == 1) { - glUniform1iARB(location, mActiveTextureChannels); + glUniform1i(location, mActiveTextureChannels); LL_DEBUGS("ShaderUniform") << "Assigned to texture channel " << mActiveTextureChannels << LL_ENDL; mActiveTextureChannels++; } @@ -800,7 +800,7 @@ GLint LLGLSLShader::mapUniformTextureChannel(GLint location, GLenum type, GLint { channel[i] = mActiveTextureChannels++; } - glUniform1ivARB(location, size, channel); + glUniform1iv(location, size, channel); LL_DEBUGS("ShaderUniform") << "Assigned to texture channel " << (mActiveTextureChannels-size) << " through " << (mActiveTextureChannels-1) << LL_ENDL; } @@ -833,7 +833,7 @@ BOOL LLGLSLShader::mapUniforms(const vector<LLStaticHashedString> * uniforms) //get the number of active uniforms GLint activeCount; - glGetObjectParameterivARB(mProgramObject, GL_OBJECT_ACTIVE_UNIFORMS_ARB, &activeCount); + glGetProgramiv(mProgramObject, GL_ACTIVE_UNIFORMS, &activeCount); //........................................................................................................................................ //........................................................................................ @@ -860,12 +860,12 @@ BOOL LLGLSLShader::mapUniforms(const vector<LLStaticHashedString> * uniforms) */ - S32 diffuseMap = glGetUniformLocationARB(mProgramObject, "diffuseMap"); - S32 specularMap = glGetUniformLocationARB(mProgramObject, "specularMap"); - S32 bumpMap = glGetUniformLocationARB(mProgramObject, "bumpMap"); - S32 altDiffuseMap = glGetUniformLocationARB(mProgramObject, "altDiffuseMap"); - S32 environmentMap = glGetUniformLocationARB(mProgramObject, "environmentMap"); - S32 reflectionMap = glGetUniformLocationARB(mProgramObject, "reflectionMap"); + S32 diffuseMap = glGetUniformLocation(mProgramObject, "diffuseMap"); + S32 specularMap = glGetUniformLocation(mProgramObject, "specularMap"); + S32 bumpMap = glGetUniformLocation(mProgramObject, "bumpMap"); + S32 altDiffuseMap = glGetUniformLocation(mProgramObject, "altDiffuseMap"); + S32 environmentMap = glGetUniformLocation(mProgramObject, "environmentMap"); + S32 reflectionMap = glGetUniformLocation(mProgramObject, "reflectionMap"); std::set<S32> skip_index; @@ -882,7 +882,7 @@ BOOL LLGLSLShader::mapUniforms(const vector<LLStaticHashedString> * uniforms) { name[0] = '\0'; - glGetActiveUniformARB(mProgramObject, i, 1024, &length, &size, &type, (GLcharARB *)name); + glGetActiveUniform(mProgramObject, i, 1024, &length, &size, &type, (GLchar *)name); if (-1 == diffuseMap && std::string(name) == "diffuseMap") { @@ -995,7 +995,7 @@ void LLGLSLShader::bind() if (sCurBoundShader != mProgramObject) // Don't re-bind current shader { LLVertexBuffer::unbind(); - glUseProgramObjectARB(mProgramObject); + glUseProgram(mProgramObject); sCurBoundShader = mProgramObject; sCurBoundShaderPtr = this; } @@ -1027,7 +1027,7 @@ void LLGLSLShader::unbind() gGL.flush(); stop_glerror(); LLVertexBuffer::unbind(); - glUseProgramObjectARB(0); + glUseProgram(0); sCurBoundShader = 0; sCurBoundShaderPtr = NULL; stop_glerror(); @@ -1038,7 +1038,7 @@ void LLGLSLShader::bindNoShader(void) LL_PROFILE_ZONE_SCOPED_CATEGORY_SHADER; LLVertexBuffer::unbind(); - glUseProgramObjectARB(0); + glUseProgram(0); sCurBoundShader = 0; sCurBoundShaderPtr = NULL; } @@ -1168,7 +1168,7 @@ void LLGLSLShader::uniform1i(U32 index, GLint x) const auto& iter = mValue.find(mUniform[index]); if (iter == mValue.end() || iter->second.mV[0] != x) { - glUniform1iARB(mUniform[index], x); + glUniform1i(mUniform[index], x); mValue[mUniform[index]] = LLVector4(x,0.f,0.f,0.f); } } @@ -1191,7 +1191,7 @@ void LLGLSLShader::uniform1f(U32 index, GLfloat x) const auto& iter = mValue.find(mUniform[index]); if (iter == mValue.end() || iter->second.mV[0] != x) { - glUniform1fARB(mUniform[index], x); + glUniform1f(mUniform[index], x); mValue[mUniform[index]] = LLVector4(x,0.f,0.f,0.f); } } @@ -1214,7 +1214,7 @@ void LLGLSLShader::uniform2f(U32 index, GLfloat x, GLfloat y) LLVector4 vec(x,y,0.f,0.f); if (iter == mValue.end() || shouldChange(iter->second,vec)) { - glUniform2fARB(mUniform[index], x, y); + glUniform2f(mUniform[index], x, y); mValue[mUniform[index]] = vec; } } @@ -1237,7 +1237,7 @@ void LLGLSLShader::uniform3f(U32 index, GLfloat x, GLfloat y, GLfloat z) LLVector4 vec(x,y,z,0.f); if (iter == mValue.end() || shouldChange(iter->second,vec)) { - glUniform3fARB(mUniform[index], x, y, z); + glUniform3f(mUniform[index], x, y, z); mValue[mUniform[index]] = vec; } } @@ -1260,7 +1260,7 @@ void LLGLSLShader::uniform4f(U32 index, GLfloat x, GLfloat y, GLfloat z, GLfloat LLVector4 vec(x,y,z,w); if (iter == mValue.end() || shouldChange(iter->second,vec)) { - glUniform4fARB(mUniform[index], x, y, z, w); + glUniform4f(mUniform[index], x, y, z, w); mValue[mUniform[index]] = vec; } } @@ -1283,7 +1283,7 @@ void LLGLSLShader::uniform1iv(U32 index, U32 count, const GLint* v) LLVector4 vec(v[0],0.f,0.f,0.f); if (iter == mValue.end() || shouldChange(iter->second,vec) || count != 1) { - glUniform1ivARB(mUniform[index], count, v); + glUniform1iv(mUniform[index], count, v); mValue[mUniform[index]] = vec; } } @@ -1306,7 +1306,7 @@ void LLGLSLShader::uniform4iv(U32 index, U32 count, const GLint* v) LLVector4 vec(v[0], v[1], v[2], v[3]); if (iter == mValue.end() || shouldChange(iter->second, vec) || count != 1) { - glUniform1ivARB(mUniform[index], count, v); + glUniform1iv(mUniform[index], count, v); mValue[mUniform[index]] = vec; } } @@ -1330,7 +1330,7 @@ void LLGLSLShader::uniform1fv(U32 index, U32 count, const GLfloat* v) LLVector4 vec(v[0],0.f,0.f,0.f); if (iter == mValue.end() || shouldChange(iter->second,vec) || count != 1) { - glUniform1fvARB(mUniform[index], count, v); + glUniform1fv(mUniform[index], count, v); mValue[mUniform[index]] = vec; } } @@ -1353,7 +1353,7 @@ void LLGLSLShader::uniform2fv(U32 index, U32 count, const GLfloat* v) LLVector4 vec(v[0],v[1],0.f,0.f); if (iter == mValue.end() || shouldChange(iter->second,vec) || count != 1) { - glUniform2fvARB(mUniform[index], count, v); + glUniform2fv(mUniform[index], count, v); mValue[mUniform[index]] = vec; } } @@ -1376,7 +1376,7 @@ void LLGLSLShader::uniform3fv(U32 index, U32 count, const GLfloat* v) LLVector4 vec(v[0],v[1],v[2],0.f); if (iter == mValue.end() || shouldChange(iter->second,vec) || count != 1) { - glUniform3fvARB(mUniform[index], count, v); + glUniform3fv(mUniform[index], count, v); mValue[mUniform[index]] = vec; } } @@ -1400,7 +1400,7 @@ void LLGLSLShader::uniform4fv(U32 index, U32 count, const GLfloat* v) if (iter == mValue.end() || shouldChange(iter->second,vec) || count != 1) { LL_PROFILE_ZONE_SCOPED_CATEGORY_SHADER; - glUniform4fvARB(mUniform[index], count, v); + glUniform4fv(mUniform[index], count, v); mValue[mUniform[index]] = vec; } } @@ -1419,7 +1419,7 @@ void LLGLSLShader::uniformMatrix2fv(U32 index, U32 count, GLboolean transpose, c if (mUniform[index] >= 0) { - glUniformMatrix2fvARB(mUniform[index], count, transpose, v); + glUniformMatrix2fv(mUniform[index], count, transpose, v); } } } @@ -1436,7 +1436,7 @@ void LLGLSLShader::uniformMatrix3fv(U32 index, U32 count, GLboolean transpose, c if (mUniform[index] >= 0) { - glUniformMatrix3fvARB(mUniform[index], count, transpose, v); + glUniformMatrix3fv(mUniform[index], count, transpose, v); } } } @@ -1472,7 +1472,7 @@ void LLGLSLShader::uniformMatrix4fv(U32 index, U32 count, GLboolean transpose, c if (mUniform[index] >= 0) { - glUniformMatrix4fvARB(mUniform[index], count, transpose, v); + glUniformMatrix4fv(mUniform[index], count, transpose, v); } } } @@ -1490,7 +1490,7 @@ GLint LLGLSLShader::getUniformLocation(const LLStaticHashedString& uniform) if (gDebugGL) { stop_glerror(); - if (iter->second != glGetUniformLocationARB(mProgramObject, uniform.String().c_str())) + if (iter->second != glGetUniformLocation(mProgramObject, uniform.String().c_str())) { LL_ERRS() << "Uniform does not match." << LL_ENDL; } @@ -1545,7 +1545,7 @@ void LLGLSLShader::uniform1i(const LLStaticHashedString& uniform, GLint v) LLVector4 vec(v,0.f,0.f,0.f); if (iter == mValue.end() || shouldChange(iter->second,vec)) { - glUniform1iARB(location, v); + glUniform1i(location, v); mValue[location] = vec; } } @@ -1562,7 +1562,7 @@ void LLGLSLShader::uniform1iv(const LLStaticHashedString& uniform, U32 count, co if (iter == mValue.end() || shouldChange(iter->second, vec) || count != 1) { LL_PROFILE_ZONE_SCOPED_CATEGORY_SHADER; - glUniform1ivARB(location, count, v); + glUniform1iv(location, count, v); mValue[location] = vec; } } @@ -1579,7 +1579,7 @@ void LLGLSLShader::uniform4iv(const LLStaticHashedString& uniform, U32 count, co if (iter == mValue.end() || shouldChange(iter->second, vec) || count != 1) { LL_PROFILE_ZONE_SCOPED_CATEGORY_SHADER; - glUniform4ivARB(location, count, v); + glUniform4iv(location, count, v); mValue[location] = vec; } } @@ -1595,7 +1595,7 @@ void LLGLSLShader::uniform2i(const LLStaticHashedString& uniform, GLint i, GLint LLVector4 vec(i,j,0.f,0.f); if (iter == mValue.end() || shouldChange(iter->second,vec)) { - glUniform2iARB(location, i, j); + glUniform2i(location, i, j); mValue[location] = vec; } } @@ -1612,7 +1612,7 @@ void LLGLSLShader::uniform1f(const LLStaticHashedString& uniform, GLfloat v) LLVector4 vec(v,0.f,0.f,0.f); if (iter == mValue.end() || shouldChange(iter->second,vec)) { - glUniform1fARB(location, v); + glUniform1f(location, v); mValue[location] = vec; } } @@ -1628,7 +1628,7 @@ void LLGLSLShader::uniform2f(const LLStaticHashedString& uniform, GLfloat x, GLf LLVector4 vec(x,y,0.f,0.f); if (iter == mValue.end() || shouldChange(iter->second,vec)) { - glUniform2fARB(location, x,y); + glUniform2f(location, x,y); mValue[location] = vec; } } @@ -1645,7 +1645,7 @@ void LLGLSLShader::uniform3f(const LLStaticHashedString& uniform, GLfloat x, GLf LLVector4 vec(x,y,z,0.f); if (iter == mValue.end() || shouldChange(iter->second,vec)) { - glUniform3fARB(location, x,y,z); + glUniform3f(location, x,y,z); mValue[location] = vec; } } @@ -1661,7 +1661,7 @@ void LLGLSLShader::uniform1fv(const LLStaticHashedString& uniform, U32 count, co LLVector4 vec(v[0],0.f,0.f,0.f); if (iter == mValue.end() || shouldChange(iter->second,vec) || count != 1) { - glUniform1fvARB(location, count, v); + glUniform1fv(location, count, v); mValue[location] = vec; } } @@ -1677,7 +1677,7 @@ void LLGLSLShader::uniform2fv(const LLStaticHashedString& uniform, U32 count, co LLVector4 vec(v[0],v[1],0.f,0.f); if (iter == mValue.end() || shouldChange(iter->second,vec) || count != 1) { - glUniform2fvARB(location, count, v); + glUniform2fv(location, count, v); mValue[location] = vec; } } @@ -1693,7 +1693,7 @@ void LLGLSLShader::uniform3fv(const LLStaticHashedString& uniform, U32 count, co LLVector4 vec(v[0],v[1],v[2],0.f); if (iter == mValue.end() || shouldChange(iter->second,vec) || count != 1) { - glUniform3fvARB(location, count, v); + glUniform3fv(location, count, v); mValue[location] = vec; } } @@ -1710,7 +1710,7 @@ void LLGLSLShader::uniform4fv(const LLStaticHashedString& uniform, U32 count, co if (iter == mValue.end() || shouldChange(iter->second,vec) || count != 1) { LL_PROFILE_ZONE_SCOPED_CATEGORY_SHADER; - glUniform4fvARB(location, count, v); + glUniform4fv(location, count, v); mValue[location] = vec; } } @@ -1723,7 +1723,7 @@ void LLGLSLShader::uniformMatrix4fv(const LLStaticHashedString& uniform, U32 cou if (location >= 0) { stop_glerror(); - glUniformMatrix4fvARB(location, count, transpose, v); + glUniformMatrix4fv(location, count, transpose, v); stop_glerror(); } } @@ -1733,7 +1733,7 @@ void LLGLSLShader::vertexAttrib4f(U32 index, GLfloat x, GLfloat y, GLfloat z, GL { if (mAttribute[index] > 0) { - glVertexAttrib4fARB(mAttribute[index], x, y, z, w); + glVertexAttrib4f(mAttribute[index], x, y, z, w); } } @@ -1741,7 +1741,7 @@ void LLGLSLShader::vertexAttrib4fv(U32 index, GLfloat* v) { if (mAttribute[index] > 0) { - glVertexAttrib4fvARB(mAttribute[index], v); + glVertexAttrib4fv(mAttribute[index], v); } } |