Nebula
Loading...
Searching...
No Matches
CoreGraphics::PixelFormat Class Reference

#include <pixelformat.h>

Detailed Description

Pixel format enumeration.

FIXME: use DX10 notations (more flexible but less readable...)

Public Types

enum  Code {
  R8G8B8X8 = 0 , R8G8B8 , R8G8B8A8 , R5G6B5 ,
  R5G5B5A1 , R4G4B4A4 , DXT1 , DXT1A ,
  DXT3 , DXT5 , DXT1sRGB , DXT1AsRGB ,
  DXT3sRGB , DXT5sRGB , BC4 , BC5 ,
  BC7 , BC7sRGB , R8 , R16F ,
  R16 , R16G16F , R16G16 , R16G16B16A16F ,
  R16G16B16A16 , R32F , R32 , R32G32F ,
  R32G32 , R32G32B32A32F , R32G32B32A32 , R32G32B32F ,
  R32G32B32 , R11G11B10F , R9G9B9E5F , SRGBA8 ,
  R10G10B10X2 , R10G10B10A2 , D24X8 , D24S8 ,
  D32S8 , D16S8 , D32 , S8 ,
  B8G8R8 , B8G8R8A8 , B5G6R5 , B5G6R5A1 ,
  B4G4R4A4 , NumPixelFormats , BC1 = DXT1 , BC3 = DXT5 ,
  InvalidPixelFormat = 0xFFFFFFFF
}
 enums More...
 

Static Public Member Functions

static Code FromString (const Util::String &str)
 convert from string
 
static Util::String ToString (Code code)
 convert to string
 
static uint ToSize (Code code)
 convert to byte size
 
static uint ToChannels (Code code)
 convert to number of channesl
 
static bool ToCompressed (Code code)
 figure out if block compressed
 
static SizeT ToTexelSize (Code code)
 calculate texel dimensions
 
static SizeT ToBlockSize (Code code)
 Calculate texel block size.
 
static bool IsDepthFormat (Code code)
 return true if depth format
 
static bool IsStencilFormat (Code code)
 return true if depth format
 
static bool IsDepthStencilFormat (Code code)
 Return true if depth/stencil format.
 
static CoreGraphics::ImageBits ToImageBits (Code code)
 Return Image bits from format.
 

Member Enumeration Documentation

◆ Code

enums

Enumerator
R8G8B8X8 
R8G8B8 
R8G8B8A8 
R5G6B5 
R5G5B5A1 
R4G4B4A4 
DXT1 
DXT1A 
DXT3 
DXT5 
DXT1sRGB 
DXT1AsRGB 
DXT3sRGB 
DXT5sRGB 
BC4 
BC5 
BC7 
BC7sRGB 
R8 
R16F 
R16 
R16G16F 
R16G16 
R16G16B16A16F 
R16G16B16A16 
R32F 
R32 
R32G32F 
R32G32 
R32G32B32A32F 
R32G32B32A32 
R32G32B32F 
R32G32B32 
R11G11B10F 
R9G9B9E5F 
SRGBA8 
R10G10B10X2 
R10G10B10A2 
D24X8 
D24S8 
D32S8 
D16S8 
D32 
S8 
B8G8R8 
B8G8R8A8 
B5G6R5 
B5G6R5A1 
B4G4R4A4 
NumPixelFormats 
BC1 
BC3 
InvalidPixelFormat 

Member Function Documentation

◆ FromString()

PixelFormat::Code CoreGraphics::PixelFormat::FromString ( const Util::String & str)
static

convert from string

Convert a pixel format string into a pixel format code.

◆ IsDepthFormat()

bool CoreGraphics::PixelFormat::IsDepthFormat ( Code code)
static

return true if depth format

◆ IsDepthStencilFormat()

bool CoreGraphics::PixelFormat::IsDepthStencilFormat ( Code code)
static

Return true if depth/stencil format.

◆ IsStencilFormat()

bool CoreGraphics::PixelFormat::IsStencilFormat ( Code code)
static

return true if depth format

◆ ToBlockSize()

SizeT CoreGraphics::PixelFormat::ToBlockSize ( Code code)
static

Calculate texel block size.

◆ ToChannels()

uint CoreGraphics::PixelFormat::ToChannels ( Code code)
static

convert to number of channesl

◆ ToCompressed()

bool CoreGraphics::PixelFormat::ToCompressed ( Code code)
static

figure out if block compressed

◆ ToImageBits()

CoreGraphics::ImageBits CoreGraphics::PixelFormat::ToImageBits ( Code code)
static

Return Image bits from format.

◆ ToSize()

uint CoreGraphics::PixelFormat::ToSize ( Code code)
static

convert to byte size

◆ ToString()

Util::String CoreGraphics::PixelFormat::ToString ( PixelFormat::Code code)
static

convert to string

Convert pixel format code into a string.

◆ ToTexelSize()

SizeT CoreGraphics::PixelFormat::ToTexelSize ( Code code)
static

calculate texel dimensions


The documentation for this class was generated from the following files: