[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gzz-commits] gzz/gfx demo/texlab.py libpaper/texcomb_NV1X.py...
From: |
Janne V. Kujala |
Subject: |
[Gzz-commits] gzz/gfx demo/texlab.py libpaper/texcomb_NV1X.py... |
Date: |
Mon, 14 Oct 2002 06:22:28 -0400 |
CVSROOT: /cvsroot/gzz
Module name: gzz
Changes by: Janne V. Kujala <address@hidden> 02/10/14 06:22:28
Modified files:
gfx/demo : texlab.py
gfx/libpaper : texcomb_NV1X.py
gfx/libutil : Debug.cxx
Log message:
Increase some combiner scales; cleanups
CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/gzz/gzz/gfx/demo/texlab.py.diff?tr1=1.10&tr2=1.11&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gzz/gzz/gfx/libpaper/texcomb_NV1X.py.diff?tr1=1.22&tr2=1.23&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gzz/gzz/gfx/libutil/Debug.cxx.diff?tr1=1.3&tr2=1.4&r1=text&r2=text
Patches:
Index: gzz/gfx/demo/texlab.py
diff -c gzz/gfx/demo/texlab.py:1.10 gzz/gfx/demo/texlab.py:1.11
*** gzz/gfx/demo/texlab.py:1.10 Fri Oct 11 06:37:58 2002
--- gzz/gfx/demo/texlab.py Mon Oct 14 06:22:27 2002
***************
*** 39,44 ****
--- 39,45 ----
if not globals().has_key("ind"): ind = 0
+ if not globals().has_key("filter"): filter = 0
class TexLabScene:
def __init__(self):
***************
*** 50,59 ****
def key(self, k):
reinit = 0
! global ind
if k == "+": ind = (ind+1) % len(args); reinit=1
if k == "-": ind = (ind+len(args)-1) % len(args); reinit=1
if k == "0": reinit=1
if reinit:
self.inittex()
--- 51,61 ----
def key(self, k):
reinit = 0
! global ind, filter
if k == "+": ind = (ind+1) % len(args); reinit=1
if k == "-": ind = (ind+len(args)-1) % len(args); reinit=1
if k == "0": reinit=1
+ if k == "f": filter = not filter
if reinit:
self.inittex()
***************
*** 69,78 ****
cs = vs.coords.affineCoordsys(0, 1, 100, 100, 256, 0, 0, 256)
vs.matcher.add(cs, "foo")
vs.map.put(getDList("""
BindTexture TEXTURE_2D %s
! TexParameter TEXTURE_2D TEXTURE_MAG_FILTER NEAREST
! TexParameter TEXTURE_2D TEXTURE_MIN_FILTER NEAREST
Enable TEXTURE_2D
Disable ALPHA_TEST
Color 1 1 1
--- 71,87 ----
cs = vs.coords.affineCoordsys(0, 1, 100, 100, 256, 0, 0, 256)
vs.matcher.add(cs, "foo")
+ if filter:
+ magfilt = "LINEAR"
+ minfilt = "LINEAR_MIPMAP_LINEAR"
+ else:
+ magfilt = "NEAREST"
+ minfilt = "NEAREST"
+
vs.map.put(getDList("""
BindTexture TEXTURE_2D %s
! TexParameter TEXTURE_2D TEXTURE_MAG_FILTER %s
! TexParameter TEXTURE_2D TEXTURE_MIN_FILTER %s
Enable TEXTURE_2D
Disable ALPHA_TEST
Color 1 1 1
***************
*** 137,143 ****
Vertex 1 1
End
Disable BLEND
! """ % tex.getTexId()),
cs)
--- 146,154 ----
Vertex 1 1
End
Disable BLEND
! """ % (tex.getTexId(),
! magfilt,
! minfilt)),
cs)
Index: gzz/gfx/libpaper/texcomb_NV1X.py
diff -c gzz/gfx/libpaper/texcomb_NV1X.py:1.22
gzz/gfx/libpaper/texcomb_NV1X.py:1.23
*** gzz/gfx/libpaper/texcomb_NV1X.py:1.22 Thu Oct 10 12:43:38 2002
--- gzz/gfx/libpaper/texcomb_NV1X.py Mon Oct 14 06:22:27 2002
***************
*** 32,38 ****
texinputs = texinputs + texinputs
t0, t1, t2, t3 = texinputs[0:4]
! #c0, c1, c2 = [ "1 1 1", "1 0 0", "0 0 0"]
constantcode = """
Enable BLEND
--- 32,38 ----
texinputs = texinputs + texinputs
t0, t1, t2, t3 = texinputs[0:4]
! #c0, c1, c2 = [ "1 1 1", "1 0 1", "0 1 0"]
constantcode = """
Enable BLEND
***************
*** 68,74 ****
# Then, select the combiner path type.
if type == 0:
scale = nvcode.combinerscale(avg(*texscales) * 8.0 * rndscale)
! bandscale = nvcode.combinerscale(2.0 * exp(.5 *
rnd.nextGaussian()))
# Band-like texture.
#
--- 68,74 ----
# Then, select the combiner path type.
if type == 0:
scale = nvcode.combinerscale(avg(*texscales) * 8.0 * rndscale)
! bandscale = nvcode.combinerscale(3.0 * exp(.5 *
rnd.nextGaussian()))
# Band-like texture.
#
***************
*** 159,165 ****
FCI G %(finalG)s ALPHA
""")
else:
! scale = nvcode.combinerscale(avg(*texscales) * 4.0 * rndscale)
alphascale = nvcode.combinerscale(avg(*texscales) * 8.0 *
rndscale)
# Interpolate on the fraction line c0,c1,c2:
--- 159,165 ----
FCI G %(finalG)s ALPHA
""")
else:
! scale = nvcode.combinerscale(avg(*texscales) * 8.0 * rndscale)
alphascale = nvcode.combinerscale(avg(*texscales) * 8.0 *
rndscale)
# Interpolate on the fraction line c0,c1,c2:
Index: gzz/gfx/libutil/Debug.cxx
diff -c gzz/gfx/libutil/Debug.cxx:1.3 gzz/gfx/libutil/Debug.cxx:1.4
*** gzz/gfx/libutil/Debug.cxx:1.3 Thu Aug 22 07:57:30 2002
--- gzz/gfx/libutil/Debug.cxx Mon Oct 14 06:22:28 2002
***************
*** 4,14 ****
#include "Debug.hxx"
namespace Debug {
- struct ltstr {
- bool operator()(const char* s1, const char* s2) const {
- return strcmp(s1, s2) < 0;
- }
- };
struct IntPtr {
int *ptr;
--- 4,9 ----
***************
*** 41,47 ****
std::vector<const char *> getVarNames() {
std::vector<const char *> v(vars.size());
int i = 0;
! for (std::map<std::string, IntPtr, ltstr>::iterator p = vars.begin();
p != vars.end(); ++p) {
v[i++] = p->first.c_str();
}
--- 36,42 ----
std::vector<const char *> getVarNames() {
std::vector<const char *> v(vars.size());
int i = 0;
! for (std::map<std::string, IntPtr>::iterator p = vars.begin();
p != vars.end(); ++p) {
v[i++] = p->first.c_str();
}