Forget the bound texture on fbo_create().

Just in case, since it overrides the texture.
This commit is contained in:
Unknown W. Brackets 2014-08-27 23:05:21 -07:00
parent 140eb82821
commit a8b78a46bd

View File

@ -1191,6 +1191,7 @@ FBO *FramebufferManager::GetTempFBO(u16 w, u16 h, FBOColorDepth depth) {
return it->second.fbo;
}
textureCache_->ForgetLastTexture();
FBO *fbo = fbo_create(w, h, 1, false, depth);
if (!fbo)
return fbo;
@ -1445,6 +1446,7 @@ void FramebufferManager::ReadFramebufferToMemory(VirtualFramebuffer *vfb, bool s
break;
}
textureCache_->ForgetLastTexture();
nvfb->fbo = fbo_create(nvfb->width, nvfb->height, 1, false, nvfb->colorDepth);
if (!(nvfb->fbo)) {
ERROR_LOG(SCEGE, "Error creating FBO! %i x %i", nvfb->renderWidth, nvfb->renderHeight);