Pro OpenGL ES for iOS
238 CHAPTER 7: Well-Rendered Miscellany^ for ( int i=0;i<16;i++ ) { iShadowMat[i] = shadowMat_local[i]; } } This is actually ...
CHAPTER 7: Well-Rendered Miscellany (^239) // glLineWidth(3.0); //8 // glDrawElements( GL_LINES, 6 3, GL_UNSIGNED_BYTE, m_Tfan1 ...
240 CHAPTER 7: Well-Rendered Miscellany^ #import <OpenGLES/ES1/gl.h> #import <OpenGLES/ES1/glext.h> #import <Open ...
CHAPTER 7: Well-Rendered Miscellany (^241) -(void)viewWillAppear:(BOOL)animated; -(void)viewWillDisappear:(BOOL)animated; @end A ...
242 CHAPTER 7: Well-Rendered Miscellany^ Figure 7-14. Showing the shadow in wireframe mode. The cube has been removed in the rig ...
CHAPTER 7: Well-Rendered Miscellany (^243) In all of these images, the background is black. Change the coloring of the backgroun ...
244 CHAPTER 7: Well-Rendered Miscellany^ Summary In this chapter, we covered a number of extra tricks to add more realism to an ...
Chapter 8 Putting It All Together A single lifetime, even though entirely devoted to the sky, would not be enough for the invest ...
246 CHAPTER 8: Putting It All Together^ Using the ‘‘drawable’’ fields is recommended by Apple, although the more traditional way ...
CHAPTER 8: Putting It All Together (^247) The scale of our model is set at 1 unit=1 million miles (1.7m kilometers or 8.3m furlo ...
248 CHAPTER 8: Putting It All Together^ What Are These Quaternion Things Anyway? On October 16, 1843, in Dublin, Irish mathemati ...
CHAPTER 8: Putting It All Together (^249) jump to 20.1°, you merely add a teeny-tiny more of that arc to your current quaternion ...
250 CHAPTER 8: Putting It All Together^ gestures are also handled. However, they did leave out momentum swipes, the kind of acti ...
CHAPTER 8: Putting It All Together (^251) (IBAction)handlePinchGesture:(UIGestureRecognizer )sender { static float startFOV=0.0 ...
252 CHAPTER 8: Putting It All Together^ -(void)setFieldOfView:(float)fov { m_FieldOfView=fov; [self setClipping]; } Then move se ...
CHAPTER 8: Putting It All Together (^253) Figure 8-3. Zooming in and out using pinch gestures Now we’re going to do the rotation ...
254 CHAPTER 8: Putting It All Together^ gluLookAt(m_Eyeposition.x,m_Eyeposition.y,m_Eyeposition.z, targetLocation.x,targetLocati ...
CHAPTER 8: Putting It All Together (^255) GLKVector3 temp = GLKVector3Subtract(to,from); //3 GLKVector3 n=GLKVector3Normalize(te ...
256 CHAPTER 8: Putting It All Together^ Now you can make some tweaks to Planet.mm. Since we’re using the new vector/point object ...
CHAPTER 8: Putting It All Together (^257) orientation=gluGetOrientation(); //1 vpLoc=[m_SolarSystem getEyeposition]; //2 objectL ...
«
8
9
10
11
12
13
14
15
16
17
»
Free download pdf