views:

822

answers:

1

I have a UIViewController that instantiates several UIImageViews on the screen. Is it possible to instantiate an EAGLView (like the one in the OpenGL ES template in the iPhone SDK) in a similar manner in my View Controller, and possibly have the UIImageViews as well as an EAGLView all running simultaneously on the same screen?

A: 

Hi Rex, I think It would be possible. The problem is that Mixing UIKit stuff in some views, and the EAGLView Open GL ES calls, can lead to serious performance issues (and fps drops). I would recommend to make a view controller for each view that you want to add to your superView.

For example for a game with a menu, I like doing a separate OpenGL ES views for each menu item, for lazy loading them, instead of making all in one OpenGL ES enabled view, I think the code is more easy to maintain that way.

I hope I understood your question correctly :-)

Mr.Gando
I'ts inappropriate to use only a single EAGLView ?, because inside my opengl code i make sure to load and draw resources to each of the scenes, and i unload them whenever i want to draw a different view.
José Joel.
It's not inappropriate at all if you manage them correctly!, I think that is a pretty good practice, you should checkout the game "Flowers".
Mr.Gando