![]() |
Murl Engine API
Version 2018.3
|
The ITexture video object interface. More...
#include <murl_video_i_texture.h>
The ITexture video object interface.
This interface represents a GPU texture, either 2D or cube map.
Used internally by various geometry texture nodes, such as Graph::FlatTexture, Graph::CubemapTexture, Graph::FrameBufferTexture and others.
Inherited by Murl::Video::Texture.
Public Member Functions | |
virtual IObject * | GetObjectInterface ()=0 |
Get the mutable Video::IObject interface. More... | |
virtual const IObject * | GetObjectInterface () const =0 |
Get the constant Video::IObject interface. More... | |
virtual Bool | Enable (UInt32 unit)=0 |
Enable the texture at a given unit. More... | |
virtual Bool | Disable (UInt32 unit)=0 |
Disable the texture at a given unit. More... | |
virtual Bool | Set (IProgram *currentProgram, UInt32 unit)=0 |
Attach the texture to the current GPU program at a given unit. More... | |
virtual Bool | SetType (IEnums::TextureType type)=0 |
Set the texture type. More... | |
virtual IEnums::TextureType | GetType () const =0 |
Get the texture type. More... | |
virtual Bool | SetRenderTargetSupported (Bool supported)=0 |
Define if this texture supports being rendered to. More... | |
virtual Bool | IsRenderTargetSupported () const =0 |
Check if this texture supports being rendered to. More... | |
virtual Bool | SetMipMappingEnabled (Bool enabled)=0 |
Enable/disable mip-mapping for this texture. More... | |
virtual Bool | IsMipMappingEnabled () const =0 |
Check if mip-mapping is enabled for this texture. More... | |
virtual Bool | SetWrapModeX (IEnums::TextureWrapMode mode)=0 |
Set the texture's wrap mode in X direction. More... | |
virtual Bool | SetWrapModeY (IEnums::TextureWrapMode mode)=0 |
Set the texture's wrap mode in Y direction. More... | |
virtual Bool | SetWrapModeZ (IEnums::TextureWrapMode mode)=0 |
Set the texture's wrap mode in Z direction. More... | |
virtual IEnums::TextureWrapMode | GetWrapModeX () const =0 |
Get the texture's wrap mode in X direction. More... | |
virtual IEnums::TextureWrapMode | GetWrapModeY () const =0 |
Get the texture's wrap mode in Y direction. More... | |
virtual IEnums::TextureWrapMode | GetWrapModeZ () const =0 |
Get the texture's wrap mode in Z direction. More... | |
virtual Bool | SetMagFilter (IEnums::TextureFilter magFilter)=0 |
Set the texture filter used for magnification. More... | |
virtual Bool | SetMinFilter (IEnums::TextureFilter minFilter, IEnums::TextureFilter mipFilter)=0 |
Set the texture filters used for minification and MIP level selection. More... | |
virtual IEnums::TextureFilter | GetMagFilter () const =0 |
Get the texture filter used for magnification. More... | |
virtual IEnums::TextureFilter | GetMinFilter () const =0 |
Get the texture filter used for minification. More... | |
virtual IEnums::TextureFilter | GetMipFilter () const =0 |
Get the texture filter used for mip-level selection. More... | |
virtual Bool | SetDepthTestMode (IEnums::DepthTestMode mode)=0 |
Set the depth compare mode, if the pixel format defines a depth texture. More... | |
virtual IEnums::DepthTestMode | GetDepthTestMode () const =0 |
Get the depth compare mode. More... | |
virtual Bool | SetDepthTestFunction (IEnums::DepthTestFunction function)=0 |
Set the depth test function, if the pixel format defines a depth texture and the depth compare mode is not NONE. More... | |
virtual IEnums::DepthTestFunction | GetDepthTestFunction () const =0 |
Get the depth test function. More... | |
virtual Bool | SetMaxAnisotropy (Real maxAnisotropy)=0 |
Set the maximum anisotropy for filtering. More... | |
virtual Real | GetMaxAnisotropy () const =0 |
Set the maximum anisotropy for filtering. More... | |
virtual Bool | SetNumberOfTargets (UInt32 numTargets)=0 |
Set the number of actual targets. More... | |
virtual UInt32 | GetNumberOfTargets () const =0 |
Get the number of actual targets. More... | |
virtual Bool | SetSourceStream (UInt32 targetIndex, IVideoStream *stream)=0 |
Define the source data via a given video stream. More... | |
virtual Bool | DefineSourceData (UInt32 targetIndex, UInt32 sizeX, UInt32 sizeY, IEnums::PixelFormat pixelFormat, Bool useSystemMemory)=0 |
Define the source data via a given format and dimensions. More... | |
virtual Bool | SetSourceModified (UInt32 targetIndex)=0 |
Mark a texture target as modified. More... | |
virtual Bool | IsSourceModified () const =0 |
Check if the texture is modified. More... | |
virtual IVideoStream * | GetSourceStream (UInt32 targetIndex) const =0 |
Get the source stream for a target if it has been set. More... | |
virtual UInt8 * | GetSourceData (UInt32 targetIndex) const =0 |
Get the raw source data for a target if it has been set. More... | |
virtual UInt32 | GetSourceSizeX (UInt32 targetIndex) const =0 |
Get the horizontal source pixel size of the base MIP level, if defined. More... | |
virtual UInt32 | GetSourceSizeY (UInt32 targetIndex) const =0 |
Get the vertical source pixel size of the base MIP level, if defined. More... | |
virtual UInt32 | GetSourcePitch (UInt32 targetIndex) const =0 |
Get the line pitch (stride) of the source data, if defined. More... | |
virtual IEnums::PixelFormat | GetSourcePixelFormat (UInt32 targetIndex) const =0 |
Get the pixel format of the source data, if defined. More... | |
virtual Bool | AttachToFrameBuffer (IFrameBuffer *frameBuffer, IEnums::TextureAttachment attachment, UInt32 targetLayer, UInt32 targetFace, UInt32 targetLevel)=0 |
Attach the texture to a frame buffer. More... | |
virtual Bool | DetachFromFrameBuffer (IFrameBuffer *frameBuffer, IEnums::TextureAttachment attachment, UInt32 targetLayer, UInt32 targetFace, UInt32 targetLevel)=0 |
Detach the texture from a frame buffer. More... | |
virtual Bool | IsAttachedToFrameBuffer (IFrameBuffer *frameBuffer, IEnums::TextureAttachment attachment, UInt32 targetLayer, UInt32 targetFace, UInt32 targetLevel) const =0 |
Check if the texure is attached to a frame buffer. More... | |
|
pure virtual |
Get the mutable Video::IObject interface.
|
pure virtual |
Get the constant Video::IObject interface.
Enable the texture at a given unit.
unit | The texture unit, from 0 to IEnums::NUM_TEXTURE_UNITS-1. |
Disable the texture at a given unit.
unit | The texture unit, from 0 to IEnums::NUM_TEXTURE_UNITS-1. |
Attach the texture to the current GPU program at a given unit.
currentProgram | The current GPU program. |
unit | The texture unit, from 0 to IEnums::NUM_TEXTURE_UNITS-1. |
|
pure virtual |
Set the texture type.
type | One of the available texture types. |
|
pure virtual |
Get the texture type.
Define if this texture supports being rendered to.
supported | If true, this texture can act as a render target. |
|
pure virtual |
Check if this texture supports being rendered to.
Enable/disable mip-mapping for this texture.
enabled | If true, mip-maps are enabled. |
|
pure virtual |
Check if mip-mapping is enabled for this texture.
|
pure virtual |
Set the texture's wrap mode in X direction.
mode | The wrap mode. |
|
pure virtual |
Set the texture's wrap mode in Y direction.
mode | The wrap mode. |
|
pure virtual |
Set the texture's wrap mode in Z direction.
mode | The wrap mode. |
|
pure virtual |
Get the texture's wrap mode in X direction.
|
pure virtual |
Get the texture's wrap mode in Y direction.
|
pure virtual |
Get the texture's wrap mode in Z direction.
|
pure virtual |
Set the texture filter used for magnification.
magFilter | The filter to use. |
|
pure virtual |
Set the texture filters used for minification and MIP level selection.
minFilter | The minification filter to use. |
mipFilter | The MIP level selection filter to use. |
|
pure virtual |
Get the texture filter used for magnification.
|
pure virtual |
Get the texture filter used for minification.
|
pure virtual |
Get the texture filter used for mip-level selection.
|
pure virtual |
Set the depth compare mode, if the pixel format defines a depth texture.
mode | The depth compare mode to use. |
|
pure virtual |
Get the depth compare mode.
|
pure virtual |
Set the depth test function, if the pixel format defines a depth texture and the depth compare mode is not NONE.
function | The depth test function to use. |
|
pure virtual |
Get the depth test function.
Set the maximum anisotropy for filtering.
The given value is clamped to the range from 1.0 to the highest possible value defined in the graphics driver/hardware, with 1.0 representing isotropic filtering (fastest), and higher values producing better visual results at the cost of rendering performance.
maxAnisotropy | The maximum anisotropy value. |
|
pure virtual |
Set the maximum anisotropy for filtering.
Set the number of actual targets.
For flat or cubemap textures, the number of targets must be 1 or 6, respectively. For cubemap array textures the given value must be dividable by 6.
numTargets | The number of targets. |
|
pure virtual |
Get the number of actual targets.
This method should return 1 for 2D textures, and 6 for cube maps.
|
pure virtual |
Define the source data via a given video stream.
targetIndex | The target index, from 0 to GetNumberOfTargets()-1. |
stream | The video stream to set. |
|
pure virtual |
Define the source data via a given format and dimensions.
targetIndex | The target index, from 0 to GetNumberOfTargets()-1. |
sizeX | The horizontal size in pixels. |
sizeY | The vertical size in pixels. |
pixelFormat | The pixel format to use. |
useSystemMemory | If false, the texture should be created in GPU memory. |
Mark a texture target as modified.
targetIndex | The target index, from 0 to GetNumberOfTargets()-1. |
|
pure virtual |
Check if the texture is modified.
|
pure virtual |
Get the source stream for a target if it has been set.
This method returns the source stream for a target, if it has been set via SetSourceStream(). If DefineSourceData() or none of these methods was used, a null pointer is returned.
targetIndex | The target index, from 0 to GetNumberOfTargets()-1. |
Get the raw source data for a target if it has been set.
This method returns a pointer to the raw source data for a target, if it has been defined via DefineSourceData(). Otherwise, a null pointer is returned.
targetIndex | The target index, from 0 to GetNumberOfTargets()-1. |
Get the horizontal source pixel size of the base MIP level, if defined.
targetIndex | The target index, from 0 to GetNumberOfTargets()-1. |
Get the vertical source pixel size of the base MIP level, if defined.
targetIndex | The target index, from 0 to GetNumberOfTargets()-1. |
Get the line pitch (stride) of the source data, if defined.
targetIndex | The target index, from 0 to GetNumberOfTargets()-1. |
|
pure virtual |
Get the pixel format of the source data, if defined.
targetIndex | The target index, from 0 to GetNumberOfTargets()-1. |
|
pure virtual |
Attach the texture to a frame buffer.
In order for this method to succeed, SetRenderTargetSupported(true) must be called.
frameBuffer | The frame buffer to attach the texture to. |
attachment | The attachment point. |
targetLayer | The target array layer |
targetFace | The target face, from 0 to GetNumberOfTargets()-1. |
targetLevel | The target MIP level |
|
pure virtual |
Detach the texture from a frame buffer.
frameBuffer | The frame buffer to detach the texture from. |
attachment | The attachment point. |
targetLayer | The target array layer |
targetFace | The target face, from 0 to GetNumberOfTargets()-1. |
targetLevel | The target MIP level |
|
pure virtual |
Check if the texure is attached to a frame buffer.
frameBuffer | The frame buffer to check. |
attachment | The attachment point. |
targetLayer | The target array layer |
targetFace | The target face, from 0 to GetNumberOfTargets()-1. |
targetLevel | The target MIP level |