The ITexture video object interface. More...
#include "murl_video_i_texture.h"
Inherited by Murl::Video::Texture, and Murl::Video::Vulkan::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... | |
Detailed Description
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.
Member Function Documentation
◆ GetObjectInterface() [1/2]
|
pure virtual |
Get the mutable Video::IObject interface.
- Returns
- The IObject interface.
◆ GetObjectInterface() [2/2]
|
pure virtual |
Get the constant Video::IObject interface.
- Returns
- The IObject interface.
◆ Enable()
Enable the texture at a given unit.
- Parameters
-
unit The texture unit, from 0 to IEnums::NUM_TEXTURE_UNITS-1.
- Returns
- true if successful.
◆ Disable()
Disable the texture at a given unit.
- Parameters
-
unit The texture unit, from 0 to IEnums::NUM_TEXTURE_UNITS-1.
- Returns
- true if successful.
◆ Set()
Attach the texture to the current GPU program at a given unit.
- Parameters
-
currentProgram The current GPU program. unit The texture unit, from 0 to IEnums::NUM_TEXTURE_UNITS-1.
- Returns
- true if successful.
◆ SetType()
|
pure virtual |
Set the texture type.
- Parameters
-
type One of the available texture types.
- Returns
- true if successful.
◆ GetType()
|
pure virtual |
Get the texture type.
- Returns
- The actual texture type.
◆ SetRenderTargetSupported()
Define if this texture supports being rendered to.
- Parameters
-
supported If true, this texture can act as a render target.
- Returns
- true if successful.
◆ IsRenderTargetSupported()
|
pure virtual |
Check if this texture supports being rendered to.
- Returns
- true if this texture can act as a render target.
◆ SetMipMappingEnabled()
Enable/disable mip-mapping for this texture.
- Parameters
-
enabled If true, mip-maps are enabled.
- Returns
- true if successful.
◆ IsMipMappingEnabled()
|
pure virtual |
Check if mip-mapping is enabled for this texture.
- Returns
- true if enabled.
◆ SetWrapModeX()
|
pure virtual |
Set the texture's wrap mode in X direction.
- Parameters
-
mode The wrap mode.
- Returns
- true if successful.
◆ SetWrapModeY()
|
pure virtual |
Set the texture's wrap mode in Y direction.
- Parameters
-
mode The wrap mode.
- Returns
- true if successful.
◆ SetWrapModeZ()
|
pure virtual |
Set the texture's wrap mode in Z direction.
- Parameters
-
mode The wrap mode.
- Returns
- true if successful.
◆ GetWrapModeX()
|
pure virtual |
Get the texture's wrap mode in X direction.
- Returns
- The wrap mode.
◆ GetWrapModeY()
|
pure virtual |
Get the texture's wrap mode in Y direction.
- Returns
- The wrap mode.
◆ GetWrapModeZ()
|
pure virtual |
Get the texture's wrap mode in Z direction.
- Returns
- The wrap mode.
◆ SetMagFilter()
|
pure virtual |
Set the texture filter used for magnification.
- Parameters
-
magFilter The filter to use.
- Returns
- true if successful.
◆ SetMinFilter()
|
pure virtual |
Set the texture filters used for minification and MIP level selection.
- Parameters
-
minFilter The minification filter to use. mipFilter The MIP level selection filter to use.
- Returns
- true if successful.
◆ GetMagFilter()
|
pure virtual |
Get the texture filter used for magnification.
- Returns
- The filter used.
◆ GetMinFilter()
|
pure virtual |
Get the texture filter used for minification.
- Returns
- The filter used.
◆ GetMipFilter()
|
pure virtual |
Get the texture filter used for mip-level selection.
- Returns
- The filter used.
◆ SetDepthTestMode()
|
pure virtual |
Set the depth compare mode, if the pixel format defines a depth texture.
- Parameters
-
mode The depth compare mode to use.
- Returns
- true if successful.
◆ GetDepthTestMode()
|
pure virtual |
Get the depth compare mode.
- Returns
- The depth compare mode used.
◆ SetDepthTestFunction()
|
pure virtual |
Set the depth test function, if the pixel format defines a depth texture and the depth compare mode is not NONE.
- Parameters
-
function The depth test function to use.
- Returns
- true if successful.
◆ GetDepthTestFunction()
|
pure virtual |
Get the depth test function.
- Returns
- The depth test function used.
◆ SetMaxAnisotropy()
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.
- Parameters
-
maxAnisotropy The maximum anisotropy value.
- Returns
- true if successful.
◆ GetMaxAnisotropy()
|
pure virtual |
Set the maximum anisotropy for filtering.
- Returns
- The maximum anisotropy value.
◆ SetNumberOfTargets()
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.
- Parameters
-
numTargets The number of targets.
- Returns
- true if successful.
◆ GetNumberOfTargets()
|
pure virtual |
Get the number of actual targets.
This method should return 1 for 2D textures, and 6 for cube maps.
- Returns
- The number of targets.
◆ SetSourceStream()
|
pure virtual |
Define the source data via a given video stream.
- Parameters
-
targetIndex The target index, from 0 to GetNumberOfTargets()-1. stream The video stream to set.
- Returns
- true if successful.
◆ DefineSourceData()
|
pure virtual |
Define the source data via a given format and dimensions.
- Parameters
-
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.
- Returns
- true if successful.
◆ SetSourceModified()
Mark a texture target as modified.
- Parameters
-
targetIndex The target index, from 0 to GetNumberOfTargets()-1.
- Returns
- true if successful.
◆ IsSourceModified()
|
pure virtual |
Check if the texture is modified.
- Returns
- true if modified.
◆ GetSourceStream()
|
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.
- Parameters
-
targetIndex The target index, from 0 to GetNumberOfTargets()-1.
- Returns
- The source stream if present, null otherwise.
◆ GetSourceData()
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.
- Parameters
-
targetIndex The target index, from 0 to GetNumberOfTargets()-1.
- Returns
- The raw source data if present, null otherwise.
◆ GetSourceSizeX()
Get the horizontal source pixel size of the base MIP level, if defined.
- Parameters
-
targetIndex The target index, from 0 to GetNumberOfTargets()-1.
- Returns
- The horizontal source size in pixels.
◆ GetSourceSizeY()
Get the vertical source pixel size of the base MIP level, if defined.
- Parameters
-
targetIndex The target index, from 0 to GetNumberOfTargets()-1.
- Returns
- The vertical source size in pixels.
◆ GetSourcePitch()
Get the line pitch (stride) of the source data, if defined.
- Parameters
-
targetIndex The target index, from 0 to GetNumberOfTargets()-1.
- Returns
- The line pitch in bytes.
◆ GetSourcePixelFormat()
|
pure virtual |
Get the pixel format of the source data, if defined.
- Parameters
-
targetIndex The target index, from 0 to GetNumberOfTargets()-1.
- Returns
- The pixel format.
◆ AttachToFrameBuffer()
|
pure virtual |
Attach the texture to a frame buffer.
In order for this method to succeed, SetRenderTargetSupported(true) must be called.
- Parameters
-
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
- Returns
- true if successful.
◆ DetachFromFrameBuffer()
|
pure virtual |
Detach the texture from a frame buffer.
- Parameters
-
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
- Returns
- true if successful.
◆ IsAttachedToFrameBuffer()
|
pure virtual |
Check if the texure is attached to a frame buffer.
- Parameters
-
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
- Returns
- true if attached.
The documentation for this interface was generated from the following file:
- murl_video_i_texture.h