d3d9: Specify tex stage for binding framebuf color.

This commit is contained in:
Unknown W. Brackets committed 2014-09-21 12:11:17 -07:00
1 parent 718d7e291f
commit 4e50eed85b
7 files changed
+21 -13

No files matched your search

+10 -1
View File
@@ -920,13 +920,18 @@ FBO *FramebufferManager::GetTempFBO(u16 w, u16 h, FBOColorDepth depth) {
return fbo;
}
void FramebufferManager::BindFramebufferColor(VirtualFramebuffer *framebuffer, bool skipCopy) {
void FramebufferManager::BindFramebufferColor(int stage, VirtualFramebuffer *framebuffer, bool skipCopy) {
if (framebuffer == NULL) {
framebuffer = currentRenderVfb_;
}
if (stage != GL_TEXTURE0) {
glActiveTexture(stage);
}
if (!framebuffer->fbo || !useBufferedRendering_) {
glBindTexture(GL_TEXTURE_2D, 0);
glActiveTexture(GL_TEXTURE0);
gstate_c.skipDrawReason |= SKIPDRAW_BAD_FB_TEXTURE;
return;
}
@@ -952,6 +957,10 @@ void FramebufferManager::BindFramebufferColor(VirtualFramebuffer *framebuffer, b
} else {
fbo_bind_color_as_texture(framebuffer->fbo, 0);
}
if (stage != GL_TEXTURE1) {
glActiveTexture(stage);
}
}
void FramebufferManager::CopyDisplayToOutput() {