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 IObjectGetObjectInterface ()=0
 Get the mutable Video::IObject interface. More...
 
virtual const IObjectGetObjectInterface () 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 IVideoStreamGetSourceStream (UInt32 targetIndex) const =0
 Get the source stream for a target if it has been set. More...
 
virtual UInt8GetSourceData (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]

virtual IObject* Murl::Video::ITexture::GetObjectInterface ( )
pure virtual

Get the mutable Video::IObject interface.

Returns
The IObject interface.

◆ GetObjectInterface() [2/2]

virtual const IObject* Murl::Video::ITexture::GetObjectInterface ( ) const
pure virtual

Get the constant Video::IObject interface.

Returns
The IObject interface.

◆ Enable()

virtual Bool Murl::Video::ITexture::Enable ( UInt32  unit)
pure virtual

Enable the texture at a given unit.

Parameters
unitThe texture unit, from 0 to IEnums::NUM_TEXTURE_UNITS-1.
Returns
true if successful.

◆ Disable()

virtual Bool Murl::Video::ITexture::Disable ( UInt32  unit)
pure virtual

Disable the texture at a given unit.

Parameters
unitThe texture unit, from 0 to IEnums::NUM_TEXTURE_UNITS-1.
Returns
true if successful.

◆ Set()

virtual Bool Murl::Video::ITexture::Set ( IProgram currentProgram,
UInt32  unit 
)
pure virtual

Attach the texture to the current GPU program at a given unit.

Parameters
currentProgramThe current GPU program.
unitThe texture unit, from 0 to IEnums::NUM_TEXTURE_UNITS-1.
Returns
true if successful.

◆ SetType()

virtual Bool Murl::Video::ITexture::SetType ( IEnums::TextureType  type)
pure virtual

Set the texture type.

Parameters
typeOne of the available texture types.
Returns
true if successful.

◆ GetType()

virtual IEnums::TextureType Murl::Video::ITexture::GetType ( ) const
pure virtual

Get the texture type.

Returns
The actual texture type.

◆ SetRenderTargetSupported()

virtual Bool Murl::Video::ITexture::SetRenderTargetSupported ( Bool  supported)
pure virtual

Define if this texture supports being rendered to.

Parameters
supportedIf true, this texture can act as a render target.
Returns
true if successful.

◆ IsRenderTargetSupported()

virtual Bool Murl::Video::ITexture::IsRenderTargetSupported ( ) const
pure virtual

Check if this texture supports being rendered to.

Returns
true if this texture can act as a render target.

◆ SetMipMappingEnabled()

virtual Bool Murl::Video::ITexture::SetMipMappingEnabled ( Bool  enabled)
pure virtual

Enable/disable mip-mapping for this texture.

Parameters
enabledIf true, mip-maps are enabled.
Returns
true if successful.

◆ IsMipMappingEnabled()

virtual Bool Murl::Video::ITexture::IsMipMappingEnabled ( ) const
pure virtual

Check if mip-mapping is enabled for this texture.

Returns
true if enabled.

◆ SetWrapModeX()

virtual Bool Murl::Video::ITexture::SetWrapModeX ( IEnums::TextureWrapMode  mode)
pure virtual

Set the texture's wrap mode in X direction.

Parameters
modeThe wrap mode.
Returns
true if successful.

◆ SetWrapModeY()

virtual Bool Murl::Video::ITexture::SetWrapModeY ( IEnums::TextureWrapMode  mode)
pure virtual

Set the texture's wrap mode in Y direction.

Parameters
modeThe wrap mode.
Returns
true if successful.

◆ SetWrapModeZ()

virtual Bool Murl::Video::ITexture::SetWrapModeZ ( IEnums::TextureWrapMode  mode)
pure virtual

Set the texture's wrap mode in Z direction.

Parameters
modeThe wrap mode.
Returns
true if successful.

◆ GetWrapModeX()

virtual IEnums::TextureWrapMode Murl::Video::ITexture::GetWrapModeX ( ) const
pure virtual

Get the texture's wrap mode in X direction.

Returns
The wrap mode.

◆ GetWrapModeY()

virtual IEnums::TextureWrapMode Murl::Video::ITexture::GetWrapModeY ( ) const
pure virtual

Get the texture's wrap mode in Y direction.

Returns
The wrap mode.

◆ GetWrapModeZ()

virtual IEnums::TextureWrapMode Murl::Video::ITexture::GetWrapModeZ ( ) const
pure virtual

Get the texture's wrap mode in Z direction.

Returns
The wrap mode.

◆ SetMagFilter()

virtual Bool Murl::Video::ITexture::SetMagFilter ( IEnums::TextureFilter  magFilter)
pure virtual

Set the texture filter used for magnification.

Parameters
magFilterThe filter to use.
Returns
true if successful.

◆ SetMinFilter()

virtual Bool Murl::Video::ITexture::SetMinFilter ( IEnums::TextureFilter  minFilter,
IEnums::TextureFilter  mipFilter 
)
pure virtual

Set the texture filters used for minification and MIP level selection.

Parameters
minFilterThe minification filter to use.
mipFilterThe MIP level selection filter to use.
Returns
true if successful.

◆ GetMagFilter()

virtual IEnums::TextureFilter Murl::Video::ITexture::GetMagFilter ( ) const
pure virtual

Get the texture filter used for magnification.

Returns
The filter used.

◆ GetMinFilter()

virtual IEnums::TextureFilter Murl::Video::ITexture::GetMinFilter ( ) const
pure virtual

Get the texture filter used for minification.

Returns
The filter used.

◆ GetMipFilter()

virtual IEnums::TextureFilter Murl::Video::ITexture::GetMipFilter ( ) const
pure virtual

Get the texture filter used for mip-level selection.

Returns
The filter used.

◆ SetDepthTestMode()

virtual Bool Murl::Video::ITexture::SetDepthTestMode ( IEnums::DepthTestMode  mode)
pure virtual

Set the depth compare mode, if the pixel format defines a depth texture.

Parameters
modeThe depth compare mode to use.
Returns
true if successful.

◆ GetDepthTestMode()

virtual IEnums::DepthTestMode Murl::Video::ITexture::GetDepthTestMode ( ) const
pure virtual

Get the depth compare mode.

Returns
The depth compare mode used.

◆ SetDepthTestFunction()

virtual Bool Murl::Video::ITexture::SetDepthTestFunction ( IEnums::DepthTestFunction  function)
pure virtual

Set the depth test function, if the pixel format defines a depth texture and the depth compare mode is not NONE.

Parameters
functionThe depth test function to use.
Returns
true if successful.

◆ GetDepthTestFunction()

virtual IEnums::DepthTestFunction Murl::Video::ITexture::GetDepthTestFunction ( ) const
pure virtual

Get the depth test function.

Returns
The depth test function used.

◆ SetMaxAnisotropy()

virtual Bool Murl::Video::ITexture::SetMaxAnisotropy ( Real  maxAnisotropy)
pure virtual

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
maxAnisotropyThe maximum anisotropy value.
Returns
true if successful.

◆ GetMaxAnisotropy()

virtual Real Murl::Video::ITexture::GetMaxAnisotropy ( ) const
pure virtual

Set the maximum anisotropy for filtering.

Returns
The maximum anisotropy value.

◆ SetNumberOfTargets()

virtual Bool Murl::Video::ITexture::SetNumberOfTargets ( UInt32  numTargets)
pure virtual

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
numTargetsThe number of targets.
Returns
true if successful.

◆ GetNumberOfTargets()

virtual UInt32 Murl::Video::ITexture::GetNumberOfTargets ( ) const
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()

virtual Bool Murl::Video::ITexture::SetSourceStream ( UInt32  targetIndex,
IVideoStream stream 
)
pure virtual

Define the source data via a given video stream.

Parameters
targetIndexThe target index, from 0 to GetNumberOfTargets()-1.
streamThe video stream to set.
Returns
true if successful.

◆ DefineSourceData()

virtual Bool Murl::Video::ITexture::DefineSourceData ( UInt32  targetIndex,
UInt32  sizeX,
UInt32  sizeY,
IEnums::PixelFormat  pixelFormat,
Bool  useSystemMemory 
)
pure virtual

Define the source data via a given format and dimensions.

Parameters
targetIndexThe target index, from 0 to GetNumberOfTargets()-1.
sizeXThe horizontal size in pixels.
sizeYThe vertical size in pixels.
pixelFormatThe pixel format to use.
useSystemMemoryIf false, the texture should be created in GPU memory.
Returns
true if successful.

◆ SetSourceModified()

virtual Bool Murl::Video::ITexture::SetSourceModified ( UInt32  targetIndex)
pure virtual

Mark a texture target as modified.

Parameters
targetIndexThe target index, from 0 to GetNumberOfTargets()-1.
Returns
true if successful.

◆ IsSourceModified()

virtual Bool Murl::Video::ITexture::IsSourceModified ( ) const
pure virtual

Check if the texture is modified.

Returns
true if modified.

◆ GetSourceStream()

virtual IVideoStream* Murl::Video::ITexture::GetSourceStream ( UInt32  targetIndex) const
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
targetIndexThe target index, from 0 to GetNumberOfTargets()-1.
Returns
The source stream if present, null otherwise.

◆ GetSourceData()

virtual UInt8* Murl::Video::ITexture::GetSourceData ( UInt32  targetIndex) const
pure virtual

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
targetIndexThe target index, from 0 to GetNumberOfTargets()-1.
Returns
The raw source data if present, null otherwise.

◆ GetSourceSizeX()

virtual UInt32 Murl::Video::ITexture::GetSourceSizeX ( UInt32  targetIndex) const
pure virtual

Get the horizontal source pixel size of the base MIP level, if defined.

Parameters
targetIndexThe target index, from 0 to GetNumberOfTargets()-1.
Returns
The horizontal source size in pixels.

◆ GetSourceSizeY()

virtual UInt32 Murl::Video::ITexture::GetSourceSizeY ( UInt32  targetIndex) const
pure virtual

Get the vertical source pixel size of the base MIP level, if defined.

Parameters
targetIndexThe target index, from 0 to GetNumberOfTargets()-1.
Returns
The vertical source size in pixels.

◆ GetSourcePitch()

virtual UInt32 Murl::Video::ITexture::GetSourcePitch ( UInt32  targetIndex) const
pure virtual

Get the line pitch (stride) of the source data, if defined.

Parameters
targetIndexThe target index, from 0 to GetNumberOfTargets()-1.
Returns
The line pitch in bytes.

◆ GetSourcePixelFormat()

virtual IEnums::PixelFormat Murl::Video::ITexture::GetSourcePixelFormat ( UInt32  targetIndex) const
pure virtual

Get the pixel format of the source data, if defined.

Parameters
targetIndexThe target index, from 0 to GetNumberOfTargets()-1.
Returns
The pixel format.

◆ AttachToFrameBuffer()

virtual Bool Murl::Video::ITexture::AttachToFrameBuffer ( IFrameBuffer frameBuffer,
IEnums::TextureAttachment  attachment,
UInt32  targetLayer,
UInt32  targetFace,
UInt32  targetLevel 
)
pure virtual

Attach the texture to a frame buffer.

In order for this method to succeed, SetRenderTargetSupported(true) must be called.

Parameters
frameBufferThe frame buffer to attach the texture to.
attachmentThe attachment point.
targetLayerThe target array layer
targetFaceThe target face, from 0 to GetNumberOfTargets()-1.
targetLevelThe target MIP level
Returns
true if successful.

◆ DetachFromFrameBuffer()

virtual Bool Murl::Video::ITexture::DetachFromFrameBuffer ( IFrameBuffer frameBuffer,
IEnums::TextureAttachment  attachment,
UInt32  targetLayer,
UInt32  targetFace,
UInt32  targetLevel 
)
pure virtual

Detach the texture from a frame buffer.

Parameters
frameBufferThe frame buffer to detach the texture from.
attachmentThe attachment point.
targetLayerThe target array layer
targetFaceThe target face, from 0 to GetNumberOfTargets()-1.
targetLevelThe target MIP level
Returns
true if successful.

◆ IsAttachedToFrameBuffer()

virtual Bool Murl::Video::ITexture::IsAttachedToFrameBuffer ( IFrameBuffer frameBuffer,
IEnums::TextureAttachment  attachment,
UInt32  targetLayer,
UInt32  targetFace,
UInt32  targetLevel 
) const
pure virtual

Check if the texure is attached to a frame buffer.

Parameters
frameBufferThe frame buffer to check.
attachmentThe attachment point.
targetLayerThe target array layer
targetFaceThe target face, from 0 to GetNumberOfTargets()-1.
targetLevelThe target MIP level
Returns
true if attached.

The documentation for this interface was generated from the following file:
  • murl_video_i_texture.h


Copyright © 2011-2024 Spraylight GmbH.