Multiple OpenGL views
Hi,
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];
[window addSubview:view1];
[window addSubview:view2];
Any thoughts?
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];
[window addSubview:view1];
[window addSubview:view2];
Any thoughts?
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 views are for when you really have multiple simultaneous views. Like in a CAD application.
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.
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.
Possibly Related Threads...
| Thread: | Author | Replies: | Views: | Last Post | |
| Multiple XIB or Views | Jerm #1 | 1 | 3,157 |
Feb 2, 2010 02:10 AM Last Post: Newbrof |
|
| Messaging between separate views | Toontingy | 0 | 1,790 |
Jan 9, 2010 05:10 PM Last Post: Toontingy |
|
| OpenGL ES 2d game - multiple EAGL Views or not? | Elphaba | 4 | 4,302 |
Aug 4, 2009 10:42 AM Last Post: maximile |
|
| views and OpenGL | jeffro | 0 | 1,774 |
Jan 20, 2009 11:18 PM Last Post: jeffro |
|
| Maintain variables across multiple Views | masumbuet | 1 | 1,989 |
Dec 17, 2008 06:42 AM Last Post: pierre |
|

