Revision: 37611
          
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=37611
Author:   psy-fi
Date:     2011-06-18 00:37:47 +0000 (Sat, 18 Jun 2011)
Log Message:
-----------
smart welding - rearrangement for a bit more optimal drawing of preview.

Modified Paths:
--------------
    branches/soc-2011-onion/source/blender/editors/uvedit/uvedit_draw.c

Modified: branches/soc-2011-onion/source/blender/editors/uvedit/uvedit_draw.c
===================================================================
--- branches/soc-2011-onion/source/blender/editors/uvedit/uvedit_draw.c 
2011-06-18 00:30:42 UTC (rev 37610)
+++ branches/soc-2011-onion/source/blender/editors/uvedit/uvedit_draw.c 
2011-06-18 00:37:47 UTC (rev 37611)
@@ -836,20 +836,25 @@
 
        /* finally draw stitch preview */
        if((stitch_preview) && stitch_preview->enabled){
+               glPushClientAttrib(GL_CLIENT_VERTEX_ARRAY_BIT);
+               glEnable(GL_VERTEX_ARRAY);
+
                glPolygonMode(GL_FRONT_AND_BACK, GL_LINE);
                glColor4f(0.0, 1.0, 0.0, 0.5);
-               glPushClientAttrib(GL_CLIENT_VERTEX_ARRAY_BIT);
-               glEnable(GL_VERTEX_ARRAY);
                glVertexPointer(2, GL_FLOAT, 0, stitch_preview->previewTris);
                glDrawArrays(GL_TRIANGLES, 0, stitch_preview->numOfTris*3);
-               glVertexPointer(2, GL_FLOAT, 0, stitch_preview->previewQuads);
-               glDrawArrays(GL_QUADS, 0, stitch_preview->numOfQuads*4);
+               glPolygonMode(GL_FRONT_AND_BACK, GL_POINT);
                glColor4f(0.0, 0.0, 1.0, 0.5);
-               glPolygonMode(GL_FRONT_AND_BACK, GL_POINT);
-               glVertexPointer(2, GL_FLOAT, 0, stitch_preview->previewTris);
                glDrawArrays(GL_TRIANGLES, 0, stitch_preview->numOfTris*3);
+
+               glPolygonMode(GL_FRONT_AND_BACK, GL_LINE);
+               glColor4f(0.0, 1.0, 0.0, 0.5);
                glVertexPointer(2, GL_FLOAT, 0, stitch_preview->previewQuads);
                glDrawArrays(GL_QUADS, 0, stitch_preview->numOfQuads*4);
+               glPolygonMode(GL_FRONT_AND_BACK, GL_POINT);
+               glColor4f(0.0, 0.0, 1.0, 0.5);
+               glDrawArrays(GL_QUADS, 0, stitch_preview->numOfQuads*4);
+
                glPopClientAttrib();
                glPolygonMode(GL_FRONT_AND_BACK, GL_FILL);
        }

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
http://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to