#include <gfx_image.h>
A Image texture represents a texture object with layers.
Public Member Functions | |
MAXON_METHOD Result< MediaSessionRef > | Load (const Url &url, const TimeValue &targetTime, MEDIASESSIONFLAGS flags, const Class< ImagePixelStorage > &pixelStorageClass=GetZeroRef< Class< ImagePixelStorage >>(), const LayerSetInterface *layerSet=nullptr) |
MAXON_METHOD Result< void > | Save (const MediaOutputRef &fileFormat, MEDIASESSIONFLAGS flags, MediaSessionRef *returnOpenSession=nullptr) const |
MAXON_FUNCTION Result< void > | Save (const Url &fileName, const MediaOutputUrlRef &fileFormat, MEDIASESSIONFLAGS flags, MediaSessionRef *returnOpenSession=nullptr) const |
Static Public Member Functions | |
static MAXON_METHOD Result< ImageTextureRef > | LoadTexture (const Url &name, const TimeValue &targetTime=TimeValue(), MEDIASESSIONFLAGS flags=MEDIASESSIONFLAGS::NONE, const Class< ImagePixelStorage > &pixelStorageClass=GetNormalPixelStorageClass(), const LayerSetInterface *layerSet=nullptr) |
Private Member Functions | |
MAXON_INTERFACE (ImageTextureInterface, MAXON_REFERENCE_NORMAL, "net.maxon.image.interface.imagetexture", MAXON_IMPLEMENTATION_MODULE("net.maxon.image")) | |
|
private |
|
static |
Creates a new texture and loads the given url into this texture.
[in] | name | Url to load. |
[in] | targetTime | Target time to receive the media samples from. |
[in] | flags | See MEDIASESSIONFLAGS for details. |
[in] | pixelStorageClass | Defines the storage class for all layers of the texture. See ImagePixelStorageClasses:: |
[in] | layerSet | Optional LayerSet or nullptr. |
MAXON_METHOD Result<MediaSessionRef> Load | ( | const Url & | url, |
const TimeValue & | targetTime, | ||
MEDIASESSIONFLAGS | flags, | ||
const Class< ImagePixelStorage > & | pixelStorageClass = GetZeroRef< Class< ImagePixelStorage >>() , |
||
const LayerSetInterface * | layerSet = nullptr |
||
) |
Loads a media into this texture.
[in] | url | Url to the media to load. |
[in] | targetTime | Target time to receive the media samples from. |
[in] | flags | See MEDIASESSIONFLAGS for details. |
[in] | pixelStorageClass | Defines the storage class for all layers of the texture. See ImagePixelStorageClasses:: |
[in] | layerSet | Optional LayerSet or nullptr. |
MAXON_METHOD Result<void> Save | ( | const MediaOutputRef & | fileFormat, |
MEDIASESSIONFLAGS | flags, | ||
MediaSessionRef * | returnOpenSession = nullptr |
||
) | const |
Saves this texture using the media session interface.
[in] | fileFormat | A ready to use MediaOutputRef which will be used as output node of the media session. |
[in] | flags | See MEDIASESSIONFLAGS for details. |
[in] | returnOpenSession | If nullptr the session will be closed directly. If a pointer to a MediaSessionRef is given the session will stay open. Don't forget session.Close() in that case. |
MAXON_FUNCTION Result<void> Save | ( | const Url & | fileName, |
const MediaOutputUrlRef & | fileFormat, | ||
MEDIASESSIONFLAGS | flags, | ||
MediaSessionRef * | returnOpenSession = nullptr |
||
) | const |
Saves this texture using the media session interface. This function simplifies the use of registered ImageSaverClasses from their registry. The usage is simple:
[in] | fileName | Url to write to. |
[in] | fileFormat | A MediaOutputUrlRef which will be used as output node of the media session. MediaOutputUrlRef::SetOutputUrl will be called in this function to set the url. |
[in] | flags | See MEDIASESSIONFLAGS for details. |
[in] | returnOpenSession | If nullptr the session will be closed directly. If a pointer to a MediaSessionRef is given the session will stay open. Don't forget session.Close() in that case. |