title: orthographic projection matrix in Opengl-es 2.0
body: <pre><code>float pfIdentity[] =
  {
      -1.0f,0.0f,0.0f,0.0f,
      0.0f,1.0f,0.0f,0.0f,
      0.0f,0.0f,1.0f,0.0f,
      0.0f,0.0f,0.0f,1.0f
  };
  </code></pre>
  
  <p>==================================================================================</p>
  
  <pre><code>    const char* pszVertShader = "\
      attribute highp vec4    myVertex;\
      uniform mediump mat4    myPMVMatrix;\
      invariant gl_Position;\
      void main(void)\
      {\
          gl_Position = myPMVMatrix * myVertex;\
  }";
  </code></pre>
  
  <p>=====================================================================</p>
  
  <pre><code>for(int i = 0; i &lt; 80000; ++i)
  {
      glClear(GL_COLOR_BUFFER_BIT);
      int i32Location = glGetUniformLocation(uiProgramObject, "myPMVMatrix");
      glUniformMatrix4fv( i32Location, 1, GL_FALSE, pfIdentity);
      glEnableVertexAttribArray(VERTEX_ARRAY);
      glVertexAttribPointer(VERTEX_ARRAY, 3, GL_FLOAT, GL_FALSE, 0, 0);
      glDrawArrays(GL_TRIANGLES, 0,i);
      eglSwapBuffers(eglDisplay, eglSurface);
  }
  
  return 0;
  }
  </code></pre>
  
  <p>p.s : i am doing opengl-es in ubuntu 10.10 with kronos headers , its an emulator for opengl-es 2.0 in linux.</p>