TextureCube Class Reference

Class representing a cube texture. More...

Inheritance diagram for TextureCube:
Texture PixelBuffer

List of all members.

Public Member Functions

 TextureCube (int width, bool mipmap, PixelFormat format)
 Creates a cube texture.
 TextureCube (int width, bool mipmap, PixelFormat format, PixelBufferOption option)
 Creates a cube texture (with options)
 TextureCube (string fileName, bool mipmap)
 Creates a cube texture (from a file)
 TextureCube (string fileName, bool mipmap, PixelFormat format)
 Creates a cube texture (from a file, with format conversion)
 TextureCube (byte[] fileImage, bool mipmap)
 Creates a cube texture (from a file image)
 TextureCube (byte[] fileImage, bool mipmap, PixelFormat format)
 Creates a cube texture (from a file image, with format conversion)
override Object ShallowClone ()
 Creates a copy of a cube texture.
void SetPixels (int level, TextureCubeFace cubeFace, Array pixels)
 Sets pixel data.
void SetPixels (int level, TextureCubeFace cubeFace, Array pixels, int dx, int dy, int dw, int dh)
 Sets pixel data (with range)
void SetPixels (int level, TextureCubeFace cubeFace, Array pixels, int offset, int pitch)
 Sets pixel data (with byte offset)
void SetPixels (int level, TextureCubeFace cubeFace, Array pixels, PixelFormat format)
 Sets pixel data (with format conversion)
void SetPixels (int level, TextureCubeFace cubeFace, Array pixels, PixelFormat format, int offset, int pitch, int dx, int dy, int dw, int dh)
 Sets pixel data (with format conversion, with byte offset, with range)
void GenerateMipmap ()
 Automatically creates a mipmap image.

Protected Member Functions

 TextureCube (TextureCube texture)
 Creates a copy of a cube texture.

Detailed Description

Class representing a cube texture.


Constructor & Destructor Documentation

TextureCube ( int  width,
bool  mipmap,
PixelFormat  format 
)

Creates a cube texture.

Parameters:
widthTexture width
mipmapExistence/Lack of mipmap
formatPixel format

Creates the cube texture using the specified parameters. The texture width must have a power of 2. Rgba, Rgba4444, Rgba5551, Rgb565, LuminanceAlpha, Luminance, Alpha, RgbaH, LuminanceAlphaH, LuminanceH, AlphaH, Dxt1, Dxt2, Dxt3, Dxt4, or Dxt5 can be specified to the pixel format.

TextureCube ( int  width,
bool  mipmap,
PixelFormat  format,
PixelBufferOption  option 
)

Creates a cube texture (with options)

Parameters:
widthTexture width
mipmapExistence/Lack of mipmap
formatPixel format
optionPixel buffer creation option

Creates the cube texture using the specified parameters. The texture width must have a power of 2. Rgba, Rgba4444, Rgba5551, Rgb565, LuminanceAlpha, Luminance, Alpha, RgbaH, LuminanceAlphaH, LuminanceH, AlphaH, Dxt1, Dxt2, Dxt3, Dxt4, or Dxt5 can be specified to the pixel format. However, if the Renderable option is specified, only Rgba, Rgba4444, Rgba5551, or Rgb565 can be specified.

TextureCube ( string  fileName,
bool  mipmap 
)

Creates a cube texture (from a file)

Parameters:
fileNameFilename
mipmapExistence/Lack of mipmap

Creates a cube texture from a specified file. The usable file formats are DDS, PNG, JPG, BMP, and GIF (however, animated GIFs are not supported). The texture width must have a power of 2. The short side of the image must be a power of 2, and the long side must be 6 times the short side.

When a DDS file, the image must be a cubemap, and the mipmap argument is ignored.

TextureCube ( string  fileName,
bool  mipmap,
PixelFormat  format 
)

Creates a cube texture (from a file, with format conversion)

Parameters:
fileNameFilename
mipmapExistence/Lack of mipmap
formatPixel format

Creates a cube texture from a specified file. The usable file formats are DDS, PNG, JPG, BMP, and GIF (however, animated GIFs are not supported). The texture width must have a power of 2. The short side of the image must be a power of 2, and the long side must be 6 times the short side. Rgba, Rgba4444, Rgba5551, Rgb565, LuminanceAlpha, Luminance, Alpha, RgbaH, LuminanceAlphaH, LuminanceH, or AlphaH can be specified to the pixel format.

When a DDS file, the image must be a cubemap, and the mipmap and format arguments are ignored.

TextureCube ( byte[]  fileImage,
bool  mipmap 
)

Creates a cube texture (from a file image)

Parameters:
fileImageFile image
mipmapExistence/Lack of mipmap

Creates a cube texture from a specified file image. The usable file formats are DDS, PNG, JPG, BMP, and GIF (however, animated GIFs are not supported). The texture width must have a power of 2. The short side of the image must be a power of 2, and the long side must be 6 times the short side.

When a DDS file, the image must be a cubemap, and the mipmap argument is ignored.

TextureCube ( byte[]  fileImage,
bool  mipmap,
PixelFormat  format 
)

Creates a cube texture (from a file image, with format conversion)

Parameters:
fileImageFile image
mipmapExistence/Lack of mipmap
formatPixel format

Creates a cube texture from a specified file image. The usable file formats are DDS, PNG, JPG, BMP, and GIF (however, animated GIFs are not supported). The texture width must have a power of 2. The short side of the image must be a power of 2, and the long side must be 6 times the short side. Rgba, Rgba4444, Rgba5551, Rgb565, LuminanceAlpha, Luminance, Alpha, RgbaH, LuminanceAlphaH, LuminanceH, or AlphaH can be specified to the pixel format.

When a DDS file, the image must be a cubemap, and the mipmap and format arguments are ignored.

TextureCube ( TextureCube  texture) [protected]

Creates a copy of a cube texture.

Parameters:
textureCube texture

Creates a copy of a cube texture. The 2 cube textures will then share unmanaged resources. When Dispose() is called for all copies, the shared unmanaged resources will be freed.


Member Function Documentation

void GenerateMipmap ( )

Automatically creates a mipmap image.

Automatically creates a mipmap image from the current zero level image. Nothing will be performed if mipmaps are not present.

When the pixel format is DXT, nothing will be performed.

void SetPixels ( int  level,
TextureCubeFace  cubeFace,
Array  pixels,
int  dx,
int  dy,
int  dw,
int  dh 
)

Sets pixel data (with range)

Parameters:
levelMipmap level (0 to LevelCount-1)
cubeFaceCube surface
pixelsPixel data
dxX coordinate of the transfer destination
dyY coordinate of the transfer destination
dwWidth of the transfer destination
dhHeight of the transfer destination

Sets the pixel data to the cube surface of the specified mipmap level.

When the pixel format is DXT, the dx, dy, dw, and dh must be a multiple of 4.

void SetPixels ( int  level,
TextureCubeFace  cubeFace,
Array  pixels,
PixelFormat  format,
int  offset,
int  pitch,
int  dx,
int  dy,
int  dw,
int  dh 
)

Sets pixel data (with format conversion, with byte offset, with range)

Parameters:
levelMipmap level (0 to LevelCount-1)
cubeFaceCube surface
pixelsPixel data
formatPixel format
offsetByte offset of pixel data
pitchByte pitch of pixel data
dxX coordinate of the transfer destination
dyY coordinate of the transfer destination
dwWidth of the transfer destination
dhHeight of the transfer destination

Sets the pixel data to the cube surface of the specified mipmap level. Rgba or the same format as the texture can be specified to the pixel format.

When the pixel format is DXT, the dx, dy, dw, and dh must be a multiple of 4. Conversion of DXT pixel format is not supported.

void SetPixels ( int  level,
TextureCubeFace  cubeFace,
Array  pixels,
PixelFormat  format 
)

Sets pixel data (with format conversion)

Parameters:
levelMipmap level (0 to LevelCount-1)
cubeFaceCube surface
pixelsPixel data
formatPixel format

Sets the pixel data to the cube surface of the specified mipmap level. Rgba or the same format as the texture can be specified to the pixel format.

Conversion of DXT pixel format is not supported.

void SetPixels ( int  level,
TextureCubeFace  cubeFace,
Array  pixels,
int  offset,
int  pitch 
)

Sets pixel data (with byte offset)

Parameters:
levelMipmap level (0 to LevelCount-1)
cubeFaceCube surface
pixelsPixel data
offsetByte offset of pixel data
pitchByte pitch of pixel data

Sets the pixel data to the cube surface of the specified mipmap level.

void SetPixels ( int  level,
TextureCubeFace  cubeFace,
Array  pixels 
)

Sets pixel data.

Parameters:
levelMipmap level (0 to LevelCount-1)
cubeFaceCube surface
pixelsPixel data

Sets the pixel data to the cube surface of the specified mipmap level.

This overload sets data to all pixels of the specified mipmap level's cube surface. When the size of the array differs from the required size, an exception is thrown. When the array size is bigger than the required size, please use a different overload.

override Object ShallowClone ( ) [virtual]

Creates a copy of a cube texture.

Returns:
Clones a cube texture

Creates a copy of a cube texture. The 2 cube textures will then share unmanaged resources. When Dispose() is called for all copies, the shared unmanaged resources will be freed.

Reimplemented from Texture.