|
The FixedFuncShader application renders a mesh using
either our HLSL shader or the standard DirectX 9 fixed
function API. The code is written is C++ and HLSL.
It is based on the CD3DApplication class provided with
the Microsoft DirectX 9 SDK.
As shown in Figure 1, the state settings used to render
the mesh are displayed on the upper-left corner of
the window. The state can be changed by using the keyboard
arrow keys, or by loading a state file (*.s) from disk.
State files (*.s)
State files can be loaded
from the command line by specifying “/s:file.s”.
They can also be loaded from the State menu or by pressing
F9. States
can be saved to disk from the State menu or by pressing
F10.
When states are saved to disk, the mesh filename and
camera information are also stored. When loading a
state file at a later time, one may want to also load
the mesh that is associated with that state as well
as the viewpoint at the time the state was saved. This
can be accomplished by selecting “Load state
w/ mesh” from the State menu or by pressing Alt-F9.
This can be very useful when analyzing any discrepancies
between rendering done with the HLSL shader (which
you can feel free to modify) and the fixed function
API.
Mesh files (*.x)
Mesh files can be loaded from
the command line by specifying “/x:file.x”. They can also be
loaded from the File menu or by pressing F11. For tweening
to work, the current mesh filename must end with “1.x”.
There must also be a file ending with “2.x” in
the same directory (e.g., the dolphin1.x and dolphin2.x
files provided with the accompanying application).
|