Managed DirectX® 9 Kick Start: Graphics and Game Programming

Book description

Managed DirectX was released with the latest version of the core DirectX libraries in DirectX9. It enables developers using the new .NET languages (i.e. C#, VB.NET, etc.) to develop rich multimedia applications with DirectX. Unfortunately the Managed DirectX runtime was released without adequate documentation, and developers are having a hard time figuring out the best way to write managed applications. This book covers how to use the Managed DirectX objects, how they differ from the core DirectX libraries, and how to create these rich multimedia applications in C#. It also covers in depth graphics techniques and the new high-level shader language shipping with DirectX9.

Table of contents

  1. Copyright
    1. Dedication
  2. Foreword
  3. About the Author
  4. Acknowledgments
  5. We Want to Hear from You!
  6. Introduction
    1. The History of Managed DirectX
    2. Namespaces Included
    3. Getting Started
  7. Beginning Graphics Concepts
    1. Introducing Direct3D
      1. Getting Started
      2. The Direct3D Device
      3. Making Our Triangle Three Dimensional
      4. Automatic Device Resets During a Resize
      5. We've Got Camera and Action; What About Lights?
      6. Device States and Transforms
      7. Swapchains and RenderTargets
      8. In Brief
    2. Choosing the Correct Device
      1. Enumerating Your System's Adapters
      2. Determining Whether a Hardware Device Is Available
      3. Checking Device Capabilities
      4. In Brief
    3. Rendering Using Simple Techniques
      1. Using Vertex Buffers
      2. Texturing Our Objects
      3. In Brief
    4. More Rendering Techniques
      1. Rendering Other Primitive Types
      2. Using Index Buffers
      3. Using Depth Buffers
      4. In Brief
    5. Rendering with Meshes
      1. Defining the Mesh
      2. Using Materials and Lighting
      3. Using Meshes to Render Complex Models
      4. In Brief
    6. Using Managed DirectX to Write a Game
      1. Choosing the Game
      2. Writing the Game
      3. Adding a Movable Car into Your Scene
      4. Adding Obstacles
      5. Implementing the Finishing Touches
      6. In Brief
  8. Intermediate Graphics Concepts
    1. Using Advanced Mesh Features
      1. Cloning Mesh Data
      2. Optimizing Mesh Data
      3. Simplifying Existing Meshes
      4. Welding Vertices in a Mesh
      5. Making Lots of Little Meshes Out of One Big One
      6. In Brief
    2. Understanding Resources
      1. Starting with the Resource Class
      2. Using the Vertex and Index Buffers
      3. Locking Our Buffers
      4. Controlling How Buffers Are Locked
      5. Using Texture Resources
      6. Locking Textures and Getting Descriptions
      7. In Brief
    3. Using the Other Mesh Types
      1. Simplifying Meshes
      2. Controlling the Level of Detail with Progressive Meshes
      3. Rendering Patch Meshes
      4. Seeing the Tessellation Levels
      5. In Brief
    4. Using the Helper Classes
      1. Drawing Lines
      2. Drawing Text
      3. Rendering to Surfaces
      4. Rendering Environment Maps
      5. In Brief
  9. Advanced Graphics Concepts
    1. Introducing the Programmable Pipeline with the High Level Shader Language
      1. Rendering a Single Triangle Without Using the Fixed-function Pipeline
      2. Rendering Shader Programs with Techniques
      3. Rendering Meshes Using the Programmable Pipeline
      4. Using HLSL to Write a Pixel Shader
      5. In Brief
    2. Using the High Level Shader Language
      1. Using Simple Formulas to Simulate Animation
      2. Determining Color by Blending Textures
      3. Lighting Textures
      4. Adding Specular Highlights
      5. In Brief
    3. Rendering Skeletal Animation
      1. Creating the Frame Hierarchy
      2. Loading Meshes with Animation
      3. Rendering Animated Meshes
      4. In Brief
  10. Sound and Input
    1. Discovering the Wonders of Sound
      1. Including the Sound Namespace
      2. Loading and Playing a Static Sound
      3. Using Sounds in 3D
      4. Manipulating the Listener
      5. Using Effects with Your Sounds
      6. In Brief
    2. Controlling User Input
      1. Detecting the Devices You Can Use
      2. Using the Keyboard Device
      3. Using the Mouse Device
      4. Using Game Pads and Joysticks for User Input
      5. Using Force Feedback
      6. In Brief
  11. 2D Graphics
    1. Using Direct3D for 2D Graphics
      1. Creating a Full Screen Rendering Device
      2. Rendering Sprites
      3. Animating Your Sprites
      4. In Brief
    2. Using DirectDraw for 2D Rendering
      1. Creating a Full Screen DirectDraw Device
      2. Animating Your Sprites
      3. In Brief
  12. Adding Networking
    1. Implementing Peer-to-Peer Networking Using DirectPlay
      1. Understanding DirectPlay Addresses
      2. Creating a Peer Connection
      3. Getting into a Session
      4. Using the Event Model
      5. Performing Actions in Our Session
      6. Handling Lost Sessions
      7. In Brief
    2. Creating a Client/Server Session
      1. Creating a Dedicated Server Session
      2. Connecting a Client
      3. Detecting Users Joining and Leaving Your Session
      4. Sending Data Packets
      5. Making the Client React
      6. Handling the Server Lost Event
      7. In Brief
    3. Understanding Advanced Networking Features
      1. Having a Detailed Look at the Event Model
      2. Detecting Bandwidth and Network Statistics
      3. Launching Applications Using a Lobby
      4. Making Your Application Lobby Aware
      5. Adding Voice Chat to Your Sessions
      6. In Brief
    4. Achieving Maximum Performance
      1. Using Value Types as Objects
      2. Understanding the Performance Implications of the Event Model
      3. Understanding the Cost of Methods
      4. In Brief
  13. Appendices
    1. Using the Diagnostics Assemblies
      1. Enumerating Everything in the System
      2. Enumerating Specific Items You Care About
    2. Playing Music and Videos
      1. Playing Back an Audio or Video File Simply
      2. Using the Features of Video Files
      3. Using Video as Textures
  14. Index

Product information

  • Title: Managed DirectX® 9 Kick Start: Graphics and Game Programming
  • Author(s): Tom Miller
  • Release date: October 2003
  • Publisher(s): Sams
  • ISBN: 9780672325960