beginning opengl game programming 2004 phần 8 pptx
... up: glVertexPointer(3, GL_FLOAT, 8 * sizeof(GLfloat), vertexData); glColorPointer(3, GL_FLOAT, 8 * sizeof(GLfloat), &vertexData[3]); glTexCoordPointer(2, GL_FLOAT, 8 * sizeof(GLfloat), &vertexData[6]); You ... performance. Fortunately, you know more about your game data than OpenGL does, and you can use this information to make rendering more efficient. For example, your ga...
Ngày tải lên: 05/08/2014, 10:20
... glScale() function. Chapter 4 ■ Transformations and Matrices80 Figure 4.10 The glScale() function. 04 BOGL_GP CH04 3/1/04 9: 58 AM Page 80 TLFeBOOK How about a translation example? On the CD under ... match the dimensions of the window. That may be good enough for Projections 89 04 BOGL_GP CH04 3/1/04 9: 58 AM Page 89 TLFeBOOK The Render() function is very simple. After clearing the...
Ngày tải lên: 05/08/2014, 10:20
... to element mn in Figure 4. 18. Using Your Own Matrices 95 Figure 4. 18 OpenGL s column-major matrix format. 04 BOGL_GP CH04 3/1/04 9: 58 AM Page 95 TLFeBOOK Blending OpenGL allows you to blend incoming ... 0 to 1 28, with values of 1 28 representing an extremely shiny material with a Lighting in OpenGL 113 Figure 5.5 The effects of GL_SHININESS . The sphere on the left has a shinine...
Ngày tải lên: 05/08/2014, 10:20
beginning opengl game programming 2004 phần 5 ppt
... B5, G5, R5 GL_UNSIGNED_INT _8_ 8 _8_ 8 Packed into unsigned 32-bit integer. R8, G8, B8, A8 GL_UNSIGNED_INT _8_ 8 _8_ 8_REV Packed into unsigned 32-bit integer. A8, B8, G8, R8 GL_UNSIGNED_INT_10_10_10_2 Packed ... B5, G5, R5 GL_UNSIGNED_INT _8_ 8 _8_ 8 Packed into unsigned 32-bit integer. R8, G8, B8, A8 GL_UNSIGNED_INT _8_ 8 _8_ 8_REV Packed into unsigned 32-bit integer. A8, B8, G8, R8 GL_UNSI...
Ngày tải lên: 05/08/2014, 10:20
beginning opengl game programming 2004 phần 6 pps
... you MUST have a current rendering context. Chapter 8 ■ OpenGL Extensions 188 08 BOGL_GP CH 08 3/1/04 10:03 AM Page 188 TLFeBOOK Texture Parameters OpenGL provides several parameters to control how ... (GLEE_EXT_fog_coord) glFogCoordfEXT( ) Chapter 8 ■ OpenGL Extensions194 08 BOGL_GP CH 08 3/1/04 10:03 AM Page 194 TLFeBOOK Beyond the Basics Chapter 8 OpenGL Extensions...
Ngày tải lên: 05/08/2014, 10:20
beginning opengl game programming 2004 phần 7 docx
... interpolation. Chapter 9 ■ More on Texture Mapping2 18 Figure 9.6 Image interpolation using texture combiners. 09 BOGL_GP CH09 3/1/04 10:04 AM Page 2 18 TLFeBOOK 221 Up Your Performance chapter 10 I n ... learn several methods for improving your game s performance. ■ Display lists ■ Ver tex arr ays ■ Frustum culling Display Lists After you’ve been writing OpenGL code for a while, you’l...
Ngày tải lên: 05/08/2014, 10:20
beginning opengl game programming 2004 phần 9 pps
... 13 ■ The Endgame2 78 Figure 13.1 Classes and their dependencies in the game. Table 13.1 Chess Game Classes Class Description CGfxOpenGL The OpenGL rendering class. The majority of OpenGL rendering ... used OpenGL in the game. We invite you to modify the game code and make additions if you would like. Use your imagination! In this chapter we will cover: ■ Chess game technical...
Ngày tải lên: 05/08/2014, 10:20
beginning opengl game programming 2004 phần 10 pps
... 9 projection matrix stack, 82 projections, 68 69, 73, 87 –91 example of, 90–91 orthographic projections, 87 88 perspective projections, 73, 88 89 viewport, setting, 89 –90 projective texturing, ... 201–202 transposing, 96–97 matrix stacks, 74, 82 84 for projections, 87 pushing matrices onto, 83 RobotExample, 84 87 Matrox, 7 menus, 5 mesh for heightfield terrain, 1 78 181 Micr...
Ngày tải lên: 05/08/2014, 10:20