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
path: root/source
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2014-01-14 17:35:43 +0400
committerCampbell Barton <ideasman42@gmail.com>2014-01-14 17:35:43 +0400
commit54e56cd3094aacf642c8b18a63b06a60da30be7e (patch)
treecd100bd898c63da2efaa4aeea57a390c192b6315 /source
parent1fb9bb815a5df8ba3b4b2ebdaa4cad192fecd145 (diff)
Fix T38209: Curve's didn't account for negative scale
Would use the face winding from the previously drawn mesh
Diffstat (limited to 'source')
-rw-r--r--source/blender/editors/space_view3d/drawobject.c18
1 files changed, 10 insertions, 8 deletions
diff --git a/source/blender/editors/space_view3d/drawobject.c b/source/blender/editors/space_view3d/drawobject.c
index e5aed93a953..8c2993ba661 100644
--- a/source/blender/editors/space_view3d/drawobject.c
+++ b/source/blender/editors/space_view3d/drawobject.c
@@ -3801,17 +3801,10 @@ static void drawDispListsolid(ListBase *lb, Object *ob, const short dflag,
glEnable(GL_LIGHTING);
glEnableClientState(GL_VERTEX_ARRAY);
-
-
+
if (ob->type == OB_MBALL) { /* mball always smooth shaded */
- if (ob->transflag & OB_NEG_SCALE) glFrontFace(GL_CW);
- else glFrontFace(GL_CCW);
glShadeModel(GL_SMOOTH);
}
- else {
- if (ob->transflag & OB_NEG_SCALE) glFrontFace(GL_CCW);
- else glFrontFace(GL_CW);
- }
dl = lb->first;
while (dl) {
@@ -3929,6 +3922,8 @@ static bool drawCurveDerivedMesh(Scene *scene, View3D *v3d, RegionView3D *rv3d,
return true;
}
+ glFrontFace((ob->transflag & OB_NEG_SCALE) ? GL_CW : GL_CCW);
+
if (dt > OB_WIRE && dm->getNumTessFaces(dm)) {
int glsl = draw_glsl_material(scene, ob, v3d, dt);
GPU_begin_object_materials(v3d, rv3d, scene, ob, glsl, NULL);
@@ -3969,6 +3964,13 @@ static bool drawDispList_nobackface(Scene *scene, View3D *v3d, RegionView3D *rv3
return false;
}
+ if (ob->type == OB_MBALL) {
+ glFrontFace((ob->transflag & OB_NEG_SCALE) ? GL_CW : GL_CCW);
+ }
+ else {
+ glFrontFace((ob->transflag & OB_NEG_SCALE) ? GL_CCW : GL_CW);
+ }
+
switch (ob->type) {
case OB_FONT:
case OB_CURVE: