Mathematics for 3D Game Programming and Computer Graphics
The OpenGL
Extensions Guide
Hardcover, 670 pages

OpenGL is the premier environment for developing 2D and 3D graphics and game applications. The interface has been the choice of game programmers, mainly because of its cross-platform operability, but also because it is constantly evolving to keep pace with hardware advances in the form of extensions. Until now, the game industry was lacking one single, concise reference to help make sense of the dozens of extensions available. The OpenGL Extensions Guide provides this much needed resource and concentrates specifically on 78 of the extensions most important to developing modern 3D games. The book is laid out in an intuitive fashion, discussing groups of extensions that modify or augment similar components of the base OpenGL architecture. In addition, the text focuses mainly on operational and implementation issues, discussing the underlying mathematics of an extension only when it is critical to understanding that extension's functionality.

“Lengyel does an excellent job providing a broader view of the reason and usage of an extension by presenting the functional information in a clear and concise manner.”
—Game Developer Magazine

Charles River Media Published by Charles River Media,
publisher of the Game Programming
Gems
series.
Amazon

Buy at Amazon.com

Contents

Preface

Chapter 1: About OpenGL Extensions

Chapter 2: Blending
2.1 GL_EXT_blend_color
2.2 GL_EXT_blend_minmax
2.3 GL_EXT_blend_subtract
2.4 GL_EXT_blend_func_separate
2.5 GL_NV_blend_square

Chapter 3: Texture Environment
3.1 GL_ARB_multitexture
3.2 GL_ARB_texture_env_add
3.3 GL_ARB_texture_env_combine
3.4 GL_ARB_texture_env_crossbar
3.5 GL_ARB_texture_env_dot3
3.6 GL_NV_texture_env_combine4
3.7 GL_EXT_texture_lod_bias

Chapter 4: Texture Mapping
4.1 GL_ARB_texture_cube_map
4.2 GL_EXT_texture3D
4.3 GL_NV_texture_rectangle
4.4 GL_EXT_texture_edge_clamp
4.5 GL_ARB_texture_border_clamp
4.6 GL_ARB_texture_mirrored_repeat
4.7 GL_ATI_texture_mirror_once
4.8 GL_EXT_texture_filter_anisotropic
4.9 GL_SGIS_texture_lod
4.10 GL_SGIS_generate_mipmap
4.11 GL_NV_texture_expand_normal

Chapter 5: Texture Compression
5.1 GL_ARB_texture_compression
5.2 GL_EXT_texture_compression_s3tc
5.3 GL_NV_texture_compression_vtc

Chapter 6: Fragment Shading
6.1 GL_NV_register_combiners
6.2 GL_NV_register_combiners2
6.3 GL_NV_texture_shader
6.4 GL_NV_texture_shader2
6.5 GL_NV_texture_shader3
6.6 GL_ATI_fragment_shader

Chapter 7: Vertex Blending
7.1 GL_EXT_vertex_weighting
7.2 GL_ARB_vertex_blend
7.3 GL_ATI_vertex_streams

Chapter 8: Array Management
8.1 GL_EXT_draw_range_elements
8.2 GL_EXT_multi_draw_arrays
8.3 GL_ATI_element_array
8.4 GL_APPLE_element_array
8.5 GL_EXT_compiled_vertex_array
8.6 GL_NV_vertex_array_range
8.7 GL_NV_vertex_array_range2
8.8 GL_APPLE_vertex_array_range

Chapter 9: Synchronization
9.1 GL_NV_fence
9.2 GL_APPLE_fence

Chapter 10: Lighting
10.1 GL_EXT_separate_specular_color
10.2 GL_EXT_secondary_color
10.3 GL_EXT_rescale_normal
10.4 GL_NV_light_max_exponent

Chapter 11: Fog
11.1 GL_EXT_fog_coord
11.2 GL_NV_fog_distance

Chapter 12: Stencil Operations
12.1 GL_EXT_stencil_wrap
12.2 GL_NV_stencil_two_side
12.3 GL_ATI_separate_stencil

Chapter 13: Shadow Mapping
13.1 GL_ARB_depth_texture
13.2 GL_ARB_shadow
13.3 GL_ARB_shadow_ambient
13.4 GL_EXT_shadow_funcs

Chapter 14: Occlusion Culling
14.1 GL_HP_occlusion_test
14.2 GL_NV_occlusion_query

Chapter 15: Point Rendering
15.1 GL_ARB_point_parameters
15.2 GL_NV_point_sprite

Chapter 16: Pixel Formats
16.1 GL_EXT_bgra
16.2 GL_EXT_abgr
16.3 GL_EXT_packed_pixels
16.4 GL_APPLE_packed_pixels
16.5 GL_NV_packed_depth_stencil

Chapter 17: Miscellaneous
17.1 GL_ARB_transpose_matrix
17.2 GL_NV_depth_clamp
17.3 GL_NV_depth_bounds_test
17.4 GL_NV_primitive_restart
17.5 GL_NV_half_float

Chapter 18: Vertex Programs
18.1 GL_ARB_vertex_program
18.2 GL_NV_vertex_program
18.3 GL_NV_vertex_program1_1
18.4 GL_NV_vertex_program2

Chapter 19: Fragment Programs
19.1 GL_ARB_fragment_program
19.2 GL_NV_fragment_program

Appendix A: Program Syntax Specifications
A.1 GL_ARB_vertex_program
A.2 GL_NV_vertex_program
A.3 GL_NV_vertex_program1_1
A.4 GL_NV_vertex_program2
A.5 GL_ARB_fragment_program
A.6 GL_NV_fragment_program

Appendix B: Extension Index

Appendix C: Function Index

Index

Errata

  • Page 37. In Table 3.6.1, the result for the GL_ADD_SIGNED_ARB entry should read a0a1 + a2a3 − 1/2.
  • Page 329. In Figure 15.2.1, the center point should be labeled (xw, yw).
  • Page 379. In Table 18.1.1, the component usage for the vertex.attrib[n] entry should read <x, y, z, w>.
  • Page 355. In Figure 17.3.1, the distance to the far end of the depth bounds range should be Lzr.
  • Page 382. The array declaration at the bottom of the page should include braces so that it reads as follows.
    PARAM coef[4] = {program.env[0..3]};
  • Page 388. The last array declaration on the page should include braces so that it reads as follows.
    PARAM mv23[] = {state.matrix.modelview.row[1..2]};
  • Page 391. The array declaration in the middle of the page should include braces so that it reads as follows.
    PARAM array[] = {program.env[0..15]};
  • Page 509. The array declaration in the middle of the page should include braces so that it reads as follows.
    PARAM coef[4] = {program.env[0..3]};
  • Page 514. The array declaration in the middle of the page should include braces so that it reads as follows.
    PARAM proj[] = {state.matrix.projection};