From 5ab2fc65c6d6ac10d298b2c648cf32ee50366741 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Foucault?= Date: Wed, 3 Jan 2018 20:39:44 +0100 Subject: DRW: Fix boolean uniform lenght. Boolean uniform needs to be 4bytes long for opengl. Use "int" for every bool you want to pass as a uniform. --- source/blender/draw/modes/object_mode.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'source/blender/draw/modes/object_mode.c') diff --git a/source/blender/draw/modes/object_mode.c b/source/blender/draw/modes/object_mode.c index e3800d87a53..af0af3dca43 100644 --- a/source/blender/draw/modes/object_mode.c +++ b/source/blender/draw/modes/object_mode.c @@ -749,8 +749,9 @@ static void OBJECT_cache_init(void *vedata) DRWState state = DRW_STATE_WRITE_COLOR; struct Gwn_Batch *quad = DRW_cache_fullscreen_quad_get(); static float alphaOcclu = 0.35f; - static bool bTrue = true; - static bool bFalse = false; + /* Reminder : bool uniforms need to be 4 bytes. */ + static const int bTrue = true; + static const int bFalse = false; psl->outlines_search = DRW_pass_create("Outlines Detect Pass", state); -- cgit v1.2.3