Is Dealing with Opengl ES 2 worth the trouble? - Printable Version
+- iDevGames Forums (http://www.idevgames.com/forums)
+-- Forum: Development Zone (/forum-3.html)
+--- Forum: Graphics & Audio Programming (/forum-9.html)
+--- Thread: Is Dealing with Opengl ES 2 worth the trouble? (/thread-9285.html)
Is Dealing with Opengl ES 2 worth the trouble? - Mattonaise - Aug 19, 2011 09:15 PM
I'm just starting iphone game development, and I was wondering if dealing with the added complexity of Opengl ES 2 is worth it if you arent planning on using any of the new features? The game wont be very graphics intense so any added performance by OpenGL ES 2 may not be neccessary, and it's not going to be using any fancy shaders. There is a nice tutorial on 71squared.com that walks you through the proccess of taking the OpenGl ES template from Xcode 4 and converting it from using version 2 back into version 1. I'm planning to follow this tutorial as I dont think version 2 is neccessary, and I have a tutorial book that uses version 1 that I also may use as neccessary. I was just wondering if there are any other reasons to consider using the newer version 2 of OpenGl ES even when the added features aren't neccessary? (As an added bonus, is a viewcontroller needed for an openGL project? As far as im concerned it may only add more complexity, as i wanted my project to stay away from the UI stuff as much as possible for concistencies sake, even not using a MainWindow nib file. But does a viewController add any needed feature support, such as help with device orientation, memory management, or different devices [iphone vs. ipad]?) And if you've reached this point, thx for staying with me
RE: Is Dealing with Opengl ES 2 worth the trouble? - ThemsAllTook - Aug 20, 2011 07:58 AM
Shaders give you a lot more control over what you're rendering, and the potential for better performance than ES1's fixed function pipeline. Learning GLSL and ES2's patterns will make you a better OpenGL programmer in general. That said, as far as I know, ES1 is still a perfectly viable choice if you don't need the fancy stuff.
RE: Is Dealing with Opengl ES 2 worth the trouble? - Mattonaise - Aug 20, 2011 10:23 AM
Alright thanks for the reply. I'll stick with version 1 for my first project, as I'm new to development and it's simpler to use. But I will definetly try out version 2 later to keep up with progression.
RE: Is Dealing with Opengl ES 2 worth the trouble? - Mattonaise - Aug 20, 2011 08:48 PM
But does anyone have some input for my second question?
RE: Is Dealing with Opengl ES 2 worth the trouble? - dazza - Aug 21, 2011 08:20 AM
Quote:is a viewcontroller needed for an openGL project?
strictly speaking I don't think so, I got away without one for months.... but now I'm reaching the end of the project I wanted to add a 'mail a link to this game to your friends button' and I found that in order to use an MFMailComposeViewController I need to set a view controller as a delegate so I plopped on in to the code for that sole reason.
RE: Is Dealing with Opengl ES 2 worth the trouble? - Mattonaise - Aug 21, 2011 03:24 PM
Oh ok, thats true, modal viewcontrollers do need a delegate to another view controller to be presented or dismissed. Thanks for that reason, that may needed, but I suppose it isnt too hard to squeeze a viewcontroller in if you dont have one.
RE: Is Dealing with Opengl ES 2 worth the trouble? - ipeku - Aug 23, 2011 07:26 PM
a view controller is a good place to setup the timer, have the main loop and do odd stuff like changing chapters, restarting the game, handle touch, accelerator input and saving and restoring game state, etc.
RE: Is Dealing with Opengl ES 2 worth the trouble? - Mattonaise - Aug 23, 2011 08:38 PM
Thats true, I just thought you could still do that suff in the EAGLView. I' not entirely good on the relationship of viewcontrollers vs views, so I was asking if viewcontrollers have any specific advantages over view that may add specific features(such as device orientation and memory management). One good one is that modal viewcontrollers need a viewcontroller delegate to function. viewcontrollers can help with device orientation, but you can still do that in the EAGLView by modifying the projection matrix (i think thats the right matrix ).
RE: Is Dealing with Opengl ES 2 worth the trouble? - ipeku - Aug 23, 2011 08:50 PM
One thing that's useful for handling the device orientation with the controller is that you can make it the whole view (EAGLView + HUD if you're using UI components for it) orientate automatically to how the user is holding the device.
RE: Is Dealing with Opengl ES 2 worth the trouble? - Mattonaise - Aug 23, 2011 08:56 PM
Yes, but im not planning on using UIKit elements over a EAGLView because that can slow performance quite a lot. I'm also trying to keep my game away from UIKit things as much as possible as i want to stick to c++ as much as possible to not overwhelm myself with Objective-C complications .