/[libvob]/libvob/vob/demo/multifil.py
ViewVC logotype

Diff of /libvob/vob/demo/multifil.py

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.3 by tjl, Thu May 29 16:14:06 2003 UTC revision 1.4 by tjl, Thu May 29 16:35:16 2003 UTC
# Line 19  class Scene: Line 19  class Scene:
19              Toggle("drawEdge", 1, "Draw edge", "e"),              Toggle("drawEdge", 1, "Draw edge", "e"),
20              Toggle("drawInside", 1, "Draw inside", "i"),              Toggle("drawInside", 1, "Draw inside", "i"),
21              Toggle("depthColor", 0, "Color from depth", "d"),              Toggle("depthColor", 0, "Color from depth", "d"),
22                Toggle("lines", 0, "Toggle showing lines", "l"),
23          )          )
24      def scene(self, vs):      def scene(self, vs):
25          putnoc(vs, background((.5,1,.2)))          putnoc(vs, background((.5,1,.2)))
26          vs.put(getDListNocoords("""          vs.put(getDListNocoords("""
27                PushAttrib POLYGON_BIT
28              Enable DEPTH_TEST              Enable DEPTH_TEST
29              LineWidth 3              LineWidth 1
30              PolygonOffset 100 100              PolygonOffset 0 0
31          """))          """))
32    
33            if self.lines:
34                vs.put(getDListNocoords("PolygonMode FRONT_AND_BACK LINE"))
35    
36            dice = 20
37          conns = GLRen.createSortedConnections(          conns = GLRen.createSortedConnections(
38              GLRen.createFilletSpan1(1000, 1 + 4*self.depthColor))              GLRen.createFilletSpan1(dice, 1 + 4*self.depthColor))
39          conns_l = GLRen.createSortedConnections(          conns_l = GLRen.createSortedConnections(
40              GLRen.createFilletSpan1(1000, 2 + 4*self.depthColor))              GLRen.createFilletSpan1(dice, 2 + 4*self.depthColor))
41    
42          size = 50          size = 50
43                    
# Line 63  class Scene: Line 69  class Scene:
69          """))          """))
70          if self.drawEdge: pc(conns_l)          if self.drawEdge: pc(conns_l)
71    
72            vs.put(getDListNocoords("""
73                PopAttrib
74            """))
75    

Legend:
Removed from v.1.3  
changed lines
  Added in v.1.4

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26