Unity 4.3 + Android - I need to update Texture2D or RenderTexture with at least 30 FPS at 1080 x 1920

Quick note . If you have a Unity / Android code that will play a h264 video , not a full video , at 30+ FPS on the Unity side and can share it, that would save me!

Description: I have Unity Pro 4.3. The first simple approach is to create an array Color32 [1080 * 1920] and assign elements to values ​​created using a mathematical function. The main target creates Texture2D and uses an array of colors for pixels and can update their frame to a frame with 30 + FPS. Here are my results so far:

Only the text side of Texture2D:

  • The purpose of the texture is not a problem.
  • Using Apply () is a big problem. This is necessary to actually update the texture.
  • This is done at 0.5 FPS using a 1080 x 1920 texture. Of course, too slow.

Texture2D Between Unity and Android Side:

  • I saw and tried to use Java Java OpenGL ES examples.
  • It sounded, and still sounds like the best approach, if I can find a fix.
  • I pass the "pointer / identifier" Texture2D to the Java side through the bridge.
  • Attempting to use a "pointer / identifier" to update Texture2D on the Java side using: glBindTexture(GL_TEXTURE_2D, texturePtr);
    glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, s_resolutionWidth, s_resolutionHeight, 0, GL_RGBA, GL_UNSIGNED_BYTE, buffer);
  • Using this "pointer / identifier", I can make numerous calls that say that all this should be legal on the Java side before and after GL calls.
  • , , , Apply() Unity, , , .
  • , Java , , .

RenderTexture:

  • , .
  • , , , , .
  • RenderTextures 1080 , 30 FPS.
  • , , - , , Texture2D , , ()!
  • , , .

Unity 30 FPS. , , , .

+3
1

, 30 fps, glTexImage2D(), , . , . Android , EGL Image Extension, . . Android:

http://software.intel.com/en-us/articles/using-opengl-es-to-accelerate-apps-with-legacy-2d-guis

+1

All Articles