[Bf-blender-cvs] [9c1ab47fc44] blender2.8: GPUOffscreen: Remove unused offscreen blit.

Clément Foucault noreply at git.blender.org
Sun Mar 25 21:33:20 CEST 2018


Commit: 9c1ab47fc44aa592e78bd129f5911a9708a82e78
Author: Clément Foucault
Date:   Sun Mar 25 15:53:17 2018 +0200
Branches: blender2.8
https://developer.blender.org/rB9c1ab47fc44aa592e78bd129f5911a9708a82e78

GPUOffscreen: Remove unused offscreen blit.

===================================================================

M	source/blender/gpu/GPU_framebuffer.h
M	source/blender/gpu/intern/gpu_framebuffer.c

===================================================================

diff --git a/source/blender/gpu/GPU_framebuffer.h b/source/blender/gpu/GPU_framebuffer.h
index 83fac2456a4..5af01e76309 100644
--- a/source/blender/gpu/GPU_framebuffer.h
+++ b/source/blender/gpu/GPU_framebuffer.h
@@ -88,7 +88,6 @@ void GPU_offscreen_free(GPUOffScreen *ofs);
 void GPU_offscreen_bind(GPUOffScreen *ofs, bool save);
 void GPU_offscreen_unbind(GPUOffScreen *ofs, bool restore);
 void GPU_offscreen_read_pixels(GPUOffScreen *ofs, int type, void *pixels);
-void GPU_offscreen_blit(GPUOffScreen *ofs, int x, int y);
 int GPU_offscreen_width(const GPUOffScreen *ofs);
 int GPU_offscreen_height(const GPUOffScreen *ofs);
 struct GPUTexture *GPU_offscreen_color_texture(const GPUOffScreen *ofs);
diff --git a/source/blender/gpu/intern/gpu_framebuffer.c b/source/blender/gpu/intern/gpu_framebuffer.c
index a267d9cf1ee..b911f6d9c7f 100644
--- a/source/blender/gpu/intern/gpu_framebuffer.c
+++ b/source/blender/gpu/intern/gpu_framebuffer.c
@@ -665,23 +665,6 @@ void GPU_offscreen_unbind(GPUOffScreen *ofs, bool restore)
 	glEnable(GL_SCISSOR_TEST);
 }
 
-void GPU_offscreen_blit(GPUOffScreen *ofs, int x, int y)
-{
-	const int w = GPU_texture_width(ofs->color);
-	const int h = GPU_texture_height(ofs->color);
-
-	glBindFramebuffer(GL_READ_FRAMEBUFFER, ofs->fb->object);
-	GLenum status = glCheckFramebufferStatus(GL_READ_FRAMEBUFFER);
-
-	if (status == GL_FRAMEBUFFER_COMPLETE) {
-		glBlitFramebuffer(0, 0, w, h, x, y, x + w, y + h, GL_COLOR_BUFFER_BIT, GL_NEAREST);
-	}
-	else {
-		gpu_print_framebuffer_error(status, NULL);
-	}
-
-	glBindFramebuffer(GL_READ_FRAMEBUFFER, 0);
-}
 
 void GPU_offscreen_read_pixels(GPUOffScreen *ofs, int type, void *pixels)
 {



More information about the Bf-blender-cvs mailing list