Class TglBitmapFormatDescriptor
Unit
glBitmap
Declaration
type TglBitmapFormatDescriptor = class(TObject)
Description
describes the properties of a given texture data format
Hierarchy
- TObject
- TglBitmapFormatDescriptor
Overview
Fields
Methods
Properties
Description
Fields
|
fBytesPerPixel: Single; |
number of bytes for each pixel
|
|
fChannelCount: Integer; |
number of color channels
|
|
fOpenGLFormat: TglBitmapFormat; |
suitable format that is supported by OpenGL
|
|
fBitsPerPixel: Integer; |
number of bits per pixel
|
|
fIsCompressed: Boolean; |
True if the format is compressed, False otherwise
|
|
fglFormat: GLenum; |
OpenGL format enum (e.g. GL_RGB)
|
|
fglInternalFormat: GLenum; |
OpenGL internal format enum (e.g. GL_RGB8)
|
|
fglDataFormat: GLenum; |
OpenGL data format enum (e.g. GL_UNSIGNED_BYTE)
|
Methods
|
function GetHasRed: Boolean; |
Returns
True if the format has a red color channel, False otherwise
|
|
function GetHasGreen: Boolean; |
Returns
True if the format has a green color channel, False otherwise
|
|
function GetHasBlue: Boolean; |
Returns
True if the format has a blue color channel, False otherwise
|
|
function GetHasAlpha: Boolean; |
Returns
True if the format has a alpha color channel, False otherwise
|
|
function GetHasColor: Boolean; |
Returns
True if the format has any color color channel, False otherwise
|
|
function GetIsGrayscale: Boolean; |
Returns
True if the format is a grayscale format, False otherwise
|
|
procedure SetValues; virtual; |
set values for this format descriptor
|
|
procedure CalcValues; |
calculate cached values
|
|
function GetSize(const aSize: TglBitmapSize): Integer; overload; virtual; |
|
|
function GetSize(const aWidth, aHeight: Integer): Integer; overload; virtual; |
|
|
constructor Create; |
constructor
|
|
class function GetByFormat(const aInternalFormat: GLenum): TglBitmapFormatDescriptor; |
get the format descriptor by a given OpenGL internal format
Parameters
- aInternalFormat
- OpenGL internal format to get format descriptor for
Returns
suitable format descriptor or tfEmpty-Descriptor |
Properties
|
property ChannelCount: Integer read fChannelCount; |
number of color channels
|
|
property IsCompressed: Boolean read fIsCompressed; |
True if the format is compressed, False otherwise
|
|
property BitsPerPixel: Integer read fBitsPerPixel; |
number of bytes per pixel
|
|
property BytesPerPixel: Single read fBytesPerPixel; |
number of bits per pixel
|
|
property glFormat: GLenum read fglFormat; |
OpenGL format enum (e.g. GL_RGB)
|
|
property glInternalFormat: GLenum read fglInternalFormat; |
OpenGL internal format enum (e.g. GL_RGB8)
|
|
property glDataFormat: GLenum read fglDataFormat; |
OpenGL data format enum (e.g. GL_UNSIGNED_BYTE)
|
|
property HasRed: Boolean read GetHasRed; |
True if the format has a red color channel, False otherwise
|
|
property HasGreen: Boolean read GetHasGreen; |
True if the format has a green color channel, False otherwise
|
|
property HasBlue: Boolean read GetHasBlue; |
True if the format has a blue color channel, False otherwise
|
|
property HasAlpha: Boolean read GetHasAlpha; |
True if the format has a alpha color channel, False otherwise
|
|
property HasColor: Boolean read GetHasColor; |
True if the format has any color color channel, False otherwise
|
|
property IsGrayscale: Boolean read GetIsGrayscale; |
True if the format is a grayscale format, False otherwise
|
Generated by PasDoc 0.13.0 on 2014-12-24 04:27:09
|