Exemplo n.º 1
0
 public void add(Rendered r, GLState t) {
   if (curp == null) throw (new RuntimeException("Tried to set up relative slot with no parent"));
   Object seq = null;
   Buffer cos = null;
   if ((t == null) && (curp.statroot == null)) {
     seq = r.staticp();
     curp.cs.copye(cos = new Buffer(cfg), GLState.Slot.Type.SYS);
     Cached c;
     if ((seq != null) && ((c = prevcache.get(new Cached(r, seq, cos, false))) != null)) {
       prevcache.remove(c);
       newcache.put(c, c);
       add(c, curp.cs);
       return;
     }
   }
   Slot s = getslot();
   curp.cs.copy(s.os);
   if (t != null) t.prep(s.os);
   s.os.copy(s.cs);
   if (curp.statroot != null) {
     s.statroot = curp.statroot;
   } else if (seq != null) {
     s.statroot = new Cached(r, seq, cos);
   }
   setup(s, r);
 }
Exemplo n.º 2
0
 protected void render(GOut g, Rendered r) {
   try {
     r.draw(g);
   } catch (RLoad l) {
     if (ignload) return;
     else throw (l);
   }
 }
Exemplo n.º 3
0
 protected void setup(Slot s, Rendered r) {
   s.r = r;
   Slot pp = s.p = curp;
   if (pp == null) curref.set(this);
   try {
     curp = s;
     s.d = r.setup(this);
   } finally {
     if ((curp = pp) == null) curref.remove();
   }
 }