| Introduction | p. xi |
| Creating the Map Editor | |
| Introducing Windows Programming | p. 3 |
| Concepts of Event-Driven Programming | p. 3 |
| Introducing the Win32 SDK | p. 4 |
| Registering a Window Class | p. 5 |
| Creating a Window | p. 7 |
| The Main Loop | p. 8 |
| The Message Handler | p. 9 |
| Your First Windows Application | p. 11 |
| Compiling Notes | p. 12 |
| Adding Windows | p. 13 |
| Buttons | p. 13 |
| Adding Functionality to Button Clicks | p. 15 |
| Resources | p. 17 |
| The Resource Editor | p. 19 |
| Adding Menus | p. 20 |
| Adding Item Click Functions | p. 22 |
| Checkmarking Items | p. 25 |
| Getting the Check State | p. 25 |
| Making a Pop-up Menu | p. 26 |
| Dialog Boxes | p. 30 |
| Differences between Windows and Dialog Controls | p. 30 |
| Using Controls | p. 31 |
| Buttons | p. 33 |
| Edit Box Controls | p. 34 |
| List Box Controls | p. 35 |
| Combo Box Controls | p. 37 |
| Static Controls | p. 39 |
| Chapter Example | p. 39 |
| Conclusion | p. 42 |
| Introduction to OpenGL | p. 43 |
| The History of OpenGL | p. 43 |
| Why Use OpenGL? | p. 45 |
| The World in Three Dimensions | p. 47 |
| OpenGL Buffers | p. 48 |
| Accumulation Buffer | p. 48 |
| Depth Buffer | p. 49 |
| Frame Buffer | p. 49 |
| Stencil Buffer | p. 49 |
| Basic OpenGL Terminology | p. 50 |
| Vertex | p. 50 |
| Triangle | p. 50 |
| Polygon | p. 50 |
| Primitive | p. 50 |
| Initializing OpenGL | p. 51 |
| Releasing OpenGL | p. 65 |
| The Different Matrices | p. 68 |
| Projection | p. 68 |
| Model View | p. 69 |
| Texture | p. 69 |
| Matrix Functions | p. 69 |
| Selecting a Matrix | p. 69 |
| Setting the Identity Matrix | p. 70 |
| Rotating a Matrix | p. 70 |
| Translating a Matrix | p. 71 |
| Scaling a Matrix | p. 72 |
| Saving and Restoring the Matrix | p. 73 |
| Resizing a GL Window | p. 73 |
| Setting the Rendering Defaults | p. 77 |
| Drawing "Things" in OpenGL | p. 78 |
| Points | p. 80 |
| Lines | p. 80 |
| Triangles | p. 81 |
| Quads | p. 81 |
| Polygons | p. 81 |
| Chapter Example | p. 82 |
| Conclusion | p. 88 |
| Defining the Map Format | p. 89 |
| Version Control | p. 89 |
| The Map Header | p. 90 |
| Extra Map Features | p. 92 |
| Main Rendering Structures | p. 97 |
| Miscellaneous Map Structures | p. 108 |
| Creating the MAP Class | p. 112 |
| Chapter Example | p. 113 |
| Conclusion | p. 118 |
| Creating the Low-Level Map Code | p. 119 |
| Generating Unique Colors | p. 119 |
| Checking to See If the Color Exists | p. 121 |
| Inserting Objects | p. 123 |
| Generating Unique Vertex Colors | p. 129 |
| Inserting Vertices | p. 131 |
| Inserting Triangles | p. 135 |
| Chapter Example | p. 137 |
| Conclusion | p. 150 |
| Creating Map Objects | p. 151 |
| The Basic Interface | p. 151 |
| Handling the WM_LBUTTONDOWN Message | p. 157 |
| Handling the WM_LBUTTONUP Message | p. 159 |
| Create a Wall | p. 160 |
| Create a Floor | p. 162 |
| Create a Ceiling | p. 163 |
| Handling the WM_MOUSEMOVE Message | p. 165 |
| The New Globals | p. 168 |
| Modifying the Rendering Function | p. 168 |
| Creating the New Buttons | p. 172 |
| Checking for Button Clicks | p. 173 |
| Chapter Example | p. 174 |
| Conclusion | p. 185 |
| Drawing Primitives | p. 187 |
| Adding Layers | p. 187 |
| Updating Wireframe Rendering with Layers | p. 190 |
| Drawing Solid Primitive | p. 191 |
| Chapter Example | p. 197 |
| Conclusion | p. 208 |
| Adding Game-Related Functionality | p. 209 |
| Placing Start Positions | p. 209 |
| Placing Multiplayer Starting Positions | p. 214 |
| Placing Entity Positions | p. 220 |
| Placing Items | p. 227 |
| Inserting Sounds | p. 234 |
| Placing Lights | p. 242 |
| Chapter Example | p. 255 |
| Conclusion | p. 275 |
| Adding Useful Functionality | p. 277 |
| Selecting an Object | p. 277 |
| Moving Objects | p. 286 |
| Assigning Textures to Objects | p. 291 |
| Duplicating Objects | p. 299 |
| Adding Skyboxes | p. 304 |
| Adding Fog | p. 308 |
| Editing Map Details | p. 311 |
| Selecting and Assigning Objects to Lights | p. 313 |
| Removing Objects from Lights | p. 317 |
| Editing Object Values | p. 319 |
| Deleting Objects | p. 324 |
| Chapter Example | p. 335 |
| Conclusion | p. 335 |
| Saving and Opening Files | p. 337 |
| Saving Files | p. 337 |
| Clearing Map Data | p. 341 |
| Opening Files | p. 343 |
| Chapter Example | p. 346 |
| Conclusion | p. 346 |
| Creating the Game Engine | |
| Basic Game Setup | p. 349 |
| The New Base Code | p. 349 |
| Using a Dialog Box for Game Configuration | p. 351 |
| Chapter Example | p. 354 |
| Conclusion | p. 356 |
| OpenGL Texturing | p. 357 |
| How Texturing Works | p. 358 |
| Loading Bitmap Files | p. 359 |
| Releasing Bitmap Data | p. 363 |
| Using Textures | p. 364 |
| Texture Filtering | p. 367 |
| Texture Wrapping | p. 368 |
| Texture Environment Settings | p. 369 |
| Transparent Colors | p. 370 |
| Using Mipmaps | p. 373 |
| Bitblitting in OpenGL | p. 374 |
| Using Texture Lists | p. 378 |
| Chapter Example | p. 380 |
| Conclusion | p. 380 |
| Rendering Scenes | p. 381 |
| Setting the Perspective View | p. 381 |
| Loading Maps | p. 382 |
| Rendering Scenes | p. 384 |
| Skyboxes | p. 386 |
| Chapter Example | p. 390 |
| Conclusion | p. 390 |
| Movement | p. 391 |
| The Math Behind Movement | p. 391 |
| Moving Forward and Backward | p. 393 |
| Strafing | p. 394 |
| Turning | p. 394 |
| Checking for Keypresses | p. 395 |
| Tracking Mouse Movements | p. 396 |
| Checking Mouse Button Input | p. 396 |
| Chapter Example | p. 397 |
| Conclusion | p. 397 |
| Lights and Fog | p. 399 |
| Dynamic Lighting | p. 399 |
| Vertex-Colored Lighting | p. 400 |
| Radiosity Lighting | p. 401 |
| Projected Texturing | p. 402 |
| Fog | p. 407 |
| Chapter Example | p. 409 |
| Conclusion | p. 409 |
| Using 3D Models | p. 411 |
| Exporting from 3ds max | p. 411 |
| Loading ASE Models | p. 413 |
| Releasing Model Data | p. 419 |
| Drawing Models | p. 420 |
| Chapter Example | p. 421 |
| Conclusion | p. 421 |
| Beyond OpenGL 1.1 | p. 423 |
| Texturing | p. 425 |
| Anisotropic Filtering (GL_EXT_texture_filter_anisotropic) | p. 425 |
| Irregular Texture Sizes (GL_ARB_texture_non_power_of_two) | p. 427 |
| Multitexturing (GL_ARB_multitexture) | p. 428 |
| Texture Compression (GL_ARB_texture_compression) | p. 431 |
| Fog | p. 433 |
| Volumetric Fog (GL_EXT_fog_coord) | p. 433 |
| Windows Extensions | p. 435 |
| Swap Control (WGL_EXT_SWAP_CONTROL) | p. 435 |
| Chapter Example | p. 436 |
| Conclusion | p. 436 |
| Multiplayer Gaming | p. 437 |
| Initializing the Server | p. 439 |
| Initializing the Client | p. 440 |
| Sending Packets | p. 442 |
| Receiving Packets | p. 443 |
| Releasing Open Sockets | p. 444 |
| Multiplayer Setup | p. 445 |
| Chapter Example | p. 449 |
| Conclusion | p. 449 |
| Using OpenAL | p. 451 |
| OpenAL Installation | p. 451 |
| Initializing OpenAL | p. 452 |
| Using Audio Files | p. 454 |
| Playing Sources | p. 456 |
| Stopping Sources | p. 457 |
| Getting the Buffer ID | p. 457 |
| Setting Source Information | p. 458 |
| Creating Sources | p. 460 |
| Releasing Sources | p. 460 |
| Releasing OpenAL | p. 461 |
| Setting Up the Listener | p. 461 |
| Adding Sound to Our Game | p. 463 |
| Chapter Example | p. 464 |
| Conclusion | p. 464 |
| Tips and Tricks | p. 465 |
| Displaying Text | p. 465 |
| Adding a Frame-per-Second Counter | p. 467 |
| Holding an Item | p. 468 |
| Time-Based Movement | p. 468 |
| Setting Start Positions | p. 469 |
| Optimization Techniques | p. 470 |
| Using Display Lists | p. 470 |
| Sorting Texture Binds | p. 472 |
| Vertex Arrays | p. 472 |
| Occlusion Querying | p. 472 |
| Chapter Example | p. 473 |
| Conclusion | p. 473 |
| Sources | p. 475 |
| Further Reading | p. 477 |
| Index | p. 479 |
| Table of Contents provided by Ingram. All Rights Reserved. |