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:
-rw-r--r--source/blender/editors/space_view3d/drawobject.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/source/blender/editors/space_view3d/drawobject.c b/source/blender/editors/space_view3d/drawobject.c
index 321281299ee..44fa0c7b181 100644
--- a/source/blender/editors/space_view3d/drawobject.c
+++ b/source/blender/editors/space_view3d/drawobject.c
@@ -3075,12 +3075,15 @@ static int drawCurveDerivedMesh(Scene *scene, View3D *v3d, RegionView3D *rv3d, B
int glsl = draw_glsl_material(scene, ob, v3d, dt);
GPU_begin_object_materials(v3d, rv3d, scene, ob, glsl, NULL);
- if (!glsl)
+ if(!glsl) {
glLightModeli(GL_LIGHT_MODEL_TWO_SIDE, 0);
+ glEnable(GL_LIGHTING);
+ dm->drawFacesSolid(dm, NULL, 0, GPU_enable_material);
+ glDisable(GL_LIGHTING);
+ }
+ else
+ dm->drawFacesGLSL(dm, GPU_enable_material);
- glEnable(GL_LIGHTING);
- dm->drawFacesSolid(dm, NULL, 0, GPU_enable_material);
- glDisable(GL_LIGHTING);
GPU_end_object_materials();
} else {
if((v3d->flag2 & V3D_RENDER_OVERRIDE && v3d->drawtype >= OB_SOLID)==0)