diff options
Diffstat (limited to 'source/blender/editors')
-rw-r--r-- | source/blender/editors/sculpt_paint/paint_vertex.c | 2 | ||||
-rw-r--r-- | source/blender/editors/space_view3d/drawmesh.c | 36 |
2 files changed, 11 insertions, 27 deletions
diff --git a/source/blender/editors/sculpt_paint/paint_vertex.c b/source/blender/editors/sculpt_paint/paint_vertex.c index 376d3d3099c..929231186f4 100644 --- a/source/blender/editors/sculpt_paint/paint_vertex.c +++ b/source/blender/editors/sculpt_paint/paint_vertex.c @@ -3024,7 +3024,7 @@ static void vpaint_stroke_update_step(bContext *C, struct PaintStroke *stroke, P * avoid this if we can! */ DAG_id_tag_update(ob->data, 0); } - else if (!GPU_buffer_legacy(ob->derivedFinal)) { + else { /* If using new VBO drawing, mark mcol as dirty to force colors gpu buffer refresh! */ ob->derivedFinal->dirty |= DM_DIRTY_MCOL_UPDATE_DRAW; } diff --git a/source/blender/editors/space_view3d/drawmesh.c b/source/blender/editors/space_view3d/drawmesh.c index 408b41719da..911403f45cb 100644 --- a/source/blender/editors/space_view3d/drawmesh.c +++ b/source/blender/editors/space_view3d/drawmesh.c @@ -562,14 +562,6 @@ static DMDrawOption draw_tface__set_draw_legacy(MTFace *tface, const bool has_mc } } -static DMDrawOption draw_mcol__set_draw_legacy(MTFace *UNUSED(tface), const bool has_mcol, int UNUSED(matnr)) -{ - if (has_mcol) - return DM_DRAW_OPTION_NORMAL; - else - return DM_DRAW_OPTION_NO_MCOL; -} - static DMDrawOption draw_tface__set_draw(MTFace *tface, const bool UNUSED(has_mcol), int matnr) { Material *ma = give_current_material(Gtexdraw.ob, matnr + 1); @@ -929,24 +921,16 @@ static void draw_mesh_textured_old(Scene *scene, View3D *v3d, RegionView3D *rv3d dm->drawMappedFacesTex(dm, me->mpoly ? draw_tface_mapped__set_draw : NULL, compareDrawOptions, &userData, uvflag); } } - else { - if (GPU_buffer_legacy(dm)) { - if (draw_flags & DRAW_MODIFIERS_PREVIEW) - dm->drawFacesTex(dm, draw_mcol__set_draw_legacy, NULL, NULL, uvflag); - else - dm->drawFacesTex(dm, draw_tface__set_draw_legacy, NULL, NULL, uvflag); - } - else { - drawTFace_userData userData; - - update_tface_color_layer(dm); - - userData.mf = DM_get_tessface_data_layer(dm, CD_MFACE); - userData.tf = DM_get_tessface_data_layer(dm, CD_MTFACE); - userData.me = NULL; - - dm->drawFacesTex(dm, draw_tface__set_draw, compareDrawOptions, &userData, uvflag); - } + else { + drawTFace_userData userData; + + update_tface_color_layer(dm); + + userData.mf = DM_get_tessface_data_layer(dm, CD_MFACE); + userData.tf = DM_get_tessface_data_layer(dm, CD_MTFACE); + userData.me = NULL; + + dm->drawFacesTex(dm, draw_tface__set_draw, compareDrawOptions, &userData, uvflag); } /* draw game engine text hack */ |