SPARK  0.1.0
A general purpose game engine written in C++.
Loading...
Searching...
No Matches
spark::render::IShaderProgram Class Referenceabstract

Interface representing a shader program, a collection of IShaderModule. More...

#include <Shader.h>

Inheritance diagram for spark::render::IShaderProgram:
spark::render::ShaderProgram< VulkanShaderModule > spark::render::ShaderProgram< ShaderModuleType > spark::render::vk::VulkanShaderProgram

Public Member Functions

std::vector< const IShaderModule * > shaders () const noexcept
 Gets all shaders contained in this program.
 
virtual std::shared_ptr< IPipelineLayoutreflectPipelineLayout () const =0
 Uses shader reflexion to extract the pipeline layout from this shader program.
 

Detailed Description

Interface representing a shader program, a collection of IShaderModule.

Member Function Documentation

◆ reflectPipelineLayout()

virtual std::shared_ptr< IPipelineLayout > spark::render::IShaderProgram::reflectPipelineLayout ( ) const
nodiscardpure virtual

Uses shader reflexion to extract the pipeline layout from this shader program.

Returns
The pipeline layout extracted from this shader program.

Shader reflection is not able to restore:

  • Immutable sampler states in Vulkan.
Note
This may not be available on all backends.

Implemented in spark::render::vk::VulkanShaderProgram.

◆ shaders()

std::vector< const IShaderModule * > spark::render::IShaderProgram::shaders ( ) const
inlinenodiscardnoexcept

Gets all shaders contained in this program.

Returns
A std::vector of pointers to all shaders contained in this program.