Direct3D (DirectX 8.1) Code Samples - Page 2

Texture Addressing
 

Demonstrates how texture addressing works under Direct3D by allowing the texture addressing mode to be changed at run-time with a textured quad whose texture coordinates range from 0.0 to 2.0. Check out the OpenGL source code page for the OpenGL equivalent of this sample.

 

Texture Sub loading
 

Demonstrates how texture sub loading works under Direct3D by copying a smaller texture over the texel data of a larger texture. Check out the OpenGL source code page for the OpenGL equivalent of this sample.

 

Texture Mip-mapping
 

This sample demonstrates how mip-mapping works under Direct3D by tiling a single textured quad across a 25x25 unit area. The original texture is simply white with a thin black border, but in a effort to show mip-mapping in action, several mip-map levels have been altered by replacing the auto generated mip-map texture for that level with a color-coded version. This causes mip-map filtering to produce rainbow colored bands which radiate across the surface as the eye point moves about. Check out the OpenGL source code page for the OpenGL equivalent of this sample.

 

Multi-texture
 

This sample demonstrates how to perform multi-texturing under Direct3D by either modulating or adding two textures together in one rendering pass. Check out the OpenGL source code page for the OpenGL equivalent of this sample.

 

Alpha Blending in the Frame buffer
 

Demonstrates how to perform alpha-blending in the frame-buffer. The sample renders a textured cube which is alpha-blended into the frame-buffer in such a way as to create a translucent effect. Check out the OpenGL source code page for the OpenGL equivalent of this sample.