![]() |
CMSC23740 Common Code Library
Support code for CS23740 programming projects
|
#include <shader.hpp>
Public Member Functions | |
| Shaders (vk::Device device, std::string const &stem, vk::ShaderStageFlags stages) | |
| load a pre-compiled shader program from the file system. | |
| Shaders (vk::Device device, std::vector< std::string > const &files, vk::ShaderStageFlags stages) | |
| ~Shaders () | |
| int | numStages () const |
| return the number of shader stages in the pipeline | |
| std::vector< vk::PipelineShaderStageCreateInfo > const & | stages () const |
| return a pointer to the array of stage create infos | |
A wrapper class for loading a pipeline of pre-compiled shaders from the file system.
| cs237::Shaders::Shaders | ( | vk::Device | device, |
| std::string const & | stem, | ||
| vk::ShaderStageFlags | stages ) |
load a pre-compiled shader program from the file system.
| device | the logical device that will run the shaders |
| stem | the base name of the shader files |
| stages | a bitmask spcifying the shader stages that form the program. The flags that we support are: eVertex, eTessellationControl, eTessellationEvaluation, eFragment, and eCompute. |
This version of the constructor assumes that the shader programs all have the same base filename and only differ in their file extensions.
| cs237::Shaders::Shaders | ( | vk::Device | device, |
| std::vector< std::string > const & | files, | ||
| vk::ShaderStageFlags | stages ) |
| cs237::Shaders::~Shaders | ( | ) |
|
inline |
return the number of shader stages in the pipeline
|
inline |
return a pointer to the array of stage create infos