Commit 649d6e79 authored by Eric Bruneton's avatar Eric Bruneton
Browse files

workaround for "bugs" or inconsistencies between driver versions

git-svn-id: svn+ssh://scm.gforge.inria.fr/svnroot/ork/trunk@25 28599a00-4e59-401b-b2d8-d34d4661a6c9
parent 20c975c0
...@@ -261,6 +261,9 @@ void Program::initUniforms() ...@@ -261,6 +261,9 @@ void Program::initUniforms()
glGetActiveUniformsiv(programId, 1, &i, GL_UNIFORM_IS_ROW_MAJOR, &isRowMajor); glGetActiveUniformsiv(programId, 1, &i, GL_UNIFORM_IS_ROW_MAJOR, &isRowMajor);
string name = string(buf); string name = string(buf);
if (size > 1 && name.find_first_of('[') != string::npos) {
name = name.substr(0, name.find_first_of('['));
}
ptr<UniformBlock> b = NULL; ptr<UniformBlock> b = NULL;
if (blockIndex != -1) { if (blockIndex != -1) {
...@@ -548,6 +551,9 @@ void Program::initUniforms() ...@@ -548,6 +551,9 @@ void Program::initUniforms()
GLsizei length; GLsizei length;
glGetActiveSubroutineUniformName(programId, getStage(s), i, GLsizei(maxLength), &length, buf); glGetActiveSubroutineUniformName(programId, getStage(s), i, GLsizei(maxLength), &length, buf);
string uname = string(buf); string uname = string(buf);
if (size > 1 && uname.find_first_of('[') != string::npos) {
uname = uname.substr(0, uname.find_first_of('['));
}
for (GLint j = 0; j < size; ++j) { for (GLint j = 0; j < size; ++j) {
string sruName = uname; string sruName = uname;
if (size > 1) { if (size > 1) {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment