The ITexture graph node interface. More...

#include "murl_graph_i_texture.h"

Inheritance diagram for Murl::Graph::ITexture:

Public Member Functions

virtual INodeGetNodeInterface ()=0
 Get the mutable Graph::INode interface. More...
 
virtual const INodeGetNodeInterface () const =0
 Get the constant Graph::INode interface. More...
 
virtual ITextureNodeTargetGetSubTextureNodeTarget ()=0
 Get the mutable container holding the optional child textures. More...
 
virtual const ITextureNodeTargetGetSubTextureNodeTarget () const =0
 Get the constant container holding the optional child textures. More...
 
virtual IImageResourceTargetGetImageResourceTarget ()=0
 Get a mutable Graph::IImageResourceTarget container. More...
 
virtual const IImageResourceTargetGetImageResourceTarget () const =0
 Get a constant Graph::IImageResourceTarget container. More...
 
virtual Bool SetVideoStream (IEnums::TextureTarget target, UInt32 layer, IVideoStream *stream)=0
 Manually set a video stream for a given layer and target. More...
 
virtual Bool SetVideoStream (IEnums::TextureTarget target, IVideoStream *stream)=0
 Manually set a video stream for layer 0 and a given target. More...
 
virtual IVideoStreamGetVideoStream (IEnums::TextureTarget target, UInt32 layer) const =0
 Get the video stream for a given layer and target. More...
 
virtual IVideoStreamGetVideoStream (IEnums::TextureTarget target) const =0
 Get the video stream for layer 0 and a given target. 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 SetNumberOfLayers (UInt32 numLayers)=0
 Set the number of texture layers. More...
 
virtual UInt32 GetNumberOfLayers () const =0
 Get the number of texture layers. More...
 
virtual Bool SetMipMapGenerationMode (IEnums::MipMapGenerationMode mode)=0
 Set the MIP map generation mode. More...
 
virtual IEnums::MipMapGenerationMode GetMipMapGenerationMode () const =0
 Get the texture type. More...
 
virtual Bool SetSize (UInt32 sizeX, UInt32 sizeY)=0
 Set the texure's dimensions. More...
 
virtual UInt32 GetSizeX () const =0
 Get the texture's base width. More...
 
virtual UInt32 GetSizeY () const =0
 Get the texture's base height. More...
 
virtual Bool SetAutoScaleFactor (Real scaleX, Real scaleY)=0
 Set the texure's auto scale factors. More...
 
virtual Real GetAutoScaleFactorX () const =0
 Get the texture's width. More...
 
virtual Real GetAutoScaleFactorY () const =0
 Get the texture's height. More...
 
virtual Bool SetAlphaEnabled (Bool enabled)=0
 Enable/disable the alpha channel for this texture. More...
 
virtual Bool IsAlphaEnabled () const =0
 Check if the alpha channel is enabled for this texture. 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 SetPrescalingEnabled (Bool enabled)=0
 Enable/disable prescaling for this texture. More...
 
virtual Bool IsPrescalingEnabled () const =0
 Check if prescaling is enabled for this texture. More...
 
virtual Bool SetPixelFormat (IEnums::PixelFormat pixelFormat)=0
 Set the texture's actual pixel format. More...
 
virtual IEnums::PixelFormat GetPixelFormat () const =0
 Get the texture's actual pixel format. More...
 
virtual Bool SetWrapModeX (IEnums::TextureWrapMode mode)=0
 Set the texture's wrap mode in X direction. More...
 
virtual IEnums::TextureWrapMode GetWrapModeX () const =0
 Get 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 IEnums::TextureWrapMode GetWrapModeY () const =0
 Get 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 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 IEnums::TextureFilter GetMagFilter () const =0
 Get the texture filter used for magnification. More...
 
virtual Bool SetMinFilter (IEnums::TextureFilter minFilter)=0
 Set the texture filter used for minification. More...
 
virtual IEnums::TextureFilter GetMinFilter () const =0
 Get the texture filter used for minification. More...
 
virtual Bool SetMipFilter (IEnums::TextureFilter mipFilter)=0
 Set the texture filter used for mip-level selection. 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 UInt32 GetNumberOfDetailLevels () const =0
 Get the texture's number of detail levels. More...
 
virtual UInt32 GetNumberOfStages (UInt32 detailLevel) const =0
 Get the texture's number of stages for a given detail level. More...
 
virtual Video::ITextureGetVideoTextureObject (UInt32 detailLevel, UInt32 stage) const =0
 Get the texture's internal video renderer object for a given pass. More...
 
- Public Member Functions inherited from Murl::Graph::IStateSlot
virtual Bool SetSlot (SInt32 slot)=0
 Set the slot index to use. More...
 
virtual SInt32 GetSlot () const =0
 Get the slot index to use. More...
 
- Public Member Functions inherited from Murl::Graph::IStateUnit
virtual Bool SetUnit (UInt32 unit)=0
 Set the unit index to use. More...
 
virtual UInt32 GetUnit () const =0
 Get the unit index to use. More...
 

Detailed Description

The ITexture graph node interface.

This interface represents a generic node representing a texture for rendering.

Member Function Documentation

◆ GetNodeInterface() [1/2]

virtual INode* Murl::Graph::ITexture::GetNodeInterface ( )
pure virtual

Get the mutable Graph::INode interface.

This method returns a mutable pointer to the node's Graph::INode interface, to be able to query or modify common node properties such as active state, visibility or ID.

Returns
The mutable Graph::INode interface, or null if not available

◆ GetNodeInterface() [2/2]

virtual const INode* Murl::Graph::ITexture::GetNodeInterface ( ) const
pure virtual

Get the constant Graph::INode interface.

This method returns a constant pointer to the node's Graph::INode interface, to be able to query common node properties such as active state, visibility or ID.

Returns
The constant Graph::INode interface, or null if not available

◆ GetSubTextureNodeTarget() [1/2]

virtual ITextureNodeTarget* Murl::Graph::ITexture::GetSubTextureNodeTarget ( )
pure virtual

Get the mutable container holding the optional child textures.

This method returns a mutable pointer to the node's Graph::ITextureNodeTarget sub container, which is used to store multiple sub-textures.

Returns
The mutable Graph::ITextureNodeTarget container, or null if not available.

◆ GetSubTextureNodeTarget() [2/2]

virtual const ITextureNodeTarget* Murl::Graph::ITexture::GetSubTextureNodeTarget ( ) const
pure virtual

Get the constant container holding the optional child textures.

This method returns a constant pointer to the node's Graph::ITextureNodeTarget sub container, which is used to store multiple sub-textures.

Returns
The constant Graph::ITextureNodeTarget container, or null if not available.

◆ GetImageResourceTarget() [1/2]

virtual IImageResourceTarget* Murl::Graph::ITexture::GetImageResourceTarget ( )
pure virtual

Get a mutable Graph::IImageResourceTarget container.

This method returns a mutable pointer to a Graph::IImageResourceTarget container, which allows to add, remove or query the image resources referenced by a node implementing this interface.

Returns
The mutable Graph::IImageResourceTarget container, or null if not available

◆ GetImageResourceTarget() [2/2]

virtual const IImageResourceTarget* Murl::Graph::ITexture::GetImageResourceTarget ( ) const
pure virtual

Get a constant Graph::IImageResourceTarget container.

This method returns a constant pointer to a Graph::IImageResourceTarget container, which allows to query the image resources referenced by a node implementing this interface.

Returns
The constant Graph::IImageResourceTarget container, or null if not available

◆ SetVideoStream() [1/2]

virtual Bool Murl::Graph::ITexture::SetVideoStream ( IEnums::TextureTarget  target,
UInt32  layer,
IVideoStream stream 
)
pure virtual

Manually set a video stream for a given layer and target.

This method can be used to supply a manually created video stream as the texture's pixel source. Note, that you cannot supply both an image resource and a video stream for the same target. Note also, that the user is responsible for correct destruction of the given stream. The layer parameter must specify a layer in the range from 0 to GetNumberOfLayers()-1.

Parameters
targetThe texture target (flat, or one of the 6 cube map sides)
layerThe texture layer
streamThe video stream to apply.
Returns
true if successful.

◆ SetVideoStream() [2/2]

virtual Bool Murl::Graph::ITexture::SetVideoStream ( IEnums::TextureTarget  target,
IVideoStream stream 
)
pure virtual

Manually set a video stream for layer 0 and a given target.

This method can be used to supply a manually created video stream as the texture's pixel source. Note, that you cannot supply both an image resource and a video stream for the same target. Note also, that the user is responsible for correct destruction of the given stream.

Parameters
targetThe texture target (flat, or one of the 6 cube map sides)
streamThe video stream to apply.
Returns
true if successful.

◆ GetVideoStream() [1/2]

virtual IVideoStream* Murl::Graph::ITexture::GetVideoStream ( IEnums::TextureTarget  target,
UInt32  layer 
) const
pure virtual

Get the video stream for a given layer and target.

Parameters
layerThe texture layer
targetThe texture target to query
Returns
The video stream at the given target, or null if none is active.

◆ GetVideoStream() [2/2]

virtual IVideoStream* Murl::Graph::ITexture::GetVideoStream ( IEnums::TextureTarget  target) const
pure virtual

Get the video stream for layer 0 and a given target.

Parameters
targetThe texture target to query
Returns
The video stream at the given target, or null if none is active.

◆ SetType()

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

Set the texture type.

For a generic node implementing this interface, the actual texture type may be set using this method. For specialized implementations that implicitly set the type (like flat textures or cube maps), this method always returns false.

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

◆ GetType()

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

Get the texture type.

Returns
The actual texture type.

◆ SetNumberOfLayers()

virtual Bool Murl::Graph::ITexture::SetNumberOfLayers ( UInt32  numLayers)
pure virtual

Set the number of texture layers.

If the node's type is not an array texture (flat or cubemap), this method returns false. See SetType().

Parameters
numLayersThe number of array layers.
Returns
true if successful.

◆ GetNumberOfLayers()

virtual UInt32 Murl::Graph::ITexture::GetNumberOfLayers ( ) const
pure virtual

Get the number of texture layers.

If the node's type is not an array texture (flat or cubemap), this method always returns 1. See SetType().

Returns
The number of array layers.

◆ SetMipMapGenerationMode()

virtual Bool Murl::Graph::ITexture::SetMipMapGenerationMode ( IEnums::MipMapGenerationMode  mode)
pure virtual

Set the MIP map generation mode.

By default, the MIP map generation mode is set to IEnums::MIP_MAP_GENERATION_MODE_FAST.

Parameters
modeThe MIP map generation mode.
Returns
true if successful.

◆ GetMipMapGenerationMode()

virtual IEnums::MipMapGenerationMode Murl::Graph::ITexture::GetMipMapGenerationMode ( ) const
pure virtual

Get the texture type.

Returns
The actual texture type.

◆ SetSize()

virtual Bool Murl::Graph::ITexture::SetSize ( UInt32  sizeX,
UInt32  sizeY 
)
pure virtual

Set the texure's dimensions.

A given value has no effect if a positive non-zero scale factor is defined for the respective axis via SetAutoScaleFactor().

Parameters
sizeXThe texture width in pixels.
sizeYThe texture height in pixels.
Returns
true if successful.

◆ GetSizeX()

virtual UInt32 Murl::Graph::ITexture::GetSizeX ( ) const
pure virtual

Get the texture's base width.

This returns the base width of the texture (at MIP level 0), which is either defined via SetSize(), SetAutoScaleFactor() or implicitly from a given image resource when none of the previous value is defined. A possible prescale factor is not considered.

Returns
The texture width in pixels.

◆ GetSizeY()

virtual UInt32 Murl::Graph::ITexture::GetSizeY ( ) const
pure virtual

Get the texture's base height.

See GetSizeX().

Returns
The texture height in pixels.

◆ SetAutoScaleFactor()

virtual Bool Murl::Graph::ITexture::SetAutoScaleFactor ( Real  scaleX,
Real  scaleY 
)
pure virtual

Set the texure's auto scale factors.

By default, the auto scale factors for both axes are set to 0.0, and the texture's dimensions match the values given via SetSize(). If any of the given scale factors is a positive non-zero value, the actual texture dimension for the respective axis is calculated from the current output surface dimension multiplied by that factor. In this case, a size value set via SetSize() has no effect. The current output surface size is retrieved via IAppConfiguration::GetDisplaySurfaceSizeX() and IAppConfiguration::GetDisplaySurfaceSizeY(). This is useful for e.g. post-processing frame buffer textures, which are supposed to match the current output display dimensions. For example, to create a texture that is half as wide and equal in height as the current output surface, specify a value of 0.5 for scaleX and a value of 1.0 for scaleY.

Parameters
scaleXThe width scale factor.
scaleYThe height scale factor.
Returns
true if successful.

◆ GetAutoScaleFactorX()

virtual Real Murl::Graph::ITexture::GetAutoScaleFactorX ( ) const
pure virtual

Get the texture's width.

Returns
The texture width in pixels.

◆ GetAutoScaleFactorY()

virtual Real Murl::Graph::ITexture::GetAutoScaleFactorY ( ) const
pure virtual

Get the texture's height.

Returns
The texture height in pixels.

◆ SetAlphaEnabled()

virtual Bool Murl::Graph::ITexture::SetAlphaEnabled ( Bool  enabled)
pure virtual

Enable/disable the alpha channel for this texture.

Parameters
enabledIf true, the alpha channel should be used.
Returns
true if successful.

◆ IsAlphaEnabled()

virtual Bool Murl::Graph::ITexture::IsAlphaEnabled ( ) const
pure virtual

Check if the alpha channel is enabled for this texture.

Returns
true if enabled.

◆ SetMipMappingEnabled()

virtual Bool Murl::Graph::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::Graph::ITexture::IsMipMappingEnabled ( ) const
pure virtual

Check if mip-mapping is enabled for this texture.

Returns
true if enabled.

◆ SetPrescalingEnabled()

virtual Bool Murl::Graph::ITexture::SetPrescalingEnabled ( Bool  enabled)
pure virtual

Enable/disable prescaling for this texture.

In the IEngineConfiguration, an application may define a power-of-2 texture prescale factor that can be used to e.g. scale down texture resources depending on a device's actual screen resolution. However, in certain cases it may not be desired to prescale all textures (e.g. when using shadow maps); for such textures, prescaling can be disabled using this method.

Parameters
enabledIf true, prescaling is enabled.
Returns
true if successful.

◆ IsPrescalingEnabled()

virtual Bool Murl::Graph::ITexture::IsPrescalingEnabled ( ) const
pure virtual

Check if prescaling is enabled for this texture.

Returns
true if enabled.

◆ SetPixelFormat()

virtual Bool Murl::Graph::ITexture::SetPixelFormat ( IEnums::PixelFormat  pixelFormat)
pure virtual

Set the texture's actual pixel format.

Parameters
pixelFormatThe pixel format to use.
Returns
true if successful.

◆ GetPixelFormat()

virtual IEnums::PixelFormat Murl::Graph::ITexture::GetPixelFormat ( ) const
pure virtual

Get the texture's actual pixel format.

Returns
The texture's pixel format.

◆ SetWrapModeX()

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

Set the texture's wrap mode in X direction.

Parameters
modeThe wrap mode.
Returns
true if successful.

◆ GetWrapModeX()

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

Get the texture's wrap mode in X direction.

Returns
The wrap mode.

◆ SetWrapModeY()

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

Set the texture's wrap mode in Y direction.

Parameters
modeThe wrap mode.
Returns
true if successful.

◆ GetWrapModeY()

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

Get the texture's wrap mode in Y direction.

Returns
The wrap mode.

◆ SetWrapModeZ()

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

Set the texture's wrap mode in Z direction.

Parameters
modeThe wrap mode.
Returns
true if successful.

◆ GetWrapModeZ()

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

Get the texture's wrap mode in Z direction.

Returns
The wrap mode.

◆ SetMagFilter()

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

Set the texture filter used for magnification.

Valid magFilter values are restricted to TEXTURE_FILTER_NEAREST and TEXTURE_FILTER_LINEAR.

Parameters
magFilterThe filter to use.
Returns
true if successful.

◆ GetMagFilter()

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

Get the texture filter used for magnification.

Returns
The filter used.

◆ SetMinFilter()

virtual Bool Murl::Graph::ITexture::SetMinFilter ( IEnums::TextureFilter  minFilter)
pure virtual

Set the texture filter used for minification.

Valid minFilter values are restricted to TEXTURE_FILTER_NEAREST and TEXTURE_FILTER_LINEAR.

Parameters
minFilterThe filter to use.
Returns
true if successful.

◆ GetMinFilter()

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

Get the texture filter used for minification.

Returns
The filter used.

◆ SetMipFilter()

virtual Bool Murl::Graph::ITexture::SetMipFilter ( IEnums::TextureFilter  mipFilter)
pure virtual

Set the texture filter used for mip-level selection.

Parameters
mipFilterThe filter to use.
Returns
true if successful.

◆ GetMipFilter()

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

Get the texture filter used for mip-level selection.

Returns
The filter used.

◆ SetDepthTestMode()

virtual Bool Murl::Graph::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::Graph::ITexture::GetDepthTestMode ( ) const
pure virtual

Get the depth compare mode.

Returns
The depth compare mode used.

◆ SetDepthTestFunction()

virtual Bool Murl::Graph::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::Graph::ITexture::GetDepthTestFunction ( ) const
pure virtual

Get the depth test function.

Returns
The depth test function used.

◆ SetMaxAnisotropy()

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

Set the maximum anisotropy for filtering.

By default, a maximum anisotropy value of 0.0 is defined. In this case, the global value defined via Murl::IEngineConfiguration::SetDefaultMaxTextureAnisotropy() is used. If set to a value other than 0.0, the given value is used. The actual value is clamped to the range from 1.0 to the highest possible value defined in the graphics driver/hardware (typically around 16.0, but may be lower), with 1.0 representing isotropic filtering (fastest), and higher values producing better visual results at the cost of rendering performance. Note that if the maximum anisotropy is higher than 1.0, it may be the case that the actual filter(s) chosen by the graphics API are different than the ones specified via SetMagFilter(), SetMinFilter() and/or SetMipFilter().

Parameters
maxAnisotropyThe maximum anisotropy value.
Returns
true if successful.

◆ GetMaxAnisotropy()

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

Set the maximum anisotropy for filtering.

Returns
The maximum anisotropy value.

◆ GetNumberOfDetailLevels()

virtual UInt32 Murl::Graph::ITexture::GetNumberOfDetailLevels ( ) const
pure virtual

Get the texture's number of detail levels.

Returns
The number of detail levels.

◆ GetNumberOfStages()

virtual UInt32 Murl::Graph::ITexture::GetNumberOfStages ( UInt32  detailLevel) const
pure virtual

Get the texture's number of stages for a given detail level.

Parameters
detailLevelThe detail level to query.
Returns
The number of stages.

◆ GetVideoTextureObject()

virtual Video::ITexture* Murl::Graph::ITexture::GetVideoTextureObject ( UInt32  detailLevel,
UInt32  stage 
) const
pure virtual

Get the texture's internal video renderer object for a given pass.

Parameters
detailLevelThe detail level to query.
stageThe stage to query.
Returns
A pointer to the mutable video renderer object.

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


Copyright © 2011-2024 Spraylight GmbH.