title: Problem with getFloatv function in GL11 (Android)
body: <p>I'm learning Open GL ES and would like to get a more intuitive interface with 3D objects than the one suggested by google in the <a href="http://developer.android.com/resources/samples/ApiDemos/src/com/example/android/apis/graphics/TouchRotateActivity.html" rel="nofollow">TouchRotateActivity sample</a>.
  In order to do that, I would like to multiply my Modelview matrix by the ModelView matrix in the previous state.</p>
  
  <p>But I encounter the following problem : getFloatv function returns 0 values in my float array, and I don't understand why (my ModelView matrix is not empty : if it was, I wouldn't get my cube on the screen).</p>
  
  <p>Could someone help me to figure out what the problem is? Here are the changes in the code .</p>
  
  <pre><code>private float[] previous;
  
  public CubeRenderer() {
      mCube = new Cube();
      previous = new float[16];
  }
  
  public void onDrawFrame(GL10 gl) {
      GL11 gl11 = (GL11) gl;
  
      gl11.glClear(GL11.GL_COLOR_BUFFER_BIT | GL11.GL_DEPTH_BUFFER_BIT);
  
      gl11.glMatrixMode(GL11.GL_MODELVIEW);
      gl11.glLoadIdentity();
      gl11.glTranslatef(0, 0, -3.0f);
      gl11.glRotatef(mAngleX, 0, 1, 0);
      gl11.glRotatef(mAngleY, 1, 0, 0);
  
      gl11.glEnableClientState(GL11.GL_VERTEX_ARRAY);
      gl11.glEnableClientState(GL11.GL_COLOR_ARRAY);
  
      /*if(!previous.equals(new float[16]))
          gl11.glMultMatrixf(previous, 0);*/
      gl11.glGetFloatv(GL11.GL_MODELVIEW_MATRIX, previous, 0);
  
      Log.d("taille matrice",Integer.toString(previous.length));
      for(int i=0; i&lt;previous.length;i++)
          Log.d(Integer.toString(i),Float.toString(previous[i]));
  
      mCube.draw(gl11);
  }
  </code></pre>
  
  <p>Thank you in advance.</p>