[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gzz-commits] gzz gfx/demo/irregularframe.py gzz/gfx/gl/Stenc...
From: |
Tuomas J. Lukka |
Subject: |
[Gzz-commits] gzz gfx/demo/irregularframe.py gzz/gfx/gl/Stenc... |
Date: |
Wed, 11 Sep 2002 02:18:01 -0400 |
CVSROOT: /cvsroot/gzz
Module name: gzz
Changes by: Tuomas J. Lukka <address@hidden> 02/09/11 02:18:01
Modified files:
gfx/demo : irregularframe.py
gzz/gfx/gl : Stencil.java
Log message:
Don't draw the stencil itself - waste of bandwidth
CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/gzz/gzz/gfx/demo/irregularframe.py.diff?tr1=1.1&tr2=1.2&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gzz/gzz/gzz/gfx/gl/Stencil.java.diff?tr1=1.7&tr2=1.8&r1=text&r2=text
Patches:
Index: gzz/gfx/demo/irregularframe.py
diff -c gzz/gfx/demo/irregularframe.py:1.1 gzz/gfx/demo/irregularframe.py:1.2
*** gzz/gfx/demo/irregularframe.py:1.1 Tue Sep 10 14:53:19 2002
--- gzz/gfx/demo/irregularframe.py Wed Sep 11 02:18:01 2002
***************
*** 21,33 ****
t.shade(128, 128, 0, 4, "RGBA", "RGBA",
"fnoise", ["scale", "0.05", "freq", "4", "df", "4", "bias", "0.5"])
class IrreguScene:
def key(self, key):
pass
def scene(self, vs):
putnoc(vs, background((0.1,0.4,0.5)))
! for i in range(0,20):
rs = 10
ro = 50
--- 21,50 ----
t.shade(128, 128, 0, 4, "RGBA", "RGBA",
"fnoise", ["scale", "0.05", "freq", "4", "df", "4", "bias", "0.5"])
+ if 0:
+ Stencil.initStencil = getDListNocoords("""
+ PushAttrib ENABLE_BIT STENCIL_BUFFER_BIT COLOR_BUFFER_BIT
+ Enable STENCIL_TEST
+ StencilFunc EQUAL 0 15
+ StencilOp ZERO ZERO INCR
+ StencilMask 1
+ ColorMask 0 0 0 0
+ Disable DEPTH_TEST
+ """)
+
+ Stencil.initOutside = getDListNocoords("""
+ StencilFunc EQUAL 0 15
+ ColorMask 1 1 1 1
+ StencilMask 0
+ """)
+
class IrreguScene:
def key(self, key):
pass
def scene(self, vs):
putnoc(vs, background((0.1,0.4,0.5)))
! for i in range(0,2):
rs = 10
ro = 50
***************
*** 96,112 ****
Disable REGISTER_COMBINERS_NV
"""%(t.getTexId())), stencs)
! putnoc(vs, getDListNocoords("Disable DEPTH_TEST\nColor 0 0 0\n"+
! "Translate -2 0 0\n"))
! simplemask().run()
! putnoc(vs, getDListNocoords("Translate 4 0 0"))
! simplemask().run()
! putnoc(vs, getDListNocoords("Translate -2 2 0"))
! simplemask().run()
! putnoc(vs, getDListNocoords("Translate 0 -4 0"))
! simplemask().run()
! putnoc(vs, getDListNocoords("Translate 0 2 0\nColor 1 1 1\n"))
! simplemask().run()
currentScene = IrreguScene()
--- 113,135 ----
Disable REGISTER_COMBINERS_NV
"""%(t.getTexId())), stencs)
! putnoc(vs, getDListNocoords("Disable DEPTH_TEST\nColor 1 1 1\n"))
!
! class outside(Runnable):
! def run(self):
! putnoc(vs, getDListNocoords("Color 0 0 0\n"+
! "Translate -2 0 0\n"))
! simplemask().run()
! putnoc(vs, getDListNocoords("Translate 4 0 0"))
! simplemask().run()
! putnoc(vs, getDListNocoords("Translate -2 2 0"))
! simplemask().run()
! putnoc(vs, getDListNocoords("Translate 0 -4 0"))
! simplemask().run()
! putnoc(vs, getDListNocoords("Translate 0 2 0\nColor 1 1
1\n"))
!
! Stencil.drawStenciled(vs, simplemask(), None, outside(), None, 0)
+ vs.dump()
currentScene = IrreguScene()
Index: gzz/gzz/gfx/gl/Stencil.java
diff -c gzz/gzz/gfx/gl/Stencil.java:1.7 gzz/gzz/gfx/gl/Stencil.java:1.8
*** gzz/gzz/gfx/gl/Stencil.java:1.7 Tue Sep 10 14:53:19 2002
--- gzz/gzz/gfx/gl/Stencil.java Wed Sep 11 02:18:01 2002
***************
*** 10,23 ****
public class Stencil {
! private static Vob initStencil;
! private static Vob initOutside;
! private static Vob initBackplane;
! private static Vob exitBackplane;
! private static Vob initContents_depth;
! private static Vob initContents_nodepth;
! private static Vob initZero;
! private static Vob exit;
static {
init();
--- 10,23 ----
public class Stencil {
! public static Vob initStencil;
! public static Vob initOutside;
! public static Vob initBackplane;
! public static Vob exitBackplane;
! public static Vob initContents_depth;
! public static Vob initContents_nodepth;
! public static Vob initZero;
! public static Vob exit;
static {
init();
***************
*** 32,43 ****
" StencilFunc EQUAL 0 15\n"+
" StencilOp ZERO ZERO INCR\n"+ // XXX
" StencilMask 1\n"+
! " ColorMask 1 1 1 1\n"+
" Disable DEPTH_TEST\n"
);
initOutside = GZZGL.createCallList(
" StencilFunc EQUAL 0 1\n"+
" StencilMask 0\n"
);
--- 32,44 ----
" StencilFunc EQUAL 0 15\n"+
" StencilOp ZERO ZERO INCR\n"+ // XXX
" StencilMask 1\n"+
! " ColorMask 0 0 0 0\n"+
" Disable DEPTH_TEST\n"
);
initOutside = GZZGL.createCallList(
" StencilFunc EQUAL 0 1\n"+
+ " ColorMask 1 1 1 1\n"+
" StencilMask 0\n"
);
- [Gzz-commits] gzz gfx/demo/irregularframe.py gzz/gfx/gl/Stenc...,
Tuomas J. Lukka <=