Pro OpenGL ES for iOS
CHAPTER 4: Turning On the Lights (^117) Figure 4-15. For a specular reflection, the incoming ray is scattered but only around th ...
118 CHAPTER 4: Turning On the Lights^ Attenuation Now back to the three kinds of attenuation listed earlier: constant, linear, a ...
CHAPTER 4: Turning On the Lights (^119) When calculated, these values act individually on each of the R, G, and B components of ...
120 CHAPTER 4: Turning On the Lights^ GLfloat green[]={0.0,1.0,0.0,0.0}; GLfloat dimgreen[]={0.0,.5,0.0,0.0}; GLfloat blue[]={0. ...
CHAPTER 4: Turning On the Lights (^121) Figure 4-16. Three lights, one main and two fill. The left-hand image has a low-resoluti ...
122 CHAPTER 4: Turning On the Lights^ Continued Name Purpose glNormal (^) Assigns a single normal to an array of faces glNormalP ...
CHAPTER 4: Turning On the Lights (^123) Next, a second object, in this case, our sun, needs to be generated, sized, and placed. ...
124 CHAPTER 4: Turning On the Lights^ GLfloat dimcyan[]={0.0,.5,.5,1.0}; //Lights go here. glLightfv(SS_SUNLIGHT,GL_POSITION,sun ...
CHAPTER 4: Turning On the Lights (^125) glPushMatrix(); //4 glTranslatef(-m_Eyeposition[X_VALUE],-m_Eyeposition[Y_VALUE], //5 -m ...
126 CHAPTER 4: Turning On the Lights^ Here’s what’s going on: Line 1 creates a lighter shade of yellow. This just colors the s ...
CHAPTER 4: Turning On the Lights (^127) The emissive material attribute is switched off, here in line 15, followed by another ...
128 CHAPTER 4: Turning On the Lights^ To Planet.m add the following initialization code at the very end of the init() method: m_ ...
CHAPTER 4: Turning On the Lights (^129) And while you’re at it, let’s turn down the gray in the background. It’s supposed to be ...
130 CHAPTER 4: Turning On the Lights^ The first is called the painter’s algorithm. This means simply to draw the furthest object ...
CHAPTER 4: Turning On the Lights (^131) Figure 4-18. Using the z-buffer Summary This chapter covered the various approaches to l ...
Chapter 5 Textures The true worth of a man is not to be found in man himself but in the colours and textures that come alive in ...
134 CHAPTER 5: Textures^ The Language of Texturing Say you wanted to create an airstrip in a game you’re working on. How would y ...
CHAPTER 5: Textures (^135) Procedural textures are very powerful because they can produce an infinite variety of scalable patter ...
136 CHAPTER 5: Textures^ Figure 5-3. All of the possible settings used to produce the gold ore texture in Figure 5-2. Procedural ...
CHAPTER 5: Textures (^137) scene, but this time with wood textures, mahogany for the chalice, and alder for the cone, while the ...
«
2
3
4
5
6
7
8
9
10
11
»
Free download pdf