beginning opengl game programming 2004 phần 1 potx

beginning opengl game programming 2004 phần 1 potx

beginning opengl game programming 2004 phần 1 potx

... 0.0); glColor3f (1. 0, 1. 0, 0.0); glVertex3f(-3.0, -0.5, 0.0); glColor3f(0.0, 1. 0, 1. 0); glVertex3f( -1. 5, -3.0, 0.0); A Sneak Peek 11 01 BOGL_GP CH 01 3 /1/ 04 2 :15 PM Page 11 TLFeBOOK An OpenGL Application ... initialization: glEnable(GL_DEPTH_TEST); Chapter 1 ■ The Exploration Begins . . . Again10 Figure 1. 4 A simple OpenGL example. 01 BOGL_GP CH 01 3 /1/ 04 2 :1...

Ngày tải lên: 05/08/2014, 10:20

36 309 0
beginning opengl game programming 2004 phần 2 ppsx

beginning opengl game programming 2004 phần 2 ppsx

... dots: glEnable(GL_LINE_STIPPLE); GLushort stipplePattern = 0xFAFA; // 11 11 1 010 11 11 1 010 // draws the stipple pattern as 010 1 11 11 010 1 11 11 glLineStipple(2, stipplePattern); You can determine the currently ... line width lineWidth = 0.5; // enable stippling glEnable(GL_LINE_STIPPLE); // 0xAAAA = 10 10 10 10 10 10 10 10 short stipplePattern = 0xAAAA; // set the stipple p...

Ngày tải lên: 05/08/2014, 10:20

38 375 0
beginning opengl game programming 2004 phần 3 pdf

beginning opengl game programming 2004 phần 3 pdf

... aspect ratio glFrustum( -1. 0, 1. 0, -1. 0, 1. 0, 1. 0, 10 00.0); } else { // set up an orthographic projection with the same near clip plane glOrtho( -1. 0, 1. 0, -1. 0, 1. 0, 1. 0, 10 00.0); } // select modelview ... specified by the vector (1, 1, 0), you rotate about the axis that goes from the relative origin to the point (1, 1, 0). In code, this looks like the following: glRota...

Ngày tải lên: 05/08/2014, 10:20

42 425 0
beginning opengl game programming 2004 phần 4 ppsx

beginning opengl game programming 2004 phần 4 ppsx

... OpenGL 11 9 05 BOGL_GP CH05 3 /1/ 04 10 :16 AM Page 11 9 TLFeBOOK If you want to set the ambient material color to red for the front and back of polygons, then you would do this: float red[] = { 1. 0f, ... y direction. glBegin(GL_TRIANGLES); glNormal3f(0.0, 1. 0, 0.0); glVertex3f(–3.0, 0.0, 2.0); glVertex3f(2.0, 0.0, 0.0); glVertex3f( 1. 0, 0.0, –3.0); glEnd(); Lighting in OpenGL 11...

Ngày tải lên: 05/08/2014, 10:20

39 340 0
beginning opengl game programming 2004 phần 5 ppt

beginning opengl game programming 2004 phần 5 ppt

... G8, R8 GL_UNSIGNED_INT _10 _10 _10 _2 Packed into unsigned 32-bit integer. R10, G10, B10, A2 GL_UNSIGNED_INT_2 _10 _10 _10 _REV Packed into unsigned 32-bit integer. A2, B10, G10, R10 Packed pixel formats ... G8, R8 GL_UNSIGNED_INT _10 _10 _10 _2 Packed into unsigned 32-bit integer. R10, G10, B10, A2 GL_UNSIGNED_INT_2 _10 _10 _10 _REV Packed into unsigned 32-bit integer. A2, B10, G10, R10 *Pac...

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 Stack 2 01 09 BOGL_GP CH09 3 /1/ 04 10 :04 AM Page 2 01 TLFeBOOK 18 5 OpenGL Extensions chapter 8 B ack in Chapter 1, “The Exploration Begins . . . Again,” we mentioned that the OpenGL extension ... (GLEE_VERSION _1_ 4) glFogCoordf( ) else if (GLEE_EXT_fog_coord) glFogCoordfEXT( ) Chapter 8 ■ OpenGL Extensions194 08 BOGL_GP CH08 3 /1/ 04 10 :03 AM Page 19 4 TLFeBOOK Beyon...

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

... -2.0); glMultiTexCoord2f(GL_TEXTURE0, 1. 0, 1. 0); glMultiTexCoord2f(GL_TEXTURE1, 1. 0, 1. 0); glVertex3f (1. 0, 1. 0f, -2.0); glMultiTexCoord2f(GL_TEXTURE0, 0.0, 1. 0); glMultiTexCoord2f(GL_TEXTURE1, 0.0, 1. 0); glVertex3f( -1. 0, 1. 0f, -2.0); glEnd(); } Figure ... 0.0); glMultiTexCoord2f(GL_TEXTURE1, 0.0, 0.0); glVertex3f( -1. 0, -1. 0f, -2.0); glMultiTexCoord2f(GL_TEXTURE0, 1. 0,...

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

... center of the window, as shown in Figure 11 .1. Bitmap Fonts 2 51 Figure 11 .1 Screenshot of the BitmapFont example. 11 BOGL_GP CH 11 3 /1/ 04 10 :06 AM Page 2 51 TLFeBOOK Caution The state associated ... context for the font SelectObject(g_HDC, hFont); Chapter 11 ■ Displaying Text250 11 BOGL_GP CH 11 3 /1/ 04 10 :06 AM Page 250 TLFeBOOK ■ Your OpenGL implementation may allow...

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

... zPos); glRotatef(m_angle, 1. 0, 0.0, 0.0); glRotatef(m_angle, 0.0, 1. 0, 0.0); glRotatef(m_angle, 0.0, 0.0, 1. 0); Chapter 11 ■ Displaying Text256 Figure 11 .2 Screenshot of the OutlineFont example. 11 BOGL_GP CH 11 3 /1/ 04 ... the Chapter 13 ■ The Endgame278 Figure 13 .1 Classes and their dependencies in the game. Table 13 .1 Chess Game Classes Class Description CGfxOpenGL...

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

... view. Chapter 13 ■ The Endgame282 Figure 13 .4 A screenshot of the chess game. 13 BOGL_GP CH13 3 /1/ 04 10 :17 AM Page 282 TLFeBOOK materials, 11 1 11 5 color tracking, 11 4 11 5 colors, 11 2 11 3 defining ... 5 normalization process, 11 7 11 8 normals, 11 5 11 8 calculating, 11 6 11 7 unit normals, 11 7 11 8 in vertex arrays, 230 NVIDIA, 7 Nvidia GeForce cards, 37 O 1D textures,...

Ngày tải lên: 05/08/2014, 10:20

36 403 0
w