Load identity write it out does not work properly

Hi there
I hava a code like this:

@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 + 1 + ".jpg");
            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:

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?

Hi

You should always set the contents of the matrices by yourself instead of relying on their “default” contents.

On the other hand, you should not use JOGL 1, this version is no more maintained, please switch to JOGL 2.0.