Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTomoaki Kawada <i@yvt.jp>2019-06-01 18:54:07 +0300
committerBrecht Van Lommel <brechtvanlommel@gmail.com>2019-06-02 13:50:50 +0300
commit62fe7e9a9d0e211bc2ad4cdfedb2489c5f899133 (patch)
treecaa21887fa80485937012a17edcea8126ae7482e /source/blender/gpu/intern/gpu_framebuffer.c
parent2a5dc454f63a4c3442d0ff0715cbd3d135bb5ca7 (diff)
GPU: support default framebuffer with ID not equal to 0
Diffstat (limited to 'source/blender/gpu/intern/gpu_framebuffer.c')
-rw-r--r--source/blender/gpu/intern/gpu_framebuffer.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/source/blender/gpu/intern/gpu_framebuffer.c b/source/blender/gpu/intern/gpu_framebuffer.c
index 62fb02931ab..98ab6d96c0a 100644
--- a/source/blender/gpu/intern/gpu_framebuffer.c
+++ b/source/blender/gpu/intern/gpu_framebuffer.c
@@ -539,7 +539,7 @@ void GPU_framebuffer_bind(GPUFrameBuffer *fb)
void GPU_framebuffer_restore(void)
{
if (GPU_framebuffer_active_get() != NULL) {
- glBindFramebuffer(GL_FRAMEBUFFER, 0);
+ glBindFramebuffer(GL_FRAMEBUFFER, GPU_framebuffer_default());
gpu_framebuffer_current_set(NULL);
}
}
@@ -718,7 +718,7 @@ void GPU_framebuffer_blit(GPUFrameBuffer *fb_read,
gpu_framebuffer_current_set(prev_fb);
}
else {
- glBindFramebuffer(GL_FRAMEBUFFER, 0);
+ glBindFramebuffer(GL_FRAMEBUFFER, GPU_framebuffer_default());
gpu_framebuffer_current_set(NULL);
}
}
@@ -909,7 +909,7 @@ void GPU_offscreen_draw_to_screen(GPUOffScreen *ofs, int x, int y)
gpu_print_framebuffer_error(status, NULL);
}
- glBindFramebuffer(GL_READ_FRAMEBUFFER, 0);
+ glBindFramebuffer(GL_READ_FRAMEBUFFER, GPU_framebuffer_default());
}
void GPU_offscreen_read_pixels(GPUOffScreen *ofs, int type, void *pixels)