Support Forum       G3D Web Page     
Classes | Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
G3D::ImageFormat Class Reference

Information about common image formats. More...

Classes

class  BayerAlgorithm
 For use with ImageFormat::convert. More...
 

Public Types

enum  BayerPattern {
  BAYER_PATTERN_NONE,
  BAYER_PATTERN_RGGB,
  BAYER_PATTERN_GRBG,
  BAYER_PATTERN_GBRG,
  BAYER_PATTERN_BGGR
}
 
enum  Code {
  CODE_AUTO = -2,
  CODE_NONE = -1,
  CODE_L8 = 0,
  CODE_L16,
  CODE_L16F,
  CODE_L32F,
  CODE_A8,
  CODE_A16,
  CODE_A16F,
  CODE_A32F,
  CODE_LA4,
  CODE_LA8,
  CODE_LA16,
  CODE_LA16F,
  CODE_LA32F,
  CODE_RGB5,
  CODE_RGB5A1,
  CODE_RGB8,
  CODE_RGB10,
  CODE_RGB10A2,
  CODE_RGB16,
  CODE_RGB16F,
  CODE_RGB32F,
  CODE_R11G11B10F,
  CODE_RGB9E5F,
  CODE_RGB8I,
  CODE_RGB8UI,
  CODE_RGBA8I,
  CODE_RGBA8UI,
  CODE_RGB8_SNORM,
  CODE_RGBA8_SNORM,
  CODE_RGB16_SNORM,
  CODE_RGBA16_SNORM,
  CODE_ARGB8,
  CODE_BGR8,
  CODE_BGRA8,
  CODE_R8,
  CODE_R8I,
  CODE_R8UI,
  CODE_R8_SNORM,
  CODE_R16,
  CODE_R16I,
  CODE_R16UI,
  CODE_R16_SNORM,
  CODE_R16F,
  CODE_R32I,
  CODE_R32UI,
  CODE_RG8,
  CODE_RG8I,
  CODE_RG8UI,
  CODE_RG8_SNORM,
  CODE_RG16,
  CODE_RG16I,
  CODE_RG16UI,
  CODE_RG16_SNORM,
  CODE_RG16F,
  CODE_RG32I,
  CODE_RG32UI,
  CODE_R32F,
  CODE_RG32F,
  CODE_RGBA8,
  CODE_RGBA16,
  CODE_RGBA16F,
  CODE_RGBA32F,
  CODE_RGBA16I,
  CODE_RGBA16UI,
  CODE_RGB32I,
  CODE_RGB32UI,
  CODE_RGBA32I,
  CODE_RGBA32UI,
  CODE_RGBA4,
  CODE_RGBA2,
  CODE_BAYER_RGGB8,
  CODE_BAYER_GRBG8,
  CODE_BAYER_GBRG8,
  CODE_BAYER_BGGR8,
  CODE_BAYER_RGGB32F,
  CODE_BAYER_GRBG32F,
  CODE_BAYER_GBRG32F,
  CODE_BAYER_BGGR32F,
  CODE_HSV8,
  CODE_HSV32F,
  CODE_YUV420_PLANAR,
  CODE_YUV422,
  CODE_YUV444,
  CODE_RGB_DXT1,
  CODE_RGBA_DXT1,
  CODE_RGBA_DXT3,
  CODE_RGBA_DXT5,
  CODE_SRGB8,
  CODE_SRGBA8,
  CODE_SL8,
  CODE_SLA8,
  CODE_SRGB_DXT1,
  CODE_SRGBA_DXT1,
  CODE_SRGBA_DXT3,
  CODE_SRGBA_DXT5,
  CODE_DEPTH16,
  CODE_DEPTH24,
  CODE_DEPTH32,
  CODE_DEPTH32F,
  CODE_STENCIL1,
  CODE_STENCIL4,
  CODE_STENCIL8,
  CODE_STENCIL16,
  CODE_DEPTH24_STENCIL8,
  CODE_NUM
}
 
enum  ColorSpace {
  COLOR_SPACE_NONE,
  COLOR_SPACE_RGB,
  COLOR_SPACE_HSV,
  COLOR_SPACE_YUV,
  COLOR_SPACE_SRGB
}
 
enum  NumberFormat {
  FLOATING_POINT_FORMAT,
  INTEGER_FORMAT,
  NORMALIZED_FIXED_POINT_FORMAT,
  OTHER
}
 

Public Member Functions

bool canInterpretAs (const ImageFormat *otherFormat) const
 True if data in otherFormat is binary compatible. More...
 
Color4 channelMask () const
 Returns a Color4 that masks off unused components in the format, given in RGBA For example, the mask for R32F is (1,0,0,0), for A32F is (0,0,0,1), for RGB32F is (1,1,1,0). More...
 
bool isIntegerFormat () const
 
const Stringname () const
 Human readable name of this format. More...
 
int openGLShaderImageFormat () const
 Provide the OpenGL format that should be used to bind to a GLSL shader image. More...
 
bool representableAsColor1unorm8 () const
 Does this contain exactly one unorm8 component? More...
 
bool representableAsColor2unorm8 () const
 Does this contain exactly two unorm8 components? More...
 
bool representableAsColor3unorm8 () const
 Does this contain exactly three unorm8 components? More...
 
bool representableAsColor4unorm8 () const
 Does this contain exactly four unorm8 components? More...
 
bool sameComponents (const ImageFormat *other) const
 Returns true if these formats have the same components (possibly in different NumberFormats or sizes) More...
 

Static Public Member Functions

static const ImageFormatA16 ()
 
static const ImageFormatA16F ()
 
static const ImageFormatA32F ()
 
static const ImageFormatA8 ()
 
static const ImageFormatAUTO ()
 
NULL pointer; indicates that the G3D::Texture class should choose either RGBA8 or RGB8 depending on the presence of an alpha channel in the input. More...
 
static const ImageFormatBGR8 ()
 
static const ImageFormatBGRA8 ()
 
static bool conversionAvailable (const ImageFormat *srcFormat, int srcRowPadBits, const ImageFormat *dstFormat, int dstRowPadBits, bool invertY=false)
 Checks if a conversion between two formats is available. More...
 
static bool convert (const Array< const void *> &srcBytes, int srcWidth, int srcHeight, const ImageFormat *srcFormat, int srcRowPadBits, const Array< void *> &dstBytes, const ImageFormat *dstFormat, int dstRowPadBits, bool invertY=false, BayerAlgorithm bayerAlg=BayerAlgorithm::MHC)
 Converts between arbitrary formats on the CPU. More...
 
static const ImageFormatdepth (int depthBits=24)
 Returns DEPTH16, DEPTH24, or DEPTH32 according to the bits specified. More...
 
static const ImageFormatDEPTH16 ()
 
static const ImageFormatDEPTH24 ()
 
static const ImageFormatDEPTH24_STENCIL8 ()
 
static const ImageFormatDEPTH32 ()
 
static const ImageFormatDEPTH32F ()
 
static const ImageFormatfloatFormat (int numChannels)
 Returns R32F, RG32F, RGB32F, or RGBA32F according to the channels specified. More...
 
static const ImageFormatfromCode (ImageFormat::Code code)
 Returns the matching ImageFormat* identified by the Code. More...
 
static const ImageFormatfromString (const String &s)
 Takes the same values that name() returns. More...
 
static const ImageFormatgetFormatWithAlpha (const ImageFormat *otherFormat)
 Returns ImageFormat representing the same channels as otherFormat plus an alpha channel, all with at least the same precision as otherFormat, or returns NULL if an equivalent format is unavailable. More...
 
static const ImageFormatgetSRGBFormat (const ImageFormat *otherFormat)
 
static const ImageFormatL16 ()
 
static const ImageFormatL16F ()
 
static const ImageFormatL32F ()
 
static const ImageFormatL8 ()
 
static const ImageFormatLA16 ()
 
static const ImageFormatLA16F ()
 
static const ImageFormatLA32F ()
 
static const ImageFormatLA4 ()
 
static const ImageFormatLA8 ()
 
static const ImageFormatR11G11B10F ()
 
static const ImageFormatR16 ()
 
static const ImageFormatR16_SNORM ()
 
static const ImageFormatR16F ()
 
static const ImageFormatR16I ()
 
static const ImageFormatR16UI ()
 
static const ImageFormatR32F ()
 
static const ImageFormatR32I ()
 
static const ImageFormatR32UI ()
 
static const ImageFormatR8 ()
 
static const ImageFormatR8_SNORM ()
 
static const ImageFormatR8I ()
 
static const ImageFormatR8UI ()
 
static const ImageFormatRG16 ()
 
static const ImageFormatRG16_SNORM ()
 
static const ImageFormatRG16F ()
 
static const ImageFormatRG16I ()
 
static const ImageFormatRG16UI ()
 
static const ImageFormatRG32F ()
 
static const ImageFormatRG32I ()
 
static const ImageFormatRG32UI ()
 
static const ImageFormatRG8 ()
 
static const ImageFormatRG8_SNORM ()
 
static const ImageFormatRG8I ()
 
static const ImageFormatRG8UI ()
 
static const ImageFormatRGB10 ()
 
static const ImageFormatRGB10A2 ()
 
static const ImageFormatRGB16 ()
 
static const ImageFormatRGB16_SNORM ()
 
static const ImageFormatRGB16F ()
 
static const ImageFormatRGB32F ()
 
static const ImageFormatRGB32I ()
 
static const ImageFormatRGB32UI ()
 
static const ImageFormatRGB5 ()
 
static const ImageFormatRGB5A1 ()
 
static const ImageFormatRGB8 ()
 
static const ImageFormatRGB8_SNORM ()
 
static const ImageFormatRGB8I ()
 
static const ImageFormatRGB8UI ()
 
static const ImageFormatRGB9E5F ()
 
static const ImageFormatRGB_DXT1 ()
 
static const ImageFormatRGBA16 ()
 
static const ImageFormatRGBA16_SNORM ()
 
static const ImageFormatRGBA16F ()
 
static const ImageFormatRGBA16I ()
 
static const ImageFormatRGBA16UI ()
 
static const ImageFormatRGBA2 ()
 
static const ImageFormatRGBA32F ()
 
static const ImageFormatRGBA32I ()
 
static const ImageFormatRGBA32UI ()
 
static const ImageFormatRGBA4 ()
 
static const ImageFormatRGBA8 ()
 
static const ImageFormatRGBA8_SNORM ()
 
static const ImageFormatRGBA8I ()
 
static const ImageFormatRGBA8UI ()
 
static const ImageFormatRGBA_DXT1 ()
 
static const ImageFormatRGBA_DXT3 ()
 
static const ImageFormatRGBA_DXT5 ()
 
static const ImageFormatSL8 ()
 
static const ImageFormatSLA8 ()
 
static const ImageFormatSRGB8 ()
 
static const ImageFormatSRGB_DXT1 ()
 
static const ImageFormatSRGBA8 ()
 
static const ImageFormatSRGBA_DXT1 ()
 
static const ImageFormatSRGBA_DXT3 ()
 
static const ImageFormatSRGBA_DXT5 ()
 
static const ImageFormatstencil (int bits=8)
 Returns STENCIL1, STENCIL4, STENCIL8 or STENCIL16 according to the bits specified. More...
 
static const ImageFormatSTENCIL1 ()
 
static const ImageFormatSTENCIL16 ()
 
static const ImageFormatSTENCIL4 ()
 
static const ImageFormatSTENCIL8 ()
 
static const ImageFormatYUV420_PLANAR ()
 
static const ImageFormatYUV422 ()
 
static const ImageFormatYUV444 ()
 

Public Attributes

int alphaBits
 Number of bits per pixel storage for alpha values; Zero for compressed textures and non-RGB. More...
 
BayerPattern bayerPattern
 If this is a Bayer format, what is the pattern. More...
 
int blueBits
 Number of bits per pixel storage for blue values; Zero for compressed textures and non-RGB. More...
 
Code code
 Useful for serializing. More...
 
ColorSpace colorSpace
 
bool compressed
 
int cpuBitsPerPixel
 Amount of CPU memory per pixel when packed into an array, discounting any end-of-row padding. More...
 
int depthBits
 Number of depth bits (for depth textures; e.g. More...
 
bool floatingPoint
 True if the bit depths specified are for float formats. More...
 
int greenBits
 Number of bits per pixel storage for green values; Zero for compressed textures and non-RGB. More...
 
int luminanceBits
 
NumberFormat numberFormat
 Indicates whether this format treats numbers as signed/unsigned integers, floating point, or signed/unsigned normalized fixed point. More...
 
int numComponents
 Number of channels (1 for a depth texture). More...
 
bool opaque
 True if there is no alpha channel for this texture. More...
 
int openGLBaseFormat
 The OpenGL base format equivalent to this one (e.g., GL_RGB, GL_ALPHA). More...
 
int openGLBitsPerPixel
 
Amount of GPU memory per pixel on most graphics cards, for formats supported by OpenGL. More...
 
int openGLDataFormat
 The OpenGL bytes (type) format of the data buffer used with this texture format, e.g., GL_UNSIGNED_BYTE. More...
 
int openGLFormat
 The OpenGL format equivalent to this one, e.g, GL_RGB8 Zero if there is no equivalent. More...
 
int redBits
 Number of bits per pixel storage for red values; Zero for compressed textures and non-RGB. More...
 
int stencilBits
 Number of bits per pixel. More...
 

Detailed Description

Information about common image formats.

Don't construct these; use the methods provided to access the const instances.

For most formats, the number indicates the number of bits per channel and a suffix of "F" indicates floating point (following OpenGL conventions). This does not hold for the YUV and DXT formats.

See also
G3D::Image, G3D::Texture, G3D::ImageConvert

Member Enumeration Documentation

◆ BayerPattern

Enumerator
BAYER_PATTERN_NONE 
BAYER_PATTERN_RGGB 
BAYER_PATTERN_GRBG 
BAYER_PATTERN_GBRG 
BAYER_PATTERN_BGGR 

◆ Code

Enumerator
CODE_AUTO 
CODE_NONE 
CODE_L8 
CODE_L16 
CODE_L16F 
CODE_L32F 
CODE_A8 
CODE_A16 
CODE_A16F 
CODE_A32F 
CODE_LA4 
CODE_LA8 
CODE_LA16 
CODE_LA16F 
CODE_LA32F 
CODE_RGB5 
CODE_RGB5A1 
CODE_RGB8 
CODE_RGB10 
CODE_RGB10A2 
CODE_RGB16 
CODE_RGB16F 
CODE_RGB32F 
CODE_R11G11B10F 
CODE_RGB9E5F 
CODE_RGB8I 
CODE_RGB8UI 
CODE_RGBA8I 
CODE_RGBA8UI 
CODE_RGB8_SNORM 
CODE_RGBA8_SNORM 
CODE_RGB16_SNORM 
CODE_RGBA16_SNORM 
CODE_ARGB8 
CODE_BGR8 
CODE_BGRA8 
CODE_R8 
CODE_R8I 
CODE_R8UI 
CODE_R8_SNORM 
CODE_R16 
CODE_R16I 
CODE_R16UI 
CODE_R16_SNORM 
CODE_R16F 
CODE_R32I 
CODE_R32UI 
CODE_RG8 
CODE_RG8I 
CODE_RG8UI 
CODE_RG8_SNORM 
CODE_RG16 
CODE_RG16I 
CODE_RG16UI 
CODE_RG16_SNORM 
CODE_RG16F 
CODE_RG32I 
CODE_RG32UI 
CODE_R32F 
CODE_RG32F 
CODE_RGBA8 
CODE_RGBA16 
CODE_RGBA16F 
CODE_RGBA32F 
CODE_RGBA16I 
CODE_RGBA16UI 
CODE_RGB32I 
CODE_RGB32UI 
CODE_RGBA32I 
CODE_RGBA32UI 
CODE_RGBA4 
CODE_RGBA2 
CODE_BAYER_RGGB8 
CODE_BAYER_GRBG8 
CODE_BAYER_GBRG8 
CODE_BAYER_BGGR8 
CODE_BAYER_RGGB32F 
CODE_BAYER_GRBG32F 
CODE_BAYER_GBRG32F 
CODE_BAYER_BGGR32F 
CODE_HSV8 
CODE_HSV32F 
CODE_YUV420_PLANAR 
CODE_YUV422 
CODE_YUV444 
CODE_RGB_DXT1 
CODE_RGBA_DXT1 
CODE_RGBA_DXT3 
CODE_RGBA_DXT5 
CODE_SRGB8 
CODE_SRGBA8 
CODE_SL8 
CODE_SLA8 
CODE_SRGB_DXT1 
CODE_SRGBA_DXT1 
CODE_SRGBA_DXT3 
CODE_SRGBA_DXT5 
CODE_DEPTH16 
CODE_DEPTH24 
CODE_DEPTH32 
CODE_DEPTH32F 
CODE_STENCIL1 
CODE_STENCIL4 
CODE_STENCIL8 
CODE_STENCIL16 
CODE_DEPTH24_STENCIL8 
CODE_NUM 

◆ ColorSpace

Enumerator
COLOR_SPACE_NONE 
COLOR_SPACE_RGB 
COLOR_SPACE_HSV 
COLOR_SPACE_YUV 
COLOR_SPACE_SRGB 

◆ NumberFormat

Enumerator
FLOATING_POINT_FORMAT 
INTEGER_FORMAT 
NORMALIZED_FIXED_POINT_FORMAT 
OTHER 

Member Function Documentation

◆ A16()

static const ImageFormat* G3D::ImageFormat::A16 ( )
static

◆ A16F()

static const ImageFormat* G3D::ImageFormat::A16F ( )
static

◆ A32F()

static const ImageFormat* G3D::ImageFormat::A32F ( )
static

◆ A8()

static const ImageFormat* G3D::ImageFormat::A8 ( )
static

◆ AUTO()

static const ImageFormat* G3D::ImageFormat::AUTO ( )
inlinestatic


NULL pointer; indicates that the G3D::Texture class should choose either RGBA8 or RGB8 depending on the presence of an alpha channel in the input.

◆ BGR8()

static const ImageFormat* G3D::ImageFormat::BGR8 ( )
static

◆ BGRA8()

static const ImageFormat* G3D::ImageFormat::BGRA8 ( )
static

◆ canInterpretAs()

bool G3D::ImageFormat::canInterpretAs ( const ImageFormat otherFormat) const

True if data in otherFormat is binary compatible.

◆ channelMask()

Color4 G3D::ImageFormat::channelMask ( ) const

Returns a Color4 that masks off unused components in the format, given in RGBA For example, the mask for R32F is (1,0,0,0), for A32F is (0,0,0,1), for RGB32F is (1,1,1,0).

(Note that luminance is interpreted as using only the R channel, even though RGB would make more sense to me...)

◆ conversionAvailable()

static bool G3D::ImageFormat::conversionAvailable ( const ImageFormat srcFormat,
int  srcRowPadBits,
const ImageFormat dstFormat,
int  dstRowPadBits,
bool  invertY = false 
)
static

Checks if a conversion between two formats is available.

Deprecated:
See also
G3D::ImageConvert

◆ convert()

static bool G3D::ImageFormat::convert ( const Array< const void *> &  srcBytes,
int  srcWidth,
int  srcHeight,
const ImageFormat srcFormat,
int  srcRowPadBits,
const Array< void *> &  dstBytes,
const ImageFormat dstFormat,
int  dstRowPadBits,
bool  invertY = false,
BayerAlgorithm  bayerAlg = BayerAlgorithm::MHC 
)
static

Converts between arbitrary formats on the CPU.

Not all format conversions are supported or directly supported. Formats without direct conversions will attempt to convert through RGBA first.

A conversion routine might only support source or destination padding or y inversion or none. If support is needed and not available in any of the direct conversion routines, then no conversion is done.

YUV422 expects data in YUY2 format (Y, U, Y2, v). Most YUV formats require width and heights that are multiples of 2.

Returns true if a conversion was available, false if none occurred.

Deprecated:
See also
G3D::ImageConvert

◆ depth()

static const ImageFormat* G3D::ImageFormat::depth ( int  depthBits = 24)
static

Returns DEPTH16, DEPTH24, or DEPTH32 according to the bits specified.

You can use "glGetInteger(GL_DEPTH_BITS)" to match the screen's format.

◆ DEPTH16()

static const ImageFormat* G3D::ImageFormat::DEPTH16 ( )
static

◆ DEPTH24()

static const ImageFormat* G3D::ImageFormat::DEPTH24 ( )
static

◆ DEPTH24_STENCIL8()

static const ImageFormat* G3D::ImageFormat::DEPTH24_STENCIL8 ( )
static

◆ DEPTH32()

static const ImageFormat* G3D::ImageFormat::DEPTH32 ( )
static

◆ DEPTH32F()

static const ImageFormat* G3D::ImageFormat::DEPTH32F ( )
static

◆ floatFormat()

static const ImageFormat* G3D::ImageFormat::floatFormat ( int  numChannels)
static

Returns R32F, RG32F, RGB32F, or RGBA32F according to the channels specified.

◆ fromCode()

static const ImageFormat* G3D::ImageFormat::fromCode ( ImageFormat::Code  code)
static

Returns the matching ImageFormat* identified by the Code.

May return NULL if this format's code is reserved but not yet implemented by G3D.

◆ fromString()

static const ImageFormat* G3D::ImageFormat::fromString ( const String s)
static

Takes the same values that name() returns.

◆ getFormatWithAlpha()

static const ImageFormat* G3D::ImageFormat::getFormatWithAlpha ( const ImageFormat otherFormat)
static

Returns ImageFormat representing the same channels as otherFormat plus an alpha channel, all with at least the same precision as otherFormat, or returns NULL if an equivalent format is unavailable.

Will return itself if already contains an alpha channel.

◆ getSRGBFormat()

static const ImageFormat* G3D::ImageFormat::getSRGBFormat ( const ImageFormat otherFormat)
static

◆ isIntegerFormat()

bool G3D::ImageFormat::isIntegerFormat ( ) const
inline

◆ L16()

static const ImageFormat* G3D::ImageFormat::L16 ( )
static

◆ L16F()

static const ImageFormat* G3D::ImageFormat::L16F ( )
static

◆ L32F()

static const ImageFormat* G3D::ImageFormat::L32F ( )
static

◆ L8()

static const ImageFormat* G3D::ImageFormat::L8 ( )
static

◆ LA16()

static const ImageFormat* G3D::ImageFormat::LA16 ( )
static

◆ LA16F()

static const ImageFormat* G3D::ImageFormat::LA16F ( )
static

◆ LA32F()

static const ImageFormat* G3D::ImageFormat::LA32F ( )
static

◆ LA4()

static const ImageFormat* G3D::ImageFormat::LA4 ( )
static

◆ LA8()

static const ImageFormat* G3D::ImageFormat::LA8 ( )
static

◆ name()

const String& G3D::ImageFormat::name ( ) const

Human readable name of this format.

◆ openGLShaderImageFormat()

int G3D::ImageFormat::openGLShaderImageFormat ( ) const

Provide the OpenGL format that should be used to bind to a GLSL shader image.

◆ R11G11B10F()

static const ImageFormat* G3D::ImageFormat::R11G11B10F ( )
static

◆ R16()

static const ImageFormat* G3D::ImageFormat::R16 ( )
static

◆ R16_SNORM()

static const ImageFormat* G3D::ImageFormat::R16_SNORM ( )
static

◆ R16F()

static const ImageFormat* G3D::ImageFormat::R16F ( )
static

◆ R16I()

static const ImageFormat* G3D::ImageFormat::R16I ( )
static

◆ R16UI()

static const ImageFormat* G3D::ImageFormat::R16UI ( )
static

◆ R32F()

static const ImageFormat* G3D::ImageFormat::R32F ( )
static

◆ R32I()

static const ImageFormat* G3D::ImageFormat::R32I ( )
static

◆ R32UI()

static const ImageFormat* G3D::ImageFormat::R32UI ( )
static

◆ R8()

static const ImageFormat* G3D::ImageFormat::R8 ( )
static

◆ R8_SNORM()

static const ImageFormat* G3D::ImageFormat::R8_SNORM ( )
static

◆ R8I()

static const ImageFormat* G3D::ImageFormat::R8I ( )
static

◆ R8UI()

static const ImageFormat* G3D::ImageFormat::R8UI ( )
static

◆ representableAsColor1unorm8()

bool G3D::ImageFormat::representableAsColor1unorm8 ( ) const

Does this contain exactly one unorm8 component?

◆ representableAsColor2unorm8()

bool G3D::ImageFormat::representableAsColor2unorm8 ( ) const

Does this contain exactly two unorm8 components?

◆ representableAsColor3unorm8()

bool G3D::ImageFormat::representableAsColor3unorm8 ( ) const

Does this contain exactly three unorm8 components?

◆ representableAsColor4unorm8()

bool G3D::ImageFormat::representableAsColor4unorm8 ( ) const

Does this contain exactly four unorm8 components?

◆ RG16()

static const ImageFormat* G3D::ImageFormat::RG16 ( )
static

◆ RG16_SNORM()

static const ImageFormat* G3D::ImageFormat::RG16_SNORM ( )
static

◆ RG16F()

static const ImageFormat* G3D::ImageFormat::RG16F ( )
static

◆ RG16I()

static const ImageFormat* G3D::ImageFormat::RG16I ( )
static

◆ RG16UI()

static const ImageFormat* G3D::ImageFormat::RG16UI ( )
static

◆ RG32F()

static const ImageFormat* G3D::ImageFormat::RG32F ( )
static

◆ RG32I()

static const ImageFormat* G3D::ImageFormat::RG32I ( )
static

◆ RG32UI()

static const ImageFormat* G3D::ImageFormat::RG32UI ( )
static

◆ RG8()

static const ImageFormat* G3D::ImageFormat::RG8 ( )
static

◆ RG8_SNORM()

static const ImageFormat* G3D::ImageFormat::RG8_SNORM ( )
static

◆ RG8I()

static const ImageFormat* G3D::ImageFormat::RG8I ( )
static

◆ RG8UI()

static const ImageFormat* G3D::ImageFormat::RG8UI ( )
static

◆ RGB10()

static const ImageFormat* G3D::ImageFormat::RGB10 ( )
static

◆ RGB10A2()

static const ImageFormat* G3D::ImageFormat::RGB10A2 ( )
static

◆ RGB16()

static const ImageFormat* G3D::ImageFormat::RGB16 ( )
static

◆ RGB16_SNORM()

static const ImageFormat* G3D::ImageFormat::RGB16_SNORM ( )
static

◆ RGB16F()

static const ImageFormat* G3D::ImageFormat::RGB16F ( )
static

◆ RGB32F()

static const ImageFormat* G3D::ImageFormat::RGB32F ( )
static

◆ RGB32I()

static const ImageFormat* G3D::ImageFormat::RGB32I ( )
static

◆ RGB32UI()

static const ImageFormat* G3D::ImageFormat::RGB32UI ( )
static

◆ RGB5()

static const ImageFormat* G3D::ImageFormat::RGB5 ( )
static

◆ RGB5A1()

static const ImageFormat* G3D::ImageFormat::RGB5A1 ( )
static

◆ RGB8()

static const ImageFormat* G3D::ImageFormat::RGB8 ( )
static

◆ RGB8_SNORM()

static const ImageFormat* G3D::ImageFormat::RGB8_SNORM ( )
static

◆ RGB8I()

static const ImageFormat* G3D::ImageFormat::RGB8I ( )
static

◆ RGB8UI()

static const ImageFormat* G3D::ImageFormat::RGB8UI ( )
static

◆ RGB9E5F()

static const ImageFormat* G3D::ImageFormat::RGB9E5F ( )
static

◆ RGB_DXT1()

static const ImageFormat* G3D::ImageFormat::RGB_DXT1 ( )
static

◆ RGBA16()

static const ImageFormat* G3D::ImageFormat::RGBA16 ( )
static

◆ RGBA16_SNORM()

static const ImageFormat* G3D::ImageFormat::RGBA16_SNORM ( )
static

◆ RGBA16F()

static const ImageFormat* G3D::ImageFormat::RGBA16F ( )
static

◆ RGBA16I()

static const ImageFormat* G3D::ImageFormat::RGBA16I ( )
static

◆ RGBA16UI()

static const ImageFormat* G3D::ImageFormat::RGBA16UI ( )
static

◆ RGBA2()

static const ImageFormat* G3D::ImageFormat::RGBA2 ( )
static

◆ RGBA32F()

static const ImageFormat* G3D::ImageFormat::RGBA32F ( )
static

◆ RGBA32I()

static const ImageFormat* G3D::ImageFormat::RGBA32I ( )
static

◆ RGBA32UI()

static const ImageFormat* G3D::ImageFormat::RGBA32UI ( )
static

◆ RGBA4()

static const ImageFormat* G3D::ImageFormat::RGBA4 ( )
static

◆ RGBA8()

static const ImageFormat* G3D::ImageFormat::RGBA8 ( )
static

◆ RGBA8_SNORM()

static const ImageFormat* G3D::ImageFormat::RGBA8_SNORM ( )
static

◆ RGBA8I()

static const ImageFormat* G3D::ImageFormat::RGBA8I ( )
static

◆ RGBA8UI()

static const ImageFormat* G3D::ImageFormat::RGBA8UI ( )
static

◆ RGBA_DXT1()

static const ImageFormat* G3D::ImageFormat::RGBA_DXT1 ( )
static

◆ RGBA_DXT3()

static const ImageFormat* G3D::ImageFormat::RGBA_DXT3 ( )
static

◆ RGBA_DXT5()

static const ImageFormat* G3D::ImageFormat::RGBA_DXT5 ( )
static

◆ sameComponents()

bool G3D::ImageFormat::sameComponents ( const ImageFormat other) const

Returns true if these formats have the same components (possibly in different NumberFormats or sizes)

◆ SL8()

static const ImageFormat* G3D::ImageFormat::SL8 ( )
static

◆ SLA8()

static const ImageFormat* G3D::ImageFormat::SLA8 ( )
static

◆ SRGB8()

static const ImageFormat* G3D::ImageFormat::SRGB8 ( )
static

◆ SRGB_DXT1()

static const ImageFormat* G3D::ImageFormat::SRGB_DXT1 ( )
static

◆ SRGBA8()

static const ImageFormat* G3D::ImageFormat::SRGBA8 ( )
static

◆ SRGBA_DXT1()

static const ImageFormat* G3D::ImageFormat::SRGBA_DXT1 ( )
static

◆ SRGBA_DXT3()

static const ImageFormat* G3D::ImageFormat::SRGBA_DXT3 ( )
static

◆ SRGBA_DXT5()

static const ImageFormat* G3D::ImageFormat::SRGBA_DXT5 ( )
static

◆ stencil()

static const ImageFormat* G3D::ImageFormat::stencil ( int  bits = 8)
static

Returns STENCIL1, STENCIL4, STENCIL8 or STENCIL16 according to the bits specified.

You can use "glGetInteger(GL_STENCIL_BITS)" to match the screen's format.

◆ STENCIL1()

static const ImageFormat* G3D::ImageFormat::STENCIL1 ( )
static

◆ STENCIL16()

static const ImageFormat* G3D::ImageFormat::STENCIL16 ( )
static

◆ STENCIL4()

static const ImageFormat* G3D::ImageFormat::STENCIL4 ( )
static

◆ STENCIL8()

static const ImageFormat* G3D::ImageFormat::STENCIL8 ( )
static

◆ YUV420_PLANAR()

static const ImageFormat* G3D::ImageFormat::YUV420_PLANAR ( )
static

◆ YUV422()

static const ImageFormat* G3D::ImageFormat::YUV422 ( )
static

◆ YUV444()

static const ImageFormat* G3D::ImageFormat::YUV444 ( )
static

Member Data Documentation

◆ alphaBits

int G3D::ImageFormat::alphaBits

Number of bits per pixel storage for alpha values; Zero for compressed textures and non-RGB.

◆ bayerPattern

BayerPattern G3D::ImageFormat::bayerPattern

If this is a Bayer format, what is the pattern.

◆ blueBits

int G3D::ImageFormat::blueBits

Number of bits per pixel storage for blue values; Zero for compressed textures and non-RGB.

◆ code

Code G3D::ImageFormat::code

Useful for serializing.

Referenced by G3D::Texture::Encoding::hashCode().

◆ colorSpace

ColorSpace G3D::ImageFormat::colorSpace

◆ compressed

bool G3D::ImageFormat::compressed

◆ cpuBitsPerPixel

int G3D::ImageFormat::cpuBitsPerPixel

Amount of CPU memory per pixel when packed into an array, discounting any end-of-row padding.

◆ depthBits

int G3D::ImageFormat::depthBits

Number of depth bits (for depth textures; e.g.

shadow maps)

◆ floatingPoint

bool G3D::ImageFormat::floatingPoint

True if the bit depths specified are for float formats.

TODO: Remove, replace with function keying off numberFormat

◆ greenBits

int G3D::ImageFormat::greenBits

Number of bits per pixel storage for green values; Zero for compressed textures and non-RGB.

◆ luminanceBits

int G3D::ImageFormat::luminanceBits

◆ numberFormat

NumberFormat G3D::ImageFormat::numberFormat

Indicates whether this format treats numbers as signed/unsigned integers, floating point, or signed/unsigned normalized fixed point.

Referenced by isIntegerFormat().

◆ numComponents

int G3D::ImageFormat::numComponents

Number of channels (1 for a depth texture).

Referenced by G3D::OptiXTriTree::optixSupportsTexture(), and G3D::VulkanTriTree::optixSupportsTexture().

◆ opaque

bool G3D::ImageFormat::opaque

True if there is no alpha channel for this texture.

◆ openGLBaseFormat

int G3D::ImageFormat::openGLBaseFormat

The OpenGL base format equivalent to this one (e.g., GL_RGB, GL_ALPHA).

Zero if there is no equivalent.

◆ openGLBitsPerPixel

int G3D::ImageFormat::openGLBitsPerPixel


Amount of GPU memory per pixel on most graphics cards, for formats supported by OpenGL.

This is only an estimate–the actual amount of memory may be different on your actual card.

This may be greater than the sum of the per-channel bits because graphics cards need to pad to the nearest 1, 2, or 4 bytes.

Referenced by G3D::GBuffer::Specification::memorySize().

◆ openGLDataFormat

int G3D::ImageFormat::openGLDataFormat

The OpenGL bytes (type) format of the data buffer used with this texture format, e.g., GL_UNSIGNED_BYTE.

◆ openGLFormat

int G3D::ImageFormat::openGLFormat

The OpenGL format equivalent to this one, e.g, GL_RGB8 Zero if there is no equivalent.

This is actually a GLenum

◆ redBits

int G3D::ImageFormat::redBits

Number of bits per pixel storage for red values; Zero for compressed textures and non-RGB.

◆ stencilBits

int G3D::ImageFormat::stencilBits

Number of bits per pixel.


documentation generated on Wed Nov 24 2021 08:01:57 using doxygen 1.8.15