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 > getAdditionalVertexShaderMacros () const
 
std::string_view getVertexShaderName () const
 
virtual std::optional< GraphicsPipelineType > getGraphicsType () const =0
 
virtual std::set< ShaderMacro > getAdditionalPixelShaderMacros () const
 
virtual std::string_view getPixelShaderName () 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 > &additionalVertexShaderMacros)
 

Protected Attributes

std::set< ShaderMacro > additionalVertexShaderMacros
 
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 > &  additionalVertexShaderMacros 
)
protected

Initializes options.

Parameters
sVertexShaderNameName of the compiled vertex shader to use (empty if not used).
additionalVertexShaderMacrosAdditional macros to enable for vertex shader configuration.

Member Function Documentation

◆ getAdditionalPixelShaderMacros()

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

Returns additional macros to enable for pixel/fragment shader configuration (if pixel/fragment shader is used).

Returns
Empty set if pixel/fragment shader is not used or no additional pixel/fragment shader macros to enable.

Reimplemented in ne::ColorPipelineConfiguration.

◆ getAdditionalVertexShaderMacros()

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

Returns additional macros to enable for vertex shader configuration.

Returns
Additional vertex shader macros to enable.

◆ 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.

◆ 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.

◆ getPixelShaderName()

virtual std::string_view ne::PipelineConfiguration::getPixelShaderName ( ) 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.

◆ 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

◆ additionalVertexShaderMacros

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

Additional macros to enable for vertex shader configuration.

◆ 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: