[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gzz-commits] gzz gfx/demo/buoydev.py gfx/demo/fillets.py gfx...
From: |
Tuomas J. Lukka |
Subject: |
[Gzz-commits] gzz gfx/demo/buoydev.py gfx/demo/fillets.py gfx... |
Date: |
Mon, 23 Sep 2002 04:37:05 -0400 |
CVSROOT: /cvsroot/gzz
Module name: gzz
Changes by: Tuomas J. Lukka <address@hidden> 02/09/23 04:37:04
Modified files:
gfx/demo : buoydev.py fillets.py fisheye.py gldemo.py
irregular2.py irregularframe.py pagespan.py
paperbasis.py papertest.py psyko.py psyko2.py
texturelab.py xupdf.py
gfx/libpaper : papermill.py textures.py
gfx/librenderables: renderables.py
gfx/libutil : effects.py
gzz/util : dbg.py
Log message:
Fixes: GZZGL split
CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/gzz/gzz/gfx/demo/buoydev.py.diff?tr1=1.3&tr2=1.4&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gzz/gzz/gfx/demo/fillets.py.diff?tr1=1.3&tr2=1.4&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gzz/gzz/gfx/demo/fisheye.py.diff?tr1=1.20&tr2=1.21&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gzz/gzz/gfx/demo/gldemo.py.diff?tr1=1.20&tr2=1.21&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gzz/gzz/gfx/demo/irregular2.py.diff?tr1=1.14&tr2=1.15&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gzz/gzz/gfx/demo/irregularframe.py.diff?tr1=1.4&tr2=1.5&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gzz/gzz/gfx/demo/pagespan.py.diff?tr1=1.4&tr2=1.5&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gzz/gzz/gfx/demo/paperbasis.py.diff?tr1=1.9&tr2=1.10&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gzz/gzz/gfx/demo/papertest.py.diff?tr1=1.26&tr2=1.27&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gzz/gzz/gfx/demo/psyko.py.diff?tr1=1.7&tr2=1.8&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gzz/gzz/gfx/demo/psyko2.py.diff?tr1=1.5&tr2=1.6&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gzz/gzz/gfx/demo/texturelab.py.diff?tr1=1.13&tr2=1.14&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gzz/gzz/gfx/demo/xupdf.py.diff?tr1=1.19&tr2=1.20&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gzz/gzz/gfx/libpaper/papermill.py.diff?tr1=1.27&tr2=1.28&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gzz/gzz/gfx/libpaper/textures.py.diff?tr1=1.7&tr2=1.8&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gzz/gzz/gfx/librenderables/renderables.py.diff?tr1=1.59&tr2=1.60&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gzz/gzz/gfx/libutil/effects.py.diff?tr1=1.3&tr2=1.4&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gzz/gzz/gzz/util/dbg.py.diff?tr1=1.3&tr2=1.4&r1=text&r2=text
Patches:
Index: gzz/gfx/demo/buoydev.py
diff -c gzz/gfx/demo/buoydev.py:1.3 gzz/gfx/demo/buoydev.py:1.4
*** gzz/gfx/demo/buoydev.py:1.3 Wed Sep 18 06:01:26 2002
--- gzz/gfx/demo/buoydev.py Mon Sep 23 04:37:04 2002
***************
*** 49,59 ****
poptrans(vs, key+"_1")
def scene(self, vs):
- # GZZGL.reallyClearStencilBuffer(1024, 768);
putnoc(vs, background((0.1,0.4,0.5)))
self.nadir = NadirAngler(800, self.nadiry[0])
! self.text = GZZGL.createHorizText(getFont(),
"TEXT!!", -1, -1, -0.1, 0.05, 0.05)
ctrx = 800
--- 49,58 ----
poptrans(vs, key+"_1")
def scene(self, vs):
putnoc(vs, background((0.1,0.4,0.5)))
self.nadir = NadirAngler(800, self.nadiry[0])
! self.text = GLRen.createHorizText(getFont(),
"TEXT!!", -1, -1, -0.1, 0.05, 0.05)
ctrx = 800
Index: gzz/gfx/demo/fillets.py
diff -c gzz/gfx/demo/fillets.py:1.3 gzz/gfx/demo/fillets.py:1.4
*** gzz/gfx/demo/fillets.py:1.3 Wed Sep 4 18:06:00 2002
--- gzz/gfx/demo/fillets.py Mon Sep 23 04:37:04 2002
***************
*** 86,92 ****
h = 0.21
tc = 0.29
! connSmooths, connSmoothMasks = [ [GZZGL.createSmoothConnector(
tex, tc, tex, tc,
-1+w, -1, 1-w, -1,
-1+w, -1+h, 1-w, -1+h,
--- 86,92 ----
h = 0.21
tc = 0.29
! connSmooths, connSmoothMasks = [ [GLRen.createSmoothConnector(
tex, tc, tex, tc,
-1+w, -1, 1-w, -1,
-1+w, -1+h, 1-w, -1+h,
***************
*** 97,103 ****
for texs in (connTexs, connTexMasks)]
connSmoothHorizs, connSmoothHorizMasks = [
! [GZZGL.createSmoothConnector(
tex, tc, tex, tc,
1, 1-w, 1, -1+w,
1-h, 1-w, 1-h, -1+w,
--- 97,103 ----
for texs in (connTexs, connTexMasks)]
connSmoothHorizs, connSmoothHorizMasks = [
! [GLRen.createSmoothConnector(
tex, tc, tex, tc,
1, 1-w, 1, -1+w,
1-h, 1-w, 1-h, -1+w,
Index: gzz/gfx/demo/fisheye.py
diff -c gzz/gfx/demo/fisheye.py:1.20 gzz/gfx/demo/fisheye.py:1.21
*** gzz/gfx/demo/fisheye.py:1.20 Fri Sep 20 09:04:36 2002
--- gzz/gfx/demo/fisheye.py Mon Sep 23 04:37:04 2002
***************
*** 77,83 ****
if showpdf:
addpdftex(pap)
! pfq = GZZGL.createFisheyePaperQuad(pap, -1, -1, 1, 1, gridsize, gridsize,
btype)
return pfq
--- 77,83 ----
if showpdf:
addpdftex(pap)
! pfq = GLRen.createFisheyePaperQuad(pap, -1, -1, 1, 1, gridsize, gridsize,
btype)
return pfq
Index: gzz/gfx/demo/gldemo.py
diff -c gzz/gfx/demo/gldemo.py:1.20 gzz/gfx/demo/gldemo.py:1.21
*** gzz/gfx/demo/gldemo.py:1.20 Mon Sep 23 03:43:42 2002
--- gzz/gfx/demo/gldemo.py Mon Sep 23 04:37:04 2002
***************
*** 9,15 ****
from java.lang import System,Runnable
import java
from gzz.client import *
! from gzz.gfx.gl import GZZGL
import math
import getopt
import gzz.util
--- 9,15 ----
from java.lang import System,Runnable
import java
from gzz.client import *
! from gzz.gfx.gl import GL, GLRen
import math
import getopt
import gzz.util
***************
*** 95,101 ****
try:
a=font
except:
! font = GZZGL.createFont("gfx/fonts/a010013l.pfb", 32);
return font
--- 95,101 ----
try:
a=font
except:
! font = GL.createFont("gfx/fonts/a010013l.pfb", 32);
return font
***************
*** 109,121 ****
clists2 = { }
def getDList(s):
if not clists.has_key(s):
! clists[s] = GZZGL.createCallListCoorded(s)
return clists[s]
def getDListNocoords(s):
global w
if not clists2.has_key(s):
! clists2[s] = GZZGL.createCallList(s)
return clists2[s]
imgs = { }
--- 109,121 ----
clists2 = { }
def getDList(s):
if not clists.has_key(s):
! clists[s] = GLRen.createCallListCoorded(s)
return clists[s]
def getDListNocoords(s):
global w
if not clists2.has_key(s):
! clists2[s] = GLRen.createCallList(s)
return clists2[s]
imgs = { }
***************
*** 124,131 ****
global w
if not imgs.has_key(s):
print "Load image ",s
! imgs[s] = GZZGL.createImage(s)
! texs[s] = GZZGL.createTexRect(imgs[s])
return texs[s]
if not locals().has_key("textures"):
--- 124,131 ----
global w
if not imgs.has_key(s):
print "Load image ",s
! imgs[s] = GL.createImage(s)
! texs[s] = GL.createTexRect(imgs[s])
return texs[s]
if not locals().has_key("textures"):
***************
*** 139,145 ****
def getTexture(*args):
key = str(args)
if not textures.has_key(key):
! textures[key] = GZZGL.createTexture()
print "Generating texture: ", args
res = textures[key].shade(*args)
print "SHADER: ", res
--- 139,145 ----
def getTexture(*args):
key = str(args)
if not textures.has_key(key):
! textures[key] = GL.createTexture()
print "Generating texture: ", args
res = textures[key].shade(*args)
print "SHADER: ", res
***************
*** 164,170 ****
0, x, y, xx, xy, yx, yy)
global transpush
if transpush == None:
! transpush = GZZGL.createGLTransformPush1()
vs.map.put(transpush, cs)
transmap[key] = cs
--- 164,170 ----
0, x, y, xx, xy, yx, yy)
global transpush
if transpush == None:
! transpush = GLRen.createGLTransformPush1()
vs.map.put(transpush, cs)
transmap[key] = cs
***************
*** 175,181 ****
0, angle, x, y, 0, 0, z)
global rotatepush
if rotatepush == None:
! rotatepush = GZZGL.createGLTransformRotatePush()
vs.map.put(rotatepush, cs)
transmap[key] = cs
--- 175,181 ----
0, angle, x, y, 0, 0, z)
global rotatepush
if rotatepush == None:
! rotatepush = GLRen.createGLTransformRotatePush()
vs.map.put(rotatepush, cs)
transmap[key] = cs
***************
*** 185,191 ****
scale, 0, 0, 0, 0, 0, 0)
global expscalepush
if expscalepush == None:
! expscalepush = GZZGL.createGLExpScalePush()
vs.map.put(expscalepush, cs)
transmap[key] = cs
--- 185,191 ----
scale, 0, 0, 0, 0, 0, 0)
global expscalepush
if expscalepush == None:
! expscalepush = GLRen.createGLExpScalePush()
vs.map.put(expscalepush, cs)
transmap[key] = cs
Index: gzz/gfx/demo/irregular2.py
diff -c gzz/gfx/demo/irregular2.py:1.14 gzz/gfx/demo/irregular2.py:1.15
*** gzz/gfx/demo/irregular2.py:1.14 Wed Sep 18 06:01:26 2002
--- gzz/gfx/demo/irregular2.py Mon Sep 23 04:37:04 2002
***************
*** 1,5 ****
from __future__ import nested_scopes
! from gzz.gfx.gl import GZZGL
execfile("gfx/libutil/effects.py")
--- 1,5 ----
from __future__ import nested_scopes
! from gzz.gfx.gl import GL, GLRen
execfile("gfx/libutil/effects.py")
Index: gzz/gfx/demo/irregularframe.py
diff -c gzz/gfx/demo/irregularframe.py:1.4 gzz/gfx/demo/irregularframe.py:1.5
*** gzz/gfx/demo/irregularframe.py:1.4 Sat Sep 21 03:35:17 2002
--- gzz/gfx/demo/irregularframe.py Mon Sep 23 04:37:04 2002
***************
*** 10,16 ****
AbstractUpdateManager.defaultAnimationTime = 5000
AbstractUpdateManager.fractCalc = AbstractUpdateManager.LinearCalculator()
! stb = GZZGL.getGLFloat("STENCIL_BITS")[0]
print "Stencil: ",stb
if stb < 3:
print "No stencil bits available"
--- 10,16 ----
AbstractUpdateManager.defaultAnimationTime = 5000
AbstractUpdateManager.fractCalc = AbstractUpdateManager.LinearCalculator()
! stb = GL.getGLFloat("STENCIL_BITS")[0]
print "Stencil: ",stb
if stb < 3:
print "No stencil bits available"
***************
*** 22,28 ****
def du():
return rng.nextDouble()
! t = GZZGL.createTexture()
t.shade(128, 128, 0, 4, "RGBA", "RGBA",
"fnoise", ["scale", "0.05", "freq", "4", "df", "4", "bias", "0.5"])
--- 22,28 ----
def du():
return rng.nextDouble()
! t = GL.createTexture()
t.shade(128, 128, 0, 4, "RGBA", "RGBA",
"fnoise", ["scale", "0.05", "freq", "4", "df", "4", "bias", "0.5"])
***************
*** 33,39 ****
def __init__(self):
self.range = range(0,5)
self.pq = [
! GZZGL.createPaperQuad(papermill.getPaper(seed), -1, -1.3, 1, 1.3)
for seed in self.range
]
self.depthtest = 1
--- 33,39 ----
def __init__(self):
self.range = range(0,5)
self.pq = [
! GLRen.createPaperQuad(papermill.getPaper(seed), -1, -1.3, 1, 1.3)
for seed in self.range
]
self.depthtest = 1
***************
*** 60,70 ****
"""))
# vs.put(coloredQuad((1,0,0)), "FOO", 500, -2, -2, vs.size.width+5,
vs.size.height+5)
if 0:
- # w.window.setCurrent()
- # GZZGL.reallyClearStencilBuffer(1200,900)
- # w.window.release()
n = vs.size.width * vs.size.height
! buf = GZZGL.createByteVector(n)
buf.readFromBuffer_ubytes(w.window, "FRONT", 0, 0, vs.size.width,
vs.size.height,
"STENCIL_INDEX")
print "NZ:"
--- 60,67 ----
"""))
# vs.put(coloredQuad((1,0,0)), "FOO", 500, -2, -2, vs.size.width+5,
vs.size.height+5)
if 0:
n = vs.size.width * vs.size.height
! buf = GL.createByteVector(n)
buf.readFromBuffer_ubytes(w.window, "FRONT", 0, 0, vs.size.width,
vs.size.height,
"STENCIL_INDEX")
print "NZ:"
Index: gzz/gfx/demo/pagespan.py
diff -c gzz/gfx/demo/pagespan.py:1.4 gzz/gfx/demo/pagespan.py:1.5
*** gzz/gfx/demo/pagespan.py:1.4 Tue Sep 17 11:37:44 2002
--- gzz/gfx/demo/pagespan.py Mon Sep 23 04:37:04 2002
***************
*** 1,5 ****
from __future__ import nested_scopes
! from gzz.gfx.gl import GZZGL,GLSpans
import gzz
# Assumes you have mstmpimg/ generated.
--- 1,5 ----
from __future__ import nested_scopes
! from gzz.gfx.gl import GL,GLRen,GLSpans
import gzz
# Assumes you have mstmpimg/ generated.
Index: gzz/gfx/demo/paperbasis.py
diff -c gzz/gfx/demo/paperbasis.py:1.9 gzz/gfx/demo/paperbasis.py:1.10
*** gzz/gfx/demo/paperbasis.py:1.9 Mon Sep 16 06:18:48 2002
--- gzz/gfx/demo/paperbasis.py Mon Sep 23 04:37:04 2002
***************
*** 2,8 ****
from gfx.libutil import nvcode
! from gzz.gfx.gl import GZZGL,Paper,PaperMill
import java
from java.lang import Math
--- 2,8 ----
from gfx.libutil import nvcode
! from gzz.gfx.gl import GL,GLRen,Paper,PaperMill
import java
from java.lang import Math
***************
*** 211,217 ****
CombinerParameterNV CONSTANT_COLOR1_NV %(r1)s
""" % locals()
! return GZZGL.createBasisPaperQuad(pap, -1, -1, 1, 1,
constcode + tex0codes[tex0comb],
constcode + tex1codes[tex1comb],
constcode + isectcodes[isectcomb])
--- 211,217 ----
CombinerParameterNV CONSTANT_COLOR1_NV %(r1)s
""" % locals()
! return GLRen.createBasisPaperQuad(pap, -1, -1, 1, 1,
constcode + tex0codes[tex0comb],
constcode + tex1codes[tex1comb],
constcode + isectcodes[isectcomb])
Index: gzz/gfx/demo/papertest.py
diff -c gzz/gfx/demo/papertest.py:1.26 gzz/gfx/demo/papertest.py:1.27
*** gzz/gfx/demo/papertest.py:1.26 Sat Sep 21 07:13:54 2002
--- gzz/gfx/demo/papertest.py Mon Sep 23 04:37:04 2002
***************
*** 61,71 ****
global cmap
x,y = 0,0
xs,ys = 200,200
! pixels = GZZGL.createByteVector(xs*ys*3)
pixels.readFromBuffer_ubytes(w.window, "FRONT", x, y, xs, ys, "RGB");
print "Read pixels"
! cmap = GZZGL.createLABColorMap(pixels, xs * ys);
currentScene = ColorMapScene()
AbstractUpdateManager.setNoAnimation()
if k == "C":
--- 61,71 ----
global cmap
x,y = 0,0
xs,ys = 200,200
! pixels = GL.createByteVector(xs*ys*3)
pixels.readFromBuffer_ubytes(w.window, "FRONT", x, y, xs, ys, "RGB");
print "Read pixels"
! cmap = GLRen.createLABColorMap(pixels, xs * ys);
currentScene = ColorMapScene()
AbstractUpdateManager.setNoAnimation()
if k == "C":
***************
*** 90,96 ****
pap = ThePaperMill().getPaper(seed,
passmask=passmask)
#print "Pq: ",seed
! return GZZGL.createPaperQuad(pap, -1, -1, 1, 1)
class PaperScene:
def __init__(self):
--- 90,96 ----
pap = ThePaperMill().getPaper(seed,
passmask=passmask)
#print "Pq: ",seed
! return GLRen.createPaperQuad(pap, -1, -1, 1, 1)
class PaperScene:
def __init__(self):
***************
*** 104,112 ****
self.vec = (1,0,0)
- # self.qua = GZZGL.createTexturedQuad(getTex(
- #
"mstmpimg/0000000008000000E9377484930004EE0856BC11F38551006325788A14C474081350DF47A8280C-144-1"
- # ), -0.8, -1, 0.8, 1, 0.01)
self.renderPaper = 0
--- 104,109 ----
***************
*** 241,247 ****
def getText(text, x = 0, y = 0, z = 2, w = 1, h = 1):
! return GZZGL.createHorizText(getFont(), text, x, y, z, w,h)
def putText(vs, cs1, text, color = None, x = 0, y = 0, z = 2, w = 1, h = 1):
if color != None:
--- 238,244 ----
def getText(text, x = 0, y = 0, z = 2, w = 1, h = 1):
! return GLRen.createHorizText(getFont(), text, x, y, z, w,h)
def putText(vs, cs1, text, color = None, x = 0, y = 0, z = 2, w = 1, h = 1):
if color != None:
Index: gzz/gfx/demo/psyko.py
diff -c gzz/gfx/demo/psyko.py:1.7 gzz/gfx/demo/psyko.py:1.8
*** gzz/gfx/demo/psyko.py:1.7 Mon Sep 2 02:18:19 2002
--- gzz/gfx/demo/psyko.py Mon Sep 23 04:37:04 2002
***************
*** 94,100 ****
def getpaper(seed):
pap = Paper()
! GZZGL.startContext()
pap.setNPasses(4)
setSolidPass(pap.getPass(0), (0.1,0.1,0.2))
--- 94,100 ----
def getpaper(seed):
pap = Paper()
! GL.startContext()
pap.setNPasses(4)
setSolidPass(pap.getPass(0), (0.1,0.1,0.2))
***************
*** 103,112 ****
PaperMill().makePaperPass(seed+57, pap.getPass(2), .5)
PaperMill().makePaperPass(seed+61, pap.getPass(3), .9375)
! GZZGL.endContext()
print "Pq: ",seed
! return GZZGL.createPaperQuad(pap, -1, -1, 1, 1)
def ignore(s):
--- 103,112 ----
PaperMill().makePaperPass(seed+57, pap.getPass(2), .5)
PaperMill().makePaperPass(seed+61, pap.getPass(3), .9375)
! GL.endContext()
print "Pq: ",seed
! return GLRen.createPaperQuad(pap, -1, -1, 1, 1)
def ignore(s):
***************
*** 451,463 ****
font = None
def getText(text, x = 0, y = 0, z = 20, w = 1, h = 1):
- # GZZGL.startContext()
global font
if font == None:
! font = GZZGL.createFont("gfx/fonts/a010013l.pfb", 40)
! return GZZGL.createHorizText(font, text, x, y, z, w,h)
! # GZZGL.endContext()
def putText(vs, cs1, text, color = None, x = 0, y = 0, z = 20, w = 1, h = 1):
if color != None:
--- 451,461 ----
font = None
def getText(text, x = 0, y = 0, z = 20, w = 1, h = 1):
global font
if font == None:
! font = GL.createFont("gfx/fonts/a010013l.pfb", 40)
! return GLRen.createHorizText(font, text, x, y, z, w,h)
def putText(vs, cs1, text, color = None, x = 0, y = 0, z = 20, w = 1, h = 1):
if color != None:
Index: gzz/gfx/demo/psyko2.py
diff -c gzz/gfx/demo/psyko2.py:1.5 gzz/gfx/demo/psyko2.py:1.6
*** gzz/gfx/demo/psyko2.py:1.5 Tue Sep 3 09:06:32 2002
--- gzz/gfx/demo/psyko2.py Mon Sep 23 04:37:04 2002
***************
*** 110,116 ****
def getpaper(seed):
pap = Paper()
! GZZGL.startContext()
passes = [ { "trans" : 0, "emboss" : 0 },
{ "trans" : .5, "emboss" : 0 },
--- 110,116 ----
def getpaper(seed):
pap = Paper()
! GL.startContext()
passes = [ { "trans" : 0, "emboss" : 0 },
{ "trans" : .5, "emboss" : 0 },
***************
*** 129,138 ****
PaperMill().makePaperPass(seeds[i], pap.getPass(i),
passes[i]["trans"],
emboss = passes[i]["emboss"])
! GZZGL.endContext()
#print "Pq: ",seed
! return GZZGL.createPaperQuad(pap, -1, -1, 1, 1)
execfile("gfx/libpaper/papermill.py")
--- 129,138 ----
PaperMill().makePaperPass(seeds[i], pap.getPass(i),
passes[i]["trans"],
emboss = passes[i]["emboss"])
! GL.endContext()
#print "Pq: ",seed
! return GLRen.createPaperQuad(pap, -1, -1, 1, 1)
execfile("gfx/libpaper/papermill.py")
***************
*** 429,441 ****
font = None
def getText(text, x = 0, y = 0, z = 20, w = 1, h = 1):
- # GZZGL.startContext()
global font
if font == None:
! font = GZZGL.createFont("gfx/fonts/a010013l.pfb", 100)
! return GZZGL.createHorizText(font, text, x, y, z, w,h)
! # GZZGL.endContext()
def putText(vs, cs1, text, color = None, x = 0, y = 0, z = 20, w = 1, h = 1):
if color != None:
--- 429,439 ----
font = None
def getText(text, x = 0, y = 0, z = 20, w = 1, h = 1):
global font
if font == None:
! font = GL.createFont("gfx/fonts/a010013l.pfb", 100)
! return GLRen.createHorizText(font, text, x, y, z, w,h)
def putText(vs, cs1, text, color = None, x = 0, y = 0, z = 20, w = 1, h = 1):
if color != None:
Index: gzz/gfx/demo/texturelab.py
diff -c gzz/gfx/demo/texturelab.py:1.13 gzz/gfx/demo/texturelab.py:1.14
*** gzz/gfx/demo/texturelab.py:1.13 Tue Sep 10 05:53:15 2002
--- gzz/gfx/demo/texturelab.py Mon Sep 23 04:37:04 2002
***************
*** 81,87 ****
for texname in curtex:
if not shaded.has_key(texname):
print "Shade: no key ",texname
! texture = GZZGL.createTexture()
apply(texture.shade, t[texname])
shaded[texname] = texture
--- 81,87 ----
for texname in curtex:
if not shaded.has_key(texname):
print "Shade: no key ",texname
! texture = GL.createTexture()
apply(texture.shade, t[texname])
shaded[texname] = texture
Index: gzz/gfx/demo/xupdf.py
diff -c gzz/gfx/demo/xupdf.py:1.19 gzz/gfx/demo/xupdf.py:1.20
*** gzz/gfx/demo/xupdf.py:1.19 Fri Sep 20 09:04:36 2002
--- gzz/gfx/demo/xupdf.py Mon Sep 23 04:37:04 2002
***************
*** 9,15 ****
AbstractUpdateManager.defaultAnimationTime = 3000
AbstractUpdateManager.fractCalc = AbstractUpdateManager.LinearCalculator()
! from gzz.gfx.gl import GZZGL,GLSpans,Paper
import gzz
from test.tools import tools
execfile("gfx/libutil/effects.py")
--- 9,15 ----
AbstractUpdateManager.defaultAnimationTime = 3000
AbstractUpdateManager.fractCalc = AbstractUpdateManager.LinearCalculator()
! from gzz.gfx.gl import GL,GLRen,GLSpans,Paper
import gzz
from test.tools import tools
execfile("gfx/libutil/effects.py")
***************
*** 240,253 ****
curx, ycoord, scale, 0, 0, scale)
if onlypages == None or i in onlypages:
if globalusefancypaper:
! pq = GZZGL.createFisheyePaperQuad(
papers[i][0], *fishargs)
vs.map.put(pq, cs1, cs2)
! pq = GZZGL.createFisheyePaperQuad(
papers[i][1][3], *fishargs)
vs.map.put(pq, cs1, cs2)
else:
! pq = GZZGL.createFisheyePaperQuad(
papers[i][1][0], *fishargs)
vs.map.put(pq, cs1, cs2)
curx += 1.02 * papers[i][1][1] * scale
--- 240,253 ----
curx, ycoord, scale, 0, 0, scale)
if onlypages == None or i in onlypages:
if globalusefancypaper:
! pq = GLRen.createFisheyePaperQuad(
papers[i][0], *fishargs)
vs.map.put(pq, cs1, cs2)
! pq = GLRen.createFisheyePaperQuad(
papers[i][1][3], *fishargs)
vs.map.put(pq, cs1, cs2)
else:
! pq = GLRen.createFisheyePaperQuad(
papers[i][1][0], *fishargs)
vs.map.put(pq, cs1, cs2)
curx += 1.02 * papers[i][1][1] * scale
Index: gzz/gfx/libpaper/papermill.py
diff -c gzz/gfx/libpaper/papermill.py:1.27 gzz/gfx/libpaper/papermill.py:1.28
*** gzz/gfx/libpaper/papermill.py:1.27 Sat Sep 21 07:13:54 2002
--- gzz/gfx/libpaper/papermill.py Mon Sep 23 04:37:04 2002
***************
*** 3,9 ****
execfile("gfx/libcolor/spaces.py")
! from gzz.gfx.gl import GZZGL,Paper,PaperMill
import java
from java.lang import Math
def initialize():
--- 3,9 ----
execfile("gfx/libcolor/spaces.py")
! from gzz.gfx.gl import GL,GLRen,Paper,PaperMill
import java
from java.lang import Math
def initialize():
***************
*** 14,25 ****
# Discriminate between different renderers.
# These are for debug output only.
if dbg:
! vendor = GZZGL.getGLString("VENDOR")
! renderer = GZZGL.getGLString("RENDERER")
! version = GZZGL.getGLString("VERSION")
print "GL strings: '%s' '%s' '%s'"%(
vendor,renderer,version)
! extensions = GZZGL.getGLString("EXTENSIONS").split()
# The backend files to load
files = [
"textures.py",
--- 14,25 ----
# Discriminate between different renderers.
# These are for debug output only.
if dbg:
! vendor = GL.getGLString("VENDOR")
! renderer = GL.getGLString("RENDERER")
! version = GL.getGLString("VERSION")
print "GL strings: '%s' '%s' '%s'"%(
vendor,renderer,version)
! extensions = GL.getGLString("EXTENSIONS").split()
# The backend files to load
files = [
"textures.py",
***************
*** 48,54 ****
if "GL_NV_register_combiners" in extensions:
# We have at least a NV10, possibly better.
# Check the number of general combiners to be sure.
! maxcomb = GZZGL.getGLFloat("MAX_GENERAL_COMBINERS_NV")[0]
if maxcomb < 4:
# use NV10 version
if dbg: print "Using NV10 combiners ",maxcomb
--- 48,54 ----
if "GL_NV_register_combiners" in extensions:
# We have at least a NV10, possibly better.
# Check the number of general combiners to be sure.
! maxcomb = GL.getGLFloat("MAX_GENERAL_COMBINERS_NV")[0]
if maxcomb < 4:
# use NV10 version
if dbg: print "Using NV10 combiners ",maxcomb
Index: gzz/gfx/libpaper/textures.py
diff -c gzz/gfx/libpaper/textures.py:1.7 gzz/gfx/libpaper/textures.py:1.8
*** gzz/gfx/libpaper/textures.py:1.7 Thu Sep 12 11:30:04 2002
--- gzz/gfx/libpaper/textures.py Mon Sep 23 04:37:04 2002
***************
*** 16,22 ****
class NamedTexture:
def __init__(self, name, args):
print "Generating texture: ",name, args
! self.texture = GZZGL.createTexture()
res = self.texture.shade(*args)
self.name = name
print "SHADER: ", res, self.texture.getTexId()
--- 16,22 ----
class NamedTexture:
def __init__(self, name, args):
print "Generating texture: ",name, args
! self.texture = GL.createTexture()
res = self.texture.shade(*args)
self.name = name
print "SHADER: ", res, self.texture.getTexId()
Index: gzz/gfx/librenderables/renderables.py
diff -c gzz/gfx/librenderables/renderables.py:1.59
gzz/gfx/librenderables/renderables.py:1.60
*** gzz/gfx/librenderables/renderables.py:1.59 Mon Sep 23 04:24:25 2002
--- gzz/gfx/librenderables/renderables.py Mon Sep 23 04:37:04 2002
***************
*** 1071,1077 ****
cls += ("static private native int "+createImpl+"(\n"
+ string.join([ idintParam(p) for p in params ], ",")+");\n\n");
! jni += ("\n\nJNIEXPORT jint JNICALL Java_gzz_gfx_gl_GZZGL_"
+ createImpl+"(JNIEnv *env, jclass"
+ string.join([", "+jniparam(p) for p in params])
+")\n{\n")
--- 1071,1077 ----
cls += ("static private native int "+createImpl+"(\n"
+ string.join([ idintParam(p) for p in params ], ",")+");\n\n");
! jni += ("\n\nJNIEXPORT jint JNICALL Java_gzz_gfx_gl_GLRen_"
+ createImpl+"(JNIEnv *env, jclass"
+ string.join([", "+jniparam(p) for p in params])
+")\n{\n")
Index: gzz/gfx/libutil/effects.py
diff -c gzz/gfx/libutil/effects.py:1.3 gzz/gfx/libutil/effects.py:1.4
*** gzz/gfx/libutil/effects.py:1.3 Thu Sep 19 03:15:21 2002
--- gzz/gfx/libutil/effects.py Mon Sep 23 04:37:04 2002
***************
*** 7,13 ****
class NadirCircleFloater(Buoy3Floater):
def __init__(self, vs, center, radius, p, nadir):
self.vs, self.c, self.r, self.p, self.nadir = vs, center, radius, p,
nadir
! self.linecon = GZZGL.createLineConnector(0, 0)
def addBuoy(self, anchorX, anchorY, importance, key, buoy, w, h):
size = importance
--- 7,13 ----
class NadirCircleFloater(Buoy3Floater):
def __init__(self, vs, center, radius, p, nadir):
self.vs, self.c, self.r, self.p, self.nadir = vs, center, radius, p,
nadir
! self.linecon = GLRen.createLineConnector(0, 0)
def addBuoy(self, anchorX, anchorY, importance, key, buoy, w, h):
size = importance
***************
*** 105,111 ****
class IrreguFrame:
! tex = GZZGL.createTexture()
tex.shade(128, 128, 0, 4, "RGBA", "RGBA",
"sawnoise", ["bias", "0.5",
"scale", "0.15", "freq", "1", "df", "2",
--- 105,111 ----
class IrreguFrame:
! tex = GL.createTexture()
tex.shade(128, 128, 0, 4, "RGBA", "RGBA",
"sawnoise", ["bias", "0.5",
"scale", "0.15", "freq", "1", "df", "2",
***************
*** 113,119 ****
# "scale", "0.2", "freq", "1", "df", "2",
# "scale2", "0.05", "freq2", "12", "df2", "1.5"])
! boxtex = GZZGL.createTexture()
combiners = "Enable"
--- 113,119 ----
# "scale", "0.2", "freq", "1", "df", "2",
# "scale2", "0.05", "freq2", "12", "df2", "1.5"])
! boxtex = GL.createTexture()
combiners = "Enable"
***************
*** 163,168 ****
self.combiners)
! self.content = GZZGL.createIrregularQuad(border, w, h, ripple, 0, code)
! self.frame = GZZGL.createIrregularQuad(border, w, h, ripple, 1, code)
--- 163,168 ----
self.combiners)
! self.content = GLRen.createIrregularQuad(border, w, h, ripple, 0, code)
! self.frame = GLRen.createIrregularQuad(border, w, h, ripple, 1, code)
Index: gzz/gzz/util/dbg.py
diff -c gzz/gzz/util/dbg.py:1.3 gzz/gzz/util/dbg.py:1.4
*** gzz/gzz/util/dbg.py:1.3 Wed Sep 4 14:42:31 2002
--- gzz/gzz/util/dbg.py Mon Sep 23 04:37:04 2002
***************
*** 9,15 ****
# gzz imports
import gzz
! from gzz.gfx.gl import GZZGL
debugger = gzz.util.Dbg()
--- 9,15 ----
# gzz imports
import gzz
! from gzz.gfx.gl import GL, GLRen
debugger = gzz.util.Dbg()
***************
*** 23,31 ****
if o in ("-d", "--dbg"):
debugger.debugClass(a, 1)
elif o in ("-G", "--gldbg"):
! GZZGL.loadLib()
print "Setting GL debug ",a
! GZZGL.setDebugVar(a, 1)
elif o in ("-D",):
m = re.match('^(.*)=(.*)$', a)
assert m
--- 23,31 ----
if o in ("-d", "--dbg"):
debugger.debugClass(a, 1)
elif o in ("-G", "--gldbg"):
! GL.loadLib()
print "Setting GL debug ",a
! GL.setDebugVar(a, 1)
elif o in ("-D",):
m = re.match('^(.*)=(.*)$', a)
assert m
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Gzz-commits] gzz gfx/demo/buoydev.py gfx/demo/fillets.py gfx...,
Tuomas J. Lukka <=