记录下源码理解的过程,如果100天不够,那就继续加上其他的百天哈。
intro
看看光一个 intro 页面进来就有各种可学的,鄙人那是相当的匮乏啊。
GLKit 就是让 opengl es 2.0
使用起来简单点,因为 opengl es 2.0
比 1.0 可控制的内容更多,上手更有难度,自然作用就更强大了。
OpenGL ES is a cross-platform C API for GPU-accelerated drawing, particularly useful for 3D graphics and image processing. On iOS, you link against OpenGLES.framework, providing access to the cross-platform API and to the most basic iOS-specific APIs (EAGLContext and CAEAGLLayer) for using OpenGL ES in your app.
GLKit is an Apple-specific framework that adds extra features for making development of OpenGL ES-based apps easier, as nicely summed up in the tutorial you linked to:
- GLKView/GLKViewController. These classes abstract out much of the boilerplate code it used to take to set up a basic OpenGL ES project.
- GLKEffects. These classes implement common shading behaviors used in OpenGL ES 1.0, to make transitioning to OpenGL ES 2.0 easier. They’re also a handy way to get some basic lighting and texturing working.
- GLMath. Prior to iOS 5, pretty much every game needed their own math library with common vector and matrix manipulation routines. Now with GLMath, most of the common math routines are there for you!
- GLKTextureLoader. This class makes it much easier to load images as textures to be used in OpenGL. Rather than having to write a complicated method dealing with tons of different image formats, loading a texture is now a single method call!
If you link GLKit.framework, you get OpenGLES.framework for free — likewise if you import the GLKit headers, the OpenGL ES headers come along for the ride.QuartzCore is for working directly with Core Animation layers. Before GLKit was introduced, you had to set up your own layers for getting OpenGL content onscreen — now GLKView does this on your behalf, so there’s no need for QuartzCore unless you want to do extra fun stuff with Core Animation.