[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gzz-commits] gzz/gfx/demo irregu3.py
From: |
Janne V. Kujala |
Subject: |
[Gzz-commits] gzz/gfx/demo irregu3.py |
Date: |
Tue, 22 Oct 2002 03:14:12 -0400 |
CVSROOT: /cvsroot/gzz
Module name: gzz
Changes by: Janne V. Kujala <address@hidden> 02/10/22 03:14:12
Modified files:
gfx/demo : irregu3.py
Log message:
Add lodbias and fix "Up"/"Down" normal direction movement
CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/gzz/gzz/gfx/demo/irregu3.py.diff?tr1=1.10&tr2=1.11&r1=text&r2=text
Patches:
Index: gzz/gfx/demo/irregu3.py
diff -u gzz/gfx/demo/irregu3.py:1.10 gzz/gfx/demo/irregu3.py:1.11
--- gzz/gfx/demo/irregu3.py:1.10 Mon Oct 21 13:37:08 2002
+++ gzz/gfx/demo/irregu3.py Tue Oct 22 03:14:12 2002
@@ -12,6 +12,8 @@
["invert", "1"])
+lodbias = 0
+
# alpha(y) = e / y * f >= e
# y <= f
@@ -25,7 +27,7 @@
cos(angle), sin(angle), 0, 0,
-sin(angle), cos(angle), 0, 0,
0, 0, 1, 0,
- sin(angle)*pos, cos(angle)*pos, 0, 1,
+ -sin(angle)*pos, cos(angle)*pos, 0, 1,
])
col0l = [ (1.0,0.5,0.5), (0.5,0.5,1.0), (0.5,1.0,0.5), (1.0,0.5,0.5) ]
@@ -42,11 +44,18 @@
#print col0, col1
e = 0.5
- return getDList("""
+ code = """
PushAttrib ENABLE_BIT
BindTexture TEXTURE_2D %(texid)s
+ """
+ if GL.hasExtension("GL_EXT_texture_lod_bias"):
+ code += """
+ TexEnv TEXTURE_FILTER_CONTROL_EXT TEXTURE_LOD_BIAS_EXT %s
+ """ % lodbias
+
+ code += """
PushMatrix
Translate -.5 -.75 0
@@ -184,7 +193,9 @@
PopMatrix
PopAttrib
-""" % vars())
+ """
+
+ return getDList(code % vars())
@@ -225,6 +236,9 @@
if k == "Down": self.pos += 1./128
if k == "Left": self.angle -= pi/180
if k == "Right": self.angle += pi/180
+ global lodbias
+ if k == "b": lodbias += .25; print "lodbias", lodbias
+ if k == "B": lodbias -= .25; print "lodbias", lodbias
print "angle",round(self.angle / pi * 180)
currentScene = IrreguScene()
- [Gzz-commits] gzz/gfx/demo irregu3.py, Janne V. Kujala, 2002/10/18
- [Gzz-commits] gzz/gfx/demo irregu3.py, Janne V. Kujala, 2002/10/19
- [Gzz-commits] gzz/gfx/demo irregu3.py, Janne V. Kujala, 2002/10/19
- [Gzz-commits] gzz/gfx/demo irregu3.py,
Janne V. Kujala <=
- [Gzz-commits] gzz/gfx/demo irregu3.py, Janne V. Kujala, 2002/10/22
- [Gzz-commits] gzz/gfx/demo irregu3.py, Janne V. Kujala, 2002/10/23
- [Gzz-commits] gzz/gfx/demo irregu3.py, Janne V. Kujala, 2002/10/24
- [Gzz-commits] gzz/gfx/demo irregu3.py, Janne V. Kujala, 2002/10/25
- [Gzz-commits] gzz/gfx/demo irregu3.py, Janne V. Kujala, 2002/10/25
- [Gzz-commits] gzz/gfx/demo irregu3.py, Janne V. Kujala, 2002/10/28
- [Gzz-commits] gzz/gfx/demo irregu3.py, Janne V. Kujala, 2002/10/29
- [Gzz-commits] gzz/gfx/demo irregu3.py, Janne V. Kujala, 2002/10/29
- [Gzz-commits] gzz/gfx/demo irregu3.py, Janne V. Kujala, 2002/10/29
- [Gzz-commits] gzz/gfx/demo irregu3.py, Janne V. Kujala, 2002/10/29