U3D
Open-source, cross-platform 2D and 3D game engine built in C++
Loading...
Searching...
No Matches
Urho3D::Pass Class Reference

Material rendering pass, which defines shaders and render state. More...

#include </var/dev/u3d/stable/Source/Urho3D/Graphics/Technique.h>

Inheritance diagram for Urho3D::Pass:
[legend]
Collaboration diagram for Urho3D::Pass:
[legend]

Public Member Functions

 Pass (const String &name)
 Construct.
 
 ~Pass () override
 Destruct.
 
void SetBlendMode (BlendMode mode)
 
void SetCullMode (CullMode mode)
 
void SetDepthTestMode (CompareMode mode)
 
void SetLightingMode (PassLightingMode mode)
 
void SetDepthWrite (bool enable)
 
void SetAlphaToCoverage (bool enable)
 
void SetIsDesktop (bool enable)
 
void SetVertexShader (const String &name)
 
void SetPixelShader (const String &name)
 
void SetVertexShaderDefines (const String &defines)
 
void SetPixelShaderDefines (const String &defines)
 
void SetVertexShaderDefineExcludes (const String &excludes)
 
void SetPixelShaderDefineExcludes (const String &excludes)
 
void ReleaseShaders ()
 Reset shader pointers.
 
void MarkShadersLoaded (unsigned frameNumber)
 Mark shaders loaded this frame.
 
const StringGetName () const
 Return pass name.
 
unsigned GetIndex () const
 Return pass index. This is used for optimal render-time pass queries that avoid map lookups.
 
BlendMode GetBlendMode () const
 
CullMode GetCullMode () const
 
CompareMode GetDepthTestMode () const
 
PassLightingMode GetLightingMode () const
 
unsigned GetShadersLoadedFrameNumber () const
 Return last shaders loaded frame number.
 
bool GetDepthWrite () const
 
bool GetAlphaToCoverage () const
 
bool IsDesktop () const
 
const StringGetVertexShader () const
 
const StringGetPixelShader () const
 
const StringGetVertexShaderDefines () const
 
const StringGetPixelShaderDefines () const
 
const StringGetVertexShaderDefineExcludes () const
 
const StringGetPixelShaderDefineExcludes () const
 
Vector< SharedPtr< ShaderVariation > > & GetVertexShaders ()
 Return vertex shaders.
 
Vector< SharedPtr< ShaderVariation > > & GetPixelShaders ()
 Return pixel shaders.
 
Vector< SharedPtr< ShaderVariation > > & GetVertexShaders (const StringHash &extraDefinesHash)
 Return vertex shaders with extra defines from the renderpath.
 
Vector< SharedPtr< ShaderVariation > > & GetPixelShaders (const StringHash &extraDefinesHash)
 Return pixel shaders with extra defines from the renderpath.
 
String GetEffectiveVertexShaderDefines () const
 Return the effective vertex shader defines, accounting for excludes. Called internally by Renderer.
 
String GetEffectivePixelShaderDefines () const
 Return the effective pixel shader defines, accounting for excludes. Called internally by Renderer.
 
- Public Member Functions inherited from Urho3D::RefCounted
 RefCounted ()
 Construct. Allocate the reference count structure and set an initial self weak reference.
 
virtual ~RefCounted ()
 Destruct. Mark as expired and also delete the reference count structure if no outside weak references exist.
 
 RefCounted (const RefCounted &rhs)=delete
 Prevent copy construction.
 
RefCountedoperator= (const RefCounted &rhs)=delete
 Prevent assignment.
 
void AddRef ()
 
void ReleaseRef ()
 
int Refs () const
 
int WeakRefs () const
 
RefCountRefCountPtr ()
 Return pointer to the reference count structure.
 

Private Attributes

unsigned index_
 Pass index.
 
BlendMode blendMode_
 Blend mode.
 
CullMode cullMode_
 Culling mode.
 
CompareMode depthTestMode_
 Depth compare mode.
 
PassLightingMode lightingMode_
 Lighting mode.
 
unsigned shadersLoadedFrameNumber_
 Last shaders loaded frame number.
 
bool depthWrite_
 Depth write mode.
 
bool alphaToCoverage_
 Alpha-to-coverage mode.
 
bool isDesktop_
 Require desktop level hardware flag.
 
String vertexShaderName_
 Vertex shader name.
 
String pixelShaderName_
 Pixel shader name.
 
String vertexShaderDefines_
 Vertex shader defines.
 
String pixelShaderDefines_
 Pixel shader defines.
 
String vertexShaderDefineExcludes_
 Vertex shader define excludes.
 
String pixelShaderDefineExcludes_
 Pixel shader define excludes.
 
Vector< SharedPtr< ShaderVariation > > vertexShaders_
 Vertex shaders.
 
Vector< SharedPtr< ShaderVariation > > pixelShaders_
 Pixel shaders.
 
HashMap< StringHash, Vector< SharedPtr< ShaderVariation > > > extraVertexShaders_
 Vertex shaders with extra defines from the renderpath.
 
HashMap< StringHash, Vector< SharedPtr< ShaderVariation > > > extraPixelShaders_
 Pixel shaders with extra defines from the renderpath.
 
String name_
 Pass name.
 

Detailed Description

Material rendering pass, which defines shaders and render state.

Member Function Documentation

◆ GetAlphaToCoverage()

bool Urho3D::Pass::GetAlphaToCoverage ( ) const
inline

Return alpha-to-coverage mode.

Here is the caller graph for this function:

◆ GetBlendMode()

BlendMode Urho3D::Pass::GetBlendMode ( ) const
inline

Return blend mode.

Here is the caller graph for this function:

◆ GetCullMode()

CullMode Urho3D::Pass::GetCullMode ( ) const
inline

Return culling mode override. If pass is not overriding culling mode (default), the illegal mode MAX_CULLMODES is returned.

Here is the caller graph for this function:

◆ GetDepthTestMode()

CompareMode Urho3D::Pass::GetDepthTestMode ( ) const
inline

Return depth compare mode.

Here is the caller graph for this function:

◆ GetDepthWrite()

bool Urho3D::Pass::GetDepthWrite ( ) const
inline

Return depth write mode.

Here is the caller graph for this function:

◆ GetLightingMode()

PassLightingMode Urho3D::Pass::GetLightingMode ( ) const
inline

Return pass lighting mode.

Here is the caller graph for this function:

◆ GetPixelShader()

const String & Urho3D::Pass::GetPixelShader ( ) const
inline

Return pixel shader name.

Here is the caller graph for this function:

◆ GetPixelShaderDefineExcludes()

const String & Urho3D::Pass::GetPixelShaderDefineExcludes ( ) const
inline

Return pixel shader define excludes.

Here is the caller graph for this function:

◆ GetPixelShaderDefines()

const String & Urho3D::Pass::GetPixelShaderDefines ( ) const
inline

Return pixel shader defines.

Here is the caller graph for this function:

◆ GetVertexShader()

const String & Urho3D::Pass::GetVertexShader ( ) const
inline

Return vertex shader name.

Here is the caller graph for this function:

◆ GetVertexShaderDefineExcludes()

const String & Urho3D::Pass::GetVertexShaderDefineExcludes ( ) const
inline

Return vertex shader define excludes.

Here is the caller graph for this function:

◆ GetVertexShaderDefines()

const String & Urho3D::Pass::GetVertexShaderDefines ( ) const
inline

Return vertex shader defines.

Here is the caller graph for this function:

◆ IsDesktop()

bool Urho3D::Pass::IsDesktop ( ) const
inline

Return whether requires desktop level hardware.

Here is the caller graph for this function:

◆ SetAlphaToCoverage()

void Urho3D::Pass::SetAlphaToCoverage ( bool  enable)

Set alpha-to-coverage on/off.

Here is the caller graph for this function:

◆ SetBlendMode()

void Urho3D::Pass::SetBlendMode ( BlendMode  mode)

Set blend mode.

Here is the caller graph for this function:

◆ SetCullMode()

void Urho3D::Pass::SetCullMode ( CullMode  mode)

Set culling mode override. By default culling mode is read from the material instead. Set the illegal culling mode MAX_CULLMODES to disable override again.

Here is the caller graph for this function:

◆ SetDepthTestMode()

void Urho3D::Pass::SetDepthTestMode ( CompareMode  mode)

Set depth compare mode.

Here is the caller graph for this function:

◆ SetDepthWrite()

void Urho3D::Pass::SetDepthWrite ( bool  enable)

Set depth write on/off.

Here is the caller graph for this function:

◆ SetIsDesktop()

void Urho3D::Pass::SetIsDesktop ( bool  enable)

Set whether requires desktop level hardware.

Here is the caller graph for this function:

◆ SetLightingMode()

void Urho3D::Pass::SetLightingMode ( PassLightingMode  mode)

Set pass lighting mode, affects what shader variations will be attempted to be loaded.

Here is the caller graph for this function:

◆ SetPixelShader()

void Urho3D::Pass::SetPixelShader ( const String name)

Set pixel shader name.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ SetPixelShaderDefineExcludes()

void Urho3D::Pass::SetPixelShaderDefineExcludes ( const String excludes)

Set pixel shader define excludes. Use to mark defines that the shader code will not recognize, to prevent compiling redundant shader variations.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ SetPixelShaderDefines()

void Urho3D::Pass::SetPixelShaderDefines ( const String defines)

Set pixel shader defines. Separate multiple defines with spaces.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ SetVertexShader()

void Urho3D::Pass::SetVertexShader ( const String name)

Set vertex shader name.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ SetVertexShaderDefineExcludes()

void Urho3D::Pass::SetVertexShaderDefineExcludes ( const String excludes)

Set vertex shader define excludes. Use to mark defines that the shader code will not recognize, to prevent compiling redundant shader variations.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ SetVertexShaderDefines()

void Urho3D::Pass::SetVertexShaderDefines ( const String defines)

Set vertex shader defines. Separate multiple defines with spaces.

Here is the call graph for this function:
Here is the caller graph for this function:

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