diff options
Diffstat (limited to 'source/blender/editors/space_view3d/drawmesh.c')
-rw-r--r-- | source/blender/editors/space_view3d/drawmesh.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/source/blender/editors/space_view3d/drawmesh.c b/source/blender/editors/space_view3d/drawmesh.c index 728890a6dbc..afc48d2ff5e 100644 --- a/source/blender/editors/space_view3d/drawmesh.c +++ b/source/blender/editors/space_view3d/drawmesh.c @@ -815,7 +815,7 @@ static void draw_mesh_text(Scene *scene, Object *ob, int glsl) /* TEXFACE */ if (glsl) { - GPU_enable_material(matnr + 1, &gattribs); + GPU_object_material_bind(matnr + 1, &gattribs); for (i = 0; i < gattribs.totlayer; i++) { if (gattribs.layer[i].type == CD_MTFACE) { @@ -967,7 +967,7 @@ static void draw_mesh_textured_old(Scene *scene, View3D *v3d, RegionView3D *rv3d } else if (draw_flags & DRAW_FACE_SELECT) { if (ob->mode & OB_MODE_WEIGHT_PAINT) - dm->drawMappedFaces(dm, wpaint__setSolidDrawOptions_facemask, GPU_enable_material, NULL, me, + dm->drawMappedFaces(dm, wpaint__setSolidDrawOptions_facemask, GPU_object_material_bind, NULL, me, DM_DRAW_USE_COLORS | DM_DRAW_ALWAYS_SMOOTH | DM_DRAW_SKIP_HIDDEN); else { drawTFace_userData userData; @@ -1024,7 +1024,7 @@ static void tex_mat_set_material_cb(void *UNUSED(userData), int mat_nr, void *at * that the GLSL code will give different result depending on the drawtype, * in texture draw mode it will output the active texture node, in material * draw mode it will show the full material. */ - GPU_enable_material(mat_nr, attribs); + GPU_object_material_bind(mat_nr, attribs); } static void tex_mat_set_texture_cb(void *userData, int mat_nr, void *attribs) @@ -1048,7 +1048,7 @@ static void tex_mat_set_texture_cb(void *userData, int mat_nr, void *attribs) NodeTexBase *texbase = node->storage; /* disable existing material */ - GPU_disable_material(); + GPU_object_material_unbind(); glMaterialfv(GL_FRONT_AND_BACK, GL_DIFFUSE, zero); glMaterialfv(GL_FRONT_AND_BACK, GL_SPECULAR, zero); glMateriali(GL_FRONT_AND_BACK, GL_SHININESS, 0); @@ -1087,7 +1087,7 @@ static void tex_mat_set_texture_cb(void *userData, int mat_nr, void *attribs) glDisable(GL_COLOR_MATERIAL); /* draw single color */ - GPU_enable_material(mat_nr, attribs); + GPU_object_material_bind(mat_nr, attribs); } } @@ -1212,7 +1212,7 @@ static void draw_mesh_paint_light_begin(void) { const float spec[4] = {0.47f, 0.47f, 0.47f, 0.47f}; - GPU_enable_material(0, NULL); + GPU_object_material_bind(0, NULL); /* but set default spec */ glColorMaterial(GL_FRONT_AND_BACK, GL_SPECULAR); @@ -1228,13 +1228,13 @@ static void draw_mesh_paint_light_end(void) glDisable(GL_COLOR_MATERIAL); glDisable(GL_LIGHTING); - GPU_disable_material(); + GPU_object_material_unbind(); } void draw_mesh_paint_weight_faces(DerivedMesh *dm, const bool use_light, void *facemask_cb, void *user_data) { - DMSetMaterial setMaterial = GPU_object_materials_check() ? GPU_enable_material : NULL; + DMSetMaterial setMaterial = GPU_object_materials_check() ? GPU_object_material_bind : NULL; if (use_light) { draw_mesh_paint_light_begin(); @@ -1252,7 +1252,7 @@ void draw_mesh_paint_vcolor_faces(DerivedMesh *dm, const bool use_light, void *facemask_cb, void *user_data, const Mesh *me) { - DMSetMaterial setMaterial = GPU_object_materials_check() ? GPU_enable_material : NULL; + DMSetMaterial setMaterial = GPU_object_materials_check() ? GPU_object_material_bind : NULL; if (use_light) { draw_mesh_paint_light_begin(); |