Nameless Engine
Loading...
Searching...
No Matches
ne::PipelineConfiguration Class Referenceabstract

#include <PipelineConfiguration.h>

Inheritance diagram for ne::PipelineConfiguration:
ne::ColorPipelineConfiguration ne::ComputePipelineConfiguration ne::DepthPipelineConfiguration

Public Member Functions

std::set< ShaderMacro > getRequiredVertexShaderMacros () const
 
virtual std::set< ShaderMacro > getRequiredFragmentShaderMacros () const
 
std::string_view getVertexShaderName () const
 
virtual std::optional< GraphicsPipelineType > getGraphicsType () const =0
 
virtual std::string_view getFragmentShaderName () const
 
virtual std::string_view getComputeShaderName () const
 
virtual bool isPixelBlendingEnabled () const
 
virtual bool isDepthBiasEnabled () const
 
virtual std::optional< PipelineShadowMappingUsage > getShadowMappingUsage () const
 

Protected Member Functions

 PipelineConfiguration (const std::string &sVertexShaderName, const std::set< ShaderMacro > &requiredVertexShaderMacros)
 

Protected Attributes

std::set< ShaderMacro > requiredVertexShaderMacros
 
const std::string sVertexShaderName
 

Detailed Description

Base class for pipeline options.

Remarks
In order to specify pipeline settings create a new object of a type that derives from this class.

Constructor & Destructor Documentation

◆ PipelineConfiguration()

ne::PipelineConfiguration::PipelineConfiguration ( const std::string &  sVertexShaderName,
const std::set< ShaderMacro > &  requiredVertexShaderMacros 
)
protected

Initializes options.

Parameters
sVertexShaderNameName of the compiled vertex shader to use (empty if not used).
requiredVertexShaderMacrosMacros required to be defined for a vertex shader. These macros are used to request the required shader variant from a shader pack.

Member Function Documentation

◆ getComputeShaderName()

virtual std::string_view ne::PipelineConfiguration::getComputeShaderName ( ) const
inlinevirtual

Returns name of the compute shader that should be used.

Returns
Empty string if compute shader is not used, otherwise name of the compiled shader.

Reimplemented in ne::ComputePipelineConfiguration.

◆ getFragmentShaderName()

virtual std::string_view ne::PipelineConfiguration::getFragmentShaderName ( ) const
inlinevirtual

Returns name of the pixel/fragment shader that should be used.

Returns
Empty string if pixel/fragment shader is not used, otherwise name of the compiled shader.

Reimplemented in ne::ColorPipelineConfiguration, and ne::DepthPipelineConfiguration.

◆ getGraphicsType()

virtual std::optional< GraphicsPipelineType > ne::PipelineConfiguration::getGraphicsType ( ) const
pure virtual

Returns type of the pipeline that the object describes.

Returns
Empty if not a graphics pipeline, otherwise graphics pipeline type.

Implemented in ne::ColorPipelineConfiguration, ne::DepthPipelineConfiguration, and ne::ComputePipelineConfiguration.

◆ getRequiredFragmentShaderMacros()

virtual std::set< ShaderMacro > ne::PipelineConfiguration::getRequiredFragmentShaderMacros ( ) const
inlinevirtual

Returns shader macros that required to be defined for a fragment/pixel shader.

Remarks
These macros are used to request the required shader variant from a shader pack.
Returns
Empty set if pixel/fragment shader is not used or no additional pixel/fragment shader macros to enable.

Reimplemented in ne::ColorPipelineConfiguration.

◆ getRequiredVertexShaderMacros()

std::set< ShaderMacro > ne::PipelineConfiguration::getRequiredVertexShaderMacros ( ) const
inline

Returns shader macros that required to be defined for a vertex shader.

Remarks
These macros are used to request the required shader variant from a shader pack.
Returns
Additional vertex shader macros to enable.

◆ getShadowMappingUsage()

virtual std::optional< PipelineShadowMappingUsage > ne::PipelineConfiguration::getShadowMappingUsage ( ) const
inlinevirtual

Tells if this pipeline is used in shadow mapping.

Returns
Empty if not used in shadow mapping, otherwise light sources that can use the pipeline for shadow mapping.

Reimplemented in ne::DepthPipelineConfiguration.

◆ getVertexShaderName()

std::string_view ne::PipelineConfiguration::getVertexShaderName ( ) const
inline

Returns name of the vertex shader that should be used.

Returns
Name of the compiled shader.

◆ isDepthBiasEnabled()

virtual bool ne::PipelineConfiguration::isDepthBiasEnabled ( ) const
inlinevirtual

Tells whether depth bias (offset is enabled or not).

Returns
true to enable, false to disable.

Reimplemented in ne::DepthPipelineConfiguration.

◆ isPixelBlendingEnabled()

virtual bool ne::PipelineConfiguration::isPixelBlendingEnabled ( ) const
inlinevirtual

Tells whether pixel blending should be enabled or not.

Returns
true to enable, false to disable.

Reimplemented in ne::ColorPipelineConfiguration.

Member Data Documentation

◆ requiredVertexShaderMacros

std::set<ShaderMacro> ne::PipelineConfiguration::requiredVertexShaderMacros
protected

Macros required to be defined for a vertex shader.

Remarks
These macros are used to request the required shader variant from a shader pack.

◆ sVertexShaderName

const std::string ne::PipelineConfiguration::sVertexShaderName
protected

Name of the compiled vertex shader to use.


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