Class TGPUCompressedImage
Unit
Declaration
type TGPUCompressedImage = class(TEncodedImage)
Description
Image compressed using one of the GPU texture compression algorithms.
Hierarchy
- TObject
- TEncodedImage
- TGPUCompressedImage
Overview
Methods
constructor Create(const AWidth, AHeight, ADepth: Cardinal; const ACompression: TTextureCompression); |
|
function Size: Cardinal; override; |
|
function HasAlpha: boolean; override; |
|
function AlphaChannel( const AlphaTolerance: Byte): TAlphaChannel; override; |
|
procedure FlipVertical; override; |
|
function Decompress: TCastleImage; |
|
function MakeCopy: TGPUCompressedImage; |
|
function CreateCopy: TEncodedImage; override; |
Properties
property Compression: TTextureCompression read FCompression; |
Description
Methods
constructor Create(const AWidth, AHeight, ADepth: Cardinal; const ACompression: TTextureCompression); |
|
function Size: Cardinal; override; |
|
Size of the whole image data inside RawPixels, in bytes. |
function HasAlpha: boolean; override; |
|
function AlphaChannel( const AlphaTolerance: Byte): TAlphaChannel; override; |
|
procedure FlipVertical; override; |
|
Flip compressed image vertically, losslessly. This works only for S3TC images, and only when their height is 1, 2, 3 or a multiple of 4. Note that this is always satisfied if image height is a power of two (as common for textures). It uses the knowledge of how S3TC compression works to losslessly flip the image, without re-compressing it. The idea is described here [http://users.telenet.be/tfautre/softdev/ddsload/explanation.htm]. |
function Decompress: TCastleImage; |
|
Decompress the image. This uses DecompressTexture variable, so you have to initialialize it first (for example to CastleGLImages.GLDecompressTexture) before using this. Exceptions raised
|
function MakeCopy: TGPUCompressedImage; |
|
Create a new image object that has exactly the same class and the same data (size, pixels) as this image. |
function CreateCopy: TEncodedImage; override; |
|
Create a new image object that has exactly the same class and the same data (size, pixels) as this image. Equivalent to MakeCopy, but virtual and declared as returning TEncodedImage class. |
Properties
property Compression: TTextureCompression read FCompression; |
|
Generated by PasDoc 0.16.0.