mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-11-14 10:09:32 +01:00
d3d9: Specify tex stage for binding framebuf color.
This commit is contained in:
1 parent
718d7e291f
commit
4e50eed85b
7 files changed
+21
-13
No files matched your search
@@ -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() {
|
||||
|
||||
Reference in new issue
Block a user