Pro OpenGL ES for iOS
198 CHAPTER 6: Will It Blend?^ glColorPointer(4, GL_UNSIGNED_BYTE, 0, m_ColorData); [self multiTextureBumpMap:m_BumpMapInfo.name ...
CHAPTER 6: Will It Blend? (^199) -(void)executePlanet:(Planet *)planet { GLfloat posX, posY, posZ; static GLfloat angle=0.0; glP ...
200 CHAPTER 6: Will It Blend?^ Figure 6-18. Huh? What’s happening is that we are going where no combiner has gone before. By sti ...
Chapter 7 Well-Rendered Miscellany If we knew what it was we were doing, it would not be called research, would it? -----Albert ...
202 CHAPTER 7: Well-Rendered Miscellany^ Hedley Buffer Objects You know the drill by this time: find the exercise from Chapter 5 ...
CHAPTER 7: Well-Rendered Miscellany (^203) glTexImage2D(GL_TEXTURE_2D, 0, GL_RGB, width, height, 0, GL_RGB, GL_UNSIGNED_SHORT_5_ ...
204 CHAPTER 7: Well-Rendered Miscellany^ You should recognize the pattern here, because creating FBOs is a lot like many of the ...
CHAPTER 7: Well-Rendered Miscellany (^205) But we’re still not quite done, because we now have to rejigger drawInRect() to use b ...
206 CHAPTER 7: Well-Rendered Miscellany^ glClearColor(0.0, 0.0, 1.0, 1.0); glClear(GL_COLOR_BUFFER_BIT); glMatrixMode(GL_MODELVI ...
CHAPTER 7: Well-Rendered Miscellany (^207) Line 4 adds a small rotation for some extra dynamic goodness. glDrawArray() at li ...
208 CHAPTER 7: Well-Rendered Miscellany^ Figure 7-1. On the left, just Hedly is spinning. Both Hedly and his window are now spin ...
CHAPTER 7: Well-Rendered Miscellany (^209) static GLfloat textureCoords1[] = { 0.0, 0.0, 0.0, 1.0, 1.0, 0.0, 1.0, 1.0 }; static ...
210 CHAPTER 7: Well-Rendered Miscellany^ This differs from the previous version of drawInRect() as follows: In line 1 we need ...
CHAPTER 7: Well-Rendered Miscellany (^211) Figure 7-3. On the left is a view on the moon from Apollo 14, and an iPhone 4 image i ...
212 CHAPTER 7: Well-Rendered Miscellany^ Figure 7-4. Lens flares are caused by the inner reflections of a bright light source wi ...
CHAPTER 7: Well-Rendered Miscellany (^213) Figure 7-5. A six-blade iris (image by Dave Fischer) The following steps are needed t ...
214 CHAPTER 7: Well-Rendered Miscellany^ cy=(frame.size.height/2.0); centerRelative=CGPointMake(m_PointerLocation.x-cx,cy-m_Poin ...
CHAPTER 7: Well-Rendered Miscellany (^215) glDisable(GL_LIGHTING); glMatrixMode(GL_PROJECTION); //4 glPushMatrix(); glLoadIdenti ...
216 CHAPTER 7: Well-Rendered Miscellany^ Line 2 converts the pixel locations to relative values based on the width and height ...
CHAPTER 7: Well-Rendered Miscellany (^217) Listing 7-7. The execute loop for the entire lens flare effect -(void)execute:(CGRect ...
«
6
7
8
9
10
11
12
13
14
15
»
Free download pdf