?/TD>
Microsoft DirectX 9.0

MFC Fog Sample


Description

The MFC Fog sample illustrates how to use Microsoft?Direct3D?with Microsoft Foundation Classes (MFC), using a CFormView. Various controls are used to control fog parameters for the 3-D scene.

Path

Source: (SDK root)\Samples\C++\Direct3D\MFCFog

Executable: (SDK root)\Samples\C++\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 the 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 of programming elements such as helper functions. This code is shared with other samples in the DirectX software development kit (SDK). You can find the sample framework headers and source code in (SDK root)\DXSDK\Samples\C++\Common\Include and (SDK root)\DXSDK\Samples\C++\Common\Src.



© 2002 Microsoft Corporation. All rights reserved.