views:

607

answers:

5

Till today I am working with Basic UIKIT application but now onwards I need to work in OpenGL.

Problem is I have not any idea about OpenGL and am confused lot about how to start and from where to start.

I need to create an application which is same as "iBeer" (see movie in YouTube).

So I am having lots of confusion about how do I create graphics of beer that you seen in application, so what should be preferred library?

A: 

I found this book quite useful for learning OpenGL ES 1.1 (the version the iphone supports): http://www.amazon.co.uk/Mobile-3D-Graphics-Kaufmann-Computer/dp/0123737273/ref=sr_1_3?ie=UTF8&s=books

Although I already knew the basics of OpenGl before reading it, so can't vouch for how good it is for a total beginner.

Other people seem to like the "Redbook", a free online version is available here: http://www.opengl.org/documentation/red_book/ This might be useful for learning the basic principles, but it covers standard desktop openGL, and there are differences between that and what is available on the Iphone.

There are also a couple of examples that come with the Iphone SDK, which I found very useful.

Tom
+7  A: 
Silfverstrom
+1 for NeHe reference. NeHe is where I got my start with OpenGL. Great place to start.
OhioDude
Same for me, went through all NeHe tutorials then i went on to the Red Book:)
Silfverstrom
+3  A: 

Jeff LaMarsh has a good primer on his blog. Here's the TOC:

  1. Basic Concepts. A Look at Simple
  2. Drawing Viewports in Perspective
  3. Let There Be Light.
  4. Living in a Material World
  5. Textures and Texture Mapping
Roger Nolan
+1  A: 

Learning OpenGL and/or OpenGL ES is done best by learning the prerequisite concept of Computer Graphics in general, as well as learning the mathematics involved. Specifically linear algebra, vector spaces and how matrices can be used to represent coordination systems. OpenGL is just an API which is easy to use, as long as you understand what you're doing. If you're afraid of math, don't waste your time.

For absolute beginners, I recommend the book "3D Math Primer", with errata and samples on gamemath.com and an online article named "The matrix and quaternion FAQ" available here: www.j3d.org/matrix_faq/matrfaq_latest.html

And the OpenGL ES 1.x specification for implementation used on the iPhone: http://www.khronos.org/opengles/1_X And last but not the least, the specification for OpenGL 2.1 and the first version of the OpenGL Shading Language, GLSL: http://www.opengl.org/registry/doc/glspec21.20061201.pdf http://www.opengl.org/registry/doc/GLSLangSpec.Full.1.10.59.pdf

A lot of people I've spoken to don't think the specification counts as documentation for library users, but in my opinion it does; simply because it is accurate, it has has authority and any other publications would be just citing it anyway. If you understand the mathematics required and the general concepts of Computer Graphics, reading the standard should be a breeze.

Last word: Avoid NeHe at all costs. I saw it suggested here, and it's probably okay if you want to go the try-and-fail route. NeHe's tutorials teaches how, but not why. Most of the examples are also horribly outdated.

I recommend focusing on the programmable pipline of OpenGL (shaders) instead of the fixed-function pipeline, if you want to use OpenGL on a computer. (OpenGL ES 1.x does not have shaders) Shader languages like Cg, GLSL and HLSL are here to stay. The proof for that is the latest OpenGL 3.1 standard where the only way to get things done is through shaders. Just a wise warning, as The RedBook and other "Tech yourself OpenGL in 10 days" books tend to focus on the latter.

Mads Elvheim
+1  A: 

I would suggest taking the other technologies out of the equation and learning OpenGL separately: then look at the differences in ES and introduce the iPhone specifics, etc. I would second Mads that NeHe is a bad place to start: There are some mistakes in those tutorials that have gone unaddressed (such as forgetting that OpenGL's y-coordinate is inverted relative to most UI toolkits but also forgetting that BMPs are stored upside-down relative to UI toolkits, so loading a BMP and displaying it works through coincidence rather than by intention).

The OpenGL red book suggested above is hands down one of the clearest and best written computing books I have ever read, but the free online copy is out of date so grab a modern dead-tree copy. You won't regret it. Again I agree with Mads that a good understanding of the maths is important. I think you could touch up your maths in parallel with reading the red book as it breaks you in gently and has some appendices covering some of the tricks.

Finally when trying out different things, like the impact of translations, scaling, etc., you often find yourself in a compile,tweak,compile loop. Much more effective is to have an app that lets you tweak parameters at run-time: but writing such a thing whilst learning is a bit of a steep ask. Nate Robins has some excellent demonstration programs that let you tweak parameters to opengl calls and show you the impact right there in the app. They come highly recommended by the opengl red book itself : http://www.xmission.com/~nate/opengl.html

jmtd