0

I am looking for a way to create an updating texture from iOS to an OpenGL Context. I have seen Render contents of UIView as an OpenGL texture but this is quite slow, as it requires the whole view to be rerendered every time it changes. This means webviews in particular are hit very hard as the whole page needs blitting around. This breaks animations in web views, and makes everything very static. I was wondering if there is a technique using some other APIs in iOS that would enable a link to be created between view to texture (much like video textures do).

This seems to be a fundamental requirement of OS display composition, but it feels like it always happens under the covers and is not exposed to developers. Perhaps I am wrong!

Bonus points for anyone that can tell me if any other OSes support this feature.

Community
  • 1
  • 1
Alexp
  • 520
  • 1
  • 4
  • 15

1 Answers1

1

Take a look at RosyWriter sample project form Apple.

It uses CVOpenGLESTextureCache to improve performance of rendering camera frames as opengl textures.

stefos
  • 1,235
  • 1
  • 10
  • 18