beginning opengl game programming 2004 phần 2 ppsx

beginning opengl game programming 2004 phần 2 ppsx

beginning opengl game programming 2004 phần 2 ppsx

... Figure 2. 1 is a screenshot of the rotating lime green triangle. Chapter 2 ■ Creating a Simple OpenGL Application30 Figure 2. 1 Screenshot of the “OpenGLApplication” example. 02 BOGL_GP CH 02 3/1/04 ... variables. The g_glRender pointer is for the CGfxOpenGL Chapter 2 ■ Creating a Simple OpenGL Application20 02 BOGL_GP CH 02 3/1/04 9:57 AM Page 20 TLFeBOOK fwKeys = (int)...
Ngày tải lên : 05/08/2014, 10:20
  • 38
  • 375
  • 0
beginning opengl game programming 2004 phần 4 ppsx

beginning opengl game programming 2004 phần 4 ppsx

... BOGL_GP CH05 3/1/04 10:16 AM Page 121 TLFeBOOK // using unsigned bytes glColor3ui (25 5, 25 5, 0); // using signed bytes in an array GLbyte yellow[] = { 127 , 127 , 0}; glColor3iv(yellow); The primary ... Lighting, Blending, and Fog 120 05 BOGL_GP CH05 3/1/04 10:16 AM Page 120 TLFeBOOK To set up a positional light located at (2, 4, –3), you’d use the following: GLfloat lightPos[] = { 2....
Ngày tải lên : 05/08/2014, 10:20
  • 39
  • 340
  • 0
beginning opengl game programming 2004 phần 1 potx

beginning opengl game programming 2004 phần 1 potx

... . . . . .22 2 Filling a Display List with Commands . . . . . . . . . . . . . . . . . . . . .22 3 Executing Display Lists . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .22 3 Display ... . . .22 4 Destroying Display Lists . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .22 5 Display Lists and Textures . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .22 6 Ve...
Ngày tải lên : 05/08/2014, 10:20
  • 36
  • 309
  • 0
beginning opengl game programming 2004 phần 3 pdf

beginning opengl game programming 2004 phần 3 pdf

... factor of 2. 0 along each axis: glScalef (2. 0f, 2. 0f, 2. 0f); If you were to draw a 1 × 1 × 1 unit cube after executing the above line, then the cube would really be drawn as a 2 × 2 × 2 cube. Now, ... without scaling, then apply- ing a scaling factor of 2. 0 along each axis would place the vertex at the location (2, 2, 2) . Scaling is performed in OpenGL through the glScale(...
Ngày tải lên : 05/08/2014, 10:20
  • 42
  • 425
  • 0
beginning opengl game programming 2004 phần 5 ppt

beginning opengl game programming 2004 phần 5 ppt

... here: void CGfxOpenGL::DrawPlane() { glBegin(GL_TRIANGLE_STRIP); glTexCoord2f(1.0, 0.0); glVertex3f (2. 0, -2. 0, -2. 0); glTexCoord2f(0.0, 0.0); glVertex3f( -2. 0, -2. 0, -2. 0); glTexCoord2f(1.0, 1.0); ... glVertex3f( -2. 0, -2. 0, -2. 0); glTexCoord2f(1.0, 1.0); glVertex3f (2. 0, -2. 0, 2. 0); glTexCoord2f(0.0, 1.0); glVertex3f( -2. 0, -2. 0, 2. 0); glEnd(); } void CGfxOpenGL::Render() {...
Ngày tải lên : 05/08/2014, 10:20
  • 34
  • 468
  • 0
beginning opengl game programming 2004 phần 6 pps

beginning opengl game programming 2004 phần 6 pps

... matrix glBindTexture(GL_TEXTURE_2D, texID); // set current texture // draw textured quad glBegin(GL_QUADS); glTexCoord2f(0.0f, 0.0f); glVertex3f( -20 .0f, -20 .0f, -40.0f); glTexCoord2f(1.0f, 0.0f); glVertex3f (20 .0f, -20 .0f, ... 0.0f); glVertex3f (20 .0f, -20 .0f, -40.0f); glTexCoord2f(1.0f, 1.0f); glVertex3f (20 .0f, 20 .0f, -40.0f); glTexCoord2f(0.0f, 1.0f); glVertex3f( -20 .0f, 20 .0f...
Ngày tải lên : 05/08/2014, 10:20
  • 36
  • 373
  • 0
beginning opengl game programming 2004 phần 7 docx

beginning opengl game programming 2004 phần 7 docx

... m_numVertices is 20 02 { Chapter 10 ■ Up Your Performance 226 10 BOGL_GP CH10 3/1/04 10:05 AM Page 22 6 TLFeBOOK GL_UNSIGNED_BYTE, image.GetImage()); image.Release(); glEnable(GL_TEXTURE_2D); // set ... for a display list and GL_FALSE otherwise. Chapter 10 ■ Up Your Performance 222 10 BOGL_GP CH10 3/1/04 10:05 AM Page 22 2 TLFeBOOK GL_RGB_SCALE and GL_RGB_ALPHA are used to set floati...
Ngày tải lên : 05/08/2014, 10:20
  • 25
  • 338
  • 0
beginning opengl game programming 2004 phần 8 pptx

beginning opengl game programming 2004 phần 8 pptx

... glDisableClientState(GLenum array); Chapter 10 ■ Up Your Performance 228 10 BOGL_GP CH10 3/1/04 10:05 AM Page 22 8 TLFeBOOK 24 9 Displaying Text chapter 11 C hances are, at some point you’ll want ... PM[ 12] ; Frustum Culling 24 3 Table 10.4 Sources for Plane Equations Plane Row Left 1 Right 1 (negated) Bottom 2 Top 2 (negated) Near 3 Far 3 (negated) 10 BOGL_GP CH10 3/1/04 10:05 AM...
Ngày tải lên : 05/08/2014, 10:20
  • 25
  • 321
  • 0
beginning opengl game programming 2004 phần 9 pps

beginning opengl game programming 2004 phần 9 pps

... relevant portions of this demo. Chapter 12 ■ OpenGL Buffers2 72 Figure 12. 3 Two spheres rendered with motion blur. 12 BOGL_GP CH 12 3/1/04 10:06 AM Page 27 2 TLFeBOOK ■ glColorMask() allows you to ... value. GL_ALWAYS Always passes. 12 BOGL_GP CH 12 3/1/04 10:06 AM Page 26 6 TLFeBOOK 27 7 The Endgame chapter 13 T he endgame. This is the end, and we have a game for you. We’ve...
Ngày tải lên : 05/08/2014, 10:20
  • 26
  • 369
  • 0
beginning opengl game programming 2004 phần 10 pps

beginning opengl game programming 2004 phần 10 pps

... arrays, 22 6 24 1 advantages of, 22 7 array-based data, 22 8 color arrays, specifying, 23 0 23 1 enabling, 22 8 22 9 flags, list of, 22 9 fog coordinates, specifying, 23 1 glArrayElement() function, 23 4 glDrawArrays() ... W.COURSEP T R.COM / GAMEDE V Beginning C++ Game Programming ISBN: 1-5 920 0 -20 5-6 $29 .99 Game Art for Teens ISBN: 1-5 920 0-307-9 $29 .99 Beginning D...
Ngày tải lên : 05/08/2014, 10:20
  • 36
  • 403
  • 0

Xem thêm

Từ khóa: