Hi there
I hava a code like this:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
| @Override public void init(GLAutoDrawable glad) { mesh = new Mesh("C:\\Users\\Judit\\Desktop\\Szakdoga_real\\quadCube.obj"); entities = new Entity[9]; for(int i = 0; i < 9; ++i){ entities[i] = new Entity(mesh, path + (i+1) + ".jpg"); } distance = 10; u = -4.7f; v = 1f; eyeX = (float) (distance * Math.cos(u) * Math.sin(v)); eyeY = (float) (distance * Math.cos(v)); eyeZ = (float) (distance * Math.sin(u) * Math.sin(v));
glad.setGL(new DebugGL(glad.getGL())); final GL gl = glad.getGL(); MOut.outMtx(gl); ... |
and a class like this:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
| public class MOut { public static void outMtx(GL gl){ double[] pos = new double[16]; gl.glGetDoublev(GL.GL_MODELVIEW_MATRIX, pos, 15); for(int i = 0; i < 16; ++i){ System.out.print(pos[i] + ", "); if((i+1)%4 == 0){ System.out.println(); } } System.out.println(); System.out.println(); } } |
I make the GL object in init, than print it's elements out, than i get :
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 1
Intead of a 4x4 ident matrix. How could this be possible?