Microsoft DirectX 8.1 (C++) |
MFCPixelShader Sample
Description
The MFCPixelShader sample illustrates how to use Microsoft® Direct3D® with Microsoft Foundation Classes (MFC), using a CFormView. Various controls are used to the control the pixel shader used for the 3-D scene.
Path
Source: (SDK root)\Samples\Multimedia\Direct3D\MFCPixelShader
Executable: (SDK root)\Samples\Multimedia\Direct3D\Bin
User's Guide
All user interaction for this sample is implemented through the visible MFC controls—sliders, radio buttons, and so on. You are encouraged to play with controls and observe the various effects they have on the rendered 3-D scene.
Programming Notes
All the MFC code is contained with the CFormView class's derived member functions. You can find the MFC code and Direct3D initialization code in the D3dapp.cpp source file. This file can be ported to work with another application by stripping out the fog-related code.
The Direct3D fog code is contained in Fog.cpp. It includes functions to initialize, animate, render, and clean up the scene.
This sample uses common Microsoft DirectX® code that consists programming elements such as helper functions. This code is shared with other samples in the DirectX SDK. You can find the common headers and source code in (SDK root)\Samples\Multimedia\Common.