The IImage resource object interface. More...
#include "murl_resource_i_image.h"
Classes | |
struct | Iff |
IFF file specific structs. More... | |
Public Member Functions | |
virtual IObject * | GetObjectInterface ()=0 |
Get the mutable Resource::IObject interface. More... | |
virtual const IObject * | GetObjectInterface () const =0 |
Get the constant Resource::IObject interface. More... | |
virtual IEnums::TextureType | GetTextureType () const =0 |
Get the texture type represented by the image. More... | |
virtual UInt32 | GetNumberOfStreams () const =0 |
Get the number of individual image streams. More... | |
virtual UInt32 | GetNumberOfLayers () const =0 |
Get the number of image layers. More... | |
virtual UInt32 | GetNumberOfFaces () const =0 |
Get the number of image faces. More... | |
virtual SInt32 | GetStreamIndex (UInt32 layerIndex, UInt32 faceIndex) const =0 |
Get the stream index for a given layer and face index. More... | |
virtual UInt32 | GetNumberOfMipLevels (UInt32 streamIndex) const =0 |
Get the number of actual MIP levels stored in the image resource. More... | |
virtual UInt32 | GetPixelSizeX (UInt32 streamIndex) const =0 |
Get the image's horizontal size in pixels, at the base MIP level. More... | |
virtual UInt32 | GetPixelSizeY (UInt32 streamIndex) const =0 |
Get the image's vertical size in pixels, at the base MIP level. More... | |
virtual IEnums::PixelFormat | GetNativePixelFormat (UInt32 streamIndex) const =0 |
Get the image's native pixel format. More... | |
virtual IEnums::PixelFormat | GetPreferredPixelFormat (UInt32 streamIndex) const =0 |
Get the image's preferred pixel format. More... | |
virtual IEnums::PixelFormat | GetForcedPixelFormat (UInt32 streamIndex) const =0 |
Get the image's forced pixel format, when no conversion is available. More... | |
virtual IEnums::VideoStreamFormat | GetVideoStreamFormat (UInt32 streamIndex) const =0 |
Get the image's actual format. More... | |
virtual IVideoStream * | CreateStream (UInt32 streamIndex, IEnums::MipMapGenerationMode mipMapGen) const =0 |
Create an IVideoStream object from the resource, with default pixel format and size. More... | |
virtual IVideoStream * | CreateStream (UInt32 streamIndex, IEnums::PixelFormat pixelFormat, UInt32 pixelSizeX, UInt32 pixelSizeY, UInt32 divisor, IEnums::MipMapGenerationMode mipMapGen) const =0 |
Create an IVideoStream object from the resource, with custom pixel format and size. More... | |
virtual Bool | CreateDefaultBinary (Data &data) const =0 |
Create a default binary encoded image. More... | |
virtual Bool | CreateBinary (Data &data, IEnums::VideoStreamFormat streamFormat, IEnums::PixelFormat pixelFormat, UInt32 sizeX, UInt32 sizeY) const =0 |
Create a binary encoded image, explicit stream and pixel formats and size. More... | |
Detailed Description
The IImage resource object interface.
An image resource holds a (possibly compressed) bitmap image in one of the available image formats, such as PNG, JPG etc.
Member Function Documentation
◆ GetObjectInterface() [1/2]
|
pure virtual |
Get the mutable Resource::IObject interface.
- Returns
- The IObject interface.
◆ GetObjectInterface() [2/2]
|
pure virtual |
Get the constant Resource::IObject interface.
- Returns
- The IObject interface.
◆ GetTextureType()
|
pure virtual |
Get the texture type represented by the image.
- Returns
- The texture type.
◆ GetNumberOfStreams()
|
pure virtual |
Get the number of individual image streams.
- Returns
- The number of streams.
◆ GetNumberOfLayers()
|
pure virtual |
Get the number of image layers.
For non-array images, this always returns 1.
- Returns
- The number of layers.
◆ GetNumberOfFaces()
|
pure virtual |
Get the number of image faces.
For flat images or arrays, this always returns 1. For cubemap images or arrays, this returns 6.
- Returns
- The number of faces.
◆ GetStreamIndex()
|
pure virtual |
Get the stream index for a given layer and face index.
- Parameters
-
layerIndex The layer index, from 0 to GetNumberOfLayers()-1. faceIndex The face index, from 0 to GetNumberOfFaces()-1.
- Returns
- The stream index from 0 to GetNumberOfStreams()-1, or -1 if any of the given parameters is out of range.
◆ GetNumberOfMipLevels()
|
pure virtual |
Get the number of actual MIP levels stored in the image resource.
- Parameters
-
streamIndex The index of the stream, from 0 to GetNumberOfStreams()-1.
- Returns
- The number of MIP levels.
◆ GetPixelSizeX()
Get the image's horizontal size in pixels, at the base MIP level.
- Parameters
-
streamIndex The index of the stream, from 0 to GetNumberOfStreams()-1.
- Returns
- The horizontal size.
◆ GetPixelSizeY()
Get the image's vertical size in pixels, at the base MIP level.
- Parameters
-
streamIndex The index of the stream, from 0 to GetNumberOfStreams()-1.
- Returns
- The vertical size.
◆ GetNativePixelFormat()
|
pure virtual |
Get the image's native pixel format.
- Parameters
-
streamIndex The index of the stream, from 0 to GetNumberOfStreams()-1.
- Returns
- The native pixel format.
◆ GetPreferredPixelFormat()
|
pure virtual |
Get the image's preferred pixel format.
If the given image has no actual preference for the format used, this method returns IEnums::PIXEL_FORMAT_UNDEFINED. Otherwise, a specific format is returned.
- Parameters
-
streamIndex The index of the stream, from 0 to GetNumberOfStreams()-1.
- Returns
- The preferred pixel format.
◆ GetForcedPixelFormat()
|
pure virtual |
Get the image's forced pixel format, when no conversion is available.
If a pixel format converter is available that can convert the image's native format to some other format, this method should return IEnums::PIXEL_FORMAT_UNDEFINED. Otherwise, a specific format is returned. This is usually the case for images using some compressed format like ETC1, PVRTC or similar.
- Parameters
-
streamIndex The index of the stream, from 0 to GetNumberOfStreams()-1.
- Returns
- The forced pixel format.
◆ GetVideoStreamFormat()
|
pure virtual |
Get the image's actual format.
- Parameters
-
streamIndex The index of the stream, from 0 to GetNumberOfStreams()-1.
- Returns
- The stream format.
◆ CreateStream() [1/2]
|
pure virtual |
Create an IVideoStream object from the resource, with default pixel format and size.
- Parameters
-
streamIndex The index of the stream, from 0 to GetNumberOfStreams()-1. mipMapGen The MIP map generation mode.
- Returns
- The newly created stream object, or null if failed.
◆ CreateStream() [2/2]
|
pure virtual |
Create an IVideoStream object from the resource, with custom pixel format and size.
- Parameters
-
streamIndex The index of the stream, from 0 to GetNumberOfStreams()-1. pixelFormat The desired pixel format. pixelSizeX The horizontal size of the stream in pixels, at the base MIP level. pixelSizeY The vertical size of the stream in pixels, at the base MIP level. divisor An optional power-of-two prescale factor (use 1 for a 1:1 image). mipMapGen The MIP map generation mode.
- Returns
- The newly created stream object, or null if failed.
◆ CreateDefaultBinary()
Create a default binary encoded image.
- Parameters
-
data The Data object to receive the encoded image.
- Returns
- true if successful.
◆ CreateBinary()
|
pure virtual |
Create a binary encoded image, explicit stream and pixel formats and size.
- Parameters
-
data The Data object to receive the encoded image. streamFormat The stream format to use. pixelFormat The pixel format to use. sizeX The width in pixels, or 0 to encode the image using its original width. sizeY The height in pixels, or 0 to encode the image using its original height.
- Returns
- true if successful.
The documentation for this interface was generated from the following file:
- murl_resource_i_image.h