gzz-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Gzz-commits] gzz/gfx/demo irregu4.py


From: Janne V. Kujala
Subject: [Gzz-commits] gzz/gfx/demo irregu4.py
Date: Sun, 01 Dec 2002 02:11:08 -0500

CVSROOT:        /cvsroot/gzz
Module name:    gzz
Changes by:     Janne V. Kujala <address@hidden>        02/12/01 02:11:08

Modified files:
        gfx/demo       : irregu4.py 

Log message:
        Add an option for solid final shape figs

CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/gzz/gzz/gfx/demo/irregu4.py.diff?tr1=1.35&tr2=1.36&r1=text&r2=text

Patches:
Index: gzz/gfx/demo/irregu4.py
diff -u gzz/gfx/demo/irregu4.py:1.35 gzz/gfx/demo/irregu4.py:1.36
--- gzz/gfx/demo/irregu4.py:1.35        Sun Dec  1 01:20:57 2002
+++ gzz/gfx/demo/irregu4.py     Sun Dec  1 02:11:07 2002
@@ -665,6 +665,8 @@
     def scene(self, vs):
         putnoc(vs, background((1.0,1.0,1.0)))
 
+        solid = 0 #XXX: draw solid instead of only edge
+
         shape = 9
         texscale = 1.3
         linewidth = 4
@@ -696,7 +698,7 @@
                 border0, border1, 1.0,
                 "", "", 0, 0,
                 65536,
-                offset_code + parseCombiner("color = 1"), 1.0)
+                offset_code + parseCombiner("color = %s" % (not solid)), 1.0)
             outer = GLRen.createIrregularEdge(shape,
                 texscale, linewidth, refsize, scale_pow,
                 border0, border1, 1.0,
@@ -723,11 +725,12 @@
                 code += parseCombiner("""
                 SPARE0.alpha = TEX0.alpha + COL0.alpha
                 alpha = SPARE0.alpha
-                color = 1
+                color = %s
                 Enable REGISTER_COMBINERS_NV
                 PolygonMode FRONT_AND_BACK FILL
                 #PolygonMode FRONT_AND_BACK LINE
-                """)
+                """ % (not solid))
+                
             code += """
                 Disable BLEND
             """
@@ -749,7 +752,9 @@
         vs.matcher.add(cs1, "2")
 
         if self.outer or self.type == 2:
-            vs.map.put(outer, cs1, cs2)
+            if not solid:
+                vs.map.put(outer, cs1, cs2)
+
         vs.map.put(inner, cs1, cs2)
 
 class StillMotionScene:




reply via email to

[Prev in Thread] Current Thread [Next in Thread]