|
GL Studio Safety Critical Embedded C++ Runtime Library
|
#include <gls_image.h>
Classes | |
| class | ImageList |
| struct | InitParameters |
| struct | InlineImage |
Public Types | |
| enum | ImageCodec { IMAGE_CODEC_RAW, IMAGE_CODEC_RLE } |
| enum | InputPixelFormat { INPUT_PIXEL_FORMAT_RGB, INPUT_PIXEL_FORMAT_RGBA, INPUT_PIXEL_FORMAT_ALPHA } |
Public Member Functions | |
| void | BindTexture (GlsStateManager &gl) const |
| GlsBool | IsEqual (const InlineImage &inlineImage) const |
Static Public Member Functions | |
| static void | Initialize (const InitParameters &initParameters) |
| static GlsImage * | GetGlsImageFromInlineImage (const InlineImage &inlineImage, const GlsBool checkForDuplicate) |
Protected Types | |
| enum | { PIXEL_GL_RED_COMPONENT = 0u, PIXEL_GL_GREEN_COMPONENT, PIXEL_GL_BLUE_COMPONENT, PIXEL_GL_ALPHA_COMPONENT, NUM_BYTES_PER_PIXEL_GL } |
Protected Member Functions | |
| GlsImage (const InlineImage &inlineImage) | |
| void | DecodeImage (const InlineImage &inlineImage) |
| GlsUInt32 | PixelSizeFromInputPixelFormat (const GlsImage::InputPixelFormat inputPixelFormat) const |
| virtual | ~GlsImage () |
Protected Attributes | |
| GLuint | _textureHandle |
| const InputPixelFormat | _inputPixelFormat |
| const GlsUInt32 | _width |
| const GlsUInt32 | _height |
| const GlsUInt32 | _crcValue |
Static Protected Attributes | |
| static const GLuint | INVALID_TEXTURE_HANDLE = 0u |
| static const GlsUInt32 | NUM_BYTES_PER_INPUT_PIXEL_FORMAT_RGB = 3u |
| static const GlsUInt32 | NUM_BYTES_PER_INPUT_PIXEL_FORMAT_RGBA = 4u |
| static const GlsUInt32 | NUM_BYTES_PER_INPUT_PIXEL_FORMAT_ALPHA = 1u |
| static ImageList * | _imageList |
| static GlsUChar * | _scanlineImageData |
Encapsulates a 2D image
|
protected |
corresponds to layout of a GL_RGBA8 pixel
| enum GlsImage::ImageCodec |
|
protected |
Constructor - create an image from the given inline image
| inlineImage | inline image in question |
|
protectedvirtual |
Destructor - shall never be called
| void GlsImage::BindTexture | ( | GlsStateManager & | gl | ) | const |
Make this image the active GL texture.
|
protected |
decode the given inline image and upload to GL
| inlineImage | inline image in question |
|
static |
Get an Image object with the given GlsInlineImage data. If checkForDuplicate is GLS_TRUE, this method checks to see if an image has already been constructed for the GlsInlineImage and if found, returns the previously constructed image.
| inlineImage | GlsInlineImage in question |
| checkForDuplicate | GLS_TRUE to check if this inline image is a duplicate of an existing image else GLS_FALSE |
|
static |
Initialize the GlsImage subsystem. This is a one time call that must be made before the image subsystem can be used.
| initParameters | initialization parameters for GlsImage subsystem |
| GlsBool GlsImage::IsEqual | ( | const InlineImage & | inlineImage | ) | const |
Determine if this image matches the given inline image
| inlineImage | inline image in question |
|
protected |
Get the number of bytes required per pixel for the given format
| inputPixelFormat | format in question |
|
protected |
CRC value used to determine if two images are the same
|
protected |
height of image in pixels. must be a power of 2
|
staticprotected |
singleton image list
|
protected |
Input pixel format of image
|
staticprotected |
intermediate image buffer for RGBA image data scanline, number of bytes = ( NUM_BYTES_PER_PIXEL_GL * _maxWidth
|
protected |
The texture handle of the image, else INVALID_TEXTURE_HANDLE
|
protected |
width of image in pixels. must be a power of 2
|
staticprotected |
value indicating invalid texture handle
|
staticprotected |
number of bytes per input pixel for INPUT_PIXEL_FORMAT_ALPHA
|
staticprotected |
number of bytes per input pixel for INPUT_PIXEL_FORMAT_RGB
|
staticprotected |
number of bytes per input pixel for INPUT_PIXEL_FORMAT_RGBA