Multiple OpenGL views - Printable Version
+- iDevGames Forums (http://www.idevgames.com/forums)
+-- Forum: Development Zone (/forum-3.html)
+--- Forum: iPhone, iPad & iPod Game Development (/forum-11.html)
+--- Thread: Multiple OpenGL views (/thread-1987.html)
Multiple OpenGL views - tfifriday - Dec 28, 2008 08:31 AM
Im trying to put together a little game, it has several scenes and i figured each scene could be an EAGLView extension. Then i could set the active view and have the active view run its gameloop.
Problem im seeing is when i add the second EAGLView to the UIWindow i get the following error:
failed to make complete framebuffer object
Heres what im doing:
view1 = [[EAGLView alloc] initWithFrame:rect];
view2 = [[EAGLView alloc] initWithFrame:rect];
Multiple OpenGL views - arekkusu - Dec 28, 2008 01:27 PM
If you're only showing one scene at a time, you only need one view.
Multiple views are for when you really have multiple simultaneous views. Like in a CAD application.
Multiple OpenGL views - tfifriday - Dec 28, 2008 02:51 PM
I figured this may be a smart way to set up the state machine, allow the front view to be the current state. It turning out to be more trouble than its worth.
I've rewritten it to use a normal state machine. Setting up a single full screen OpenGL view and having each game state class write the OpenGL instructions.
Thanks for your response.