CMSC23700 Common Code Library
Support code for CS23700 programming projects
Loading...
Searching...
No Matches
cs237::Shaders Class Reference

#include <cs237-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
 

Detailed Description

A wrapper class for loading a pipeline of pre-compiled shaders from the file system.

Constructor & Destructor Documentation

◆ Shaders() [1/2]

cs237::Shaders::Shaders ( vk::Device  device,
std::string const &  stem,
vk::ShaderStageFlags  stages 
)

load a pre-compiled shader program from the file system.

Parameters
devicethe logical device that will run the shaders
stemthe base name of the shader files
stagesa 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.

◆ Shaders() [2/2]

cs237::Shaders::Shaders ( vk::Device  device,
std::vector< std::string > const &  files,
vk::ShaderStageFlags  stages 
)

◆ ~Shaders()

cs237::Shaders::~Shaders ( )

Member Function Documentation

◆ numStages()

int cs237::Shaders::numStages ( ) const
inline

return the number of shader stages in the pipeline

◆ stages()

std::vector< vk::PipelineShaderStageCreateInfo > const & cs237::Shaders::stages ( ) const
inline

return a pointer to the array of stage create infos


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