forked from bartvdbraak/blender
Material not set in edit derived meshes after last material modification
commits.
This commit is contained in:
parent
c979f2656d
commit
c9675b460e
@ -56,6 +56,7 @@
|
||||
#include "MEM_guardedalloc.h"
|
||||
|
||||
#include "GPU_extensions.h"
|
||||
#include "GPU_draw.h"
|
||||
#include "GPU_glew.h"
|
||||
|
||||
extern GLubyte stipple_quarttone[128]; /* glutil.c, bad level data */
|
||||
@ -607,13 +608,17 @@ static void emDM_drawMappedFaces(DerivedMesh *dm,
|
||||
int drawSmooth;
|
||||
|
||||
efa = ltri[0]->f;
|
||||
drawSmooth = lnors || ((flag & DM_DRAW_ALWAYS_SMOOTH) ? 1 : BM_elem_flag_test(efa, BM_ELEM_SMOOTH));
|
||||
|
||||
drawSmooth = lnors || ((flag & DM_DRAW_ALWAYS_SMOOTH) ? 1 : BM_elem_flag_test(efa, BM_ELEM_SMOOTH));
|
||||
|
||||
draw_option = (!setDrawOptions ?
|
||||
DM_DRAW_OPTION_NORMAL :
|
||||
setDrawOptions(userData, BM_elem_index_get(efa)));
|
||||
|
||||
if (draw_option != DM_DRAW_OPTION_SKIP) {
|
||||
const GLenum poly_type = GL_TRIANGLES; /* BMESH NOTE, this is odd but keep it for now to match trunk */
|
||||
|
||||
GPU_enable_material(efa->mat_nr + 1, NULL);
|
||||
|
||||
if (draw_option == DM_DRAW_OPTION_STIPPLE) { /* enabled with stipple */
|
||||
|
||||
if (poly_prev != GL_ZERO) glEnd();
|
||||
|
Loading…
Reference in New Issue
Block a user