Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorClément Foucault <foucault.clem@gmail.com>2018-07-10 15:14:55 +0300
committerClément Foucault <foucault.clem@gmail.com>2018-07-10 16:31:34 +0300
commit873d7f7e14e080f75e75ed7c6c07f326e588cecb (patch)
treeb0147308da930199bbdfea7a2cc4a5c17938b10f /source/blender/draw/engines/workbench/workbench_deferred.c
parentdfd192ce41f7e4923db0642f22a587862656bbdd (diff)
DrawData: Change drawdata to a generic struct shared accross ID types
This makes tagging much more generic and make the world updates more in line with the new tagging system (Depsgraph).
Diffstat (limited to 'source/blender/draw/engines/workbench/workbench_deferred.c')
-rw-r--r--source/blender/draw/engines/workbench/workbench_deferred.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/source/blender/draw/engines/workbench/workbench_deferred.c b/source/blender/draw/engines/workbench/workbench_deferred.c
index d153728a000..784ed861014 100644
--- a/source/blender/draw/engines/workbench/workbench_deferred.c
+++ b/source/blender/draw/engines/workbench/workbench_deferred.c
@@ -258,9 +258,9 @@ static struct GPUTexture *create_jitter_texture(int num_samples)
/* Functions */
-static void workbench_init_object_data(ObjectEngineData *engine_data)
+static void workbench_init_object_data(DrawData *dd)
{
- WORKBENCH_ObjectData *data = (WORKBENCH_ObjectData *)engine_data;
+ WORKBENCH_ObjectData *data = (WORKBENCH_ObjectData *)dd;
data->object_id = ((e_data.next_object_id++) & 0xff) + 1;
data->shadow_bbox_dirty = true;
}
@@ -561,8 +561,8 @@ static WORKBENCH_MaterialData *get_or_create_material_data(
WORKBENCH_PassList *psl = vedata->psl;
WORKBENCH_PrivateData *wpd = stl->g_data;
WORKBENCH_MaterialData *material;
- WORKBENCH_ObjectData *engine_object_data = (WORKBENCH_ObjectData *)DRW_object_engine_data_ensure(
- ob, &draw_engine_workbench_solid, sizeof(WORKBENCH_ObjectData), &workbench_init_object_data, NULL);
+ WORKBENCH_ObjectData *engine_object_data = (WORKBENCH_ObjectData *)DRW_drawdata_ensure(
+ &ob->id, &draw_engine_workbench_solid, sizeof(WORKBENCH_ObjectData), &workbench_init_object_data, NULL);
WORKBENCH_MaterialData material_template;
/* Solid */
@@ -731,8 +731,8 @@ void workbench_deferred_solid_cache_populate(WORKBENCH_Data *vedata, Object *ob)
// DRW_shgroup_call_sculpt_add(wpd->shadow_shgrp, ob, ob->obmat);
}
else {
- WORKBENCH_ObjectData *engine_object_data = (WORKBENCH_ObjectData *)DRW_object_engine_data_ensure(
- ob, &draw_engine_workbench_solid, sizeof(WORKBENCH_ObjectData), &workbench_init_object_data, NULL);
+ WORKBENCH_ObjectData *engine_object_data = (WORKBENCH_ObjectData *)DRW_drawdata_ensure(
+ &ob->id, &draw_engine_workbench_solid, sizeof(WORKBENCH_ObjectData), &workbench_init_object_data, NULL);
if (studiolight_object_cast_visible_shadow(wpd, ob, engine_object_data)) {