By using the "NeHe" OpenGL tutorials and adapting them to the Mac OS X desktop platform, I was able to create a rotating cube and map a texture onto it. However, I was unable to load the texture into the program. I contacted a fellow iPhone programmer I met over the summer, and he helped me find the error in my code.
He also suggested that I switch from the desktop version of OpenGL to OpenGL ES through the iPhone, which uses most of the same OpenGL commands but simplifies the Objective C aspect of OpenGL programming. Many more relevant tutorials exist for the iPhone platform, such as http://iphonedevelopment.blogspot.com/2009/05/opengl-es-from-ground-up-table-of.html.
Since then, I learned how to apply lighting to a 3D scene:
Next, I will explore materials and textures with OpenGL ES on the iPhone.
No comments:
Post a Comment