Fix compile problem for older (<3.0) GL versions compiled without extensions.

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@6124 dfc29bdd-3216-0410-991c-e03cc46cb475
This commit is contained in:
cutealien 2020-06-19 17:21:10 +00:00
parent 49d7850d1e
commit ce3e4b0e6e
2 changed files with 6 additions and 4 deletions

View File

@ -1915,7 +1915,7 @@ inline void COpenGLExtensionHandler::extGlUniform1uiv(GLint loc, GLsizei count,
#ifdef _IRR_OPENGL_USE_EXTPOINTER_ #ifdef _IRR_OPENGL_USE_EXTPOINTER_
if (pGlUniform1uiv) if (pGlUniform1uiv)
pGlUniform1uiv(loc, count, v); pGlUniform1uiv(loc, count, v);
#else #elif defined(GL_VERSION_3_0)
glUniform1uiv(loc, count, v); glUniform1uiv(loc, count, v);
#endif #endif
} }
@ -1925,7 +1925,7 @@ inline void COpenGLExtensionHandler::extGlUniform2uiv(GLint loc, GLsizei count,
#ifdef _IRR_OPENGL_USE_EXTPOINTER_ #ifdef _IRR_OPENGL_USE_EXTPOINTER_
if (pGlUniform2uiv) if (pGlUniform2uiv)
pGlUniform2uiv(loc, count, v); pGlUniform2uiv(loc, count, v);
#else #elif defined(GL_VERSION_3_0)
glUniform2uiv(loc, count, v); glUniform2uiv(loc, count, v);
#endif #endif
} }
@ -1935,7 +1935,7 @@ inline void COpenGLExtensionHandler::extGlUniform3uiv(GLint loc, GLsizei count,
#ifdef _IRR_OPENGL_USE_EXTPOINTER_ #ifdef _IRR_OPENGL_USE_EXTPOINTER_
if (pGlUniform3uiv) if (pGlUniform3uiv)
pGlUniform3uiv(loc, count, v); pGlUniform3uiv(loc, count, v);
#else #elif defined(GL_VERSION_3_0)
glUniform3uiv(loc, count, v); glUniform3uiv(loc, count, v);
#endif #endif
} }
@ -1945,7 +1945,7 @@ inline void COpenGLExtensionHandler::extGlUniform4uiv(GLint loc, GLsizei count,
#ifdef _IRR_OPENGL_USE_EXTPOINTER_ #ifdef _IRR_OPENGL_USE_EXTPOINTER_
if (pGlUniform4uiv) if (pGlUniform4uiv)
pGlUniform4uiv(loc, count, v); pGlUniform4uiv(loc, count, v);
#else #elif defined(GL_VERSION_3_0)
glUniform4uiv(loc, count, v); glUniform4uiv(loc, count, v);
#endif #endif
} }

View File

@ -736,6 +736,7 @@ bool COpenGLSLMaterialRenderer::setPixelShaderConstant(s32 index, const u32* int
case GL_UNSIGNED_INT: case GL_UNSIGNED_INT:
Driver->extGlUniform1uiv(UniformInfo[index].location, count, reinterpret_cast<const GLuint*>(ints)); Driver->extGlUniform1uiv(UniformInfo[index].location, count, reinterpret_cast<const GLuint*>(ints));
break; break;
#if defined(GL_VERSION_3_0)
case GL_UNSIGNED_INT_VEC2: case GL_UNSIGNED_INT_VEC2:
Driver->extGlUniform2uiv(UniformInfo[index].location, count/2, reinterpret_cast<const GLuint*>(ints)); Driver->extGlUniform2uiv(UniformInfo[index].location, count/2, reinterpret_cast<const GLuint*>(ints));
break; break;
@ -745,6 +746,7 @@ bool COpenGLSLMaterialRenderer::setPixelShaderConstant(s32 index, const u32* int
case GL_UNSIGNED_INT_VEC4: case GL_UNSIGNED_INT_VEC4:
Driver->extGlUniform4uiv(UniformInfo[index].location, count/4, reinterpret_cast<const GLuint*>(ints)); Driver->extGlUniform4uiv(UniformInfo[index].location, count/4, reinterpret_cast<const GLuint*>(ints));
break; break;
#endif
default: default:
status = false; status = false;
break; break;