I just downloaded sample (Alpha blending one) and tried to run it - I had problems with shaders on AMD. But with few modifications I've managed to run it:
In Material class constructor:
Material::Material(Shader* const* shaders, int shaderCount, string* inputElements, int inputElementCount)
This block of code:
// Get the amount of uniform variables in the shader.
glGetProgramInterfaceiv(this->programId, GL_UNIFORM, GL_ACTIVE_RESOURCES, &count);
unsigned int uniformType;
for(int i = 0 ; i < count ; i++)
// Write the uniform name into a char buffer
glGetActiveUniform (this->programId, i, sizeof(nameBuffer),
&uniformLength, &uniformSize, &uniformType, (char*)&nameBuffer);
// Create a string from the char buffer.
// Get the location handle of the uniform variable.
unsigned int location = glGetUniformLocation(this->programId, name);
// Insert the uniform location into the map.
this->parameterMap[name] = location;
Crashes on AMD gpus on glGetProgramInterfaceiv procedure. The address of glGetProgramInterfaceiv is apparently NULL, so the extension GL_ARB_program_interface_query apparently is unsupported and causes crashes on (recent) AMD drivers, officialy supporting OpenGL 4.2 ... can't tell about OpenGL 4.3 drivers yet (I haven't updated the new "24th Jul" drivers yet), even though extensions list says it is supported (driver bug?!).
I removed this code and re written function for getting uniform location, as (dumb but simple, I could've cast that string though in a more better way, haven't look at your class yet though):
unsigned int Material::GetUniformLocation(string paramName)
/*std::map<string, unsigned int>::iterator iter = this->parameterMap.find(paramName);
if(iter == this->parameterMap.end())
throw Exception("Set value error.", "Material parameter <" + paramName + "> was not found.");
return glGetUniformLocation(this->programId, paramName.ToChar());
Which apparently works on AMD! Voila!
Here is my proof: :ph34r:
Ninja'd with help of my desktop kitten!
EDIT: + as you use OpenGL with SFML your code should actually already run on Linux, but I haven't tried it yet (and I even didn't realize in the first moment, as I'm not using SFML or any other library, but interacting directly with X11 ... "Zealots, zealots everywhere"). Maybe you should add it (note that it also works on XP (OpenGL versions), not ust Vista/7/8 -> proof above ).
EDIT2: After further investigation in really seems that AMD version of GL_ARB_program_interface_query is bugged as I've tried adding it into my own game engine and upon starting it crashed. Let me try with new AMD drivers today, we'll see whether they got any better.