Are you a beginning programmer just getting started in 3D graphics programming? If you’re comfortable programming in C++ and have a basic understanding of 3D math concepts, Beginning OpenGL Game Programming, Second Edition will get you started programming 3D graphics for games using the OpenGL API. Revised to work with the latest version of OpenGL, OpenGL 3.0, this book is perfect for programmers who are new to game development or new to OpenGL. New skills and concepts are taught using step-by-step instructions, with end-of-chapter exercises for testing and reinforcement. From creating a simple OpenGL application, to applying texture mapping, and even displaying 2D fonts, you’ll find complete yet concise coverage of all the newest features of OpenGL as they apply to 3D graphics for game development. And by the end of the book, you’ll be able to apply your newfound knowledge of OpenGL to create your very own games.
The accompanying CD-ROM includes the source code for all the sample applications that accompany the book.
Where to get it
Beginning OpenGL Game Programming, 2nd Ed. is available now at the following online booksellers:
Table of Contents
- The Exploration Begins. . . Again
- Why Make Games?
- The World of 3D Games
- The Elements of a Game
- What Is OpenGL?
- OpenGL History
- OpenGL
Architecture
- Fixed-Function
vs. Programmability
- The Deprecation
Model
- Deprecated
Features in This Book
- Related
Libraries
- A Sneak Peek
- Summary
- Creating a Simple
OpenGL Application
- About the
Platform
- Introduction to
WGL
- The Rendering
Context
- Pixel Formats
- nSize
- dwFlags
- iPixelType
- cColorBits
- Setting the
Pixel Format
- An OpenGL
Application
- Full-Screen
OpenGL
- The Example
Class
- Summary
- OpenGL States and
Primitives
- State Functions
- Querying Numeric
States
- Enabling and
Disabling States
- glIsEnabled()
- Querying String
Values
- glGetStringi()
- Finding Errors
- Colors in OpenGL
- Handling
Primitives
- Immediate Mode
- Vertex Arrays
- Vertex Buffer
Objects
- Drawing Points
in 3D
- Drawing Lines in
3D
- Drawing
Triangles in 3D
- Summary
- Transformations
and Matrices
- Understanding
Coordinate Transformations
- Eye Coordinates
- Viewing
Transformations
- Modeling
Transformations
- Projection
Transformations
- Viewport
Transformations
- Fixed-Function
OpenGL and Matrices
- The Modelview
Matrix
- Translation
- Rotation
- Scaling
- Matrix Stacks
- The Robot
Example
- Projections
- Orthographic
- Perspective
- Setting the
Viewport
- Projection
Example
- Manipulating the
Viewpoint
- Using
gluLookAt()
- Using glRotate()
and glTranslate()
- Creating Your
Own Custom Routines
- Using Your Own
Matrices
- Loading Your
Matrix
- Multiplying
Matrices
- Summary
- OpenGL Extensions
- What Is an
Extension?
- Extension Naming
- Name Strings
- Functions and
Tokens
- Obtaining a
Function’s Entry Point
- Extensions on
Windows
- Finding Supported
Extensions
- WGL Extensions
- Defining Tokens
- Introduction to
Glee
- Setting Up Glee
- Using Glee
- Using GLee with
Core Extensions
- Extensions in
Action
- Summary
- Moving to a
Programmable Pipeline
- The Future of
OpenGL
- What Is GLSL?
- Vertex Shaders
- Fragment Shaders
- The GLSL Language
- Shader Structure
- Preprocessor
- Variables
- Shader Inputs
- Statements
- Constructors
- Swizzling
- Defining
Functions
- Built-in
Functions
- GLSL Deprecated
Functions
- Using Shaders
- Creating GLSL
Objects
- Querying the
Information Logs
- Sending Data to
Shaders
- The GLSLProgram
Class
- Replacing the
Fixed-Function Pipeline
- Handling Your Own
Matrices
- The Kazmath
Library
- The Robot
Example Revisited
- Summary
- Texture Mapping
- An Overview of
Texture Mapping
- Using the Texture
Map
- Texture Objects
- Creating Texture
Objects
- Deleting Texture
Objects
- Specifying
Textures
- 2D Textures
- 1D Textures
- 3D Textures
- Cube Map
Textures
- Texture Filtering
- Texture
Coordinates
- Applying Texture
Coordinates
- Texture
Parameters
- Texture Wrap
Modes
- Mipmaps
- Mipmaps and the
OpenGL Utility Library
- Loading Targa
Image Files
- The Targa File
Format
- The TargaImage
Class
- Summary
- Lighting,
Blending, and Fog
- Lighting
- Normals
- The Lighting
Model
- Materials
- Lighting in GLSL
- Blending
- Separate Blend
Functions
- Constant Blend
Color
- Fog
- Fog Example
- Summary
- More on Texture
Mapping
- Subimages
- Copying from the
Color Buffer
- Environment
Mapping
- Sphere Mapping
- Reflective Cube
Mapping
- Alpha Testing
- Multitexturing
- Texture Units
- Multitexturing
in GLSL
- Summary
- Improving Your
Performance
- Frustum Culling
- The Plane
Equation
- Defining Your
Frustum
- Testing a Point
- Testing a Sphere
- Frustum Culling
Applied
- Summary
- Displaying Text
- 2D Texture-Mapped
Fonts
- Generating the
Texture Coordinates
- The
Texture-Mapped Fonts Example
- 2D Fonts with
FreeType
- The FreeType
Library
- Initializing
FreeType and Loading a Font
- Setting the Font
Size
- Generating Glyph
Textures
- Freeing FreeType
Resources
- The FreeType
Example
- A Note on 3D
Fonts
- Summary
- OpenGL Buffers
- What Is an OpenGL
Buffer?
- Clearing Buffers
- The Scissor Test
- The Color Buffers
- Color Masking
- Setting the
Clear Color
- The Depth Buffer
- Controlling
Depth Testing
- Disabling Depth
Buffer Writes
- Potential Issues
- The Stencil
Buffer
- Summary
- The Endgame
- The MD2 Model
Format
- The MD2 Header
- Loading the
Model Data
- Animating the
MD2 Model
- Rendering the
Model
- Creating
Explosions
- Point Sprites
- Using Point
Sprites
- Ogro Invasion!
- A Note on
Collision Detection
- Summary
|