Platform SDK: DirectX

Spheremap Sample

[Visual Basic]

This topic pertains only to application development in C++. See Direct3D Immediate Mode Visual Basic Samples.

[C++]

Description

This sample loads a 3-D object and renders it, using a sphere map.

Path

Source: (SDK root)\Samples\Multimedia\D3dim\Src\Spheremap

Executable: (SDK root)\Samples\Multimedia\D3dim\Bin\Spheremap.exe

User's Guide

Press F1 to see available commands, or choose from the menu.

Programming Notes

The sphere map itself is a special, preconstructed texture map containing a 180-degree view of an environment. Before a frame is rendered, the object's normals are used to compute the texture coordinates for each vertex of the object. When rendered, the object looks as if it reflects the environment.