title: Java: OpenGL ES 2.0, view clipping
body: <p>I have a problem with an Orthographic projection, isometric camera view, where objects I draw far away from center 0, 0, 0 on a scene is clipped even if the objects is placed in the view.</p>
  
  <p>In the <strong>onSurfaceChanged</strong> method I have:</p>
  
  <pre><code>GLES20.glViewport(0, 0, width, height); 
  final float ratio = (float) width / height;
  
  final float left = -ratio;
  final float right = ratio;
  final float bottom = -1.0f;
  final float top = 1.0f;
  final float near = 1.0f;
  final float far = 10.0f;
  
  int useForOrtho = Math.min(width, height);
  mProjectionMatrix = createOrthoProjectionMatrix(left, right, top, bottom, near, far);
  Matrix.orthoM(mViewMatrix, 0,
              -useForOrtho / 2,
              useForOrtho / 2,
              -useForOrtho / 2,
              useForOrtho / 2, 0.01f, 100.0f);
  
  Matrix.rotateM(mViewMatrix, 0, 45, 0.0f, 0.0f, 1.0f);
  Matrix.rotateM(mViewMatrix, 0, 35, 1.0f, -1.0f, 0.0f);
  </code></pre>
  
  <p>Here is the function for the <strong>projection matrix</strong>:</p>
  
  <pre><code>public float[] createOrthoProjectionMatrix(float left, float right, float top, float bottom, float near, float far)
  {
  
      float[] m = new float[16];
  
      m[0] = 2.0f / (right - left);
      m[1] = 0.0f;
      m[2] = 0.0f;
      m[3] = 0.0f;
  
      m[4] = 0.0f;
      m[5] = 2.0f / (top - bottom);
      m[6] = 0.0f;
      m[7] = 0.0f;
  
      m[8] = 0.0f;
      m[9] = 0.0f;
      m[10] = -2.0f / (far - near);
      m[11] = 0.0f;
  
      m[12] = -(right + left  ) / (right - left  );
      m[13] = -(top   + bottom) / (top   - bottom);
      m[14] = -(far   + near  ) / (far   - near  );
      m[15] = 1.0f;
  
      return m;
  }
  </code></pre>
  
  <p>Where can I control how far out on x, y, z away from 0, 0, 0 that objects can be drawn without being clipped? The problem objects isn't placed "out of view", but more like out of the current rendervolume - out of distance - having triangles clipped.</p>