title: OpenGL ES rendering to user-space memory
body: <p>I need to implement off-screen rendering to texture on an ARM device with PowerVR SGX hardware.</p>
  
  <p>Everything is done (pixelbuffers and OpenGL ES 2.0 API were used). The only problem unsolved is very slow  <code>glReadPixels</code> function.</p>
  
  <p>I'm not an expert in  OpenGL ES, so I'm asking community: is it possible to render textures directly into user-space memory? Or may be there is some way to get hardware address of texture's memory region? Some other technique (EGL extensions)?</p>
  
  <p>I don't need an universal solution, just working one for PowerVR hardware.</p>
  
  <p><strong>Update:</strong> A little more information on 'slow function <code>glReadPixels</code>'. Copy 512x512 RGB texture data to CPU's memory:</p>
  
  <ul>
  <li><code>glReadPixels(0, 0, WIDTH, HEIGHT, GL_RGBA, GL_UNSIGNED_BYTE, &amp;arr)</code> takes 210 ms,</li>
  <li><code>glReadPixels(0, 0, WIDTH, HEIGHT, GL_BGRA, GL_UNSIGNED_BYTE, &amp;arr)</code> takes 24 ms (<code>GL_BGRA</code> is not standard for glReadPixels, it's PoverVR extension),</li>
  <li><code>memcpy(&amp;arr, &amp;arr2, WIDTH * HEIGHT * 4)</code> takes 5 ms</li>
  </ul>
  
  <p>In case of bigger textures, differences are bigger too.</p>