![]() |
Murl Engine API
Version 2018.3
|
The IImage resource object interface. More...
#include <murl_resource_i_image.h>
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.
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... | |
|
pure virtual |
Get the mutable Resource::IObject interface.
|
pure virtual |
Get the constant Resource::IObject interface.
|
pure virtual |
Get the texture type represented by the image.
|
pure virtual |
Get the number of individual image streams.
|
pure virtual |
Get the number of image layers.
For non-array images, this always returns 1.
|
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.
|
pure virtual |
Get the stream index for a given layer and face index.
layerIndex | The layer index, from 0 to GetNumberOfLayers()-1. |
faceIndex | The face index, from 0 to GetNumberOfFaces()-1. |
|
pure virtual |
Get the number of actual MIP levels stored in the image resource.
streamIndex | The index of the stream, from 0 to GetNumberOfStreams()-1. |
Get the image's horizontal size in pixels, at the base MIP level.
streamIndex | The index of the stream, from 0 to GetNumberOfStreams()-1. |
Get the image's vertical size in pixels, at the base MIP level.
streamIndex | The index of the stream, from 0 to GetNumberOfStreams()-1. |
|
pure virtual |
Get the image's native pixel format.
streamIndex | The index of the stream, from 0 to GetNumberOfStreams()-1. |
|
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.
streamIndex | The index of the stream, from 0 to GetNumberOfStreams()-1. |
|
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.
streamIndex | The index of the stream, from 0 to GetNumberOfStreams()-1. |
|
pure virtual |
Get the image's actual format.
streamIndex | The index of the stream, from 0 to GetNumberOfStreams()-1. |
|
pure virtual |
Create an IVideoStream object from the resource, with default pixel format and size.
streamIndex | The index of the stream, from 0 to GetNumberOfStreams()-1. |
mipMapGen | The MIP map generation mode. |
|
pure virtual |
Create an IVideoStream object from the resource, with custom pixel format and size.
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. |
Create a default binary encoded image.
data | The Data object to receive the encoded image. |
|
pure virtual |
Create a binary encoded image, explicit stream and pixel formats and size.
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. |