From bc648af4e1bb9635d6d4fa6ef5d196607a47d2fb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Foucault?= Date: Tue, 14 Nov 2017 20:49:13 +0100 Subject: Fix Opengl Error with glBlitFramebuffer This was caused by 93936b8643b9c4f77fe13d35b41ecaa246843dd8 From GL spec : GL_INVALID_OPERATION is generated if mask contains GL_DEPTH_BUFFER_BIT or GL_STENCIL_BUFFER_BIT and the source and destination depth and stencil formats do not match. So blitting framebuffer with depth or stencil require the SAME FORMAT. --- source/blender/draw/engines/basic/basic_engine.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source/blender/draw/engines/basic/basic_engine.c') diff --git a/source/blender/draw/engines/basic/basic_engine.c b/source/blender/draw/engines/basic/basic_engine.c index a4ee3d22444..92ffa8a1794 100644 --- a/source/blender/draw/engines/basic/basic_engine.c +++ b/source/blender/draw/engines/basic/basic_engine.c @@ -136,7 +136,7 @@ static void BASIC_engine_init(void *vedata) #ifdef USE_DEPTH if (DRW_state_is_fbo()) { const float *viewport_size = DRW_viewport_size_get(); - DRWFboTexture tex = {&txl->depth_dup, DRW_TEX_DEPTH_24, 0}; + DRWFboTexture tex = {&txl->depth_dup, DRW_TEX_DEPTH_24_STENCIL_8, 0}; DRW_framebuffer_init(&fbl->dupli_depth, &draw_engine_basic_type, (int)viewport_size[0], (int)viewport_size[1], &tex, 1); -- cgit v1.2.3