gzz-commits
[Top][All Lists]
Advanced

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

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


From: Tuomas J. Lukka
Subject: [Gzz-commits] gzz/gfx/demo vpbuoy.py
Date: Sat, 14 Dec 2002 08:01:54 -0500

CVSROOT:        /cvsroot/gzz
Module name:    gzz
Changes by:     Tuomas J. Lukka <address@hidden>        02/12/14 08:01:50

Modified files:
        gfx/demo       : vpbuoy.py 

Log message:
        Param twiddling

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

Patches:
Index: gzz/gfx/demo/vpbuoy.py
diff -u gzz/gfx/demo/vpbuoy.py:1.1 gzz/gfx/demo/vpbuoy.py:1.2
--- gzz/gfx/demo/vpbuoy.py:1.1  Sat Dec 14 03:12:35 2002
+++ gzz/gfx/demo/vpbuoy.py      Sat Dec 14 08:01:50 2002
@@ -11,8 +11,8 @@
            # w = 0
            ATTRIB orig = vertex.position;
 
-           PARAM center = { 500, 500, 0, 0 };
-           PARAM p = { 100, 500, 0, 0 };
+           PARAM center = { 512, 350, 0, 0 };
+           PARAM p = { 112, 350, 0, 0 };
            PARAM radius = { %(recrad)s, 0, 0, 0 };
            PARAM zeroone = { 0, 1, 5, 0 };
 
@@ -52,6 +52,7 @@
            MAD buoy, amp, scale, p;
 
            MOV buoy.zw, zeroone.xyxy;
+           ADD buoy.z, buoy.z, -scale;
 
            DP4 result.position.x, mvp[0], buoy;
            DP4 result.position.y, mvp[1], buoy;
@@ -62,7 +63,6 @@
 
            TEMP ps0;
            MAD ps0, zeroone.z, anchor.z, zeroone.z;
-           EX2 scale, scale.x;
            MUL result.pointsize, scale, ps0;
 
 
@@ -98,7 +98,7 @@
                        Vertex %(x)s %(y)s 1 1
                    """ % locals())
        else:
-           for i in range(0,100):
+           for i in range(0,2000):
                x, y = java.lang.Math.random(), java.lang.Math.random()
                vert.append("""
                    Color %(x)s .0 %(y)s .6
@@ -126,14 +126,15 @@
                BindProgram VERTEX_PROGRAM_ARB %s
                Enable VERTEX_PROGRAM_ARB
                Enable VERTEX_PROGRAM_POINT_SIZE_ARB
+               Enable POINT_SMOOTH
                Enable BLEND
        """ % self.prog.getProgId()));
 
        from java.lang import Math
 
        vs.put(GLRen.createSetMatrix("MATRIX0_ARB"), "M", 0,
-           Math.random() * 300, Math.random() * 300,
-           Math.random() * 800, Math.random() * 800,
+           -150+Math.random() * 300, -150+Math.random() * 300,
+           700 + Math.random() * 400, 700 + Math.random() * 400,
            )
 
        vs.put(self.pointlist, "F", 0, 0, 0, 1, 1)



reply via email to

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