Don't enable SDL_GL_FRAMEBUFFER_SRGB_CAPABLE in Linux when creating the window, to work around a potential bug. sRGB windows are still possible even without that.

This commit is contained in:
Alex Szpakowski
2015-03-03 17:48:19 -04:00
parent 8277eb9abd
commit 06fa7bd7a4
4 changed files with 40 additions and 2 deletions
+9 -2
View File
@@ -382,7 +382,14 @@ void Shader::attach(bool temporary)
{
// make sure all sent textures are properly bound to their respective texture units
// note: list potentially contains texture ids of deleted/invalid textures!
gl.bindTextures(1, (GLsizei) activeTexUnits.size(), &activeTexUnits[0]);
for (size_t i = 0; i < activeTexUnits.size(); ++i)
{
if (activeTexUnits[i] > 0)
gl.bindTextureToUnit(activeTexUnits[i], i + 1, false);
}
// We always want to use texture unit 0 for everyhing else.
gl.setTextureUnit(0);
}
}
@@ -523,7 +530,7 @@ void Shader::sendTexture(const std::string &name, Texture *texture)
checkSetUniformError(u, 1, 1, UNIFORM_SAMPLER);
// bind texture to assigned texture unit and send uniform to shader program
gl.bindTextures(texunit, 1, &gltex);
gl.bindTextureToUnit(gltex, texunit, true);
glUniform1i(u.location, texunit);