Microsoft DirectX 8.1 (Visual Basic)

AnimKeys Sample

Description

The AnimKeys sample illustrates how to use the Microsoft® Direct3D® framework to load and play key-framed animation with an .x file. The animation information is contained in the .x file.

Path

Source: (SDK root)\Samples\Multimedia\VBSamples\Direct3D\AnimKeys

Executable: (SDK root)\Samples\Multimedia\VBSamples\Direct3D\Bin

User's Guide

The following table lists the keys that are implemented.

Key Action
F2 Prompts you to select a new rendering device or display mode.
ALT+ENTER Toggles between full-screen and windowed modes.
ESC Exits the application.

Programming Notes

The last argument passed to D3DUtil_LoadFromFile is a CD3DAnimation class that is the parent to any animations that are in the .x file. Subsequently Animation.SetTime can be used to pose the model.

This sample uses common Microsoft DirectX® code that consists of programming elements such as helper functions. This code is shared with other samples on the DirectX SDK. You can find the common source code in (SDK root)\Samples\Multimedia\VBSamples.