gzz-commits
[Top][All Lists]
Advanced

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

[Gzz-commits] gzz ./Makefile gfx/librenderables/renderables.p...


From: Tuomas J. Lukka
Subject: [Gzz-commits] gzz ./Makefile gfx/librenderables/renderables.p...
Date: Thu, 26 Dec 2002 07:44:43 -0500

CVSROOT:        /cvsroot/gzz
Module name:    gzz
Changes by:     Tuomas J. Lukka <address@hidden>        02/12/26 07:44:40

Modified files:
        .              : Makefile 
        gfx/librenderables: renderables.py 
        gfx/util       : cg.py 
Added files:
        gfx/demo/opengl: bumpy.py 

Log message:
        Thinking about stretching bumpy things

CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/gzz/gzz/Makefile.diff?tr1=1.228&tr2=1.229&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gzz/gzz/gfx/demo/opengl/bumpy.py?rev=1.1
http://savannah.gnu.org/cgi-bin/viewcvs/gzz/gzz/gfx/librenderables/renderables.py.diff?tr1=1.166&tr2=1.167&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gzz/gzz/gfx/util/cg.py.diff?tr1=1.2&tr2=1.3&r1=text&r2=text

Patches:
Index: gzz/Makefile
diff -u gzz/Makefile:1.228 gzz/Makefile:1.229
--- gzz/Makefile:1.228  Thu Dec 19 17:24:42 2002
+++ gzz/Makefile        Thu Dec 26 07:44:38 2002
@@ -461,8 +461,9 @@
 runpaperbasis:
        $(GLLIB) $(JYTHON) $(GLDEMO) gfx/demo/paperbasis.py
 
+DEMOMOD = gfx/demo/$(DEMO).py
 rundemo:
-       $(GLLIB) $(JYTHON) $(GLDEMO) gfx/demo/$(DEMO).py
+       $(GLLIB) $(JYTHON) $(GLDEMO) $(DEMOMOD)
 
 runanim:
        $(GLLIB) $(JYTHON) gfx/util/anim.py $(DBG) gfx/anim/$(ANIM).py
Index: gzz/gfx/librenderables/renderables.py
diff -u gzz/gfx/librenderables/renderables.py:1.166 
gzz/gfx/librenderables/renderables.py:1.167
--- gzz/gfx/librenderables/renderables.py:1.166 Wed Dec 18 11:12:32 2002
+++ gzz/gfx/librenderables/renderables.py       Thu Dec 26 07:44:40 2002
@@ -1423,7 +1423,49 @@
         """,
 }    ,
 
-        
+# For testing out things: just render a mesh. 
+# Use vertex programs to do interesting stuff.
+{
+    "Type" : "0",
+    "Name": "SimpleDiced",
+    "Data": """int flags;
+           int ndice;
+           """,
+    "Params" : "int flags, int ndice",
+    "ParamCode" : """
+           this->flags = flags;
+           this->ndice = ndice;
+           """,
+    "ExtraClass" : """
+       void vert(int x, int y) {
+           DBG(dbg) << "SimplDiced vert "<<x<<" "<<y<<"\n";
+           glVertex2f(x / (ndice-1.0), y / (ndice-1.0));
+       }
+    """,
+    "RenderCode" : """
+       register int flags = this->flags;
+       GLERR
+       for(int i=0; i<ndice-1; i++) {
+           glBegin(GL_TRIANGLE_STRIP);
+           DBG(dbg) << "SimpleDiced Begin strip "<<i<<"\n";
+           for(int j=0; j<ndice; j++) {
+               if(flags&1) {
+                   if(j < ndice-i)
+                       vert(i, j);
+                   if(j < ndice-(i+1))
+                       vert((i+1), j);
+               } else {
+                   vert(i, j);
+                   vert(i+1, j);
+               }
+           }
+           DBG(dbg) << "SimpleDiced End strip "<<i<<"\n";
+           glEnd();
+           GLERR
+       }
+    """
+},
+
 
 # coords1: paper => window
 # coords2: frame => paper (assumed to be affine)
Index: gzz/gfx/util/cg.py
diff -u gzz/gfx/util/cg.py:1.2 gzz/gfx/util/cg.py:1.3
--- gzz/gfx/util/cg.py:1.2      Thu Dec 19 04:12:39 2002
+++ gzz/gfx/util/cg.py  Thu Dec 26 07:44:40 2002
@@ -6,7 +6,7 @@
 import tempfile
 import os
 
-_cgc = "/BIG/Cg/Cg-1.5.0-install/usr/bin/cgc"
+_cgc = "/BIG/Cg/usr/bin/cgc"
 
 def compile_arbvp1(prog):
     """Compile a Cg program and return an ARB vertex program.



reply via email to

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