[float[] params2=new float[16];
FloatBuffer params = ByteBuffer.allocateDirect(64).order(ByteOrder.nativeOrder()).asFloatBuffer();//FloatBuffer.wrap(params2);
//ByteBuffer.allocateDirect(64).order(ByteOrder.nativeOrder()).asFloatBuffer();
//System.out.println("Getting Modelview");
gl.getFloatv(GL.MODELVIEW_MATRIX, Sys.getDirectBufferAddress(params));
for(int r=0; r<16; r++)
{
params2[r]=params.get(r);
System.out.println(params2[r]);
}
BufferedReader stdin=new BufferedReader(new InputStreamReader(System.in));
try
{
stdin.readLine();
}
catch(IOException e){ }
params.clear();
//params2=params.array();
Matrix4f modelview = new Matrix4f(params2);
modelview.transpose(modelview);
//System.out.println("Getting Projection");
gl.getFloatv(GL.PROJECTION_MATRIX, Sys.getDirectBufferAddress(params));
//params2=params.array();
for(int r=0; r<16; r++)
{
params2[r]=params.get(r);
System.out.println(params2[r]);
}
try
{
stdin.readLine();
}
catch(IOException e){ }
params.clear();
I’ll start on that as soon as I get this to work.
This is in drawGLScene. The first time, it works fine. params is filled, and I think it more or less works. After that, params2 is always set to zero. This occurs with our without the params.clear calls made. Anyone know why this would happen?
Thanks.
-Nick