Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

OpenGL ES For Iphone

I have no experience at all with OpenGL and just started playing around with iPhone development. From google, it seems that iphone uses a special type of opengl (openGL ES). What are the languages that is supported by openGL ES? I know a little bit of C++ but by now i believe my C and Objective-C is better than C++.

like image 863
denniss Avatar asked Oct 13 '22 22:10

denniss


1 Answers

Accessing the OpenGL is the same as working with any C library. If you can program with C then you'll be able to handle OpenGL. If you're familiar with adding frameworks and libraries to an Xcode project then you should be fine with OpenGL projects.

As a note: OpenGL ES is not unique to the iPhone. OpenGL ES is a reduced version of the OpenGL library for working with the smaller memory and slower processors found in mobile devices. Other phones like Android also use it.

One good thing about OpenGL ES when compared to standard OpenGL is that it really cut back on the number of API calls that the desktop version of OpenGL had. Only those calls that were considered necessary were kept. If there were duplicate ways of doing the same thing then one way was removed. This means that you have less to learn.

The bad thing about OpenGL ES when compared to standard OpenGL is that it really cut back on the number of API calls that the desktop version of OpenGL had. Again and again when researching how to do something in OpenGL you'll find a cool way to do it on a desktop but will find practically nothing for how to do it with the mobile version. Thankfully as mobile dev becomes more popular this will be less of a problem and already there are a number of OpenGL ES books (see Munshi) appearing.

Also, not all OpenGL ESes are the same. Roughly you have OpenGL ES 2.0 and what came before it and is typically called OpenGL ES 1.x. The most noticible difference between these two is the integration of the programmable pipeline (vertex and fragment shaders). If you create a basic OpenGL ES project with Xcode you find a simple example of the contortions that one needs to go through in order to handle the difference versions.

The shader code itself is a sort of C like programming language. There are some quirks but these are quickly learnt and are rather useful.

Call me weird but I enjoy playing about with Open GL and the ES variants. It's tough but the rewards are worth it as you'll get access to a powerful and useful API. Hopefully you'll be able to get through the early learning stages and really enjoy yourself with OpenGL.

like image 140
No one in particular Avatar answered Nov 03 '22 01:11

No one in particular