Getting Model View Matrix In Android?
how to get current model view matrix in Android?i am using OpenGL 1.1,the method GL.getFloatv() is giving zero values.please help. float[] model_matrix = new float[16]; GL11.getFlo
Solution 1:
Just a guess, since you don't show any code: you should be using GL11.GL_MODELVIEW_MATRIX, and not GL_MODELVIEW for requesting the matrix values.
Solution 2:
Not sure if this is still pending or which version you used, but as of now, the GLES11.glGetFloatv has 2 overloads and the the one using float[16] requires 3 parameters. The one with 2 params takes a FloatBuffer. This works for me:
float[] model_matrix = newfloat[16];
GLES11.glGetFloatv(GLES11.GL_MODELVIEW_MATRIX, model_matrix, 0);
Post a Comment for "Getting Model View Matrix In Android?"