From ad0e95688d254abee315622ebdc3aeb0d2ba979d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Foucault?= Date: Sat, 11 May 2019 14:42:26 +0200 Subject: Cleanup: DRW: Remove pointers to materials --- source/blender/draw/intern/draw_manager_exec.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'source/blender/draw/intern/draw_manager_exec.c') diff --git a/source/blender/draw/intern/draw_manager_exec.c b/source/blender/draw/intern/draw_manager_exec.c index efea155d35d..a1532243381 100644 --- a/source/blender/draw/intern/draw_manager_exec.c +++ b/source/blender/draw/intern/draw_manager_exec.c @@ -818,12 +818,12 @@ static void draw_geometry_prepare(DRWShadingGroup *shgroup, DRWCall *call) (float *)state->modelviewprojection); } if (shgroup->objectinfo != -1) { - float objectinfo[4]; - objectinfo[0] = state->objectinfo[0]; - objectinfo[1] = call->single.ma_index; /* WATCH this is only valid for single drawcalls. */ - objectinfo[2] = state->objectinfo[1]; - objectinfo[3] = (state->flag & DRW_CALL_NEGSCALE) ? -1.0f : 1.0f; - GPU_shader_uniform_vector(shgroup->shader, shgroup->objectinfo, 4, 1, (float *)objectinfo); + float infos[4]; + infos[0] = state->ob_index; + // infos[1]; /* UNUSED. */ + infos[2] = state->ob_random; + infos[3] = (state->flag & DRW_CALL_NEGSCALE) ? -1.0f : 1.0f; + GPU_shader_uniform_vector(shgroup->shader, shgroup->objectinfo, 4, 1, (float *)infos); } if (shgroup->orcotexfac != -1) { GPU_shader_uniform_vector( -- cgit v1.2.3