[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gzz-commits] gzz gfx/demo/gldemo.py gfx/libpaper/papermill.p...
From: |
Tuomas J. Lukka |
Subject: |
[Gzz-commits] gzz gfx/demo/gldemo.py gfx/libpaper/papermill.p... |
Date: |
Wed, 04 Sep 2002 02:31:12 -0400 |
CVSROOT: /cvsroot/gzz
Module name: gzz
Changes by: Tuomas J. Lukka <address@hidden> 02/09/04 02:31:11
Modified files:
gfx/demo : gldemo.py
gfx/libpaper : papermill.py textures.py
gzz/gfx/gl : PaperMill.java
gzz/modules/pp/vob: BgVob.java
Log message:
Start integrating libpaper
CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/gzz/gzz/gfx/demo/gldemo.py.diff?tr1=1.5&tr2=1.6&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gzz/gzz/gfx/libpaper/papermill.py.diff?tr1=1.21&tr2=1.22&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gzz/gzz/gfx/libpaper/textures.py.diff?tr1=1.4&tr2=1.5&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gzz/gzz/gzz/gfx/gl/PaperMill.java.diff?tr1=1.2&tr2=1.3&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gzz/gzz/gzz/modules/pp/vob/BgVob.java.diff?tr1=1.21&tr2=1.22&r1=text&r2=text
Patches:
Index: gzz/gfx/demo/gldemo.py
diff -c gzz/gfx/demo/gldemo.py:1.5 gzz/gfx/demo/gldemo.py:1.6
*** gzz/gfx/demo/gldemo.py:1.5 Tue Sep 3 17:11:17 2002
--- gzz/gfx/demo/gldemo.py Wed Sep 4 02:31:11 2002
***************
*** 9,15 ****
from java.lang import System,Runnable
import java
from gzz.client import *
! from gzz.gfx.gl import GZZGL, Paper
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 GZZGL
import math
import getopt
import gzz.util
Index: gzz/gfx/libpaper/papermill.py
diff -c gzz/gfx/libpaper/papermill.py:1.21 gzz/gfx/libpaper/papermill.py:1.22
*** gzz/gfx/libpaper/papermill.py:1.21 Tue Sep 3 17:15:32 2002
--- gzz/gfx/libpaper/papermill.py Wed Sep 4 02:31:11 2002
***************
*** 4,9 ****
--- 4,10 ----
execfile("gfx/libcolor/spaces.py")
from gzz.gfx.gl import GZZGL,Paper,PaperMill
+ import java
from java.lang import Math
def initialize():
global initialized
***************
*** 206,208 ****
--- 207,210 ----
if dbg: print "TexGen"+str(i), data
ppass.putNormalTexGen(i, data)
+ papermillInstance = ThePaperMill()
Index: gzz/gfx/libpaper/textures.py
diff -c gzz/gfx/libpaper/textures.py:1.4 gzz/gfx/libpaper/textures.py:1.5
*** gzz/gfx/libpaper/textures.py:1.4 Tue Sep 3 17:15:32 2002
--- gzz/gfx/libpaper/textures.py Wed Sep 4 02:31:11 2002
***************
*** 11,22 ****
isNV2X = 0
! textures = {}
class NamedTexture:
def __init__(self, name, args):
! self.texture = apply(getTexture, args)
self.name = name
def getTexId(self):
return self.texture.getTexId()
def getName(self):
--- 11,25 ----
isNV2X = 0
! ptextures = {}
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
def getTexId(self):
return self.texture.getTexId()
def getName(self):
Index: gzz/gzz/gfx/gl/PaperMill.java
diff -c gzz/gzz/gfx/gl/PaperMill.java:1.2 gzz/gzz/gfx/gl/PaperMill.java:1.3
*** gzz/gzz/gfx/gl/PaperMill.java:1.2 Tue Sep 3 17:15:33 2002
--- gzz/gzz/gfx/gl/PaperMill.java Wed Sep 4 02:31:11 2002
***************
*** 1,6 ****
--- 1,7 ----
// (c) Tuomas J. Lukka
package gzz.gfx.gl;
+ import org.python.util.PythonInterpreter;
public abstract class PaperMill {
public abstract Paper getPaper(int seed);
***************
*** 8,13 ****
static private PaperMill instance;
static public PaperMill getInstance() {
! return null;
}
}
--- 9,20 ----
static private PaperMill instance;
static public PaperMill getInstance() {
! if(instance == null) {
! PythonInterpreter jython = new PythonInterpreter();
! jython.execfile("gfx/libpaper/papermill.py");
! instance = (PaperMill)(jython.get("papermillInstance",
! PaperMill.class));
! }
! return instance;
}
}
Index: gzz/gzz/modules/pp/vob/BgVob.java
diff -c gzz/gzz/modules/pp/vob/BgVob.java:1.21
gzz/gzz/modules/pp/vob/BgVob.java:1.22
*** gzz/gzz/modules/pp/vob/BgVob.java:1.21 Mon Aug 19 08:27:11 2002
--- gzz/gzz/modules/pp/vob/BgVob.java Wed Sep 4 02:31:11 2002
***************
*** 36,42 ****
* used to pan pretty easily.
*/
public class BgVob extends gzz.vob.Vob {
! public static final String rcsid = "$Id: BgVob.java,v 1.21 2002/08/19
12:27:11 tjl Exp $";
public static boolean dbg = false;
private static void p(String s) { if(dbg) pa(s); }
private static void pa(String s) { System.err.println(s); }
--- 36,42 ----
* used to pan pretty easily.
*/
public class BgVob extends gzz.vob.Vob {
! public static final String rcsid = "$Id: BgVob.java,v 1.22 2002/09/04
06:31:11 tjl Exp $";
public static boolean dbg = false;
private static void p(String s) { if(dbg) pa(s); }
private static void pa(String s) { System.err.println(s); }
***************
*** 54,73 ****
papercode = cell;
- /*
- Cell colorCell = cell.s(Dims.d_user_3_id);
- if(colorCell != null && colorCell.t().length() > 0) {
- int i = 0xffffff;
- try {
- i = Integer.parseInt(colorCell.t(),16);
- } catch(NumberFormatException e) {
- // e.printStackTrace();
- i = 0xffffff;
- // pa("NumberFormatException:
\""+colorCell.t()+"\"");
- }
- bgcolor = new Color(i);
- }
- */
}
static Rectangle rect = new Rectangle();
static Rectangle rect2 = new Rectangle();
--- 54,59 ----
***************
*** 93,110 ****
static HashMap papers = new HashMap();
GZZGL.PaperQuad getPaperQuad(Cell c) {
- throw new UnsupportedOperationException();
- /*
GZZGL.PaperQuad ret = (GZZGL.PaperQuad)papers.get(c);
if(ret == null) {
! GZZGL.Paper pap;
GZZGL.PaperQuad pq;
! pap = GZZGL.createPaper(c.hashCode());
ret = GZZGL.createPaperQuad(pap, -1, -1, 1, 1);
papers.put(c, ret);
}
return ret;
- */
}
--- 79,93 ----
static HashMap papers = new HashMap();
GZZGL.PaperQuad getPaperQuad(Cell c) {
GZZGL.PaperQuad ret = (GZZGL.PaperQuad)papers.get(c);
if(ret == null) {
! Paper pap;
GZZGL.PaperQuad pq;
! pap = PaperMill.getInstance().getPaper(c.hashCode());
ret = GZZGL.createPaperQuad(pap, -1, -1, 1, 1);
papers.put(c, ret);
}
return ret;
}
***************
*** 112,121 ****
int[] list, int curs, int coordsys1,
int coordsys2) {
! /*
! GZZGL.PaperQuad pq = getPaperQuad(papercode);
curs = pq.addToListGL(win, list, curs, coordsys1, coordsys2);
- */
return curs;
}
--- 95,102 ----
int[] list, int curs, int coordsys1,
int coordsys2) {
! GZZGL.PaperQuad pq = getPaperQuad(papercode);
curs = pq.addToListGL(win, list, curs, coordsys1, coordsys2);
return curs;
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Gzz-commits] gzz gfx/demo/gldemo.py gfx/libpaper/papermill.p...,
Tuomas J. Lukka <=