diff options
author | Clément Foucault <foucault.clem@gmail.com> | 2017-03-26 20:10:53 +0300 |
---|---|---|
committer | Clément Foucault <foucault.clem@gmail.com> | 2017-03-27 15:01:47 +0300 |
commit | e54d8eeab2eac9b98bb57a886eb334a812f6487a (patch) | |
tree | 01cc5675a4fd78d4fa7760cc0d7d05ed560185ca /source/blender/draw/modes/edit_mesh_mode.c | |
parent | 522ca1828177e8161f60f4693b523bbeeeb8cafa (diff) |
Draw Manager: Make Viewport Data passed by the manager call.
Diffstat (limited to 'source/blender/draw/modes/edit_mesh_mode.c')
-rw-r--r-- | source/blender/draw/modes/edit_mesh_mode.c | 21 |
1 files changed, 10 insertions, 11 deletions
diff --git a/source/blender/draw/modes/edit_mesh_mode.c b/source/blender/draw/modes/edit_mesh_mode.c index 45d32d70bbc..b17d6288d05 100644 --- a/source/blender/draw/modes/edit_mesh_mode.c +++ b/source/blender/draw/modes/edit_mesh_mode.c @@ -124,11 +124,11 @@ static struct { /* *********** FUNCTIONS *********** */ -static void EDIT_MESH_engine_init(void) +static void EDIT_MESH_engine_init(void *vedata) { EDIT_MESH_Data *ved = DRW_viewport_engine_data_get("EditMeshMode"); EDIT_MESH_TextureList *txl = ved->txl; - EDIT_MESH_FramebufferList *fbl = ved->fbl; + EDIT_MESH_FramebufferList *fbl = ((EDIT_MESH_Data *)vedata)->fbl; float *viewport_size = DRW_viewport_size_get(); @@ -261,11 +261,11 @@ static float backwire_opacity; static float face_mod; static float size_normal; -static void EDIT_MESH_cache_init(void) +static void EDIT_MESH_cache_init(void *vedata) { - g_data.vedata = DRW_viewport_engine_data_get("EditMeshMode"); - EDIT_MESH_TextureList *txl = g_data.vedata->txl; - EDIT_MESH_PassList *psl = g_data.vedata->psl; + + EDIT_MESH_TextureList *txl = ((EDIT_MESH_Data *)vedata)->txl; + EDIT_MESH_PassList *psl = ((EDIT_MESH_Data *)vedata)->psl; DefaultTextureList *dtxl = DRW_viewport_texture_list_get(); const struct bContext *C = DRW_get_context(); @@ -348,7 +348,7 @@ static void edit_mesh_add_ob_to_pass(Scene *scene, Object *ob, DRWShadingGroup * } } -static void EDIT_MESH_cache_populate(Object *ob) +static void EDIT_MESH_cache_populate(void *UNUSED(vedata), Object *ob) { const struct bContext *C = DRW_get_context(); View3D *v3d = CTX_wm_view3d(C); @@ -401,11 +401,10 @@ static void EDIT_MESH_cache_populate(Object *ob) } } -static void EDIT_MESH_draw_scene(void) +static void EDIT_MESH_draw_scene(void *vedata) { - EDIT_MESH_Data *ved = DRW_viewport_engine_data_get("EditMeshMode"); - EDIT_MESH_PassList *psl = ved->psl; - EDIT_MESH_FramebufferList *fbl = ved->fbl; + EDIT_MESH_PassList *psl = ((EDIT_MESH_Data *)vedata)->psl; + EDIT_MESH_FramebufferList *fbl = ((EDIT_MESH_Data *)vedata)->fbl; DefaultFramebufferList *dfbl = DRW_viewport_framebuffer_list_get(); DefaultTextureList *dtxl = DRW_viewport_texture_list_get(); |