/[gzz]/gzz/gzz/gfx/gl/GLVobMap.java
ViewVC logotype

Diff of /gzz/gzz/gfx/gl/GLVobMap.java

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.15 by tjl, Thu Dec 5 10:57:34 2002 UTC revision 1.16 by tjl, Sun Jan 12 11:41:46 2003 UTC
# Line 30  public static final String rcsid = "$Id$ Line 30  public static final String rcsid = "$Id$
30      private static void pa(String s) { System.err.println(s); }      private static void pa(String s) { System.err.println(s); }
31    
32      gzz.client.gl.GLRenderingSurface screen;      gzz.client.gl.GLRenderingSurface screen;
33        VobScene vs;
34    
35      public GLVobMap(gzz.client.gl.GLRenderingSurface screen) {      public GLVobMap(gzz.client.gl.GLRenderingSurface screen) {
36          this.screen = screen;          this.screen = screen;
# Line 37  public static final String rcsid = "$Id$ Line 38  public static final String rcsid = "$Id$
38          clear();          clear();
39      }      }
40    
41        public void setVS(VobScene vs) { this.vs = vs; }
42    
43      int[] list;      int[] list;
44      int curs;      int curs;
45      int[] cs;      int[] cs;
# Line 51  public static final String rcsid = "$Id$ Line 54  public static final String rcsid = "$Id$
54          nvobs = 0;          nvobs = 0;
55      }      }
56    
57      public void put(Vob3 vob, int coordsys1, int coordsys2, int coordsys3) {      public void put(Vob vob, int coordsys1, int coordsys2, int coordsys3) {
         curs = vob.addToListGL(screen, list, curs, coordsys1,  
                                coordsys2, coordsys3);  
58          if(dbg) pa("Add to GLVobMap "+this+":  "+vob+" "+coordsys1+" "          if(dbg) pa("Add to GLVobMap "+this+":  "+vob+" "+coordsys1+" "
59                     +coordsys2+" "+coordsys3+" curs: "+curs);                     +coordsys2+" "+coordsys3+" curs: "+curs);
60          // Stash it away so it won't get garbage collected too early :(          int ind = vob.putGL(vs, coordsys1, coordsys2, coordsys3);
61            if(ind == 0) return;
62            // Now, stash it away.
63          cs[nvobs] = coordsys1;          cs[nvobs] = coordsys1;
64          vobs[nvobs++] = vob;          vobs[nvobs++] = vob;
65            list[curs++] = (GL.RENDERABLE3 | ind);
66            list[curs++] = coordsys1;
67            list[curs++] = coordsys2;
68            list[curs++] = coordsys3;
69      }      }
70      public void put(Vob vob, int coordsys1, int coordsys2) {      public void put(Vob vob, int coordsys1, int coordsys2) {
71          curs = vob.addToListGL(screen, list, curs, coordsys1, coordsys2);          if(dbg) pa("Add to GLVobMap "+this+":  "+vob+" "+coordsys1+" "
72          if(dbg) pa("Add to GLVobMap "+this+":  "+vob+" "+coordsys1+" "+coordsys2+" curs: "+curs);                     +coordsys2+" curs: "+curs);
73          // Stash it away so it won't get garbage collected too early :(          int ind = vob.putGL(vs, coordsys1, coordsys2);
74            if(ind == 0) return;
75            // Now, stash it away.
76          cs[nvobs] = coordsys1;          cs[nvobs] = coordsys1;
77          vobs[nvobs++] = vob;          vobs[nvobs++] = vob;
78      }          list[curs++] = (GL.RENDERABLE2 | ind);
79      public void put(Vob vob, int coordsys) {          list[curs++] = coordsys1;
80          put(vob, coordsys, 0);          list[curs++] = coordsys2;
81        }
82        public void put(Vob vob, int coordsys1) {
83            if(dbg) pa("Add to GLVobMap "+this+":  "+vob+" "+coordsys1+
84                       " curs: "+curs);
85            int ind = vob.putGL(vs, coordsys1);
86            if(ind == 0) return;
87            // Now, stash it away.
88            cs[nvobs] = coordsys1;
89            vobs[nvobs++] = vob;
90            list[curs++] = (GL.RENDERABLE1 | ind);
91            list[curs++] = coordsys1;
92      }      }
93      public void put(Vob vob) {      public void put(Vob vob) {
94          put(vob, 0, 0);          if(dbg) pa("Add to GLVobMap "+this+":  "+vob+ " curs: "+curs);
95            int ind = vob.putGL(vs);
96            if(ind == 0) return;
97            // Now, stash it away.
98            vobs[nvobs++] = vob;
99            list[curs++] = (GL.RENDERABLE0 | ind);
100      }      }
101      public void dump() {      public void dump() {
102          pa("GLVobMap");          pa("GLVobMap");

Legend:
Removed from v.1.15  
changed lines
  Added in v.1.16

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26