Bugfix #2746
authorTon Roosendaal <ton@blender.org>
Fri, 23 Sep 2005 08:29:32 +0000 (08:29 +0000)
committerTon Roosendaal <ton@blender.org>
Fri, 23 Sep 2005 08:29:32 +0000 (08:29 +0000)
In Surface editmode, solid draw  mode, curves are drawn in wire now
(where in invisible). Its a simple fix, it shouldn't give issues with
the Nurbana work. :)

source/blender/src/drawobject.c

index 80a9bcbbe0331c17272ea3b5e0a603923e7f76d6..81b8eb34071a5046d09adf2d9ba41e4b5b5549be 100644 (file)
@@ -1914,7 +1914,7 @@ static void drawDispListwire(ListBase *dlbase)
 static void drawDispListsolid(ListBase *lb, Object *ob)
 {
        DispList *dl;
 static void drawDispListsolid(ListBase *lb, Object *ob)
 {
        DispList *dl;
-       int parts, ofs, p1, p2, p3, p4, a, b, *index;
+       int nr, parts, ofs, p1, p2, p3, p4, a, b, *index;
        float *data, *v1, *v2, *v3, *v4;
        float *ndata, *n1, *n2, *n3, *n4;
        
        float *data, *v1, *v2, *v3, *v4;
        float *ndata, *n1, *n2, *n3, *n4;
        
@@ -1935,6 +1935,37 @@ static void drawDispListsolid(ListBase *lb, Object *ob)
                ndata= dl->nors;
 
                switch(dl->type) {
                ndata= dl->nors;
 
                switch(dl->type) {
+               case DL_SEGM:
+                       BIF_ThemeColor(TH_WIRE);
+                       glDisable(GL_LIGHTING);
+
+                       parts= dl->parts;
+                       while(parts--) {
+                               nr= dl->nr;
+                               glBegin(GL_LINE_STRIP);
+                               while(nr--) {
+                                       glVertex3fv(data);
+                                       data+=3;
+                               }
+                               glEnd();
+                       }
+                       glEnable(GL_LIGHTING);
+                       break;
+               case DL_POLY:
+                       BIF_ThemeColor(TH_WIRE);
+                       glDisable(GL_LIGHTING);
+                       parts= dl->parts;
+                       while(parts--) {
+                               nr= dl->nr;
+                               glBegin(GL_LINE_LOOP);
+                               while(nr--) {
+                                       glVertex3fv(data);
+                                       data+=3;
+                               }
+                               glEnd();
+                       }
+                       glEnable(GL_LIGHTING);
+                       break;
                case DL_SURF:
 
                        set_gl_material(dl->col+1);
                case DL_SURF:
 
                        set_gl_material(dl->col+1);