Microsoft DirectX 8.0 (Visual Basic) |
You can navigate between faces of a cubic environment map by using the Direct3DCubeTexture8.GetCubeMapSurface method.
The following code example uses GetCubeMapSurface to retrieve the cube-map surface used for the positive-y face (face 2).
' ' For this example, CubeMap is a valid ' Direct3DCubeTexture8 object. ' Dim Face2 As Direct3DSurface8 Set Face2 = CubeMap.GetCubeMapSurface( D3DCUBEMAP_FACE_POSITIVE_Y, 0 );
The first parameter that GetAttachedSurface accepts is a CONST_D3DCUBEMAP_FACES enumerated value that describes the attached surface that the method should retrieve. The second parameter tells Microsoft® Direct3D® which level of a mipmapped cube texture to retrieve. Because this cube-map is not mipmapped, 0 is used here.