After finish my last project, Cupid-4-Stupid, for the Android Market, I decided to play around the iPhone/iTouch.
I have many books and tutorial at my disposal; however, most of them do not reflex the changes that Objective-C have being doing. I will be adding references as a work cities at the end of the posting
Even do most of the code seems to work, many produce warning all around; so, I have to do what I do best… improvise.
I am going to post the different steps I am taking in order to learn how to program on iOS and OpenGL using XCode and Objective-C.
Just to clarify, iOS use OpenGL ES which is a lite version of OpenGL. At the momento of writing this post there are two versions of OpenGL ES: OpenGL ES 1.0 (ES1) and OpenGL ES 2.0 (ES2).
I bought XCode version 4.0.2. It cost me around 5 dollars. Later on, I found out the negative reviews that this version had generated. I am hoping that soon Apple address all the issues that people are complaining around the web.
(I am assuming that you have this version installed in your computer)
First lets create a new application:
- Open the application by clicking here
- Select the option [Create a new Xcode project]
- Select OpenGL ES Application
- Fill the information such as product name (Example 01), company name (your.company.name), and the device family (iphone)
- A window will show up asking you where to save the project. Press [New Folder]
- Type the name of the folder (Example01) that will hold your project
- Access to the folder that you created and press the button [Create]
- Now you should see what I call the workbench, where you will be working on.
- If you press [Run]
you will see the iPhone simulator running your project
The code that makes this work is already done for you. Now you are ready to begin modifying and adding your own files.
- If for some reason you cannot find something such as the [Run] button, you can go to View menu that is on the top of your screen and select which part you wish to hide or show
Check for the next part of this tutorial. We shall start analyzing the basic files that Xcode generates for your example to work.
These examples are provided for educational purposes. Using this code is under your own responsibility and risk. The code and information is given ‘as is’. I do not take responsibilities of how they are used.
© 2011, Alejandro G. Carlstein Ramos Mejia. All rights reserved.