[Bf-blender-cvs] [54e56cd] master: Fix T38209: Curve's didn't account for negative scale
Campbell Barton
noreply at git.blender.org
Tue Jan 14 14:40:15 CET 2014
Commit: 54e56cd3094aacf642c8b18a63b06a60da30be7e
Author: Campbell Barton
Date: Wed Jan 15 00:35:43 2014 +1100
https://developer.blender.org/rB54e56cd3094aacf642c8b18a63b06a60da30be7e
Fix T38209: Curve's didn't account for negative scale
Would use the face winding from the previously drawn mesh
===================================================================
M source/blender/editors/space_view3d/drawobject.c
===================================================================
diff --git a/source/blender/editors/space_view3d/drawobject.c b/source/blender/editors/space_view3d/drawobject.c
index e5aed93..8c2993b 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:
More information about the Bf-blender-cvs
mailing list