[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gzz-commits] gzz ./TODO gfx/libcoords/Coords.cxx gfx/libutil...
From: |
Tuomas J. Lukka |
Subject: |
[Gzz-commits] gzz ./TODO gfx/libcoords/Coords.cxx gfx/libutil... |
Date: |
Mon, 04 Nov 2002 02:53:17 -0500 |
CVSROOT: /cvsroot/gzz
Module name: gzz
Changes by: Tuomas J. Lukka <address@hidden> 02/11/04 02:53:15
Modified files:
. : TODO
gfx/libcoords : Coords.cxx
gfx/libutil : effects.py
gzz/gfx/gl : Stencil.java
gzz/modules/pp : PPView2.java
Log message:
Buoys must be deferred because of stencil
CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/gzz/gzz/TODO.diff?tr1=1.358&tr2=1.359&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gzz/gzz/gfx/libcoords/Coords.cxx.diff?tr1=1.48&tr2=1.49&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gzz/gzz/gfx/libutil/effects.py.diff?tr1=1.22&tr2=1.23&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gzz/gzz/gzz/gfx/gl/Stencil.java.diff?tr1=1.17&tr2=1.18&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gzz/gzz/gzz/modules/pp/PPView2.java.diff?tr1=1.6&tr2=1.7&r1=text&r2=text
Patches:
Index: gzz/TODO
diff -u gzz/TODO:1.358 gzz/TODO:1.359
--- gzz/TODO:1.358 Sun Nov 3 23:35:39 2002
+++ gzz/TODO Mon Nov 4 02:53:14 2002
@@ -154,6 +154,8 @@
+ clean GzzGL-jni
+ complete "Gzz technologies" white paper
anybody:
+ - tests for singular coordsys: scale = 0 etc., inverses. Mustn't
+ coredump
- tests for PEG 1021
- implement PEG 1021 for AWT
+ implement PEG 1012
Index: gzz/gfx/libcoords/Coords.cxx
diff -u gzz/gfx/libcoords/Coords.cxx:1.48 gzz/gfx/libcoords/Coords.cxx:1.49
--- gzz/gfx/libcoords/Coords.cxx:1.48 Sun Nov 3 13:28:16 2002
+++ gzz/gfx/libcoords/Coords.cxx Mon Nov 4 02:53:15 2002
@@ -93,6 +93,7 @@
public TransformCoordSys<typename Deriver::BaseTransform> {
CoordSys *dep[Deriver::NDetermining >? 1];
float nparams[Deriver::BaseTransform::NParams];
+ Deriver d;
virtual void setSuper(CoordSys **super) {
@@ -102,7 +103,6 @@
}
virtual void setParams(float *params) {
- Deriver d;
d.derivedParams(super, dep, params, nparams);
t.setParams(nparams, super);
}
@@ -114,6 +114,9 @@
}
return false;
}
+ virtual bool shouldBeDrawn() {
+ return d.shouldBeDrawn();
+ }
};
template<class Transform> class InverseTransformCoordSys : public
TransformCoordSysBase<Transform> {
@@ -332,6 +335,9 @@
newparams[3] = sq.x;
newparams[4] = sq.y;
}
+ bool shouldBeDrawn() {
+ return true;
+ }
};
/** An ortho coordsys with the unit square box.
@@ -421,6 +427,9 @@
newparams[0] = angle * 180 / M_PI;
}
+ bool shouldBeDrawn() {
+ return true;
+ }
};
/** Translation.
@@ -530,16 +539,15 @@
ZPt tr = ctr + pointdir * (pt-ctr);
- DBG(dbg_buoy) << "final: "<<tr<<"\n";
- float scale;
- if(rdist > 1) {
+ valid = 1;
+ float scale = 1-rdist;
+
+ if(scale <.0001) {
valid = 0;
- scale = 0;
- } else {
- valid = 1;
- scale = 1-rdist;
+ scale = 1;
}
+ DBG(dbg_buoy) << "final: "<<tr<<" "<<valid<<" "<<scale<<"
"<<rdist<<"\n";
newparams[0] = tr.x;
newparams[1] = tr.y;
Index: gzz/gfx/libutil/effects.py
diff -u gzz/gfx/libutil/effects.py:1.22 gzz/gfx/libutil/effects.py:1.23
--- gzz/gfx/libutil/effects.py:1.22 Sun Nov 3 13:28:16 2002
+++ gzz/gfx/libutil/effects.py Mon Nov 4 02:53:15 2002
@@ -83,4 +83,4 @@
def getContent(self): return self._content
def getFrame(self): return self._frame
- def getBlank(self): return self._frame
+ def getBlank(self): return self._content
Index: gzz/gzz/gfx/gl/Stencil.java
diff -u gzz/gzz/gfx/gl/Stencil.java:1.17 gzz/gzz/gfx/gl/Stencil.java:1.18
--- gzz/gzz/gfx/gl/Stencil.java:1.17 Sat Nov 2 13:30:18 2002
+++ gzz/gzz/gfx/gl/Stencil.java Mon Nov 4 02:53:15 2002
@@ -87,6 +87,7 @@
" StencilFunc EQUAL 1 1\n"+
" StencilMask 0\n"+
" DepthMask 1\n"+
+" DepthFunc LEQUAL\n"+
" Enable DEPTH_TEST\n"
);
initContents_nodepth = GLRen.createCallList(
Index: gzz/gzz/modules/pp/PPView2.java
diff -u gzz/gzz/modules/pp/PPView2.java:1.6 gzz/gzz/modules/pp/PPView2.java:1.7
--- gzz/gzz/modules/pp/PPView2.java:1.6 Sun Nov 3 23:35:39 2002
+++ gzz/gzz/modules/pp/PPView2.java Mon Nov 4 02:53:15 2002
@@ -11,6 +11,7 @@
import java.awt.Dimension;
import gzz.client.GraphicsAPI;
import gzz.util.Pair;
+import java.util.*;
public class PPView2 implements View {
@@ -168,6 +169,10 @@
}
}
+ /** A queue of runnables to run after first view
+ * has finished; these will render the buoys.
+ */
+ List buoyqueue = new ArrayList(); // Try to pronounce *that*
class BFloater implements Cell1DBuoyHook.Floater {
int dir;
@@ -180,7 +185,7 @@
centerX(vs), buoyCenterY, buoyRadius,
centerX(vs) - dir * buoyRadius, buoyCenterY);
}
- public void buoy(int anchor, Cell c, Cell connectedFrom) {
+ public void buoy(int anchor, final Cell c, Cell connectedFrom) {
Object key ;
if(dir > 0)
key = new Pair(connectedFrom, c);
@@ -190,15 +195,19 @@
.5f, .5f);
int buoycs = floater.buoyCoordsys(actr, key);
- int frameCS = vs.orthoBoxCS(buoycs, "frame", 0,
+ final int frameCS = vs.orthoBoxCS(buoycs, "frame", 0,
-buoyVPWidth/2, -buoyVPHeight, 1, 1,
buoyVPWidth, buoyVPHeight);
// XXX Pan
- int c2fCS = vs.coords.ortho(0, 0, 0, 0, buoyZoom, buoyZoom);
+ final int c2fCS = vs.coords.ortho(0, 0, 0, 0, buoyZoom, buoyZoom);
vs.matcher.addSub(buoycs, c2fCS, "C2F");
- buoy_vc.setAccursed(c);
- buoy_singlePlane.render(vs, frameCS, c2fCS);
+ buoyqueue.add(new Runnable() {
+ public void run() {
+ buoy_vc.setAccursed(c);
+ buoy_singlePlane.render(vs, frameCS, c2fCS);
+ }
+ });
}
}
@@ -239,7 +248,7 @@
1, 0, 0, 1);
vs.matcher.add(mainctr, "MAINVP");
- int frameCS = vs.orthoBoxCS(mainctr, "frame", 0,
+ int frameCS = vs.orthoBoxCS(mainctr, "frame", 10,
(-mainWidth)/2, -mainHeight/2, 1, 1,
mainWidth, mainHeight);
@@ -248,6 +257,8 @@
setZoomPan(vs);
pl.render(vs, frameCS, c2fCS);
+ for(Iterator i = buoyqueue.iterator(); i.hasNext(); )
+ ((Runnable)i.next()).run();
}
/** Cause the changes to the zooming and panning variables
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Gzz-commits] gzz ./TODO gfx/libcoords/Coords.cxx gfx/libutil...,
Tuomas J. Lukka <=