diff options
author | Clément Foucault <foucault.clem@gmail.com> | 2018-01-03 22:39:44 +0300 |
---|---|---|
committer | Clément Foucault <foucault.clem@gmail.com> | 2018-01-04 12:43:54 +0300 |
commit | 5ab2fc65c6d6ac10d298b2c648cf32ee50366741 (patch) | |
tree | b2415d05553d82879008f78c71d8bbeb5e74be65 /source/blender/draw/modes/object_mode.c | |
parent | b4ad0151c336ae490e2794b361ba601a58f4ae5e (diff) |
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.
Diffstat (limited to 'source/blender/draw/modes/object_mode.c')
-rw-r--r-- | source/blender/draw/modes/object_mode.c | 5 |
1 files changed, 3 insertions, 2 deletions
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); |