diff options
author | Clément Foucault <foucault.clem@gmail.com> | 2018-04-17 18:00:24 +0300 |
---|---|---|
committer | Clément Foucault <foucault.clem@gmail.com> | 2018-04-17 18:00:36 +0300 |
commit | c6681f735ed5eb517047c62b36a5ea62b22574ea (patch) | |
tree | 15f3364db25dff5aced444395344843ea3db5b61 /source/blender | |
parent | 088b6342e6449ed3b31ee3d8007eb42f108bc313 (diff) |
Object Mode: Fix wrong wire color on non-meshes objects.
Diffstat (limited to 'source/blender')
-rw-r--r-- | source/blender/draw/intern/draw_common.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/source/blender/draw/intern/draw_common.c b/source/blender/draw/intern/draw_common.c index 68a82d017cf..765e3f05848 100644 --- a/source/blender/draw/intern/draw_common.c +++ b/source/blender/draw/intern/draw_common.c @@ -162,6 +162,7 @@ static struct { struct Gwn_VertFormat *instance_screen_aligned; struct Gwn_VertFormat *instance_scaled; struct Gwn_VertFormat *instance_sized; + struct Gwn_VertFormat *instance_outline; struct Gwn_VertFormat *instance; struct Gwn_VertFormat *instance_camera; struct Gwn_VertFormat *instance_distance_lines; @@ -336,13 +337,13 @@ DRWShadingGroup *shgroup_instance_outline(DRWPass *pass, struct Gwn_Batch *geom, { GPUShader *sh_inst = GPU_shader_get_builtin_shader(GPU_SHADER_INSTANCE_VARIYING_ID_VARIYING_SIZE); - DRW_shgroup_instance_format(g_formats.instance_sized, { + DRW_shgroup_instance_format(g_formats.instance_outline, { {"callId" , DRW_ATTRIB_INT, 1}, {"size" , DRW_ATTRIB_FLOAT, 1}, {"InstanceModelMatrix", DRW_ATTRIB_FLOAT, 16} }); - DRWShadingGroup *grp = DRW_shgroup_instance_create(sh_inst, pass, geom, g_formats.instance_sized); + DRWShadingGroup *grp = DRW_shgroup_instance_create(sh_inst, pass, geom, g_formats.instance_outline); DRW_shgroup_uniform_int(grp, "baseId", baseid, 1); return grp; |