#include <OgrePixelFormat.h>
Static Public Member Functions | |
static size_t | getNumElemBytes (PixelFormat format) |
Returns the size in bytes of an element of the given pixel format. | |
static size_t | getNumElemBits (PixelFormat format) |
Returns the size in bits of an element of the given pixel format. | |
static size_t | getMemorySize (size_t width, size_t height, size_t depth, PixelFormat format) |
Returns the size in memory of a region with the given extents and pixel format with consecutive memory layout. | |
static unsigned int | getFlags (PixelFormat format) |
Returns the property flags for this pixel format. | |
static bool | hasAlpha (PixelFormat format) |
Shortcut method to determine if the format has an alpha component. | |
static bool | isFloatingPoint (PixelFormat format) |
Shortcut method to determine if the format is floating point. | |
static bool | isCompressed (PixelFormat format) |
Shortcut method to determine if the format is compressed. | |
static bool | isDepth (PixelFormat format) |
Shortcut method to determine if the format is a depth format. | |
static bool | isNativeEndian (PixelFormat format) |
Shortcut method to determine if the format is in native endian format. | |
static bool | isLuminance (PixelFormat format) |
Shortcut method to determine if the format is a luminance format. | |
static bool | isValidExtent (size_t width, size_t height, size_t depth, PixelFormat format) |
Return wether a certain image extent is valid for this image format. | |
static void | getBitDepths (PixelFormat format, int rgba[4]) |
Gives the number of bits (RGBA) for a format. | |
static void | getBitMasks (PixelFormat format, uint32 rgba[4]) |
Gives the masks for the R, G, B and A component. | |
static String | getFormatName (PixelFormat srcformat) |
Gets the name of an image format. | |
static bool | isAccessible (PixelFormat srcformat) |
Returns wether the format can be packed or unpacked with the packColour() and unpackColour() functions. | |
static PixelComponentType | getComponentType (PixelFormat fmt) |
Returns the component type for a certain pixel format. | |
static size_t | getComponentCount (PixelFormat fmt) |
Returns the component count for a certain pixel format. | |
static PixelFormat | getFormatFromName (const String &name, bool accessibleOnly=false, bool caseSensitive=false) |
Gets the format from given name. | |
static String | getBNFExpressionOfPixelFormats (bool accessibleOnly=false) |
Gets the BNF expression of the pixel-formats. | |
static PixelFormat | getFormatForBitDepths (PixelFormat fmt, ushort integerBits, ushort floatBits) |
Returns the similar format but acoording with given bit depths. | |
static void | packColour (const ColourValue &colour, const PixelFormat pf, void *dest) |
Pack a colour value to memory. | |
static void | packColour (const uint8 r, const uint8 g, const uint8 b, const uint8 a, const PixelFormat pf, void *dest) |
Pack a colour value to memory. | |
static void | packColour (const float r, const float g, const float b, const float a, const PixelFormat pf, void *dest) |
Pack a colour value to memory. | |
static void | unpackColour (ColourValue *colour, PixelFormat pf, const void *src) |
Unpack a colour value from memory. | |
static void | unpackColour (uint8 *r, uint8 *g, uint8 *b, uint8 *a, PixelFormat pf, const void *src) |
Unpack a colour value from memory. | |
static void | unpackColour (float *r, float *g, float *b, float *a, PixelFormat pf, const void *src) |
Unpack a colour value from memory. | |
static void | bulkPixelConversion (void *src, PixelFormat srcFormat, void *dest, PixelFormat dstFormat, unsigned int count) |
Convert consecutive pixels from one format to another. | |
static void | bulkPixelConversion (const PixelBox &src, const PixelBox &dst) |
Convert pixels from one format to another. |
Definition at line 272 of file OgrePixelFormat.h.
|
Convert pixels from one format to another. No dithering or filtering is being done. Converting from RGB to luminance takes the R channel.
|
|
Convert consecutive pixels from one format to another. No dithering or filtering is being done. Converting from RGB to luminance takes the R channel. In case the source and destination format match, just a copy is done.
|
|
Gives the number of bits (RGBA) for a format. See remarks.
|
|
Gives the masks for the R, G, B and A component.
|
|
Gets the BNF expression of the pixel-formats.
|
|
Returns the component count for a certain pixel format. Returns 3(no alpha) or 4 (has alpha) in case there is no clear component type like with compressed formats. |
|
Returns the component type for a certain pixel format. Returns PCT_BYTE in case there is no clear component type like with compressed formats. This is one of PCT_BYTE, PCT_SHORT, PCT_FLOAT16, PCT_FLOAT32. |
|
Returns the property flags for this pixel format.
|
|
Returns the similar format but acoording with given bit depths.
|
|
Gets the format from given name.
|
|
Gets the name of an image format.
|
|
Returns the size in memory of a region with the given extents and pixel format with consecutive memory layout.
|
|
Returns the size in bits of an element of the given pixel format.
|
|
Returns the size in bytes of an element of the given pixel format.
|
|
Shortcut method to determine if the format has an alpha component.
|
|
Returns wether the format can be packed or unpacked with the packColour() and unpackColour() functions. This is generally not true for compressed and depth formats as they are special. It can only be true for formats with a fixed element size.
|
|
Shortcut method to determine if the format is compressed.
|
|
Shortcut method to determine if the format is a depth format.
|
|
Shortcut method to determine if the format is floating point.
|
|
Shortcut method to determine if the format is a luminance format.
|
|
Shortcut method to determine if the format is in native endian format.
|
|
Return wether a certain image extent is valid for this image format.
|
|
Pack a colour value to memory.
|
|
Pack a colour value to memory.
|
|
Pack a colour value to memory.
|
|
Unpack a colour value from memory.
|
|
Unpack a colour value from memory.
|
|
Unpack a colour value from memory.
|
Copyright © 2000-2005 by The OGRE Team
This work is licensed under a Creative Commons Attribution-ShareAlike 2.5 License.
Last modified Mon Aug 20 13:54:22 2007