Pro OpenGL ES for iOS
278 CHAPTER 8: Putting It All Together^ +(id)allocWithZone:(NSZone *)zone { @synchronized(self) { if (m_Singleton == nil) { m_Si ...
CHAPTER 8: Putting It All Together (^279) Listing 8-15a. The header for creating a label texture import <Foundation/Foundatio ...
280 CHAPTER 8: Putting It All Together^ width = i; } height = size.height; if((height != 1) && (height & (height - 1 ...
CHAPTER 8: Putting It All Together (^281) -(void)renderAtPoint:(CGPoint)point depth:(CGFloat)depth red:(float)red green:(float)g ...
282 CHAPTER 8: Putting It All Together^ Setting the fill color in line 5 ensures that the filled text characters are visible. ...
CHAPTER 8: Putting It All Together (^283) [[OpenGLUtils getObject]sphereToRectTheta:15.0[ra floatValue]/DEGREES_PER_RADIAN phi:[ ...
284 CHAPTER 8: Putting It All Together^ Figure 8-8. Our one-planet solar system Cool, eh? And of course, if you don’t see the ab ...
CHAPTER 8: Putting It All Together (^285) Why? Beats me. But the smooth lines we take for granted on desktops are absent on the ...
286 CHAPTER 8: Putting It All Together^ And surprisingly, the performance generally holds up. So, it has two things going for it ...
CHAPTER 8: Putting It All Together (^287) Figure 8-11. Distant Suns with custom date wheel on the left side yet with a standard ...
288 CHAPTER 8: Putting It All Together^ However, we did add lens flare, point and line objects, made the application support hig ...
Chapter 9 Performance ’n’ Stuff An ounce of performance is worth pounds of promises. ------M a e W e s t I'm so fast that last n ...
290 CHAPTER 9: Performance ’n’ Stuff^ (GPU). Each data transfer takes a finite amount of time, and performance could be increase ...
CHAPTER 9: Performance ’n’ Stuff (^291) if(m_UseNormals) { vboBuffer += totalXYZBytes; memcpy(vboBuffer,m_NormalData,totalNormal ...
292 CHAPTER 9: Performance ’n’ Stuff^ So, how do we use VBOs? Very easily. Take a look at the executeVBO() method in Listing 9-2 ...
CHAPTER 9: Performance ’n’ Stuff (^293) Rendering the VBOs is pretty straightforward, with only a single ‘‘huh?’’ in the process ...
294 CHAPTER 9: Performance ’n’ Stuff^ Figure 9-1. Giant computer-generated sow bug. Or 11 planet earths stacked on top of each o ...
CHAPTER 9: Performance ’n’ Stuff (^295) Figure 9-2. Performance Detective Interleaved Data Another recommended trick is to use i ...
296 CHAPTER 9: Performance ’n’ Stuff^ needed to, just to ensure the behavior is easily predictable. But for commercial, performa ...
CHAPTER 9: Performance ’n’ Stuff (^297) But don’t stop at fonts, because sprite sheets can also be applied anytime you have a fa ...
«
10
11
12
13
14
15
16
17
18
19
»
Free download pdf