zzogl glsl: remove a bad optimization that lost track of some textures. Fix potential black-screen

git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5308 96395faa-99c1-11dd-bbfe-3dabce05a288
This commit is contained in:
gregory.hainaut 2012-06-18 22:13:22 +00:00
parent d72a64b9cf
commit 27a4110256
1 changed files with 10 additions and 0 deletions

View File

@ -353,11 +353,21 @@ struct SamplerParam {
assert(unit >= 0);
assert(unit < 11);
if (texid) {
// Unfortunately there is a nastly corner case
// 1/ Attach a texture to the unit
// 2/ delete the texture
// 3/ recreate a texture (with same id)
// 4/ => texture need to be reattached again...
#if 0
if (g_current_texture_bind[unit] != texid) {
glActiveTexture(GL_TEXTURE0 + unit);
glBindTexture(target, texid);
g_current_texture_bind[unit] = texid;
}
#else
glActiveTexture(GL_TEXTURE0 + unit);
glBindTexture(target, texid);
#endif
}
}