Recommended practice environment for OpenGL ES 2.0? - iphone

I decided to learn some OpenGL ES 2.0 and I am trying to pick a practice platform for it. What comes to possible target platform, it could be Android, iPhone or WebGL. But I don't want to spend too much time and effort to get the environment setup properly.
Would you recommend WebGL for a fast start to OpenGL ES 2.0 learning or something else?
Edit: I am using Mac and I am not really interested in ES 1.x at the moment.

If you register as a developer at the iOS Developer Center (free), you can download Xcode and the iOS SDK (again, for free when you get Xcode 3), which includes a simulator capable of OpenGL ES 2.0. This of course assumes you have a Mac to run that all on.
Once you have the SDK, you can simply start up Xcode and create a new application based on the OpenGL ES Application template. This application will be a fully functional OpenGL ES 1.1 and 2.0 iOS application that you can build and run in the simulator. You can ignore all of the iOS-specific setup code and focus on the -drawFrame method in the xxxViewController.m class, which is where the OpenGL ES 2.0 drawing code lies.
This can be a pretty quick environment to set up for playing with OpenGL ES 2.0 shaders. I've also tried out the PowerVR SDK package that trenki suggests, and it is a little more involved to get something set up with that. If you're on Windows, it will be a lot more viable of a solution than the Mac-based iOS SDK I describe here.
One other shader development tool that can come in handy for prototyping on the Mac is Quartz Composer. It comes along with Xcode, and provides a visual prototyping environment for all sorts of effects, including OpenGL shaders. I demonstrate an example of doing this kind of prototyping in an article I wrote here. Desktop GLSL and the implementation in OpenGL ES differs slightly, but much is the same between the two.
While targeted at iOS, I taught a class on OpenGL ES 2.0 recently as part of a course that can be downloaded from iTunes U for free. It might helpful in getting up to speed on shaders.

I suggest you download and setup the Khronos OpenGL ES 2.0 SDKs for POWERVR SGX PC Emulation package (Unfortunately you have to register to be able to download). This allows you to get everything up and running on a desktop computer which will make your life a lot easier when it comes to debugging. You can then use C/C++ to develop your OpenGL ES 2.0 applications.
If I'm not mistaken my Android phone (Samsung Galaxy S) also uses this OpenGL implementation.
Instead of using the Khronos SDK you could also use the OpenGL ES 2.0 libraries from the Mesa3D Project (Ubuntu has them in the repository). They work fine but I can't recommend them because I already ran into a situation where the results differed from the Khronos SDK implementation and my Android device.
EDIT: You also have to create a Window and an OpenGL rendering context in order to actually use OpenGL. For that I can recommend SDL (1.3) which also has an official port for Android. I tested it on Android and Ubuntu with the mentioned SDK. It allows me to use the same code for both.

If its for game developing try using a framework, this way you don't have to do the baby steps yourself :-).
Here are some to get you started ( i prefer the android ones :-) ) :
Android
- Min3d
- Libgdx
- AndEngine
iPhone
- Cocos2d
- Sparrow
WebGL
- Tutorial
- glge

If you want to learn OpenGL ES and have a mac I suggest this book:
http://iphone-3d-programming.labs.oreilly.com/ (You can read it from the web, or buy it, I think it is worth it)
Besides the OpenGL itself it explains some of the mathematics and it shows the OpenGL ES 1.1 and 2.0 way for all examples.
(Depending of what you want to do sometimes 1.1 is much easier and suites better.. in 2.0 you always need shaders even if you only want to draw a single triangle.)

Since the Raspberry Pi supports hardware accelerated OpenGL ES 2.0, and is quite inexpensive, it would make a good platform, for testing if not actual development. It's basically a last generation smartphone, without the phone bits. If you install a Linux distro on it (e.g. Debian) you are ready to program on it out of the box. Since it's a learning platform, it's well suited for the purpose. You won't be alone, many are dipping their toes into Open GL ES on it.

Related

OpenGL ES in Eclipse with MinGW for Windows

I want to compile OpenGL ES programs in Eclipse for use in an emulator like that of PowerVR's. I have Eclipse setup with MinGW and can make a basic C++ hello-world executable, so this is a good start. I have found these OpenGL ES examples and want to be able to build them in Eclipse, so I guess the next step is getting Eclipse to build an OpenGL ES application. The examples want me to use Visual Studio, but I am not interested in using that. My main target is Desktop and Android so sticking to Eclipse would prove beneficial I'd think. I see there are many libraries like GLEW that greatly help with making OpenGL graphic applications, but these I'm guessing cannot be compiled for OpenGL ES for a mobile platform-- unless that's a bad assumption. I am coming from a background of having once used OpenGL with glut to make OpenGL applications. I guess I am confused on how to proceed in order to start programming something that is both ready for desktop and mobile platforms.
I ended up downloading the ARM MALI emulator for OpenGL ES, and after some configuration to get it to build in Eclipse, I think I am on my way now. It builds rather easily, and with the included dll files I can get it to run under Windows; so now I can begin programming for OpenGL ES and be sure it will likely work on a mobile platform that supports OpenGL ES-- I don't have an Android device, nor a mac computer so this seems ideal for now. I suppose eventually I will install GLEW and GLUT when I decide to program for the desktop and have a better understanding of what is available in OpenGL ES 2.0 that is also available for the standard OpenGL.

iOS only 3D engine/SDK for C++

I'm researching which engine/sdk I should use for 3D iOS development in C++
Although there have been questions like this, I haven't found the best solution for my requirements so I'm looking forward to hear your experiences.
Unity and UDK are not what I'm looking for, due to lack of control.
Shiva3D looks interesting but don't need the extra editor
ninevehgl no skinned models and no C++
Marmalade perfect but multi-platform not required
requirements:
licensed or open source, preferably licensed which means a more extended sdk/engine
iOS iPhone/iPad, multi platform with android not preferred.
fast loading of both rigid and skinned/rigged 3d models
C++
My current choice would be Marmalade which I have been testing for a while now but I've had some issues where results differ from device to device so that's why i prefer an iOS only option. And most games I see using Marmalade are just using it to port an existing iOS app to android and not publishing to iOS.
Perhaps you can try PowerVR Insider SDK.
It contains an app framework
It's in C++
It contains modules to load 3d models
Nice math lib with vector and matrix support
http://www.imgtec.com/powervr/insider/powervr-insider.asp
Also consider cocos3d library. It is free and robust for iPad/iPhone and utilizes OpenGLES 1.1/2.0. You can load models from Wavefront OBJ format or directly into the interface.

Anything similar to XNA for Android or IOS?

I want to start creating games for Android/IOS. I have already created 2D games using XNA and I want to publish them on other platforms even PCs but my highest priority is Mobile platforms. As I said I am familiar with XNA so I need a similar Engine for 2D. It would be great if I could write once and publish on many platforms. Please dont suggest Unity or Unreal. They are not that easy when it comes to 2D.
By similar I mean, for example, how easy to draw a sprite on the screen.
Note: I am working on Windows so no Mac suggestions please.
Regards,
You may also want to consider MonoGame ( https://github.com/mono/MonoGame/ ) as that is also an Open Source, OpenGL implementation of XNA that currently has support for iOS, Android, MacOS X, Windows and recently Linux. It is now all ES 2.0 on the mobile platforms. Our biggest change is that we now support Windows 8, and have a DirectX 11 backend thanks to SharpDX. We now also have initial PlayStation mobile support.
Actually ExEn, is a fork of MonoGame( originally called XNATouch ).
For a list of games on the AppStore or Android Market place and even NaLC, currently using MonoGame look here -
http://monogame.codeplex.com/
I hope this helps.
D.
You might want to keep up on the project called ExEn, which has already successfully ported some XNA samples and smaller games to iPhone and Android. It requires relatively little work to port and refactor to these platforms.
I suggest you check out AndEngine, its an open-source 2d open-gl based game engine that has a strong community. If you want something that you can make cross platform games with check out LibGDX It too is free, open source and based on openGl but it also allows for 3d games. It is also cross platform so a game you write for android can be compiled for, Windows, MacOS (see below), Linux. It also has a really strong community.
Regarding iOS and OSX games you really can't make them unless you buy a Mac. Apple doesn't distribute their SDK for use on any other platform but their own. That said you could maybe get something working under VMWare
Check out MOAI SDK. It's completely free and open-source. It is in beta right now but it is still pretty good. Crimson Pirates for iOS was developed with it.
Right now it supports iOS, Android, Mac, Windows, and Linux. Really good. I thought I liked Cocos2D-x, which is a C++ variant of Cocos2d-iphone supporting windows, iOS (not Mac), and Android but not truely supporting desktop kinda made me like MOAI more.
You can use C++ with MOAI or you can use Lua (they highly encourage using Lua). Being built in C++ is really great because you get access to a vast amount of libraries and you can easily bind them to Lua.
You should try games development with cocos2d.
Cocos2d is one of the best 2d engines for ios/Android I have come across.
http://www.cocos2d-iphone.org/
It is openGL based free engine.
Regards,
Sam
These might be useful to you. However, the first two aren't free, but they have editions for both iOS and Android.
iOS:
http://ios.xamarin.com/
Android:
http://android.xamarin.com/
I've never used either of them, but it's something I've been looking into a bit.
Apparently it lets you run C# and .NET code on both iOS and Android which is pretty cool considering how much easier drawing and things like that are in XNA compared to Open GL ES 2.0. Not to mention the fact that you'd be using C# instead of objective C.
There's also a free open source version sponsored by the same people who make the two I listed above. This one lets you run C# and .NET code on Windows, Linux, and Mac OS X.
http://www.mono-project.com/Main_Page
I have been researching this topic intensively over the last few weeks.
I think the best solution for you is Marmalade, formerly known as Airplay SDK. It is actually more Windows-oriented than Mac (work in Visual Studio), although you still need a Mac for the final step of getting a signed app onto the store. It sounds like a very capable pure C++ product with iOS and Android as well as a bunch of other platforms, Personal license with splash screen $150 pa, single seat Professional $500 pa for all platforms. They have a 45 day trial license which I'm currently using.
I was tempted by MonoGame, could live with the $400 price tag for each platform (for the needed MonoTouch) but it is just way too buggy. The final straw was a combination of a bug causing it to crash all the samples on iOS5 and that keyboard input is broken on iOS.
Too be fair, I'm pretty sure that is all on the MonoGame side and was very impressed with how well MonoTouch worked and was looking forward to programming in c# with LINQ et al.
Since it is not obvious from the other answers, it should be noted to those who are unaware that the ExEn project and the MonoGame projects both build on the Monotouch platform from Xamarin (formerly from Novell) - which is a prerequisite for both for iOS games.
The Xamarin projects was mentioned in another answer as an alternative to Xna, but is really not. Monotouch and Mono for Android are a way to run C# and .NET on iPhone/iPad and Android.
Game development at least on the iPhone side, is typically done using OpenGL and OpenGL is also wrapped in Monotouch. The Xna implementations in Exen and MonoGame also uses OpenGL as the foundation as far as I know.
It should also be noted that Monotouch and Mono for Android are commercial products.
BTW: Exen also compiles to other platforms e.g. silverlight.

Game development using Unity for iPhone

I have decided to use the game engine Unity to develop my game for iPhone. But I need to use some functions built into the iOS SDK.
If I choose to develop using Unity, can I still use functions from the standard iOS SDK? Like functions to access a url, etc...
When you compile a Unity project for iOS it takes your C# or JavaScript code and AOT compiles it to a native dll. It then creates an xcode project which loads that dll. You can add native objectiveC, or C/C++ functions to this project and expose them for calling from the Unity engine.
http://unity3d.com/support/documentation/Manual/Plugins.html
Unity also has built-in methods for accessing URLs.
I don't know how the Unity SDK is built, but if it's a static Objective-C library then you can access iOS SDK functions without any problems. If its a script engine where you develop your scripts outside the IDE then you may not access iOS function.
Have you checked other engines/sdk's for your game development? I know that Cocos2D is well documented and I know for sure that you can call iOS methods.
Good luck!
I used both unity3d and corona which are very good at their field, and yes you can use all standart SDK over them, sometimes you need to do tricks though (which is quite a pain). If you are developing a 3d game and familiar with NVIDIA PhysX engine go for unity, it gives you nice features. But if you are clueless about collasions/rigidbodies/ragdolls etc you would have a hard time for sure.
As for 2d application development since I don't like Objective-C I prefer corona which you code in lua (easy to learn and use). You can use most of the IOS SDK in it without any problem.
I really reccomend you starting with Unity, it is the best engine I have ever used (I have used a ton of bad engines).
Unity is the best place to start and to stay. Coding, graphics and everything is simple to manage in this engine.
Unity is specially 3d but you can also build 2d games, some examples are Zombieville and OMG Pirates (very succesfull games on the appstore).

Options for game development with MonoTouch

What options are there for game developers in regards to working with the MonoTouch framework?
Is OpenGL fully supported? Or just a subset?
Is there any additional tools, frameworks or engines that would be compatible with MonoTouch? Would these libraries also have to be written in .NET?
Do you have any other tips?
Thanks all.
OpenGL is fully supported in MonoTouch, we distribute OpenTK with support for OpenGL ES 1 and ES 2, so it has a nice binding that you can use from managed languages like C#.
As the previous poster hinted, there is XnaTouch available today, and there is some talk about bringing Cocos2D on the Monotouch-o-sphere.
An alternative to using MonoTouch with OpenGL or XnaTouch is to use another Mono-based framework that is entirely focused on gaming, the Unity3D platform. This is a professional tool for building 3D and 2D games and goes beyond what Xna does, it is an entire gaming IDE with a full game engine.
XNATouch: Free implementation of the XNA Framework for MonoTouch
unity3d: C# game library for iPhone. It's based on Mono but don't think it is related to MonoTouch.