[Bf-blender-cvs] [1e32951] master: OpenGL: use EXT version of FBOs
Mike Erwin
noreply at git.blender.org
Fri May 27 06:20:12 CEST 2016
Commit: 1e32951477ec83e6400a0d2773c16bc899a96892
Author: Mike Erwin
Date: Fri May 27 00:19:32 2016 -0400
Branches: master
https://developer.blender.org/rB1e32951477ec83e6400a0d2773c16bc899a96892
OpenGL: use EXT version of FBOs
Blender 2.7x supports OpenGL 2.1 which has FBO only as an extension.
It was working fine, but this is more correct.
===================================================================
M source/blender/gpu/intern/gpu_framebuffer.c
===================================================================
diff --git a/source/blender/gpu/intern/gpu_framebuffer.c b/source/blender/gpu/intern/gpu_framebuffer.c
index c15e49a..a6d120b 100644
--- a/source/blender/gpu/intern/gpu_framebuffer.c
+++ b/source/blender/gpu/intern/gpu_framebuffer.c
@@ -575,7 +575,7 @@ void GPU_offscreen_read_pixels(GPUOffScreen *ofs, int type, void *pixels)
glFramebufferTexture2DEXT(
GL_READ_FRAMEBUFFER_EXT, GL_COLOR_ATTACHMENT0_EXT + ofs->color->fb_attachment,
GL_TEXTURE_2D_MULTISAMPLE, ofs->color->bindcode, 0);
- status = glCheckFramebufferStatus(GL_READ_FRAMEBUFFER_EXT);
+ status = glCheckFramebufferStatusEXT(GL_READ_FRAMEBUFFER_EXT);
if (status != GL_FRAMEBUFFER_COMPLETE_EXT) {
goto finally;
}
@@ -583,11 +583,11 @@ void GPU_offscreen_read_pixels(GPUOffScreen *ofs, int type, void *pixels)
/* write into new single-sample buffer */
glGenFramebuffersEXT(1, &fbo_blit);
- glBindFramebuffer(GL_DRAW_FRAMEBUFFER_EXT, fbo_blit);
+ glBindFramebufferEXT(GL_DRAW_FRAMEBUFFER_EXT, fbo_blit);
glFramebufferTexture2DEXT(
- GL_DRAW_FRAMEBUFFER_EXT, GL_COLOR_ATTACHMENT0,
+ GL_DRAW_FRAMEBUFFER_EXT, GL_COLOR_ATTACHMENT0_EXT,
GL_TEXTURE_2D, tex_blit, 0);
- status = glCheckFramebufferStatus(GL_DRAW_FRAMEBUFFER_EXT);
+ status = glCheckFramebufferStatusEXT(GL_DRAW_FRAMEBUFFER_EXT);
if (status != GL_FRAMEBUFFER_COMPLETE_EXT) {
goto finally;
}
More information about the Bf-blender-cvs
mailing list