beginning opengl game programming 2004 phần 10 pps
... Direct Media Layer), 10 SetupPixelFormat() function, 22–23 SetupProjection() function, 27 shaders, 9 shading, 102 104 example, 104 flat shading, 102 104 smooth shading, 102 , 103 shininess of materials, ... W.COURSEP T R.COM / GAMEDE V Beginning C++ Game Programming ISBN: 1-59200-205-6 $29.99 Game Art for Teens ISBN: 1-59200-307-9 $29.99 Beginning DirectX 9 ISBN: 1-59200-...
Ngày tải lên: 05/08/2014, 10:20
... line width lineWidth = 0.5; // enable stippling glEnable(GL_LINE_STIPPLE); // 0xAAAA = 101 0 101 0 101 0 101 0 short stipplePattern = 0xAAAA; // set the stipple pattern glLineStipple(2, stipplePattern); // ... dots: glEnable(GL_LINE_STIPPLE); GLushort stipplePattern = 0xFAFA; // 1111 101 0 1111 101 0 // draws the stipple pattern as 0101 1111 0101 1111 glLineStipple(2, stipplePattern); Y...
Ngày tải lên: 05/08/2014, 10:20
... to (0.0, 0.0, -10. 0), moving the // world 10 units along the negative z-axis, which effectively moves the // camera to the position (0.0, 0.0, 10. 0). glTranslatef(0.0f, 0.0f, -10. 0f); // draw ... Blending, and Fog108 05 BOGL_GP CH05 3/1/04 10: 16 AM Page 108 TLFeBOOK Fog Coordinates Extension Extension name: EXT_fog_coord Name string: GL_EXT_fog_coord Promoted to core: OpenGL 1.4...
Ngày tải lên: 05/08/2014, 10:20
beginning opengl game programming 2004 phần 6 pps
... headers and libraries for OpenGL available on Windows platforms are for OpenGL 1.1. That’s right, the latest OpenGL headers and libraries for Windows are four versions and almost 10 years out of date. Fortunately, ... default, the range is [ 100 0.0, 100 0.0], which essentially guar- antees that the level of detail will never be clamped. The following code sets the level of detail ra...
Ngày tải lên: 05/08/2014, 10:20
beginning opengl game programming 2004 phần 9 pps
... 3/1/04 10: 06 AM Page 266 TLFeBOOK 277 The Endgame chapter 13 T he endgame. This is the end, and we have a game for you. We’ve covered quite a bit of OpenGL in this book, and now it’s time to put OpenGL ... 13 ■ The Endgame278 Figure 13.1 Classes and their dependencies in the game. Table 13.1 Chess Game Classes Class Description CGfxOpenGL The OpenGL rendering class. The majorit...
Ngày tải lên: 05/08/2014, 10:20
beginning opengl game programming 2004 phần 1 potx
... finished writing OpenGL Game Programming. Although the book didn’t cover everything we had initially planned, we hoped that it would bene- fit people learning to program games with OpenGL. The ensuing ... Learned ■ 3D gaming is a rapidly growing and excited field. ■ OpenGL is a graphics library that is used in many games. ■ OpenGL has been around for over 10 years. Its development...
Ngày tải lên: 05/08/2014, 10:20
beginning opengl game programming 2004 phần 3 pdf
... 0.0) gluLookAt(0.0f, 0.0f, 10. 0f, 0.0f, 0.0f, -100 .0f, 0.0f, 1.0f, 0.0f); // draw a triangle at the origin glBegin(GL_TRIANGLE); glVertexf (10. 0f, 0.0f, 0.0f); glVertexf(0.0f, 10. 0f, 0.0f); glVertexf( -10. 0f, 0.0f, ... at the position (0,0 ,10) and looking down the // negative z axis (0.0, 0.0, -100 .0). // (eyex, eyey, eyez) = (0.0, 0.0, 10. 0) // (centerx, centery, centerz) = (0.0,...
Ngày tải lên: 05/08/2014, 10:20
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
beginning opengl game programming 2004 phần 7 docx
... 9 ■ More on Texture Mapping 210 09 BOGL_GP CH09 3/1/04 10: 04 AM Page 210 TLFeBOOK So, what if you want to call several display lists at once? Well, conveniently, OpenGL pro- vides direct support ... GL_TRUE if listName is a valid name for a display list and GL_FALSE otherwise. Chapter 10 ■ Up Your Performance222 10 BOGL_GP CH10 3/1/04 10: 05 AM Page 222 TLFeBOOK GL_RGB_SCALE an...
Ngày tải lên: 05/08/2014, 10:20
beginning opengl game programming 2004 phần 8 pptx
... letting OpenGL do it for you, so either way, you pass the object to OpenGL and move on to the next one. Chapter 10 ■ Up Your Performance242 Figure 10. 4 The Marbles demo. 10 BOGL_GP CH10 3/1/04 10: 05 ... type you will be using. Then you tell OpenGL to use each array with corresponding calls to gl*Pointer() . Chapter 10 ■ Up Your Performance234 10 BOGL_GP CH10 3/1/04 10: 05...
Ngày tải lên: 05/08/2014, 10:20