title: How to get GL_VIEWPORT dimensions in Android GL10?
body: <p>I'd like to accomplish the following in Android using API Level 7:</p>
  
  <pre><code>glGet(GL_VIEWPORT, someBuffer)
  </code></pre>
  
  <p><a href="http://www.khronos.org/opengles/sdk/1.1/docs/man/glGet.xml" rel="nofollow">Documentation for OpenGL ES 1.1</a> shows this as part of the C API.</p>
  
  <p>I've tried using the following code:</p>
  
  <pre><code>    int[] results = new int[4];
      gl.glGetIntegerv(GL10.GL_MAX_VIEWPORT_DIMS, results, 0);
      for (int i = 0; i &lt; results.length; i++) {
          Log.e(TAG, "results[" + i + "]: " + results[i]);
      }
  </code></pre>
  
  <p>I get output in various phases of the surface like so:</p>
  
  <pre><code>onSurfaceCreated called
      results[0]: 4096
      results[1]: 4096
      results[2]: 0
      results[3]: 0
  onSurfaceChanged called with height: 800 and width: 480
    //NOTE: gl.glViewport(0, 0, width, height); is called here
      results[0]: 4096
      results[1]: 4096
      results[2]: 0
      results[3]: 0
  onDrawFrame called
      results[0]: 4096
      results[1]: 4096
      results[2]: 0
      results[3]: 0
  </code></pre>
  
  <p>How would one do this using Android's kronos GLES?</p>