diff options
author | Clément Foucault <foucault.clem@gmail.com> | 2017-09-26 15:01:50 +0300 |
---|---|---|
committer | Clément Foucault <foucault.clem@gmail.com> | 2017-09-26 15:01:50 +0300 |
commit | 30f9cd710b3a2edad5a13a67bbe7c89a53785dca (patch) | |
tree | 51645a0ed9950f51bd04b2c3696f918abd31730d /source/blender/gpu/intern | |
parent | 496a354d7f009e437d0b4a0c782d00f46af09994 (diff) |
GPUFramebuffer: Enable multisample when binding a Multisample FBO
For some reason it was not working on intel but was working on Nvidia.
Diffstat (limited to 'source/blender/gpu/intern')
-rw-r--r-- | source/blender/gpu/intern/gpu_framebuffer.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/source/blender/gpu/intern/gpu_framebuffer.c b/source/blender/gpu/intern/gpu_framebuffer.c index 4ba0d5543fe..e7b70b70d80 100644 --- a/source/blender/gpu/intern/gpu_framebuffer.c +++ b/source/blender/gpu/intern/gpu_framebuffer.c @@ -348,6 +348,10 @@ void GPU_framebuffer_bind(GPUFrameBuffer *fb) glReadBuffer(readattachement); } + if (GPU_texture_target(tex) == GL_TEXTURE_2D_MULTISAMPLE) { + glEnable(GL_MULTISAMPLE); + } + glViewport(0, 0, GPU_texture_width(tex), GPU_texture_height(tex)); GG.currentfb = fb->object; } |