gzz-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Gzz-commits] gzz ./TODO gfx/demo/fillet/ambiguity.py gfx/dem...


From: Tuomas J. Lukka
Subject: [Gzz-commits] gzz ./TODO gfx/demo/fillet/ambiguity.py gfx/dem...
Date: Sun, 12 Jan 2003 06:41:50 -0500

CVSROOT:        /cvsroot/gzz
Module name:    gzz
Changes by:     Tuomas J. Lukka <address@hidden>        03/01/12 06:41:48

Modified files:
        .              : TODO 
        gfx/demo/fillet: ambiguity.py zbuffer.py 
        gfx/libutil    : ObjectStorer.hxx 
        gfx/util       : misc.py 
        gzz/gfx/gl     : GL.java GLVobMap.java 
        gzz/modules/pp/vob: BgVob.java CursorVob.java TextCursorVob.java 
        gzz/vob        : Vob.java VobMap.java VobScene.java 
        gzz/vob/impl   : DefaultVobMap.java 
        gzz/vob/vobs   : CalendarVob.java ColoredSectorVob.java 
                         ContinuousLineVob.java FilledRectVob.java 
                         LineVob.java OvalBgVob.java RectBgVob.java 
                         SimpleConnection.java SolidBgVob.java 
                         TDecor.java TestSpotVob.java TextCursorVob.java 
                         TextVob.java 
        test/gzz/gfx/gl: glvobcoorder.test paper.test 
        test/gzz/mem   : partition.test 
        test/tools     : gfx.py 
Removed files:
        gzz/gfx/gl     : GLCellConnector.java GLCellVob.java 
        gzz/vob        : Vob3.java 

Log message:
        WHEW\! Bug found by mudyc should now be fixed by the API change

CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/gzz/gzz/TODO.diff?tr1=1.505&tr2=1.506&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gzz/gzz/gfx/demo/fillet/ambiguity.py.diff?tr1=1.5&tr2=1.6&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gzz/gzz/gfx/demo/fillet/zbuffer.py.diff?tr1=1.6&tr2=1.7&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gzz/gzz/gfx/libutil/ObjectStorer.hxx.diff?tr1=1.10&tr2=1.11&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gzz/gzz/gfx/util/misc.py.diff?tr1=1.5&tr2=1.6&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gzz/gzz/gzz/gfx/gl/GL.java.diff?tr1=1.34&tr2=1.35&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gzz/gzz/gzz/gfx/gl/GLVobMap.java.diff?tr1=1.15&tr2=1.16&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gzz/gzz/gzz/modules/pp/vob/BgVob.java.diff?tr1=1.32&tr2=1.33&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gzz/gzz/gzz/modules/pp/vob/CursorVob.java.diff?tr1=1.9&tr2=1.10&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gzz/gzz/gzz/modules/pp/vob/TextCursorVob.java.diff?tr1=1.8&tr2=1.9&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gzz/gzz/gzz/vob/Vob.java.diff?tr1=1.19&tr2=1.20&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gzz/gzz/gzz/vob/VobMap.java.diff?tr1=1.5&tr2=1.6&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gzz/gzz/gzz/vob/VobScene.java.diff?tr1=1.23&tr2=1.24&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gzz/gzz/gzz/vob/impl/DefaultVobMap.java.diff?tr1=1.1&tr2=1.2&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gzz/gzz/gzz/vob/vobs/CalendarVob.java.diff?tr1=1.2&tr2=1.3&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gzz/gzz/gzz/vob/vobs/ColoredSectorVob.java.diff?tr1=1.4&tr2=1.5&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gzz/gzz/gzz/vob/vobs/ContinuousLineVob.java.diff?tr1=1.3&tr2=1.4&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gzz/gzz/gzz/vob/vobs/FilledRectVob.java.diff?tr1=1.4&tr2=1.5&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gzz/gzz/gzz/vob/vobs/LineVob.java.diff?tr1=1.6&tr2=1.7&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gzz/gzz/gzz/vob/vobs/OvalBgVob.java.diff?tr1=1.7&tr2=1.8&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gzz/gzz/gzz/vob/vobs/RectBgVob.java.diff?tr1=1.6&tr2=1.7&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gzz/gzz/gzz/vob/vobs/SimpleConnection.java.diff?tr1=1.4&tr2=1.5&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gzz/gzz/gzz/vob/vobs/SolidBgVob.java.diff?tr1=1.3&tr2=1.4&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gzz/gzz/gzz/vob/vobs/TDecor.java.diff?tr1=1.4&tr2=1.5&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gzz/gzz/gzz/vob/vobs/TestSpotVob.java.diff?tr1=1.4&tr2=1.5&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gzz/gzz/gzz/vob/vobs/TextCursorVob.java.diff?tr1=1.5&tr2=1.6&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gzz/gzz/gzz/vob/vobs/TextVob.java.diff?tr1=1.10&tr2=1.11&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gzz/gzz/test/gzz/gfx/gl/glvobcoorder.test.diff?tr1=1.30&tr2=1.31&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gzz/gzz/test/gzz/gfx/gl/paper.test.diff?tr1=1.8&tr2=1.9&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gzz/gzz/test/gzz/mem/partition.test.diff?tr1=1.7&tr2=1.8&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gzz/gzz/test/tools/gfx.py.diff?tr1=1.15&tr2=1.16&r1=text&r2=text

Patches:
Index: gzz/TODO
diff -u gzz/TODO:1.505 gzz/TODO:1.506
--- gzz/TODO:1.505      Sat Jan 11 06:37:57 2003
+++ gzz/TODO    Sun Jan 12 06:41:45 2003
@@ -251,7 +251,13 @@
        + better algorithm for CullingCoordSys. Uses now parallel
           bounding boxes. Fast, but not very efficient.
        + implement Paper TexGenEmboss::setUp_explicit
+       + glvobcoorder.test : testCulling:
+         don't use Paper, use a different-colored
+         filled rectangle and test clearly for both
+         colors (not "not" tests but test that the 
+         color really is right)
     tjl:
+       - implement PEG vob_addtolistgl--tjl
        - faster (asynch) loading of (pagespan) images
            - load in separate thread
            - discard high-rez images when not in use
Index: gzz/gfx/demo/fillet/ambiguity.py
diff -u gzz/gfx/demo/fillet/ambiguity.py:1.5 
gzz/gfx/demo/fillet/ambiguity.py:1.6
--- gzz/gfx/demo/fillet/ambiguity.py:1.5        Mon Dec 30 08:49:48 2002
+++ gzz/gfx/demo/fillet/ambiguity.py    Sun Jan 12 06:41:45 2003
@@ -85,7 +85,7 @@
        linew = d.width / 130
        putnoc(vs, background(self.bgcolor))
 
-       putnoc(vs, getDList("""
+       putnoc(vs, getDListNocoords("""
            Enable ALPHA_TEST
            LineWidth %(linew)s
            AlphaFunc GEQUAL 0.2
Index: gzz/gfx/demo/fillet/zbuffer.py
diff -u gzz/gfx/demo/fillet/zbuffer.py:1.6 gzz/gfx/demo/fillet/zbuffer.py:1.7
--- gzz/gfx/demo/fillet/zbuffer.py:1.6  Mon Dec 30 08:49:48 2002
+++ gzz/gfx/demo/fillet/zbuffer.py      Sun Jan 12 06:41:45 2003
@@ -45,7 +45,7 @@
            
        putnoc(vs, background((0.3, 0.2, 0.6)))
 
-       putnoc(vs, getDList("""
+       putnoc(vs, getDListNocoords("""
            Enable ALPHA_TEST
            AlphaFunc GEQUAL 0.2
            Enable DEPTH_TEST
@@ -55,7 +55,7 @@
        """))
 
        if self.polymode:
-           putnoc(vs, getDList("""
+           putnoc(vs, getDListNocoords("""
                PolygonMode FRONT_AND_BACK LINE
                Disable TEXTURE_2D
                LineWidth 2
@@ -100,7 +100,7 @@
 
        self.putCells(vs, sca)
 
-       putnoc(vs, getDList("""
+       putnoc(vs, getDListNocoords("""
            PopAttrib
            """))
        return vs
@@ -114,12 +114,12 @@
                    vs.coords.ortho(into, d, -0.75*wid*self.movel, 2*l, wid/2, 
h/2), "bar"+str(d)))
                for d in (600, 800)]
 
-       putnoc(vs, getDList("""
+       putnoc(vs, getDListNocoords("""
            Color 1 1 1
        """))
 
        if self.color: 
-           putnoc(vs, getDList("""
+           putnoc(vs, getDListNocoords("""
                Color 1 1 1
            """))
        print "ctr ",cellTexRects,"cc",cc
@@ -128,15 +128,15 @@
 
        if self.conn:
            if self.color: 
-               putnoc(vs, getDList("""
+               putnoc(vs, getDListNocoords("""
                    Color 1 0.6 0.6
                """))
-           putnoc(vs, getDList("""
+           putnoc(vs, getDListNocoords("""
                PushAttrib DEPTH_BUFFER_BIT
                DepthFunc ALWAYS
            """))
            vs.map.put(connSmooths[self.ind], cc[0][1], cc[0][0])
-           putnoc(vs, getDList("""
+           putnoc(vs, getDListNocoords("""
                PopAttrib
            """))
 
Index: gzz/gfx/libutil/ObjectStorer.hxx
diff -u gzz/gfx/libutil/ObjectStorer.hxx:1.10 
gzz/gfx/libutil/ObjectStorer.hxx:1.11
--- gzz/gfx/libutil/ObjectStorer.hxx:1.10       Sat Jan 11 06:47:50 2003
+++ gzz/gfx/libutil/ObjectStorer.hxx    Sun Jan 12 06:41:45 2003
@@ -32,7 +32,7 @@
                return 0; // invalid value
            }
 
-           for(int i=vec.size()-1; i>= 0; i--) {
+           for(int i=vec.size()-1; i> 0; i--) {
                if(vec[i] == 0) {
                    vec[i] = p;
                    return i;
@@ -46,7 +46,10 @@
        /** Mark the object with the given id for removal.
         */
        void remove(int p) {
-           if(p == 0) return;
+           if(p == 0) {
+               cerr << name<<": Trying to delete element 0\n";
+               return;
+           }
            if((unsigned)p >= vec.size()) {
                cerr << name<<": Trying to delete element past end "<<p<<"\n";
                return;
@@ -62,8 +65,9 @@
        /** Get the pointer corresponding to the given id.
         */
        T *get(int p) {
-           if((unsigned)p >= vec.size()) {
-               cerr << name<<": Trying to get element past end\n";
+           if(p <= 0 || (unsigned)p >= vec.size()) {
+               cerr << name<<
+                   ": Trying to get element past end "<<p<<"\n";
                return 0;
            }
            if(vec[p] == NULL) {
Index: gzz/gfx/util/misc.py
diff -u gzz/gfx/util/misc.py:1.5 gzz/gfx/util/misc.py:1.6
--- gzz/gfx/util/misc.py:1.5    Mon Dec 23 05:34:51 2002
+++ gzz/gfx/util/misc.py        Sun Jan 12 06:41:46 2003
@@ -157,4 +157,5 @@
 
 
 def putnoc(vs, noc):
-    vs.put(noc, "NOCKEY", 10, 0, 0, 1, 1)
+    vs.map.put(noc)
+
Index: gzz/gzz/gfx/gl/GL.java
diff -u gzz/gzz/gfx/gl/GL.java:1.34 gzz/gzz/gfx/gl/GL.java:1.35
--- gzz/gzz/gfx/gl/GL.java:1.34 Sun Dec 29 15:33:13 2002
+++ gzz/gzz/gfx/gl/GL.java      Sun Jan 12 06:41:46 2003
@@ -29,6 +29,7 @@
 import java.util.HashSet;
 import java.util.StringTokenizer;
 import gzz.client.GraphicsAPI;
+import gzz.vob.VobScene;
 
 /** The interface to the native OpenGL library.
  * Note: here we must be VERY careful, as this is one of the places
@@ -170,33 +171,14 @@
      */
     static public abstract class NonRenderableJavaObject extends JavaObject {
        NonRenderableJavaObject(int id) { super(id); }
-       public int addToListGL(GraphicsAPI.RenderingSurface win, int[] list, 
int cur, int cs1, int cs2) {
-           throw new Error("Not right to try to add me to a display list");
-       }
     }
 
     /** The Java proxy representing a Renderable object.
      */
     static public abstract class Renderable0JavaObject extends JavaObject {
        public Renderable0JavaObject(int id) { super(id); }
-       /** Add this object to the given list with the given coordinate system.
-        * Usage:
-        * <pre>
-        *      int[] list;
-        *      int curs;
-        *      curs = obj.addToListGL(list, curs, coordsys);
-        * </pre>
-        * @param list The display list to add this to.
-        * @param cur The current index, to which the first int goes
-        * @param coordsys The number of the coordinate system.
-        * @return The new current index after adding these.
-        */
-       public int addToList(int[] list, int cur) {
-           list[cur++] = (RENDERABLE0 | getId());
-           return cur;
-       }
-       public int addToListGL(GraphicsAPI.RenderingSurface win, int[] list, 
int cur, int cs1, int cs2) {
-           return addToList(list, cur);
+       public int putGL(VobScene vs) {
+           return getId();
        }
        protected void deleteObj() {
            deleteRenderable0(getId());
@@ -209,25 +191,8 @@
      */
     static public abstract class Renderable1JavaObject extends JavaObject {
        public Renderable1JavaObject(int id) { super(id); }
-       /** Add this object to the given list with the given coordinate system.
-        * Usage:
-        * <pre>
-        *      int[] list;
-        *      int curs;
-        *      curs = obj.addToList(list, curs, coordsys);
-        * </pre>
-        * @param list The display list to add this to.
-        * @param cur The current index, to which the first int goes
-        * @param coordsys The number of the coordinate system.
-        * @return The new current index after adding these.
-        */
-       public int addToList(int[] list, int cur, int coordsys) {
-           list[cur++] = (RENDERABLE1 | getId());
-           list[cur++] = coordsys;
-           return cur;
-       }
-       public int addToListGL(GraphicsAPI.RenderingSurface win, int[] list, 
int cur, int cs1, int cs2) {
-           return addToList(list, cur, cs1);
+       public int putGL(VobScene vs, int coordsys1) {
+           return getId();
        }
        protected void deleteObj() {
            deleteRenderable1(getId());
@@ -239,26 +204,8 @@
      */
     static public abstract class Renderable2JavaObject extends JavaObject {
        public Renderable2JavaObject(int id) { super(id); }
-       /** Add this object to the given list with the given coordinate
-        * systems.
-        * Usage:
-        * <pre>
-        *      int[] list;
-        *      int curs;
-        *      curs = obj.addToList(list, curs, coordsys1, coordsys2);
-        * </pre>
-        * @param list The display list to add this to.
-        * @param cur The current index, to which the first int goes
-        * @param coordsys1 The number of the first system.
-        * @param coordsys2 The number of the second system.
-        * @return The new current index after adding these.
-        */
-       public int addToListGL(GraphicsAPI.RenderingSurface win, int[] list, 
int cur,
-                           int coordsys1, int coordsys2) {
-           list[cur++] = (RENDERABLE2 | getId());
-           list[cur++] = coordsys1;
-           list[cur++] = coordsys2;
-           return cur;
+       public int putGL(VobScene vs, int coordsys1, int coordsys2) {
+           return getId();
        }
        protected void deleteObj() {
            deleteRenderable2(getId());
@@ -268,31 +215,10 @@
 
     /** The Java proxy representing a Renderable2 object.
      */
-    static public abstract class Renderable3JavaObject extends JavaObject 
-       implements gzz.vob.Vob3 {
+    static public abstract class Renderable3JavaObject extends JavaObject {
        public Renderable3JavaObject(int id) { super(id); }
-       /** Add this object to the given list with the given coordinate
-        * systems.
-        * Usage:
-        * <pre>
-        *      int[] list;
-        *      int curs;
-        *      curs = obj.addToList(list, curs, coordsys1, coordsys2, 
coordsys3);
-        * </pre>
-        * @param list The display list to add this to.
-        * @param cur The current index, to which the first int goes
-        * @param coordsys1 The number of the first system.
-        * @param coordsys2 The number of the second system.
-        * @param coordsys3 The number of the third system.
-        * @return The new current index after adding these.
-        */
-       public int addToListGL(GraphicsAPI.RenderingSurface win, int[] list, 
int cur,
-                           int coordsys1, int coordsys2, int coordsys3) {
-           list[cur++] = (RENDERABLE3 | getId());
-           list[cur++] = coordsys1;
-           list[cur++] = coordsys2;
-           list[cur++] = coordsys3;
-           return cur;
+       public int putGL(VobScene vs, int coordsys1, int coordsys2, int 
coordsys3) {
+           return getId();
        }
        protected void deleteObj() {
            deleteRenderable3(getId());
Index: gzz/gzz/gfx/gl/GLVobMap.java
diff -u gzz/gzz/gfx/gl/GLVobMap.java:1.15 gzz/gzz/gfx/gl/GLVobMap.java:1.16
--- gzz/gzz/gfx/gl/GLVobMap.java:1.15   Thu Dec  5 05:57:34 2002
+++ gzz/gzz/gfx/gl/GLVobMap.java        Sun Jan 12 06:41:46 2003
@@ -25,11 +25,12 @@
 import java.awt.*;
 
 public class GLVobMap implements VobMap {
-public static final String rcsid = "$Id: GLVobMap.java,v 1.15 2002/12/05 
10:57:34 tjl Exp $";
+public static final String rcsid = "$Id: GLVobMap.java,v 1.16 2003/01/12 
11:41:46 tjl Exp $";
     public static boolean dbg = false;
     private static void pa(String s) { System.err.println(s); }
 
     gzz.client.gl.GLRenderingSurface screen;
+    VobScene vs;
 
     public GLVobMap(gzz.client.gl.GLRenderingSurface screen) { 
        this.screen = screen; 
@@ -37,6 +38,8 @@
        clear();
     }
 
+    public void setVS(VobScene vs) { this.vs = vs; }
+
     int[] list;
     int curs;
     int[] cs;
@@ -51,27 +54,49 @@
        nvobs = 0;
     }
 
-    public void put(Vob3 vob, int coordsys1, int coordsys2, int coordsys3) {
-       curs = vob.addToListGL(screen, list, curs, coordsys1, 
-                              coordsys2, coordsys3);
+    public void put(Vob vob, int coordsys1, int coordsys2, int coordsys3) {
        if(dbg) pa("Add to GLVobMap "+this+":  "+vob+" "+coordsys1+" "
                   +coordsys2+" "+coordsys3+" curs: "+curs);
-       // Stash it away so it won't get garbage collected too early :(
+       int ind = vob.putGL(vs, coordsys1, coordsys2, coordsys3);
+       if(ind == 0) return;
+       // Now, stash it away.
        cs[nvobs] = coordsys1;
        vobs[nvobs++] = vob;
+       list[curs++] = (GL.RENDERABLE3 | ind);
+       list[curs++] = coordsys1;
+       list[curs++] = coordsys2;
+       list[curs++] = coordsys3;
     }
     public void put(Vob vob, int coordsys1, int coordsys2) {
-       curs = vob.addToListGL(screen, list, curs, coordsys1, coordsys2);
-       if(dbg) pa("Add to GLVobMap "+this+":  "+vob+" "+coordsys1+" 
"+coordsys2+" curs: "+curs);
-       // Stash it away so it won't get garbage collected too early :(
+       if(dbg) pa("Add to GLVobMap "+this+":  "+vob+" "+coordsys1+" "
+                  +coordsys2+" curs: "+curs);
+       int ind = vob.putGL(vs, coordsys1, coordsys2);
+       if(ind == 0) return;
+       // Now, stash it away.
        cs[nvobs] = coordsys1;
        vobs[nvobs++] = vob;
+       list[curs++] = (GL.RENDERABLE2 | ind);
+       list[curs++] = coordsys1;
+       list[curs++] = coordsys2;
     }
-    public void put(Vob vob, int coordsys) {
-       put(vob, coordsys, 0);
+    public void put(Vob vob, int coordsys1) {
+       if(dbg) pa("Add to GLVobMap "+this+":  "+vob+" "+coordsys1+
+                  " curs: "+curs);
+       int ind = vob.putGL(vs, coordsys1);
+       if(ind == 0) return;
+       // Now, stash it away.
+       cs[nvobs] = coordsys1;
+       vobs[nvobs++] = vob;
+       list[curs++] = (GL.RENDERABLE1 | ind);
+       list[curs++] = coordsys1;
     }
     public void put(Vob vob) {
-       put(vob, 0, 0);
+       if(dbg) pa("Add to GLVobMap "+this+":  "+vob+ " curs: "+curs);
+       int ind = vob.putGL(vs);
+       if(ind == 0) return;
+       // Now, stash it away.
+       vobs[nvobs++] = vob;
+       list[curs++] = (GL.RENDERABLE0 | ind);
     }
     public void dump() {
        pa("GLVobMap");
Index: gzz/gzz/modules/pp/vob/BgVob.java
diff -u gzz/gzz/modules/pp/vob/BgVob.java:1.32 
gzz/gzz/modules/pp/vob/BgVob.java:1.33
--- gzz/gzz/modules/pp/vob/BgVob.java:1.32      Thu Dec  5 05:57:34 2002
+++ gzz/gzz/modules/pp/vob/BgVob.java   Sun Jan 12 06:41:46 2003
@@ -37,7 +37,7 @@
  * used to pan pretty easily.
  */
 public class BgVob extends gzz.vob.Vob {
-public static final String rcsid = "$Id: BgVob.java,v 1.32 2002/12/05 10:57:34 
tjl Exp $";
+public static final String rcsid = "$Id: BgVob.java,v 1.33 2003/01/12 11:41:46 
tjl Exp $";
     public static boolean dbg = false;
     private static void pa(String s) { System.err.println(s); }
 
@@ -109,12 +109,9 @@
        }
     }
 
-     public int addToListGL(GraphicsAPI.RenderingSurface win,
-                   int[] list, int curs, int coordsys1,
-                   int coordsys2) {
-
-       curs = pq.addToListGL(win, list, curs, coordsys1, coordsys2);
-       return curs;
+     public int putGL(VobScene vs, int coordsys1, int coordsys2) {
+       vs.map.put(pq, coordsys1, coordsys2);
+       return 0;
     }
     
 }
Index: gzz/gzz/modules/pp/vob/CursorVob.java
diff -u gzz/gzz/modules/pp/vob/CursorVob.java:1.9 
gzz/gzz/modules/pp/vob/CursorVob.java:1.10
--- gzz/gzz/modules/pp/vob/CursorVob.java:1.9   Thu Dec  5 05:57:34 2002
+++ gzz/gzz/modules/pp/vob/CursorVob.java       Sun Jan 12 06:41:46 2003
@@ -29,7 +29,7 @@
                
 
 public class CursorVob extends gzz.vob.Vob {
-public static final String rcsid = "$Id: CursorVob.java,v 1.9 2002/12/05 
10:57:34 tjl Exp $";
+public static final String rcsid = "$Id: CursorVob.java,v 1.10 2003/01/12 
11:41:46 tjl Exp $";
 
 
     static Point p1 = new Point();
@@ -61,14 +61,12 @@
 
     static Vob crosshair;
 
-    public int addToListGL(gzz.client.GraphicsAPI.RenderingSurface win,
-                       int[] list, int curs, int coordsys1,
-                               int coordsys2) { 
+    public int putGL(VobScene vs, int coordsys1) {
        if(crosshair == null)
            crosshair = GLRen.createCallListBoxCoorded(
                    "Begin LINES\nVertex -1 -1\nVertex 1 1\nVertex 1 -1\nVertex 
-1 1\nEnd"
                    );
-       curs = crosshair.addToListGL(win, list, curs, coordsys1, coordsys2);
-       return curs;
+       vs.map.put(crosshair, coordsys1);
+       return 0;
     }
 }
Index: gzz/gzz/modules/pp/vob/TextCursorVob.java
diff -u gzz/gzz/modules/pp/vob/TextCursorVob.java:1.8 
gzz/gzz/modules/pp/vob/TextCursorVob.java:1.9
--- gzz/gzz/modules/pp/vob/TextCursorVob.java:1.8       Thu Dec  5 05:57:34 2002
+++ gzz/gzz/modules/pp/vob/TextCursorVob.java   Sun Jan 12 06:41:46 2003
@@ -29,7 +29,7 @@
 
 /** A vertical line for now */
 public class TextCursorVob extends gzz.vob.Vob {
-public static final String rcsid = "$Id: TextCursorVob.java,v 1.8 2002/12/05 
10:57:34 tjl Exp $";
+public static final String rcsid = "$Id: TextCursorVob.java,v 1.9 2003/01/12 
11:41:46 tjl Exp $";
 
     static Point p1 = new Point();
     static Point p2 = new Point();
@@ -46,17 +46,15 @@
     }
 
     // Emulate... ;)
-    static Vob crosshair;
+    static Vob vertline;
 
-    public int addToListGL(gzz.client.GraphicsAPI.RenderingSurface win,
-                       int[] list, int curs, int coordsys1,
-                               int coordsys2) { 
+    public int putGL(VobScene vs, int coordsys1) {
 
-       if (crosshair == null) {
-           crosshair = GLRen.createCallListBoxCoorded(
+       if (vertline == null) {
+           vertline = GLRen.createCallListBoxCoorded(
              "Begin LINE_STRIP\nVertex 0 1\nVertex 0 -1\nEnd\n");
        }
-       curs = crosshair.addToListGL(win, list, curs, coordsys1, coordsys2);
-       return curs;
+       vs.map.put(vertline, coordsys1);
+       return 0;
     }
 }
Index: gzz/gzz/vob/Vob.java
diff -u gzz/gzz/vob/Vob.java:1.19 gzz/gzz/vob/Vob.java:1.20
--- gzz/gzz/vob/Vob.java:1.19   Thu Dec  5 05:57:34 2002
+++ gzz/gzz/vob/Vob.java        Sun Jan 12 06:41:46 2003
@@ -41,7 +41,7 @@
  */
 
 public abstract class Vob {
-public static final String rcsid = "$Id: Vob.java,v 1.19 2002/12/05 10:57:34 
tjl Exp $";
+public static final String rcsid = "$Id: Vob.java,v 1.20 2003/01/12 11:41:46 
tjl Exp $";
     public static boolean dbg = false;
     private static void pa(String s) { System.err.println(s); }
 
@@ -79,22 +79,38 @@
                                boolean foo,
                                RenderInfo info1,
                                RenderInfo info2) { }
-    private final int addToListGL(
+
+    public final int addToListGL(
                        int[] list, int curs, int coordsys1,
-                               int coordsys2) { return -42; }
+                               int coordsys2) { 
+       throw new Error();
+    }
 
     /** For OpenGL: Add the current vob to the given display list, using
      * the given coordinate systems.
-     * If only one coordinate system is needed, coordsys1 is used.
+     * There are two alternatives: for composite Vobs, this will
+     * call vs.put for the components, for "real" GL Vobs,
+     * this will return the GL index.
      */
-    public int addToListGL(gzz.client.GraphicsAPI.RenderingSurface win,
+    public int putGL(VobScene vs) {
+       throw new Error("Wrong # coordsys: 0 for " + this);
+    }
+    public int putGL(VobScene vs, int cs1) {
+       throw new Error("Wrong # coordsys: 1 for " + this);
+    }
+    public int putGL(VobScene vs, int cs1, int cs2) {
+       throw new Error("Wrong # coordsys: 2 for " + this);
+    }
+    public int putGL(VobScene vs, int cs1, int cs2, int cs3) {
+       throw new Error("Wrong # coordsys: 3 for " + this);
+    }
+
+
+
+    public final int addToListGL(gzz.client.GraphicsAPI.RenderingSurface win,
                        int[] list, int curs, int coordsys1,
                                int coordsys2) { 
-       if(dbg) {
-           System.err.println("Vob default (empty) addToListGL called; you 
probably didn't mean this..." + this);
-           new Throwable().fillInStackTrace().printStackTrace();
-       }
-       return curs; 
+       throw new Error();
     }
 
     /** An interface which provides information about the current 
Index: gzz/gzz/vob/VobMap.java
diff -u gzz/gzz/vob/VobMap.java:1.5 gzz/gzz/vob/VobMap.java:1.6
--- gzz/gzz/vob/VobMap.java:1.5 Sun May 26 09:03:25 2002
+++ gzz/gzz/vob/VobMap.java     Sun Jan 12 06:41:46 2003
@@ -34,5 +34,7 @@
      * in the given coordinate system.
      */
     public Vob getVobByCS(int i);
+
+    public void setVS(VobScene vs);
 }
 
Index: gzz/gzz/vob/VobScene.java
diff -u gzz/gzz/vob/VobScene.java:1.23 gzz/gzz/vob/VobScene.java:1.24
--- gzz/gzz/vob/VobScene.java:1.23      Fri Dec  6 07:20:16 2002
+++ gzz/gzz/vob/VobScene.java   Sun Jan 12 06:41:46 2003
@@ -132,6 +132,7 @@
                            gzz.client.GraphicsAPI.RenderingSurface window,
                                Dimension size) { 
        this.map = m; 
+       m.setVS(this);
        this.coords = c; 
        this.matcher = mat;
        this.gfxapi = gfxapi;
Index: gzz/gzz/vob/impl/DefaultVobMap.java
diff -u gzz/gzz/vob/impl/DefaultVobMap.java:1.1 
gzz/gzz/vob/impl/DefaultVobMap.java:1.2
--- gzz/gzz/vob/impl/DefaultVobMap.java:1.1     Fri Nov  1 20:23:46 2002
+++ gzz/gzz/vob/impl/DefaultVobMap.java Sun Jan 12 06:41:46 2003
@@ -27,10 +27,12 @@
 /** An implementation of VobMap.
  */
 public class DefaultVobMap implements VobMap {
-public static final String rcsid = "$Id: DefaultVobMap.java,v 1.1 2002/11/02 
01:23:46 benja Exp $";
+public static final String rcsid = "$Id: DefaultVobMap.java,v 1.2 2003/01/12 
11:41:46 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); }
+
+    public void setVS(VobScene vs) { }
 
     int[] moreInts(int[] orig, int n) {
        int[] arr = new int[n];
Index: gzz/gzz/vob/vobs/CalendarVob.java
diff -u gzz/gzz/vob/vobs/CalendarVob.java:1.2 
gzz/gzz/vob/vobs/CalendarVob.java:1.3
--- gzz/gzz/vob/vobs/CalendarVob.java:1.2       Thu Dec  5 05:57:34 2002
+++ gzz/gzz/vob/vobs/CalendarVob.java   Sun Jan 12 06:41:47 2003
@@ -13,7 +13,7 @@
 import java.util.*;
 
 public class CalendarVob extends Vob {
-public static final String rcsid = "$Id: CalendarVob.java,v 1.2 2002/12/05 
10:57:34 tjl Exp $";
+public static final String rcsid = "$Id: CalendarVob.java,v 1.3 2003/01/12 
11:41:47 tjl Exp $";
     public static boolean dbg = false;
     static final void p(String s) { if(dbg) System.out.println(s); }
     static final void pa(String s) { System.out.println(s); }
@@ -230,8 +230,7 @@
 
     static GL.DisplayList list;
 
-    public int addToListGL(GraphicsAPI.RenderingSurface win,
-                          int[] list, int curs, 
+    public int putGL(VobScene vs,
                           int coordsys1,
                           int coordsys2) 
     {
@@ -268,7 +267,9 @@
                                       weeknumber_width,
                                       weekday_height,  
                                       month_name_height);
-       return  cp.addToListGL(win, list, curs, coordsys1, coordsys2);
+
+       vs.map.put(cp, coordsys1, coordsys2);
+       return 0;
     }
 }
 
Index: gzz/gzz/vob/vobs/ColoredSectorVob.java
diff -u gzz/gzz/vob/vobs/ColoredSectorVob.java:1.4 
gzz/gzz/vob/vobs/ColoredSectorVob.java:1.5
--- gzz/gzz/vob/vobs/ColoredSectorVob.java:1.4  Thu Dec 12 14:20:57 2002
+++ gzz/gzz/vob/vobs/ColoredSectorVob.java      Sun Jan 12 06:41:47 2003
@@ -41,7 +41,7 @@
  */
 
 public class ColoredSectorVob extends Vob {
-public static final String rcsid = "$Id: ColoredSectorVob.java,v 1.4 
2002/12/12 19:20:57 humppake Exp $";
+public static final String rcsid = "$Id: ColoredSectorVob.java,v 1.5 
2003/01/12 11:41:47 tjl Exp $";
     public static boolean dbg = false;
     static final void p(String s) { if(dbg) System.out.println(s); }
     static final void pa(String s) { System.out.println(s); }
@@ -145,9 +145,7 @@
 
     Vob glList;
 
-    public int addToListGL(GraphicsAPI.RenderingSurface win,
-                   int[] list, int curs, int coordsys1,
-                               int coordsys2) {
+    public int putGL(VobScene vs, int coordsys1) {
         if(dbg) pa("Addtolistgl coloredsectorvob "+coordsys1);
        if(glList == null) {
            if (!circleGLReady) prepareCircleGL();
@@ -204,8 +202,8 @@
                "PopAttrib\n"
                );
        }
-       curs = glList.addToListGL(win, list, curs, coordsys1, coordsys2);
-       return curs;
+       vs.map.put(glList, coordsys1);
+       return 0;
     }
 
     /** Adds one more solid color to be drawn inside
Index: gzz/gzz/vob/vobs/ContinuousLineVob.java
diff -u gzz/gzz/vob/vobs/ContinuousLineVob.java:1.3 
gzz/gzz/vob/vobs/ContinuousLineVob.java:1.4
--- gzz/gzz/vob/vobs/ContinuousLineVob.java:1.3 Mon Dec 30 08:49:48 2002
+++ gzz/gzz/vob/vobs/ContinuousLineVob.java     Sun Jan 12 06:41:47 2003
@@ -32,7 +32,7 @@
 /** Continuous line needs x,y,z points in float array.
  */
 public class ContinuousLineVob extends Vob {
-public static final String rcsid = "$Id: ContinuousLineVob.java,v 1.3 
2002/12/30 13:49:48 benja Exp $";
+public static final String rcsid = "$Id: ContinuousLineVob.java,v 1.4 
2003/01/12 11:41:47 tjl Exp $";
 
     static private GL.Texture tex;
     static private boolean needInit = true;
@@ -82,9 +82,7 @@
     // GL implementation
     // =================
     static float[] tmp_floats = new float[3];
-    public int addToListGL(gzz.client.GraphicsAPI.RenderingSurface win,
-                       int[] list, int curs, int coordsys1,
-                               int coordsys2) { 
+    public int putGL(VobScene vs, int coordsys1) { 
        if (needInit) loadTex();
 
        ColorUtil.getRGBColorComponents(color, tmp_floats);
@@ -92,6 +90,7 @@
        GLRen.ContinuousLine cl = 
            GLRen.createContinuousLine(tex.getTexId(), width, points, 
                                       tmp_floats);
-       return  cl.addToListGL(win, list, curs, coordsys1, coordsys2);
+       vs.map.put(cl, coordsys1);
+       return  0;
     }
 }
Index: gzz/gzz/vob/vobs/FilledRectVob.java
diff -u gzz/gzz/vob/vobs/FilledRectVob.java:1.4 
gzz/gzz/vob/vobs/FilledRectVob.java:1.5
--- gzz/gzz/vob/vobs/FilledRectVob.java:1.4     Thu Dec  5 05:57:34 2002
+++ gzz/gzz/vob/vobs/FilledRectVob.java Sun Jan 12 06:41:47 2003
@@ -39,7 +39,7 @@
  */
 
 public class FilledRectVob extends Vob {
-public static final String rcsid = "$Id: FilledRectVob.java,v 1.4 2002/12/05 
10:57:34 tjl Exp $";
+public static final String rcsid = "$Id: FilledRectVob.java,v 1.5 2003/01/12 
11:41:47 tjl Exp $";
     public static boolean dbg = false;
     static final void pa(String s) { System.out.println(s); }
 
@@ -70,11 +70,8 @@
 
     Vob glList;
 
-    public int addToListGL(GraphicsAPI.RenderingSurface win,
-                   int[] list, int curs, int coordsys1,
-                               int coordsys2) {
+    public int putGL(VobScene vs, int coordsys1) {
        float [] boxwh = new float[2];
-       
 
         if(dbg) pa("Addtolistgl rectbg "+coordsys1);
        if(glList == null) {
@@ -90,8 +87,10 @@
                 "PopAttrib\n"
                    );
        }
-       curs = glList.addToListGL(win, list, curs, coordsys1, coordsys2);
-       return curs;
+
+       vs.map.put(glList, coordsys1);
+
+       return 0;
     }
 }
 
Index: gzz/gzz/vob/vobs/LineVob.java
diff -u gzz/gzz/vob/vobs/LineVob.java:1.6 gzz/gzz/vob/vobs/LineVob.java:1.7
--- gzz/gzz/vob/vobs/LineVob.java:1.6   Thu Dec  5 05:57:34 2002
+++ gzz/gzz/vob/vobs/LineVob.java       Sun Jan 12 06:41:47 2003
@@ -35,7 +35,7 @@
  */
 
 public class LineVob extends Vob {
-public static final String rcsid = "$Id: LineVob.java,v 1.6 2002/12/05 
10:57:34 tjl Exp $";
+public static final String rcsid = "$Id: LineVob.java,v 1.7 2003/01/12 
11:41:47 tjl Exp $";
 
     int x0, y0, x1, y1;
     Color color;
@@ -69,17 +69,15 @@
     }
 
     Vob dlist;
-    public int addToListGL(gzz.client.GraphicsAPI.RenderingSurface win,
-                       int[] list, int curs, int coordsys1,
-                               int coordsys2) { 
+    public int putGL(VobScene vs, int coordsys1) { 
        if(dlist == null)
            dlist = GLCache.getCallListBoxCoorded(
                    "PushAttrib CURRENT_BIT ENABLE_BIT\nColor 
"+ColorUtil.colorGLString(color)+"\n"+
                    "Disable TEXTURE_2D\nBegin LINE_STRIP\nVertex "+x0+" "+y0+
                    "\nVertex "+x1+" "+y1+"\nEnd\nPopAttrib\n");
        
-       curs = dlist.addToListGL(win, list, curs, coordsys1, coordsys2);
-       return curs;
+       vs.map.put(dlist, coordsys1);
+       return 0;
     }
 
 }
Index: gzz/gzz/vob/vobs/OvalBgVob.java
diff -u gzz/gzz/vob/vobs/OvalBgVob.java:1.7 gzz/gzz/vob/vobs/OvalBgVob.java:1.8
--- gzz/gzz/vob/vobs/OvalBgVob.java:1.7 Thu Dec  5 15:30:15 2002
+++ gzz/gzz/vob/vobs/OvalBgVob.java     Sun Jan 12 06:41:47 2003
@@ -41,7 +41,7 @@
  */
 
 public class OvalBgVob extends Vob {
-public static final String rcsid = "$Id: OvalBgVob.java,v 1.7 2002/12/05 
20:30:15 humppake Exp $";
+public static final String rcsid = "$Id: OvalBgVob.java,v 1.8 2003/01/12 
11:41:47 tjl Exp $";
     public static boolean dbg = false;
     static final void p(String s) { if(dbg) System.out.println(s); }
     static final void pa(String s) { System.out.println(s); }
@@ -140,9 +140,7 @@
 
     Vob glList;
 
-    public int addToListGL(GraphicsAPI.RenderingSurface win,
-                   int[] list, int curs, int coordsys1,
-                               int coordsys2) {
+    public int putGL(VobScene vs, int coordsys1) {
         if(dbg) pa("Addtolistgl rectbg "+coordsys1);
        if(glList == null) {
            /** In OpenGL the oval shape is done by drawing
@@ -193,8 +191,8 @@
                "PopAttrib\n"
                );
        }
-       curs = glList.addToListGL(win, list, curs, coordsys1, coordsys2);
-       return curs;
+       vs.map.put(glList, coordsys1);
+       return 0;
     }
 
     /** Adds one more solid color to be drawn inside
Index: gzz/gzz/vob/vobs/RectBgVob.java
diff -u gzz/gzz/vob/vobs/RectBgVob.java:1.6 gzz/gzz/vob/vobs/RectBgVob.java:1.7
--- gzz/gzz/vob/vobs/RectBgVob.java:1.6 Thu Dec 12 04:42:20 2002
+++ gzz/gzz/vob/vobs/RectBgVob.java     Sun Jan 12 06:41:47 2003
@@ -40,7 +40,7 @@
  */
 
 public class RectBgVob extends Vob {
-public static final String rcsid = "$Id: RectBgVob.java,v 1.6 2002/12/12 
09:42:20 humppake Exp $";
+public static final String rcsid = "$Id: RectBgVob.java,v 1.7 2003/01/12 
11:41:47 tjl Exp $";
     public static boolean dbg = false;
     static final void pa(String s) { System.out.println(s); }
 
@@ -94,9 +94,7 @@
 
     Vob glList;
 
-    public int addToListGL(GraphicsAPI.RenderingSurface win,
-                   int[] list, int curs, int coordsys1,
-                               int coordsys2) {
+    public int putGL(VobScene vs, int coordsys1) {
         if(dbg) pa("Addtolistgl rectbg "+coordsys1);
        if(glList == null) {
            String bgcall = "";
@@ -143,8 +141,8 @@
                 "PopAttrib\n"
                    );
        }
-       curs = glList.addToListGL(win, list, curs, coordsys1, coordsys2);
-       return curs;
+       vs.map.put(glList, coordsys1);
+       return 0;
     }
 
     /** Adds one more solid color to be drawn inside
Index: gzz/gzz/vob/vobs/SimpleConnection.java
diff -u gzz/gzz/vob/vobs/SimpleConnection.java:1.4 
gzz/gzz/vob/vobs/SimpleConnection.java:1.5
--- gzz/gzz/vob/vobs/SimpleConnection.java:1.4  Thu Dec  5 05:57:34 2002
+++ gzz/gzz/vob/vobs/SimpleConnection.java      Sun Jan 12 06:41:47 2003
@@ -31,7 +31,7 @@
  */
 
 public class SimpleConnection extends Vob {
-public static final String rcsid = "$Id: SimpleConnection.java,v 1.4 
2002/12/05 10:57:34 tjl Exp $";
+public static final String rcsid = "$Id: SimpleConnection.java,v 1.5 
2003/01/12 11:41:47 tjl Exp $";
 
     float x0, y0, x1, y1;
     Color color;
@@ -72,11 +72,10 @@
        g.drawLine(pt0.x, pt0.y, pt1.x, pt1.y);
     }
 
-    static Vob line;
-    public int addToListGL(GraphicsAPI.RenderingSurface win,
-                       int[] list, int curs, int coordsys1,
-                               int coordsys2) {
-       if(color != null)
+    Vob line;
+
+    public int putGL(VobScene vs, int coordsys1, int coordsys2) {
+       if(line == null && color != null)
            line = GLRen.createLineConnector(x0, y0, x1, y1, 1, 1,
                                             color.getRed()/255f,
                                             color.getGreen()/255f,
@@ -84,8 +83,8 @@
                                             1);
        else line = GLRen.createLineConnector(x0, y0, x1, y1, 1, 1,
                                              -1, -1, -1, -1);
-        curs = line.addToListGL(win, list, curs, coordsys1, coordsys2);
-       return curs;
+       vs.map.put(line, coordsys1, coordsys2);
+       return 0;
     }
 }
 
Index: gzz/gzz/vob/vobs/SolidBgVob.java
diff -u gzz/gzz/vob/vobs/SolidBgVob.java:1.3 
gzz/gzz/vob/vobs/SolidBgVob.java:1.4
--- gzz/gzz/vob/vobs/SolidBgVob.java:1.3        Thu Dec 12 04:42:20 2002
+++ gzz/gzz/vob/vobs/SolidBgVob.java    Sun Jan 12 06:41:47 2003
@@ -82,14 +82,12 @@
 
     Vob glList;
 
-    public int addToListGL(gzz.client.GraphicsAPI.RenderingSurface win,
-                  int[] list, int curs, int coordsys1, int coordsys2)
-    {
+    public int putGL(VobScene vs) {
        if(glList == null) {
            glList = GLRen.createCallList( getGLStr() );
        }
-       curs = glList.addToListGL( win, list, curs, coordsys1, coordsys2);
-       return curs;
+       vs.map.put(glList);
+       return 0;
     }
 
 }
Index: gzz/gzz/vob/vobs/TDecor.java
diff -u gzz/gzz/vob/vobs/TDecor.java:1.4 gzz/gzz/vob/vobs/TDecor.java:1.5
--- gzz/gzz/vob/vobs/TDecor.java:1.4    Thu Dec  5 05:57:34 2002
+++ gzz/gzz/vob/vobs/TDecor.java        Sun Jan 12 06:41:47 2003
@@ -30,7 +30,7 @@
 /** A "T" decoration indicating a connection that isn't shown.
  */
 public class TDecor extends Vob {
-public static final String rcsid = "$Id: TDecor.java,v 1.4 2002/12/05 10:57:34 
tjl Exp $";
+public static final String rcsid = "$Id: TDecor.java,v 1.5 2003/01/12 11:41:47 
tjl Exp $";
 
     Color color;
 
@@ -84,9 +84,7 @@
     }
 
     Vob decor;
-    public int addToListGL(gzz.client.GraphicsAPI.RenderingSurface win,
-                       int[] list, int curs, int coordsys1,
-                               int coordsys2) { 
+    public int putGL(VobScene vs, int coordsys1) {
        float r, g, b, a;
         if(color != null) {
            r = color.getRed()/255f;
@@ -95,9 +93,11 @@
            a = 1f;
        } else { r = g = b = a = -1; }
            
-       decor = GLRen.createTDecor(horizontal, dir, 1, r, g, b, a);
-       curs = decor.addToListGL(win, list, curs, coordsys1, coordsys2);
-       return curs;
+       if(decor == null)
+           decor = GLRen.createTDecor(horizontal, dir, 1, r, g, b, a);
+
+       vs.map.put(decor, coordsys1);
+       return 0;
     }
 }
 
Index: gzz/gzz/vob/vobs/TestSpotVob.java
diff -u gzz/gzz/vob/vobs/TestSpotVob.java:1.4 
gzz/gzz/vob/vobs/TestSpotVob.java:1.5
--- gzz/gzz/vob/vobs/TestSpotVob.java:1.4       Thu Dec  5 05:57:34 2002
+++ gzz/gzz/vob/vobs/TestSpotVob.java   Sun Jan 12 06:41:47 2003
@@ -34,7 +34,7 @@
  * This is most likely not useful for anything else. 
  */
 public class TestSpotVob extends Vob {
-public static final String rcsid = "$Id: TestSpotVob.java,v 1.4 2002/12/05 
10:57:34 tjl Exp $";
+public static final String rcsid = "$Id: TestSpotVob.java,v 1.5 2003/01/12 
11:41:47 tjl Exp $";
 
     float x, y, z;
 
@@ -60,9 +60,7 @@
        g.fillRect(i.x+((int)x-1), i.y+((int)y-1), 3, 3);
     }
 
-    public int addToListGL(gzz.client.GraphicsAPI.RenderingSurface win,
-                       int[] list, int curs, int coordsys1,
-                               int coordsys2) { 
+    public int putGL(VobScene vs, int coordsys1) {
        if(glrend == null) {
            glrend = GLCache.getCallListCoorded(
 "              PushAttrib CURRENT_BIT ENABLE_BIT     \n" +
@@ -76,6 +74,7 @@
 "              PopAttrib     \n"
            );
        }
-       return glrend.addToListGL(win, list, curs, coordsys1, coordsys2);
+       vs.map.put(glrend, coordsys1);
+       return 0;
     }
 }
Index: gzz/gzz/vob/vobs/TextCursorVob.java
diff -u gzz/gzz/vob/vobs/TextCursorVob.java:1.5 
gzz/gzz/vob/vobs/TextCursorVob.java:1.6
--- gzz/gzz/vob/vobs/TextCursorVob.java:1.5     Thu Dec  5 05:57:34 2002
+++ gzz/gzz/vob/vobs/TextCursorVob.java Sun Jan 12 06:41:47 2003
@@ -39,7 +39,7 @@
  */
 
 public class TextCursorVob extends Vob {
-String rcsid = "$Id: TextCursorVob.java,v 1.5 2002/12/05 10:57:34 tjl Exp $";
+String rcsid = "$Id: TextCursorVob.java,v 1.6 2003/01/12 11:41:47 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); }
@@ -83,14 +83,12 @@
     }
 
     Vob dlist;
-    public int addToListGL(gzz.client.GraphicsAPI.RenderingSurface win,
-                       int[] list, int curs, int coordsys1,
-                               int coordsys2) { 
+    public int putGL(VobScene vs, int coordsys1) {
        if(dlist == null)
            dlist = GLCache.getCallListBoxCoorded(
                    "Begin LINE_STRIP\nVertex 0 -.1\nVertex 0 1.1\nEnd\n");
-       curs = dlist.addToListGL(win, list, curs, coordsys1, coordsys2);
-       return curs;
+       vs.map.put(dlist, coordsys1);
+       return 0;
     }
 }
 
Index: gzz/gzz/vob/vobs/TextVob.java
diff -u gzz/gzz/vob/vobs/TextVob.java:1.10 gzz/gzz/vob/vobs/TextVob.java:1.11
--- gzz/gzz/vob/vobs/TextVob.java:1.10  Fri Jan 10 05:01:25 2003
+++ gzz/gzz/vob/vobs/TextVob.java       Sun Jan 12 06:41:47 2003
@@ -48,14 +48,14 @@
  * XXX Diagram!
  */
 public class TextVob extends HBox.VobHBox {
-String rcsid = "$Id: TextVob.java,v 1.10 2003/01/10 10:01:25 mudyc Exp $";
+String rcsid = "$Id: TextVob.java,v 1.11 2003/01/12 11:41:47 tjl Exp $";
     public static boolean dbg = false;
     private static void pa(String s) { System.err.println(s); }
 
     protected final TextStyle style;
     protected final String text;
     protected final boolean baselined;
-    protected String textColor = "Color 0 0 0";
+    protected String textColor = null;
 
     protected Object key;
 
@@ -81,8 +81,7 @@
        this.baselined = baselined;
        this.text = text;
 
-       if (color != null)
-           this.textColor = color;
+       this.textColor = color;
     }
 
 
@@ -151,13 +150,13 @@
        //g.setClip(oldClip);
     }
 
-    static private Vob start, stop, resetColor;
+    static private Vob start, stop;
     private Vob setColor;
     static public Vob getStartCode() {
        if(start == null) {
            if (GL.hasExtension("GL_NV_register_combiners")) {
                start = GLCache.getCallList(
-"   PushAttrib ENABLE_BIT TEXTURE_BIT  \n"+
+"   PushAttrib ENABLE_BIT TEXTURE_BIT CURRENT_BIT  \n"+
 "   Enable REGISTER_COMBINERS_NV                       \n" +
 "   CombinerParameterNV NUM_GENERAL_COMBINERS_NV 1     \n" +
 "   CombinerParameterNV CONSTANT_COLOR0_NV 0 0 0 0.4   \n" +
@@ -188,16 +187,10 @@
 
     private Vob setColor() {
        if(setColor == null) { 
-           setColor = GLCache.getCallList(this.textColor);
+           setColor = GLCache.getCallList(this.textColor == null ? "" : 
this.textColor);
        }
        return setColor;
     }
-    static public Vob resetColor() {
-       if(resetColor == null) {
-           resetColor = GLCache.getCallList("Color 0 0 0");
-       }
-       return resetColor;
-    }
 
     
 
@@ -205,9 +198,7 @@
     /** The OpenGL renderable for this TextVob.
      */
     private Vob ht;
-    public int addToListGL(GraphicsAPI.RenderingSurface win,
-                          int[] list, int curs, int coordsys1,
-                          int coordsys2) {
+    public int putGL(VobScene vs, int coordsys1) {
        if(dbg) pa("Addtolistgl text "+text);
        if(ht == null) {
            GLTextStyle gls = (GLTextStyle)style;
@@ -219,12 +210,11 @@
                    0,
                    1, 1);
        }
-       curs = getStartCode().addToListGL(win, list, curs, 0, 0);
-       curs = setColor().addToListGL(win, list, curs, 0, 0);
-       curs = ht.addToListGL(win, list, curs, coordsys1, coordsys2);
-       curs = resetColor().addToListGL(win, list, curs, 0, 0);
-       curs = getStopCode().addToListGL(win, list, curs, 0, 0);
-       return curs;
+       vs.map.put(getStartCode());
+       vs.map.put(setColor());
+       vs.map.put(ht, coordsys1);
+       vs.map.put(getStopCode());
+       return 0;
     }
 
 
Index: gzz/test/gzz/gfx/gl/glvobcoorder.test
diff -u gzz/test/gzz/gfx/gl/glvobcoorder.test:1.30 
gzz/test/gzz/gfx/gl/glvobcoorder.test:1.31
--- gzz/test/gzz/gfx/gl/glvobcoorder.test:1.30  Mon Jan  6 06:51:59 2003
+++ gzz/test/gzz/gfx/gl/glvobcoorder.test       Sun Jan 12 06:41:47 2003
@@ -179,12 +179,13 @@
     def putThings():
        vs.map.clear()
        vs.map.put(gzz.vob.vobs.SolidBgVob(Color.red))
-       vs.map.put(renderable, cs_cull)
+       vs.map.put(renderable, cs_cull, 0)
        render(vs)
 
 #test cull-clip interface
     font = GL.createFont("gfx/fonts/a010013l.pfb", 16)
     renderable = GLRen.createHorizText2(font, "FOO", 1, 1, 1, 1)
+
     
     cs = c.affineCoordsys(0, 0, 10, 10, 100, 0, 0, 100)
     cs_clip = c.affineCoordsys(0, 0, 0, 0, 200, 0, 0, 200)
Index: gzz/test/gzz/gfx/gl/paper.test
diff -u gzz/test/gzz/gfx/gl/paper.test:1.8 gzz/test/gzz/gfx/gl/paper.test:1.9
--- gzz/test/gzz/gfx/gl/paper.test:1.8  Thu Nov 21 06:21:24 2002
+++ gzz/test/gzz/gfx/gl/paper.test      Sun Jan 12 06:41:47 2003
@@ -18,7 +18,8 @@
 
     paper = PaperMill.getInstance().getPaper(42)
     pq = GLRen.createPaperQuad(paper, 0, 0, 1, 1, 1)
-    vs.put(pq, 0, 100, 100, 200, 200)
+    cs1 = vs.orthoCS(0, "1", 0, 100, 100, 200, 200)
+    vs.map.put(pq, cs1, 0)
     render(vs)
     checkAvgColor(50, 50, 2, 2, (0, 0, 0))
     checkAvgColor(150, 50, 2, 2, (0, 0, 0))
@@ -42,8 +43,10 @@
        vs = getvs()
        vs.map.put(SolidBgVob(Color.blue))
 
-       vs.put(pq1, 0, 0, 0, 150, 300)
-       vs.put(pq2, 0, 150, 0, 150, 300)
+       cs1 = vs.orthoCS(0, "1", 0, 0, 0, 150, 300)
+       cs2 = vs.orthoCS(0, "2", 0, 150, 0, 150, 300)
+       vs.map.put(pq1, cs1, 0)
+       vs.map.put(pq2, cs2, 0)
 
        render(vs)
 
Index: gzz/test/gzz/mem/partition.test
diff -u gzz/test/gzz/mem/partition.test:1.7 gzz/test/gzz/mem/partition.test:1.8
--- gzz/test/gzz/mem/partition.test:1.7 Thu Jan  9 19:42:49 2003
+++ gzz/test/gzz/mem/partition.test     Sun Jan 12 06:41:47 2003
@@ -21,8 +21,8 @@
        return self.qual
 
 def waitFor(f, dontStop = 0):
-    for i in range(0,20):
-       java.lang.Thread.sleep(50)
+    for i in range(0,30):
+       java.lang.Thread.sleep(100)
        if f():
            if not dontStop: pool.stop()
            return
Index: gzz/test/tools/gfx.py
diff -u gzz/test/tools/gfx.py:1.15 gzz/test/tools/gfx.py:1.16
--- gzz/test/tools/gfx.py:1.15  Thu Dec 19 18:06:01 2002
+++ gzz/test/tools/gfx.py       Sun Jan 12 06:41:48 2003
@@ -22,13 +22,9 @@
     _drawbufvs.map.put(SolidBgVob(Color(0, 0, 0.2)))
     _drawbufvs.map.put(GLCache.getCallList("""
        Disable TEXTURE_2D
+       Color 1 1 1 1
     """))
     cs = _drawbufvs.translateCS(0, "tr", 0, 501)
-    _drawbufvs.map.put(
-       GLCache.getCallList("""
-           Color 1 1 1 1
-       """)
-    )
     _drawbufvs.map.put(
        GLRen.createDrawPixels(
            500, 500,




reply via email to

[Prev in Thread] Current Thread [Next in Thread]