[Fencommits] libvob: fixes and twids.
Matti J. Katila
majukati at cc.jyu.fi
Tue Mar 7 02:05:26 EET 2006
Tue Mar 7 01:10:03 EET 2006 Matti J. Katila <majukati at cc.jyu.fi>
* fixes and twids.
diff -rN -u libvob-old/org/nongnu/libvob/gl/impl/lwjgl/CallGL.java libvob-new/org/nongnu/libvob/gl/impl/lwjgl/CallGL.java
--- libvob-old/org/nongnu/libvob/gl/impl/lwjgl/CallGL.java 2006-03-07 02:05:24.075359415 +0200
+++ libvob-new/org/nongnu/libvob/gl/impl/lwjgl/CallGL.java 2006-03-07 01:34:37.000000000 +0200
@@ -534,10 +534,14 @@
}
private static float getTokenf(String f) {
- return Float.parseFloat(f);
+ try {
+ return Float.parseFloat(f);
+ } catch (NumberFormatException e) {
+ return getToken(f);
+ }
}
- private static int getToken(String token) {
+ public static int getToken(String token) {
//System.out.println("token: "+token);
Field f = null;
Class[] clzz = {
diff -rN -u libvob-old/org/nongnu/libvob/gl/impl/lwjgl/Coorder.java libvob-new/org/nongnu/libvob/gl/impl/lwjgl/Coorder.java
--- libvob-old/org/nongnu/libvob/gl/impl/lwjgl/Coorder.java 2006-03-07 02:05:24.068360473 +0200
+++ libvob-new/org/nongnu/libvob/gl/impl/lwjgl/Coorder.java 2006-03-07 01:34:37.000000000 +0200
@@ -51,8 +51,10 @@
out.print("Root");
}
- Vector2f sq = new Vector2f(1,1);
+ Vector2f sq = new Vector2f();
public Vector2f getSqSize() {
+ sq.x = 1;
+ sq.y = 1;
return sq;
}
};
diff -rN -u libvob-old/org/nongnu/libvob/gl/impl/lwjgl/LWJGLRen.java libvob-new/org/nongnu/libvob/gl/impl/lwjgl/LWJGLRen.java
--- libvob-old/org/nongnu/libvob/gl/impl/lwjgl/LWJGLRen.java 2006-03-07 02:05:24.069360322 +0200
+++ libvob-new/org/nongnu/libvob/gl/impl/lwjgl/LWJGLRen.java 2006-03-07 01:34:37.000000000 +0200
@@ -5,13 +5,21 @@
import java.awt.Graphics;
import org.nongnu.libvob.AbstractVob;
+import org.nongnu.libvob.TextStyle;
import org.nongnu.libvob.Vob;
import org.nongnu.libvob.VobScene;
-import org.nongnu.libvob.Vob.RenderInfo;
+import org.nongnu.libvob.gl.PaperMill.Paper;
+import org.nongnu.libvob.gl.Ren.PaperQuad;
+import org.nongnu.libvob.gl.Ren.Text1;
+import org.nongnu.libvob.gl.impl.lwjgl.mosaictext.LWJGL_Text;
import org.nongnu.libvob.gl.impl.lwjgl.vobs.trivial.CallListBoxCoorder;
import org.nongnu.libvob.gl.impl.lwjgl.vobs.trivial.CallListCoorder;
import org.nongnu.libvob.gl.impl.lwjgl.vobs.trivial.NonFilledRectangleVob;
+/** A class that implements objects that can render OpenGL with lwjgl.
+ *
+ * @author Matti J. Katila
+ */
public class LWJGLRen {
static public interface Vob0 {
@@ -64,6 +72,262 @@
return new CallListBoxCoorder(s);
}
+ public static Vob createText(TextStyle style, String text) {
+ return ((LWJGL_Text.TextStyleImpl)style).createVob(text);
+ }
+
+
+ // ---- NON-STATIC METHODS --------------------------
+
+
+ public PaperQuad createPaperQuad(Paper paper, float x0, float y0, float x1, float y1, float dicefactor) {
+ return new PaperQuadImpl(paper, x0,y0,x1,y1, dicefactor);
+ }
+
+ public Text1 createText1(TextStyle p0, String p1, float p2, int p3) {
+ return null;
+ }
+
+
+
+ class PaperQuadImpl extends GLVob implements PaperQuad, Vob3 {
+
+ public PaperQuadImpl(Paper paper, float x0, float y0, float x1, float y1, float dicefactor) {
+ }
+
+ public void render(Transform cs0, Transform cs1, Transform cs2, int callList) {
+ // TODO Auto-generated method stub
+
+ }
+
+
+ /**
+ # PaperQuad is a bit complicated: there are three coordinate
+ # systems here: the window cs, the object cs and the paper cs.
+ # cs1 is object => window,
+ # and cs2 is paper => object, unless PAPERQUAD_CS2_TO_SCREEN is set, when it is
+ # paper => window
+ # Corners give the corners of the quad to render, in object
+ # coordinates.
+ */
+/*
+ class PaperQuad {
+ public:
+ enum { NTrans = 2 };
+
+ ::Vob::Paper::Paper *paper;
+ float x0,y0,x1,y1;
+ float scale;
+ float dicefactor;
+ int flags;
+
+ template<class F> void params(F &f) {
+ f(paper, x0, y0, x1, y1, scale, dicefactor, flags);
+ }
+
+ template<class T> void render(const T &coords1, const T &coords2) const {
+ const int flags = this->flags;
+ // object -> paper/window
+ const Transform &coords2inv = coords2.getInverse();
+
+ GLERR;
+
+
+ ZPt paperorigin, paperx, papery;
+ if(flags & PAPERQUAD_CS2_TO_SCREEN) {
+ const Transform &coords1inv = coords1.getInverse();
+ paperorigin = coords1inv.transform(coords2.transform(ZPt(0, 0, 0)));
+ paperx = coords1inv.transform(coords2.transform(ZPt(1, 0, 0)))
+ - paperorigin;
+ papery = coords1inv.transform(coords2.transform(ZPt(0, 1, 0)))
+ - paperorigin;
+ } else {
+ paperorigin = coords2.transform(ZPt(0, 0, 0));
+ paperx = coords2.transform(ZPt(1, 0, 0)) - paperorigin;
+ papery = coords2.transform(ZPt(0, 1, 0)) - paperorigin;
+ }
+
+
+ Paper::LightParam lightParam;
+
+ // These are now irrelevant
+ lightParam.orig = paperorigin-ZPt(0,0,0);
+ lightParam.e0 = paperx * scale;
+ lightParam.e1 = papery * scale;
+ lightParam.e2 = ZVec(0,0,paperx.length()) * scale;
+
+ lightParam.Light = ZVec(-1,-1,1);
+ lightParam.Light_w = 0.0;
+
+ DBG(dbg_paperquad) << "Paperquad: " <<
+ lightParam.orig << " " <<
+ lightParam.e0 << " " <<
+ lightParam.e1 << " " <<
+ lightParam.e2 << " " <<
+ "\\nCorners" <<
+ x0 << " " <<
+ y0 << " " <<
+ x1 << " " <<
+ y1 << " " <<
+ "\\n"
+ ;
+ GLERR;
+
+
+ int dice;
+
+ if(flags & PAPERQUAD_NONL_MAXLEN) {
+ Pt p1 = coords1.transform(Pt(x0,y0));
+ Pt p2 = coords1.transform(Pt(x0,y1));
+ Pt p3 = coords1.transform(Pt(x1,y0));
+ Pt p4 = coords1.transform(Pt(x1,y1));
+ float dist[4] = {
+ (p2-p1).length(),
+ (p3-p1).length(),
+ (p4-p2).length(),
+ (p4-p3).length()
+ };
+ float m = *std::max_element(dist, dist+4);
+
+ dice = (int)(m / dicefactor) + 2;
+ } else { // old way
+
+ ZPt ctr = ZPt(lerp(x0, x1, 0.5), lerp(y0, y1, 0.5), 0);
+ double len = hypot(x1-x0, y1-y0) / 2;
+ double nonl = coords1.nonlinearity(ctr, len);
+
+ dice = (int)(len * nonl * dicefactor) + 2;
+ }
+ DBG(dbg_paperquad) << "Dice: " << dice <<"\\n";
+ // Cap it at a ridiculous value
+ if( dice > 100) dice = 100;
+ if(dice < 2 ) dice = 2;
+
+ float *vertices = new float[dice * dice * 5];
+
+ int *indices = new int[(dice) * (2*dice)];
+
+ #define VERTICES3(x, y, z) vertices[((x)*dice + (y))*5 + (z)]
+ #define VERTICES2(x, y) vertices[((x)*dice + (y))*5]
+ #define INDICES2(x, y) indices[(x)*2*dice + (y)]
+ #define INDICES1(x) indices[(x)*2*dice]
+
+ int *indps[dice-1];
+ int counts[dice-1];
+ for(int ix = 0; ix<dice; ix++) {
+ if(ix < dice-1) {
+ counts[ix] = 2*dice;
+ indps[ix] = &INDICES1(ix);
+ }
+ for(int iy = 0; iy<dice; iy++) {
+ if(ix < dice-1) {
+ INDICES2(ix, 2*iy) = dice * ix + iy;
+ INDICES2(ix, 2*iy+1) = dice * (ix+1) + iy;
+ }
+ float x = ix / (dice - 1.0);
+ float y = iy / (dice - 1.0);
+ ZPt p(lerp(x0, x1, x), lerp(y0, y1, y), 0);
+ ZPt v = coords1.transform(p);
+ VERTICES3(ix, iy, 2) = v.x;
+ VERTICES3(ix, iy, 3) = v.y;
+ VERTICES3(ix, iy, 4) = v.z;
+ ZPt t;
+ if(flags & PAPERQUAD_CS2_TO_SCREEN) {
+ t = coords2inv.transform(v);
+ } else {
+ t = coords2inv.transform(p);
+ }
+ VERTICES3(ix, iy, 0) = t.x;
+ VERTICES3(ix, iy, 1) = t.y;
+ DBG(dbg_paperquad) << " vert: " <<
+ ix << " " <<
+ iy << " : " <<
+ VERTICES3(ix, iy, 0) << " " <<
+ VERTICES3(ix, iy, 1) << " " <<
+ VERTICES3(ix, iy, 2) << " " <<
+ VERTICES3(ix, iy, 3) << " " <<
+ VERTICES3(ix, iy, 4) << " " <<
+ "\\n";
+ }
+ }
+
+ if(flags & PAPERQUAD_USE_VERTEX_PROGRAM) {
+ glPushClientAttrib(GL_CLIENT_VERTEX_ARRAY_BIT);
+ glInterleavedArrays(GL_T2F_V3F, 5*sizeof(float), vertices);
+ glLockArraysEXT(0, dice*dice);
+
+ for(Paper::Paper::iterator it = paper->begin(); it != paper->end(); ++it) {
+
+ DBG(dbg_paperquad) << "Pass\\n";
+ GLERR;
+ (*it).setUp_VP(&lightParam);
+
+ DBG(dbg_paperquad) << "Going to multidraw\\n";
+ GLERR;
+ glMultiDrawElementsEXT(GL_QUAD_STRIP, counts,
+ GL_UNSIGNED_INT, (const GLvoid **)indps, dice-1);
+ DBG(dbg_paperquad) << "Teardown\\n";
+ GLERR;
+ (*it).tearDown_VP();
+
+ GLERR;
+ DBG(dbg_paperquad) << "Pass over\\n";
+
+ }
+ glUnlockArraysEXT();
+ glPopClientAttrib();
+ } else {
+ for(Paper::Paper::iterator it = paper->begin(); it != paper->end(); ++it) {
+
+ DBG(dbg_paperquad) << "Pass\\n";
+ GLERR;
+ (*it).setUp_explicit(&lightParam);
+
+ DBG(dbg_paperquad) << "Going to set texcoords explicit\\n";
+ GLERR;
+
+
+ for(int ix = 0; ix<dice-1; ix++) {
+ glBegin(GL_QUAD_STRIP);
+ for(int iy = 0; iy<dice; iy++) {
+
+ float tmp[4] = { VERTICES3(ix, iy, 0), VERTICES3(ix, iy, 1), 0 ,1 };
+ DBG(dbg_paperquad) << "to texcoords\\n";
+ (*it).texcoords_explicit( tmp );
+ DBG(dbg_paperquad) << "to vertex\\n";
+ glVertex3fv( (&(VERTICES2(ix, iy))+2) );
+
+ float tmp2[4] = { VERTICES3(ix+1, iy, 0), VERTICES3(ix+1, iy, 1), 0 ,1 };
+ DBG(dbg_paperquad) << "to texcoords\\n";
+ (*it).texcoords_explicit( tmp2 );
+ DBG(dbg_paperquad) << "to vertex\\n";
+ glVertex3fv( ((&VERTICES2(ix+1, iy))+2) );
+ }
+ DBG(dbg_paperquad) << "to end\\n";
+ glEnd();
+ }
+
+
+ DBG(dbg_paperquad) << "Teardown\\n";
+ GLERR;
+ (*it).tearDown_explicit();
+
+ GLERR;
+ DBG(dbg_paperquad) << "Pass over\\n";
+ }
+ }
+
+ DBG(dbg_paperquad) << "Passes over\\n";
+
+ GLERR;
+
+ delete [] vertices;
+ delete [] indices;
+
+ }
+*/
+ }
+
}
diff -rN -u libvob-old/org/nongnu/libvob/gl/impl/lwjgl/paper/Paper.java libvob-new/org/nongnu/libvob/gl/impl/lwjgl/paper/Paper.java
--- libvob-old/org/nongnu/libvob/gl/impl/lwjgl/paper/Paper.java 1970-01-01 02:00:00.000000000 +0200
+++ libvob-new/org/nongnu/libvob/gl/impl/lwjgl/paper/Paper.java 2006-03-07 01:34:37.000000000 +0200
@@ -0,0 +1,245 @@
+/*
+Paper.java
+ *
+ * Copyright (c) 2002-2003, Tuomas Lukka
+ * 2006, Matti J. Katila
+ *
+ * This file is part of Libvob.
+ *
+ * Libvob is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * Libvob is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+ * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
+ * Public License for more details.
+ *
+ * You should have received a copy of the GNU General
+ * Public License along with Libvob; if not, write to the Free
+ * Software Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ */
+/*
+ * Written by Tuomas Lukka, ported to Java by Matti J. Katila
+ */
+package org.nongnu.libvob.gl.impl.lwjgl.paper;
+import java.util.ArrayList;
+
+import org.lwjgl.util.vector.Matrix4f;
+import org.nongnu.libvob.gl.GL;
+import org.nongnu.libvob.gl.impl.lwjgl.CallGL;
+import org.nongnu.libvob.gl.PaperMill;
+
+/** The interface to the paper library.
+ * For all array-type things (X), there are the methods setNX, getNX
+ * and also some (possibly different, for using derived
+ * classes) putX methods.
+ * <p>
+ * For example, the paper contains the Passes array,
+ * so there are the methods getNPasses() and setNPasses(int i).
+ * The passes are all of the same type so they are automatically
+ * added as empties - getPass gives the Pass object to use
+ * to place stuff into the pass.
+ */
+public class Paper implements PaperMill.Paper {
+
+ public static boolean dbg = true;
+ private static void pa(String s) { System.out.println(s); }
+
+
+ ArrayList passes = new ArrayList();
+
+
+ public void setNPasses(int num) {
+ passes.ensureCapacity(num);
+ while (passes.size() < num)
+ passes.add(new Pass(passes.size()));
+ }
+
+ public Pass getPass(int index) { return (Pass) passes.get(index); }
+
+
+
+
+
+ /** The identififier to be passed to C for this object.
+ */
+ private int c_id;
+
+ /** Put all objects that manage displaylists and textures
+ * used by this paper here to ensure they don't get
+ * GCed before this.
+ */
+ private ArrayList depends;
+
+ /** Add an object on whose C++ representation this paper
+ * depends. For instance, if one of the setup codes uses
+ * a texture id of a given GL.Texture object, then that
+ * object should be added here.
+ */
+ public void addDepend(Object o) {
+ if(depends == null) depends = new ArrayList();
+ depends.add(o);
+ }
+
+ /** A class representing a single rendering pass
+ * of a paper.
+ * A pass contains the two CallGL codes Setupcode and Teardowncode,
+ * and the following arrays:
+ * IndirectTextureBinds, TexGens, LightSetups.
+ */
+ public class Pass {
+
+ /** Simple, non-lighting-dependent TexGen.
+ * Transforms paper coordinates into texture coordinates using
+ * the given matrix.
+ */
+ class TexGen {
+ Matrix4f tex_mat = new Matrix4f();
+ public void putNormalTexGen(float[] matrix) {
+// this->tex_mat[0] = tex_mat[0];
+// this->tex_mat[1] = tex_mat[1];
+// this->tex_mat[2] = tex_mat[2];
+// this->tex_mat[3] = tex_mat[3];
+ tex_mat.m00 = matrix[0];
+ tex_mat.m01 = matrix[1];
+ tex_mat.m02 = matrix[2];
+ tex_mat.m03 = matrix[3];
+
+// this->tex_mat[4] = tex_mat[4];
+// this->tex_mat[5] = tex_mat[5];
+// this->tex_mat[6] = tex_mat[6];
+// this->tex_mat[7] = tex_mat[7];
+ tex_mat.m10 = matrix[4];
+ tex_mat.m11 = matrix[5];
+ tex_mat.m12 = matrix[6];
+ tex_mat.m13 = matrix[7];
+
+// this->tex_mat[8] = tex_mat[8];
+// this->tex_mat[9] = tex_mat[9];
+// this->tex_mat[10] = tex_mat[10];
+// this->tex_mat[11] = tex_mat[11];
+ tex_mat.m20 = matrix[8];
+ tex_mat.m21 = matrix[9];
+ tex_mat.m22 = matrix[10];
+ tex_mat.m23 = matrix[11];
+
+// this->tex_mat[12] = 0;
+// this->tex_mat[13] = 0;
+// this->tex_mat[14] = 0;
+// this->tex_mat[15] = 1;
+ tex_mat.m30 = 0;
+ tex_mat.m31 = 0;
+ tex_mat.m32 = 0;
+ tex_mat.m33 = 1f;
+ }
+
+ }
+
+
+
+ private int index;
+ private Pass(int index) { this.index = index; }
+
+// public void setNIndirectTextureBinds(int n) { impl_Pass_setNIndirectTextureBinds(c_id, index, n); }
+//
+// public int getNIndirectTextureBinds() { return impl_Pass_getNIndirectTextureBinds(c_id, index); }
+//
+
+ ArrayList texGens = new ArrayList();
+ public int getNTexGens() { return texGens.size(); }
+ public void setNTexGens(int n) {
+ texGens.ensureCapacity(n);
+ while (texGens.size() < n)
+ texGens.add(new TexGen());
+ }
+//
+// public int getNLightSetups() { return impl_Pass_getNLightSetups(c_id, index); }
+// public void setNLightSetups(int n) { impl_Pass_setNLightSetups(c_id, index, n); }
+//
+ String setupCode = null, tearDownCode = null;
+ public void setSetupcode(String code) {
+ //CallGL.call(code);
+ this.setupCode = code;
+ }
+ public String getSetupcode() { return setupCode; }
+ public void setTeardowncode(String code) {
+ this.tearDownCode = code;
+ }
+ public String getTeardowncode() { return tearDownCode; }
+
+
+ public void putNormalTexGen(int ind, float[] matrix) {
+ ((TexGen)texGens.get(ind)).putNormalTexGen(matrix);
+ }
+// public void putEmbossTexGen(int ind, float[] matrix, float eps) {
+// if(ind < 0 || ind >= getNTexGens())
+// throw new ArrayIndexOutOfBoundsException();
+// impl_Pass_putEmbossTexGen(c_id, index, ind, matrix, eps);
+// }
+
+ /** Put an instruction to bind an indirect texture
+ * for this pass.
+ * The GL.IndirectTexture object is automatically
+ * added to the depends array.
+ * @param ind The index of the indirect texture bind instruction to put
+ * @param activeTexture The GL token string (without the GL_ prefix)
+ * for which texture to call glActiveTextureARB
+ * for. E.g. "TEXTURE1_ARB"
+ * @param textureTarget The GL token string (w.o. GL_) for
+ * which texture target to bind.
+ * E.g. "TEXTURE_3D"
+ * @param indirectTexture The indirect texture to bind.
+ */
+ public void putIndirectTextureBind(int ind,
+ String activeTexture, String textureTarget,
+ GL.IndirectTexture indirectTexture) {
+// if(ind < 0 || ind >= getNIndirectTextureBinds())
+// throw new ArrayIndexOutOfBoundsException(ind);
+ addDepend(indirectTexture);
+// impl_Pass_putIndirectTextureBind(c_id, index, ind,
+// activeTexture, textureTarget,
+// indirectTexture.getIndirectTextureId());
+ }
+
+ /** Add an object on whose C++ representation this paper
+ * depends. For instance, if one of the setup codes uses
+ * a texture id of a given GL.Texture object, then that
+ * object should be added here.
+ */
+ public void addDepend(Object o) {
+ Paper.this.addDepend(o);
+ }
+ }
+
+// public int getNPasses() { return impl_getNPasses(c_id); }
+// public void setNPasses(int i) { impl_setNPasses(c_id, i); }
+
+// public Pass getPass(int p) {
+// if(p < 0 || p >= getNPasses())
+// throw new ArrayIndexOutOfBoundsException();
+// return new Pass(p);
+// }
+
+ public Object clone() {
+ Paper p = new Paper();
+// impl_clone(c_id, p.c_id);
+ if(depends != null) { // Clone also the depending objects
+ p.depends = new ArrayList();
+ p.depends.addAll(depends);
+ }
+ return p;
+ }
+
+ public Paper() {
+// c_id = impl_create();
+ }
+
+ public int getId() { return c_id; }
+
+
+}
diff -rN -u libvob-old/org/nongnu/libvob/gl/impl/lwjgl/trans/linear/BoxTransform.java libvob-new/org/nongnu/libvob/gl/impl/lwjgl/trans/linear/BoxTransform.java
--- libvob-old/org/nongnu/libvob/gl/impl/lwjgl/trans/linear/BoxTransform.java 2006-03-07 02:05:24.065360927 +0200
+++ libvob-new/org/nongnu/libvob/gl/impl/lwjgl/trans/linear/BoxTransform.java 2006-03-07 01:34:37.000000000 +0200
@@ -1,3 +1,6 @@
+// (c): Matti J. Katila
+
+// bases on code of Tuomas J. Lukka
package org.nongnu.libvob.gl.impl.lwjgl.trans.linear;
import java.io.OutputStream;
diff -rN -u libvob-old/org/nongnu/libvob/gl/impl/lwjgl/trans/linear/OrthoBoxTransform.java libvob-new/org/nongnu/libvob/gl/impl/lwjgl/trans/linear/OrthoBoxTransform.java
--- libvob-old/org/nongnu/libvob/gl/impl/lwjgl/trans/linear/OrthoBoxTransform.java 2006-03-07 02:05:24.067360624 +0200
+++ libvob-new/org/nongnu/libvob/gl/impl/lwjgl/trans/linear/OrthoBoxTransform.java 2006-03-07 01:34:37.000000000 +0200
@@ -1,3 +1,6 @@
+// (c): Matti J. Katila
+
+// bases on code of Tuomas J. Lukka
package org.nongnu.libvob.gl.impl.lwjgl.trans.linear;
import java.io.OutputStream;
diff -rN -u libvob-old/org/nongnu/libvob/gl/impl/lwjgl/trans/linear/ScaleTransform.java libvob-new/org/nongnu/libvob/gl/impl/lwjgl/trans/linear/ScaleTransform.java
--- libvob-old/org/nongnu/libvob/gl/impl/lwjgl/trans/linear/ScaleTransform.java 2006-03-07 02:05:24.067360624 +0200
+++ libvob-new/org/nongnu/libvob/gl/impl/lwjgl/trans/linear/ScaleTransform.java 2006-03-07 01:34:37.000000000 +0200
@@ -1,3 +1,6 @@
+// (c): Matti J. Katila
+
+// bases on code of Tuomas J. Lukka
package org.nongnu.libvob.gl.impl.lwjgl.trans.linear;
import java.io.OutputStream;
@@ -64,8 +67,9 @@
public Vector2f getSqSize() {
Vector2f ret = parent.getSqSize();
- ret.x *= xs;
- ret.y *= ys;
+ // haha.. scale shall not affect to square at all..
+ // ret.x *= xs;
+ // ret.y *= ys;
return ret;
}
diff -rN -u libvob-old/org/nongnu/libvob/gl/impl/lwjgl/trans/linear/TranslateTransform.java libvob-new/org/nongnu/libvob/gl/impl/lwjgl/trans/linear/TranslateTransform.java
--- libvob-old/org/nongnu/libvob/gl/impl/lwjgl/trans/linear/TranslateTransform.java 2006-03-07 02:05:24.066360775 +0200
+++ libvob-new/org/nongnu/libvob/gl/impl/lwjgl/trans/linear/TranslateTransform.java 2006-03-07 01:34:37.000000000 +0200
@@ -1,3 +1,6 @@
+// (c): Matti J. Katila
+
+// bases on code of Tuomas J. Lukka
package org.nongnu.libvob.gl.impl.lwjgl.trans.linear;
import java.io.OutputStream;
More information about the Fencommits
mailing list