Déjà client ? Identifiez-vous

Mot de passe oublié ?

Nouveau client ?

CRÉER VOTRE COMPTE
Opengl game programming
Ajouter à une liste

Librairie Eyrolles - Paris 5e
Indisponible

Opengl game programming

Opengl game programming

Kevin Hawkins, Dave Astle, André LaMothe

816 pages, parution le 15/05/2001

Résumé

OpenGL is an application programming interface (API) that exposes hardware features needed to create computer graphics. Unlike Microsoft's Direct3D, which only works on Windows, OpenGL works across all platforms. OpenGL Game Programming is a complete guide to game development using the OpenGL graphics API. Myriad examples are included to demonstrate various concepts such as coloring, texture mapping, blending, lighting, coordinate transforms, 3D modeling, collision detection, and several other key concepts involved in game development. It also covers how to integrate the non-graphical elements of Microsoft's DirectX into OpenGL games so that users can incorporate sound, music, and networking functions. Teaching users how to use OpenGL to create dynamic 3D environments and effects for use in game development, this book covers all the fundamentals so that users can program OpenGL API to its fullest potential. Anyone interested in game development will find the information in this book invaluable as they begin to create dynamic game graphics. Series editor André LaMothe has published numerous magazine articles and is an international best-selling author with over six game programming and 3D graphics titles to his credit. He has been active in the computing industry for more than twenty years, during which he created one of the world's first commercially available virtual reality games, CyberGate. André is also the founder and CEO of Xtreme Games LLC.

Table of Contents

Letter from the Series Editor
Foreword
Introduction

Part I: Introduction to OpenGl and DirectX

Chapter 1: The Eploration Begins: OpenGl and DirectX
Why Make Games?
The World of 3D Games
The Elements of a Game
Your Tools
What is OpenGL

OpenGl History
OpenGL Architecture
The OpenGL Utility Library
What is GLUT
A Sneak Peek
What is DirectX
DirectX History
DirectX Architecture
DirectX Graphics
DirectX Audio
DirectInput
DirectPlay
DirectShow
DirectSetup
OpenGL versus DirectX
Summary

Chapter 2: Using Windows with OpenGL
Introduction to Windows Programming

The Basic Windows Application
Getting Started with WinMain()
The Windows procedure
Handling Messages
Window Classes
Setting the Windows Class Atrributes
Loading Icons and Mouse Pointers
Registering the Class
Window Creation
The Message Loop
A Complete Windows Application
Introduction to WGL
The Rendering Context
Using WGL
wglCreateContext()
wglDeleteContext()
wglMakeCurrent()
Pixel Formats
nSize
dwFlags
iPixelType
cColorBits
The OpenGL Window Application
Full-Screen OpenGL
Summary

Chapter 3: An Overview of 3D Graphics Theory
Scalars, Points, and Vectors

Vector Magnitude
Vector Normalization
Vector Addition
Vector-Scalar Multiplication
The Dot Product
The Cross Product
Matrices
The Identity Matrix
The Zero Matrix
Matrix Addition and Subtraction
Matrix Multiplication
Putting It Together
Transformations
Translation
Rotation
Scaling
Projections
Parallel Projection
Perspective Projection
3D Clipping
Lighting
Ambient Light
Diffuse Light
Specular Light
Texture Mapping
Summary

Part II: Using OpenGL

Chapter 4: OpenGl States and Primitives
State Functions
Handling Primitives

Drawing Points in 3D
Modifying Point Size
Antialiasing Points
Drawing Lines in 3D
Modifying Line Width
Antialiasing Lines Width
Specifying a Stipple Pattern
Drawing Polygons in 3D
Polygon Face Culling
Hiding Polygon Edges
Antialiasing Polygons
Specifying a Stipple Pattern
Triangles
Quadrilaterals
Polygons
Using Primitives
Summary

Chapter 5: Coordinate Transformations and OpenGL Matrices
Understanding Coordinate Transfermations

The Camera and Eye Coordinates
Viewing Transformations
Using the gluLookAt() Function
Using the glRotate*() and glTranslate*O Functions
CreatingYour Own Custom Routines
Modeling Transformations
Projection Transformations
The Viewport Transformation
OpenGL and Matrices
The Modelview Matrix
Translation
Rotation
Scaling
Matrix Stacks
The Robot Example
Projections
Orthographic
Perspective
Setting the Viewport
Projection Example
UsingYour Own Matrices
LoadingYour Matrix
Multiplying Matrices
Custom Matrix Example
Summary

Chapter 6: Adding Colors, Blending, and Lighting
How Does ColorWork!
Using Colors in OpenGL

Color Depth
The Color Cube
RGBA Mode in OpenGL
Color-lndex Mode in OpenGL
Shading
Lighting in OpenGL
OpenGL Lighting and the Real World
Materials
Normals
Calculating Normals
Using Normals
The Unit Normal
Using OpenGL Lighting
Creating Light Sources
Positioning Light Sources
Attenuation
Spotlights
Defining Materials
Lighting Models
Specular Lighting Effects
Moving and Rotating Lights
Blending
Transparency
Summary

Chapter 7: Bitmaps and Images with OpenGL
The OpenGL Bitmap

Positioning the Bitmap
Drawing the Bitmap
An OpenGL Bitmap Example
Using Images
Drawing Image Data
Reading from the Screen
Copying Screen Data
Magnification, Reduction, and Flipping
Managing Pixel Storage
The Windows Bitmap
The BMP File Format
Loading BMP Files
Writing BMP Files
Targa Image Files
The Targa File Format
Loading Targa Files
Writing Targa Files
Summary

Chapter 8: Texture Mapping
An Overview of Texture Mapping

The Checkered-Cube Example
Applying the Texture Map
2D Textures
I D Textures
3D Textures
Texture Objects
Generating the Texture Name
Creating and UsingTexture Objects
Texture Filtering
Texture Functions
Texture Coordinates
Repeating and Clamping
Mipmaps and Level of Detail
Automatically Generating Mipmaps
The Waving-Flag Example
The Explanation
The Implementation
The Textured Heightfield Terrain Example
The Explanation
The Implementation
Summary

Chapter 9: Advanced Texture Mapping
Multitexturing

Verifying Multitexture Support
Accessing Extension Functions
Establishing the Texture Units
Specifying the Texture Coordinates
Putting It Together Environment Mapping
The Torus in the Sky
The Texture Matrix
Lightmapping
Using the Lightmap
Multipass Multitexturing
Summary

Chapter 10: Display Lists and Vertex Arrays
Display Lists

Creating a Display List
Filling a Display List with Commands
Executing Display Lists
Display-List Issues
Destroying Display Lists
Display Lists and Textures
Example: Robot Demo with Display Lists
Vertex Arrays
EnablingVertex Arrays
Working with Arrays
glDrawArrays()
glDrawElements()
glDrawRangeElements()
glArrayElement()
Vertex Arrays and Multitexturing
Locking Arrays
Example:Terrain Demo Revisited
Summary

Chapter 11: Displaying Text
Bitmap Fonts
Outline Fonts
Texture-Mapped Fonts
Summary

Chapter 12: OpenGL Buffers
What Is an OpenGL Buffer?

Setting Up the Pixel Format
Clearing the Buffers
The Color Buffer
Double-Buffered Systems
Stereo Buffering
The Depth Buffer
Depth-Comparison Functions
Using the Depth Buffer
The Stencil Buffer
A Stencil-Buffer Example
The Accumulation Buffer
Summary

Chapter 13: OpenGL Quadrics
The Basics of OpenGL Quadrics

Draw Style
Normal
Orientation
Texture Coordinates
Cleaning Up
Disks
Cylinders
Spheres
Example:A Quadric Fly-Through World
Summary

Chapter 14: Curves and Surfaces
Curve and Surface Representation

Parametric Equations
Control Points and Continuity
Evaluators
Evenly Spaced Grids
Surfaces
Applying Textures to Surfaces
NURBS
Summary

Chapter 15: Special Effects
Billboarding

Example: Cacti in the Desert
Using Particle Systems
Parricles
Position
Velocity
Life Span
Size
Weight
Representation
Color
Owner
Methods
Particle Systems
Particle List
Position
Emission Rate
Forces
Default Particle Attributes and Ranges
Current State
Blending
Representation
Methods
Particle-System Managers
Implementation
Particle-System Effects
Example: Snowstorm
Fog
OpenGL Fog
Volumetric Fog
Reflections
Reflecting Lights
Handling the Depth Buffer
Handling Finite Planes Using Stencil Buffers
Addressing Irregular Reflective Surfaces
Handling Arbitrarily Oriented Planes
Shadows
Static Shadows
Projective Shadows
The Shadow-Projection Matrix
Handling Problems with the Depth Buffer
Restricting the Shadow with the Stencil Buffer
Handling Multiple Light Sources and Multiple Planar Surfaces
Problems with Projective Shadows
Stenciled Shadow Volumes
Other Methods
Example: Reflections and Shadows
Summary

Part III: Building a Game

Chapter 16: Using DirectX: DirectInput
Why Use DirectInput?

Windows Messages
Win32
Win32 Keyboard Input
Win32 Joystick Input
Directinput
Initializing Directinput
Directinput Return Values
Using Directinput
Adding Devices
Creating Devices
Enumerating Devices
Verifying Device Capabilities
Enumerating Objects
Setting the Device Data Format
Setting the Cooperative Level
Modifying Device Properties
Acquiring the Device
Getting Input
Immediate Data
Buffered Data
Polling Devices
Shutting Down
Action Mapping
Building the Input Sub-System
Input Sample Program
Summary

Chapter 17: Using DirectX Audio
The Basics of Sound

Sound on the Computer
Digitized Sound
Synthesized Sound
What Is DirectX Audio?
DirectX Audio Features
Loader
Segments and Segment States
Performance
Messages
Performance Channels
DLS Synthesizer
Instruments and Downloading
Audiopaths and Buffers
Audio Data Flow
Loading and Playing Audio with DirectMusic
Initialize COM
Create and Initialize the Performance
Create the Loader
Load a Segment
Download the Band
Play the Segment
Stopping a Segment
Is the Segment Playing?
Controlling Segment Loops
Cleaning Up
A Simple Example
Using Audiopaths
The Default Audiopath
Standard Audiopaths
Playing Sound on Audiopaths
Retrieving Objects from Audiopaths
3D Sound
3D Sound Coordinates
Perception
The DirectSound 3D Buffer
Setting 3D Parameters
The Minimum and Maximum Distances
Processing Mode
Position and Velocity
Sound Cones
The DirectSound 3D Listener
3D ClickingText Example
Summary

Chapter 18: Working with 3D Models
3D Model File Formats
The MD2 File Format

Our MD2 Implementation
Loading the MD2
Displaying the MD2
Adding the Texture
Animating the Model
Developing a CMD2Model Class
Controlling the Model Animation
One Last Tidbit
Summary

Chapter 19: Physics Modeling with OpenGL
A Physics Review

Time
Distance, Displacement, and Position
Velocity
Acceleration
Force
Newton's First Law of Motion
Newton's Second Law of Motion
Newton's Third Law of Motion
Momentum
Conservation of Momentum
Friction
Friction on a Flat Surface
Friction on an Inclined Plane
Modeling the Real World
Breaking Things Up
Timing
The Vector
The Plane
The Object
Handling Object Collisions
Bounding Spheres
Bounding Boxes
Plane Collisions
Collision Response
An Example:Air Hockey
The Air-Hockey World
The Hockey Table
The Puck and Time-Based Collision
The Player
Putting It Together
Summary

Chapter 20: Building a Game Engine
Designing The SimpEngine

Managing Data with CNode
Working with Objects: CObjea
The Engine Core
The Input System
The CEngine Class
The Game Cycle
Handling Input
The SimpEngine
The Camera
The World
Adding Models
The Audio System
The Particle System
Summary

Chapter 21: Making a Game: A Time to Kill
Initial Design
The Game World
The Enemies

Enemy Al
The Ogro
The Sod
Rockets and Explosions
The User Interface
Playing the Game
Building the EXE
Summary

Part IV: Appendixes

Appendix A: Online Resources
Game Development

GameDev.net
Game Development Search Engine
flipCode
Gamasutra
OpenGL
NeHe Productions
OpenGL.org
Additional OpenGL Links
DirectX
DirectX Developer Center
The DirectX Mailing List
Miscellaneous Resources
ParticleSystems.com
Real-Time Rendering
Developer Pages
Fog Articles

Appendix B: Using the CD
The CD User Interface
CD-ROM File Structure
System Requirements
Installation
Miscellaneous Problems and Troubleshooting Information
Still Need Help?

Index

L'auteur - Dave Astle

Dave Astle is a senior software engineer at QUALCOMM, where he plays a primary role in the development and optimization of their OpenGL ES implementation. He is a founder and operator of GameDev.net, the leading online community for game developers. Astle is coauthor of OpenGL Game Programming and Beginning OpenGL Game Programming, has contributed to numerous other books as an author and editor, and is a regular speaker at game industry conferences.

L'auteur - André LaMothe

André LaMothe

holds degrees in mathematics, computer science, and electrical engineering. He is the author of the best-selling books Tricks of the Game Programming Gurus, Teach Yourself Game Programming in 21 Days, and the Black Art of 3D Game Programming. Andre has also written numerous articles in Game Developer, Byte, Software Developer, and Circuit Cellar.

Caractéristiques techniques

  PAPIER
Éditeur(s) Prima Publishing
Auteur(s) Kevin Hawkins, Dave Astle, André LaMothe
Parution 15/05/2001
Nb. de pages 816
Format 18,8 x 23,2
Couverture Broché
Poids 1334g
Intérieur Noir et Blanc
EAN13 9780761533306
ISBN13 978-0-7615-3330-6

Avantages Eyrolles.com

Livraison à partir de 0,01 en France métropolitaine
Paiement en ligne SÉCURISÉ
Livraison dans le monde
Retour sous 15 jours
+ d'un million et demi de livres disponibles
satisfait ou remboursé
Satisfait ou remboursé
Paiement sécurisé
modes de paiement
Paiement à l'expédition
partout dans le monde
Livraison partout dans le monde
Service clients sav@commande.eyrolles.com
librairie française
Librairie française depuis 1925
Recevez nos newsletters
Vous serez régulièrement informé(e) de toutes nos actualités.
Inscription