/[gzz]/gzz/gfx/demo/vpbuoy.py
ViewVC logotype

Diff of /gzz/gfx/demo/vpbuoy.py

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

revision 1.1 by tjl, Sat Dec 14 08:12:35 2002 UTC revision 1.2 by tjl, Sat Dec 14 13:01:50 2002 UTC
# Line 11  class Scene: Line 11  class Scene:
11              # w = 0              # w = 0
12              ATTRIB orig = vertex.position;              ATTRIB orig = vertex.position;
13    
14              PARAM center = { 500, 500, 0, 0 };              PARAM center = { 512, 350, 0, 0 };
15              PARAM p = { 100, 500, 0, 0 };              PARAM p = { 112, 350, 0, 0 };
16              PARAM radius = { %(recrad)s, 0, 0, 0 };              PARAM radius = { %(recrad)s, 0, 0, 0 };
17              PARAM zeroone = { 0, 1, 5, 0 };              PARAM zeroone = { 0, 1, 5, 0 };
18    
# Line 52  class Scene: Line 52  class Scene:
52              MAD buoy, amp, scale, p;              MAD buoy, amp, scale, p;
53    
54              MOV buoy.zw, zeroone.xyxy;              MOV buoy.zw, zeroone.xyxy;
55                ADD buoy.z, buoy.z, -scale;
56    
57              DP4 result.position.x, mvp[0], buoy;              DP4 result.position.x, mvp[0], buoy;
58              DP4 result.position.y, mvp[1], buoy;              DP4 result.position.y, mvp[1], buoy;
# Line 62  class Scene: Line 63  class Scene:
63    
64              TEMP ps0;              TEMP ps0;
65              MAD ps0, zeroone.z, anchor.z, zeroone.z;              MAD ps0, zeroone.z, anchor.z, zeroone.z;
             EX2 scale, scale.x;  
66              MUL result.pointsize, scale, ps0;              MUL result.pointsize, scale, ps0;
67    
68    
# Line 98  class Scene: Line 98  class Scene:
98                          Vertex %(x)s %(y)s 1 1                          Vertex %(x)s %(y)s 1 1
99                      """ % locals())                      """ % locals())
100          else:          else:
101              for i in range(0,100):              for i in range(0,2000):
102                  x, y = java.lang.Math.random(), java.lang.Math.random()                  x, y = java.lang.Math.random(), java.lang.Math.random()
103                  vert.append("""                  vert.append("""
104                      Color %(x)s .0 %(y)s .6                      Color %(x)s .0 %(y)s .6
# Line 126  class Scene: Line 126  class Scene:
126                  BindProgram VERTEX_PROGRAM_ARB %s                  BindProgram VERTEX_PROGRAM_ARB %s
127                  Enable VERTEX_PROGRAM_ARB                  Enable VERTEX_PROGRAM_ARB
128                  Enable VERTEX_PROGRAM_POINT_SIZE_ARB                  Enable VERTEX_PROGRAM_POINT_SIZE_ARB
129                    Enable POINT_SMOOTH
130                  Enable BLEND                  Enable BLEND
131          """ % self.prog.getProgId()));          """ % self.prog.getProgId()));
132    
133          from java.lang import Math          from java.lang import Math
134    
135          vs.put(GLRen.createSetMatrix("MATRIX0_ARB"), "M", 0,          vs.put(GLRen.createSetMatrix("MATRIX0_ARB"), "M", 0,
136              Math.random() * 300, Math.random() * 300,              -150+Math.random() * 300, -150+Math.random() * 300,
137              Math.random() * 800, Math.random() * 800,              700 + Math.random() * 400, 700 + Math.random() * 400,
138              )              )
139    
140          vs.put(self.pointlist, "F", 0, 0, 0, 1, 1)          vs.put(self.pointlist, "F", 0, 0, 0, 1, 1)

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.2

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