mirror of https://github.com/PCSX2/pcsx2.git
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:
parent
d72a64b9cf
commit
27a4110256
|
@ -353,11 +353,21 @@ struct SamplerParam {
|
||||||
assert(unit >= 0);
|
assert(unit >= 0);
|
||||||
assert(unit < 11);
|
assert(unit < 11);
|
||||||
if (texid) {
|
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) {
|
if (g_current_texture_bind[unit] != texid) {
|
||||||
glActiveTexture(GL_TEXTURE0 + unit);
|
glActiveTexture(GL_TEXTURE0 + unit);
|
||||||
glBindTexture(target, texid);
|
glBindTexture(target, texid);
|
||||||
g_current_texture_bind[unit] = texid;
|
g_current_texture_bind[unit] = texid;
|
||||||
}
|
}
|
||||||
|
#else
|
||||||
|
glActiveTexture(GL_TEXTURE0 + unit);
|
||||||
|
glBindTexture(target, texid);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue