The documents in this section show you how to accomplish commonly encountered development tasks in Microsoft DirectX.
The following tables list tasks available for DirectX feature areas using C# code examples.
Handle a Device (Direct3D)
Check for Shader Support
|
This example shows how to check the hardware device for shader support. |
Create an Additional Swap Chain
|
This example demonstrates how to create an additional swap chain using the SwapChain class. Additional swap chains are useful for supporting multiple viewports; for example, a single window partitioned into four sub-windows, each with different views of the same scene. |
Maintain Floating Point Precision after Device Creation
|
When a Device object is created, the common language runtime will change the floating-point unit (FPU) to single precision to maintain better performance. To maintain the default double precision FPU, which is default for the common language runtime, use the CreateFlags.FpuPreserve flag when creating a Device object as in the sample code below. |
Record and Apply StateBlocks
|
This example demonstrates how to use state blocks to set and retrieve a device's state. |
Render a 3-D Scene (Direct3D)
Draw A Sprite
|
This example demonstrates how to draw a sprite. |
Generate a Scene
|
This example shows how to begin scene generation and draw primitives. |
Render Mesh with Texture using HLSL
|
This example demonstrates how to render a mesh texture using the high-level shader language (HLSL). |
Set Up a Projection Matrix
|
This example demonstrates how to set up the projection transformation matrix, which transforms 3-D camera or view space coordinates into 2-D screen coordinates. |
Set Up a View Matrix
|
This example demonstrates how to initialize the view transformation matrix, which transforms world coordinates into camera or view space. |
Using an Effect
|
This example demonstrates how to use an effect technique that was loaded from a file. |
Use Meshes, Textures, and Effects (Direct3D)
Use Vertex and Index Buffers (Direct3D)
Use Effects on Sound (DirectSound)
Send comments about this topic to Microsoft. © Microsoft Corporation. All rights reserved.
Feedback? Please provide us with your comments on this topic.
For more help, visit the DirectX Developer Center