Cocoa Design Patterns
Learning OpenGL ES for iOS
Presentations
Buy at Amazon Now
  • Cocoa Design Patterns
    Cocoa Design Patterns
    by Erik M. Buck, Donald A. Yacktman
  • Learning OpenGL ES for iOS: A Hands-on Guide to Modern 3D Graphics Programming
    Learning OpenGL ES for iOS: A Hands-on Guide to Modern 3D Graphics Programming
    by Erik M. Buck

Errata > Use of AGLKView etc..

Hi,
In the second chapter "Making the hardware work for you", in the deep dive section there is a note where you say "The rest of the examples in this book assume GLKit is used. Therefore, AGLKView does not appear in any other examples in this book."
But, in the next chapter, the code example use AGLK...
I don't understand.
You mean, AGLKView only but not AGLK"xxx"?
September 11, 2012 | Unregistered CommenterJulien Choromanski
Many of the chapters demonstrate how Apple's GLKit works by partially reimplementing the various GLK classes. The book isn't about GLKit as much as it's about OpenGL ES. The book uses GLKit as a shining example of how to use OpenGL ES. GLKit hides/encapsulates a lot of underlying OpenGL ES, so the book makes deep dives into the implementation of GLKit features to show the relevant OpenGL ES code.

The note in Chapter 2 is intended to suggest that you use the official supported and complete GLK classes from Apple in preference to the similar AGLK classes implemented within the book. If you become curious about how the GLK classes work, you have the AGLK classes available as reference implementations of similar features.

Many chapters introduce and implement AGLK classes showing how the corresponding GLK classes may be implemented with OpenGL ES. The chapters often provide multiple examples that differ only by substituting an AGLK class for a GLK class. Such examples are intended to demonstrate the similarities between the AGLK and GLK classes. Later examples use the GLK versions even when compatible AGLK versions have been previously introduced. Again, the AGLK classes are provided as instructional aides and not necessarily intended for "real" applications. Use Apple's GLK versions instead.
September 12, 2012 | Registered CommenterErik Buck
Can we get better documentation on what is going on in 2.3 example?
June 27, 2013 | Unregistered CommenterJesse
Can you narrow your request a bit?

The text of Chapter 2 fairly thoroughly explains the seven steps needed to use OpenGL ES 2.0. Example 2.3 shows the use of the following OpenGL ES functions by wrapping them up in reusable Objective-C objects for iOS:
glGenBuffers() // Step 1 in the chapter text
glBindBuffer() // Step 2 in the chapter text
glBufferData() // Step 3 in the chapter text
glEnableVertexAttribArray() // Step 4 in the chapter text
glVertexAttribPointer() // Step 5 in the chapter text
glDrawArrays() // Step 6 in the chapter text
glDeleteBuffers() // Step 7 in the chapter text

The following functions are also used:
glGetError()
glClearColor()
glClear()
glEnable()
glDisable()
June 28, 2013 | Registered CommenterErik Buck
From p.53, top of the first non-code paragraph, "The GLKVertexAttribArrayBuffer class..." seems to be missing the prefix 'A'. Assuming that is indeed a typo, the rest of that paragraph appears to be indicating that the newly introduced class AGLKVertexAttribArraybuffer will be useful throughout the book, and (this reader surmises) might be useful in one's own code. So the question resurfaces: Which of the AGLKxxx classes are intended for real world development, and which are "Deep Dive" (for didactic purposes only)? And if there are some of these AGLKxxx classes that are universally useful in real world code, which version of them (from which of the Chapter code samples) ought to be used? That is assuming that the AGLKVertexAttribArraybuffer code changes as the book goes along... which I have not checked, being as it is that I am presently at page 53 of the text, wondering about these issues.
July 16, 2013 | Unregistered CommenterMyno
From p.53, top of the first non-code paragraph, "The GLKVertexAttribArrayBuffer class..." seems to be missing the prefix 'A'. (The name without the 'A' is not known to Apple's Developer site.) Assuming that is indeed a typo, the rest of that paragraph appears to be indicating that the newly introduced class AGLKVertexAttribArraybuffer will be useful throughout the book, and (this reader surmises) might be useful in one's own code. So the question resurfaces: Which of the AGLKxxx classes are intended for real world development, and which are "Deep Dive" (for didactic purposes only)? And if there are some of these AGLKxxx classes that are universally useful in real world code, which version of them (from which of the Chapter code samples) ought to be used? That is assuming that the AGLKVertexAttribArraybuffer code changes as the book goes along... which I have not checked, being as it is that I am presently at page 53 of the text, wondering about these issues.
July 16, 2013 | Unregistered CommenterMyno