Computer Graphics Programming in OpenGL with C++, 2/e (Hardcover)

Gordon, V. Scott, Clevenger, John L.


This new edition provides step-by-step instruction on modern 3D graphics shader programming in OpenGL with C++, along with its theoretical foundations. It is appropriate both for computer science graphics courses and for professionals interested in mastering 3D graphics skills. It has been designed in a 4-color, "teach-yourself" format with numerous examples that the reader can run just as presented. Every shader stage is explored, from the basics of modeling, textures, lighting, shadows, etc., through advanced techniques such as tessellation, normal mapping, noise maps, as well as new chapters on simulating water, stereoscopy, and ray tracing.


  • Covers modern OpenGL 4.0+ shader programming in C++, with instructions for both PC/Windows and Macintosh
  • Adds new chapters on simulating water, stereoscopy, and ray tracing
  • Includes companion files with code, object models, figures, and more (also available for downloading by writing to the publisher)
  • Illustrates every technique with running code examples. Everything needed to install the libraries, and complete source code for each example
  • Includes step-by-step instruction for using each GLSL programmable pipeline stage (vertex, tessellation, geometry, and fragment)
  • Explores practical examples for modeling, lighting, and shadows (including soft shadows), terrain, water, and 3D materials such as wood and marble
  • Explains how to optimize code for tools such as Nvidia's Nsight debugger.



- 使用C++介紹了現代OpenGL 4.0+的着色器編程,並提供了PC/Windows和Macintosh的指令。
- 新增了關於模擬水、立體視覺和光線追蹤的新章節。
- 附帶代碼、物體模型、圖片等相關文件(也可通過向出版商寫信下載)。
- 通過運行代碼示例來演示每一種技術。提供了安裝庫所需的一切,以及每個示例的完整源代碼。
- 提供了使用每個GLSL可編程管道階段(頂點、曲面細分、幾何和片段)的逐步指導。
- 探討了建模、照明和陰影(包括軟陰影)、地形、水以及木材和大理石等3D材料的實用示例。
- 解釋了如何優化代碼以適應Nvidia的Nsight調試器等工具。