[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gzz-commits] gzz gfx/demo/texturelab.py test/testutil.py gzz...
From: |
Tuomas J. Lukka |
Subject: |
[Gzz-commits] gzz gfx/demo/texturelab.py test/testutil.py gzz... |
Date: |
Fri, 06 Sep 2002 07:04:59 -0400 |
CVSROOT: /cvsroot/gzz
Module name: gzz
Changes by: Tuomas J. Lukka <address@hidden> 02/09/06 07:04:58
Modified files:
gfx/demo : texturelab.py
test : testutil.py
Added files:
gzz/vob/buoy : NadirAngler.java
test/gzz/vob/buoy: nadir.test
Log message:
Implement buoy nadir angle calculator. Next, to actually make use of
it...
CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/gzz/gzz/gfx/demo/texturelab.py.diff?tr1=1.11&tr2=1.12&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gzz/gzz/gzz/vob/buoy/NadirAngler.java?rev=1.1
http://savannah.gnu.org/cgi-bin/viewcvs/gzz/gzz/test/testutil.py.diff?tr1=1.9&tr2=1.10&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gzz/gzz/test/gzz/vob/buoy/nadir.test?rev=1.1
Patches:
Index: gzz/gfx/demo/texturelab.py
diff -c gzz/gfx/demo/texturelab.py:1.11 gzz/gfx/demo/texturelab.py:1.12
*** gzz/gfx/demo/texturelab.py:1.11 Thu Sep 5 07:54:50 2002
--- gzz/gfx/demo/texturelab.py Fri Sep 6 07:04:58 2002
***************
*** 14,27 ****
"shadowlen", "0.9",
"lx", "-0.5",
"ly", "0.4",
! "npredger", "0.1",
"noisefreqangle", "10",
"noisefreqr", "20",
! "noisescale", ".5",
! "xnoisescale", ".7",
]
! AbstractUpdateManager.defaultAnimationTime = 10000
scal = 1024
t = {
--- 14,27 ----
"shadowlen", "0.9",
"lx", "-0.5",
"ly", "0.4",
! "npredger", "0.06",
"noisefreqangle", "10",
"noisefreqr", "20",
! "noisescale", ".4",
! "xnoisescale", ".3",
]
! AbstractUpdateManager.defaultAnimationTime = 30000
scal = 1024
t = {
***************
*** 42,64 ****
shaded = { }
def shadedquad(tex):
return getDList("""
BindTexture TEXTURE_2D %(tex)s
TexParameter TEXTURE_2D TEXTURE_MAG_FILTER LINEAR
TexParameter TEXTURE_2D TEXTURE_MIN_FILTER
LINEAR_MIPMAP_LINEAR
Enable TEXTURE_2D
Begin QUAD_STRIP
! TexCoord 1.1 1.1 0
Vertex 1 -1 1
! TexCoord 1.1 -0.1 0
Vertex 1 1 1
! TexCoord -0.1 1.1 5
Vertex -1 -1 1
! TexCoord -0.1 -0.1 5
Vertex -1 1 1
End
""" % {
"tex" : tex.getTexId(),
})
class ShaderScene:
--- 42,68 ----
shaded = { }
def shadedquad(tex):
+ t1 = "1.0"
+ t0 = "0"
return getDList("""
BindTexture TEXTURE_2D %(tex)s
TexParameter TEXTURE_2D TEXTURE_MAG_FILTER LINEAR
TexParameter TEXTURE_2D TEXTURE_MIN_FILTER
LINEAR_MIPMAP_LINEAR
Enable TEXTURE_2D
Begin QUAD_STRIP
! TexCoord %(t1)s %(t1)s 0
Vertex 1 -1 1
! TexCoord %(t1)s %(t0)s 0
Vertex 1 1 1
! TexCoord %(t0)s %(t1)s 5
Vertex -1 -1 1
! TexCoord %(t0)s %(t0)s 5
Vertex -1 1 1
End
""" % {
"tex" : tex.getTexId(),
+ "t0": t0,
+ "t1": t1
})
class ShaderScene:
***************
*** 84,90 ****
def scene(self, vs):
! putnoc(vs, background((0.5,0.5,0.5)))
putnoc(vs, getDList("""
PushAttrib POLYGON_BIT ENABLE_BIT
--- 88,94 ----
def scene(self, vs):
! putnoc(vs, background((0,0.5,0)))
putnoc(vs, getDList("""
PushAttrib POLYGON_BIT ENABLE_BIT
***************
*** 93,99 ****
Enable BLEND
BlendFunc SRC_ALPHA ONE_MINUS_SRC_ALPHA
Disable TEXTURE_3D
! Color 0 1 0 1
"""))
s0 = self.s0[0]
s1 = 1100 - s0
--- 97,103 ----
Enable BLEND
BlendFunc SRC_ALPHA ONE_MINUS_SRC_ALPHA
Disable TEXTURE_3D
! Color 0.7 0 0.7 1
"""))
s0 = self.s0[0]
s1 = 1100 - s0
***************
*** 107,118 ****
putnoc(vs, getDList("""
! Color 0.6 0.0 0.05 1
"""))
vs.put(samb, "3", 10, s0, s0, s1, s1);
putnoc(vs, getDList("""
! Color 0.2 0.5 0.7 1
BlendFunc ONE ONE_MINUS_SRC_ALPHA
"""))
vs.put(sdiff, "4", 10, s0, s0, s1,s1);
--- 111,122 ----
putnoc(vs, getDList("""
! Color 0.3 0.2 0.05 1
"""))
vs.put(samb, "3", 10, s0, s0, s1, s1);
putnoc(vs, getDList("""
! Color 0.1 0.8 0.1 1
BlendFunc ONE ONE_MINUS_SRC_ALPHA
"""))
vs.put(sdiff, "4", 10, s0, s0, s1,s1);
Index: gzz/test/testutil.py
diff -c gzz/test/testutil.py:1.9 gzz/test/testutil.py:1.10
*** gzz/test/testutil.py:1.9 Fri Aug 30 12:48:38 2002
--- gzz/test/testutil.py Fri Sep 6 07:04:58 2002
***************
*** 51,56 ****
--- 51,62 ----
faildefs = compile("""
def failUnlessEqual(first, second, msg = None):
unittestObject.failUnlessEqual(first, second, msg)
+ def failIf(expr, msg = None):
+ unittestObject.failIf(expr, msg)
+ def failUnless(expr, msg = None):
+ unittestObject.failUnless(expr, msg)
+ def fail(msg = None):
+ unittestObject.fail(msg)
""", "testutil", 'exec')
def load(file):
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Gzz-commits] gzz gfx/demo/texturelab.py test/testutil.py gzz...,
Tuomas J. Lukka <=