Luanti 5.16.0-dev
Loading...
Searching...
No Matches
RemappingSource Class Reference

Allows remapping texture indicies in another RenderSource. More...

#include <pipeline.h>

Inheritance diagram for RemappingSource:
Collaboration diagram for RemappingSource:

Public Member Functions

 RemappingSource (RenderSource *source)
void setMapping (u8 index, u8 target_index)
 Maps texture index to a different index in the dependent source.
virtual u8 getTextureCount () override
 Return the number of textures in the source.
virtual video::ITexture * getTexture (u8 index) override
 Get a texture by index.

Public Attributes

RenderSourcem_source
std::vector< u8 > m_mappings

Additional Inherited Members

Private Member Functions inherited from RenderPipelineObject
virtual ~RenderPipelineObject ()=default
virtual void reset (PipelineContext &context)

Detailed Description

Allows remapping texture indicies in another RenderSource.

Note
all unmapped indexes are passed through to the underlying render source.

Constructor & Destructor Documentation

◆ RemappingSource()

RemappingSource::RemappingSource ( RenderSource * source)
inline

References m_source.

Member Function Documentation

◆ getTexture()

virtual video::ITexture * RemappingSource::getTexture ( u8 index)
inlineoverridevirtual

Get a texture by index.

Returns nullptr is the texture does not exist.

Implements RenderSource.

References m_mappings, and m_source.

◆ getTextureCount()

virtual u8 RemappingSource::getTextureCount ( )
inlineoverridevirtual

Return the number of textures in the source.

Implements RenderSource.

References m_mappings.

◆ setMapping()

void RemappingSource::setMapping ( u8 index,
u8 target_index )
inline

Maps texture index to a different index in the dependent source.

Parameters
indextexture index as requested by the
See also
RenderStep.
Parameters
target_indexmatching texture index in the underlying
See also
RenderSource.

References m_mappings.

Member Data Documentation

◆ m_mappings

std::vector<u8> RemappingSource::m_mappings

◆ m_source

RenderSource* RemappingSource::m_source

Referenced by RemappingSource(), and getTexture().


The documentation for this class was generated from the following file: