Microsoft DirectX 9.0 SDK Update (October 2004)

CubeTextureRequirements.CubeTextureRequirements Constructor

Language:

Note: This documentation is preliminary and is subject to change.
How Do I...?

Initializes a new instance of the CubeTextureRequirements class.

Definition

Visual Basic .NET Public Sub New()
C# public CubeTextureRequirements();
Managed C++ public: CubeTextureRequirements();
JScript .NET public function CubeTextureRequirements();

How Do I...?

Create a Cube Texture

This example demonstrates how to create a cube texture.

A cube texture is created after the hardware is checked to ensure that cube textures are supported. The new cube texture has an edge length of 16 pixels, and no Usage value. Provided the hardware supports mipmap cube textures, all cube texture sublevels down to 1x1 pixels for each face are automatically generated.

In the following C# code example, device is assumed to be the rendering Device. Developers should also check to ensure that the hardware supports the X8R8G8B8 format.

              [C#]
              
//Check cube texture requirements. CubeTextureRequirements tr = new CubeTextureRequirements(); tr.Format = Format.A8R8G8B8; TextureLoader.CheckCubeTextureRequirements(device, 0, Pool.Managed, out tr); //Create texture. CubeTexture cube = new CubeTexture( device, 16, 0, 0, Format.X8R8G8B8, Pool.Managed );


© 2004 Microsoft Corporation. All rights reserved. Terms of use.

Feedback? Please provide us with your comments on this topic.
For more help, visit the DirectX Developer Center