Luanti 5.11.0-dev
 
Loading...
Searching...
No Matches
IShaderSource Class Referenceabstract

#include <shader.h>

+ Inheritance diagram for IShaderSource:

Public Member Functions

 IShaderSource ()=default
 
virtual ~IShaderSource ()=default
 
virtual ShaderInfo getShaderInfo (u32 id)=0
 returns information about an existing shader
 
virtual u32 getShader (const std::string &name, MaterialType material_type, NodeDrawType drawtype=NDT_NORMAL)=0
 Generates or gets a shader suitable for nodes and entities.
 
virtual u32 getShaderRaw (const std::string &name, bool blendAlpha=false)=0
 Generates or gets a shader for general use.
 

Constructor & Destructor Documentation

◆ IShaderSource()

IShaderSource::IShaderSource ( )
default

◆ ~IShaderSource()

virtual IShaderSource::~IShaderSource ( )
virtualdefault

Member Function Documentation

◆ getShader()

virtual u32 IShaderSource::getShader ( const std::string & name,
MaterialType material_type,
NodeDrawType drawtype = NDT_NORMAL )
pure virtual

Generates or gets a shader suitable for nodes and entities.

Implemented in ShaderSource.

Referenced by GenericCAO::addToScene(), and WieldMeshSceneNode::setItem().

+ Here is the caller graph for this function:

◆ getShaderInfo()

virtual ShaderInfo IShaderSource::getShaderInfo ( u32 id)
pure virtual

returns information about an existing shader

Use this to get the material ID to plug into video::SMaterial.

Implemented in ShaderSource.

Referenced by Clouds::Clouds(), Hud::Hud(), MapBlockMesh::MapBlockMesh(), Sky::Sky(), GenericCAO::addToScene(), Minimap::drawMinimap(), PostProcessingStep::run(), and WieldMeshSceneNode::setItem().

+ Here is the caller graph for this function:

◆ getShaderRaw()

virtual u32 IShaderSource::getShaderRaw ( const std::string & name,
bool blendAlpha = false )
pure virtual

Generates or gets a shader for general use.

Parameters
namename of the shader (directory on disk)
blendAlphaenable alpha blending for this material?
Returns
shader ID

Implemented in ShaderSource.

Referenced by Clouds::Clouds(), Hud::Hud(), Sky::Sky(), and Minimap::drawMinimap().

+ Here is the caller graph for this function:

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