DirectX Transform C++ Samples

Several sample applications are provided to demonstrate the various features of transforms.

Code Walk-Throughs

These articles describe following examples in a thorough, step-by-step manner.

Article Description
Example: The Wipe Transform This sample shows how to write a 2-D image transform.
Example: The WipeDlg Application This sample uses the transform contained in Wipe.dll for a Windows application.


Sample Applications

Note  The Microsoft DirectX Transform sample applications are currently not included with the documentation.


These samples show how to use transforms in Windows applications. There are instructive comments in the source code, and prepared Microsoft Visual Studio projects for you to use. See Building DirectX Transform Samples and Applications for instructions on building these samples using Microsoft Visual C++ 6.0.

Sample folder Description
DXSurf1 This sample shows how to use a DXSurface to load an image file and display it as a second, full-screen exclusive mode DXSurface.
DXSurf2 This sample shows how DXSurfaces enable alpha blending for images. The application fades one image in and out over a background image. The images are loaded into DXSurfaces, which are attached to a IDXSurfaceModifier (Surface Modifier) foreground and background surfaces. The opacity of the foreground image over the background is changed with the Surface Modifier in a timed loop.
DXSurf3 This sample shows how to use a transform to scale an image to fit a window. It also manipulates the color components of DXSurface samples, and composites the result over the scaled image.
SurfMod This sample shows how Surface Modifiers can be used to combine images in creative ways. The sample consists of 12 frames that can be changed with the right and left arrow keys. Each frame displays the result of a different Surface Modifier setup. At the bottom of each frame in red type are the properties of the current Surface Modifier and in green type are notes or hints that can be helpful when using Surface Modifiers in this way. Because they work well with Surface Modifiers, lookup tables are also demonstrated briefly in the sample.
Grad This sample shows how to create procedural surfaces. The surface is a four-color gradient image, built by specifying a color for each corner of a DXSurface. The sample shows how to implement your own DXSurface and override the CDXBaseARGBPtr::FillSamples function to produce the transform output.
Wipe This sample is the wipe transform and associated windows application created in the Code Walk-Throughs.