wren
Vulkan-based game engine
Loading...
Searching...
No Matches
wren::vk::Shader Class Reference

#include <shader.hpp>

Collaboration diagram for wren::vk::Shader:

Public Types

using Ptr = std::shared_ptr<Shader>

Public Member Functions

auto get_pipeline () const
auto pipeline_layout () const
auto descriptor_layout () const
void fragment_shader (const ShaderModule &fragment)
void vertex_shader (const ShaderModule &vertex)
auto create_graphics_pipeline (const ::vk::Device &device, const ::vk::RenderPass &render_pass, const math::Vec2f &size, bool depth) -> expected< void >

Static Public Member Functions

static auto create (const ::vk::Device &device, const std::string &vertex_shader, const std::string &fragment_shader) -> expected< Ptr >
static auto create (const ::vk::Device &device, const std::filesystem::path &shader_path) -> expected< Ptr >

Static Private Member Functions

static auto read_wren_shader_file (const std::filesystem::path &path) -> expected< std::map< ShaderType, std::string > >

Private Attributes

::vk::DescriptorSetLayout descriptor_layout_
::vk::PipelineLayout pipeline_layout_
::vk::Pipeline pipeline_
ShaderModule vertex_shader_module_
ShaderModule fragment_shader_module_

Member Typedef Documentation

◆ Ptr

using wren::vk::Shader::Ptr = std::shared_ptr<Shader>

Member Function Documentation

◆ create() [1/2]

auto wren::vk::Shader::create ( const ::vk::Device & device,
const std::filesystem::path & shader_path ) -> expected< Ptr >
static

◆ create() [2/2]

auto wren::vk::Shader::create ( const ::vk::Device & device,
const std::string & vertex_shader,
const std::string & fragment_shader ) -> expected< Ptr >
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ create_graphics_pipeline()

auto wren::vk::Shader::create_graphics_pipeline ( const ::vk::Device & device,
const ::vk::RenderPass & render_pass,
const math::Vec2f & size,
bool depth ) -> expected< void >

◆ descriptor_layout()

auto wren::vk::Shader::descriptor_layout ( ) const
inlinenodiscard

◆ fragment_shader()

void wren::vk::Shader::fragment_shader ( const ShaderModule & fragment)
inline
Here is the caller graph for this function:

◆ get_pipeline()

auto wren::vk::Shader::get_pipeline ( ) const
inlinenodiscard

◆ pipeline_layout()

auto wren::vk::Shader::pipeline_layout ( ) const
inlinenodiscard

◆ read_wren_shader_file()

auto wren::vk::Shader::read_wren_shader_file ( const std::filesystem::path & path) -> expected< std::map< ShaderType, std::string > >
staticprivate

◆ vertex_shader()

void wren::vk::Shader::vertex_shader ( const ShaderModule & vertex)
inline
Here is the caller graph for this function:

Member Data Documentation

◆ descriptor_layout_

::vk::DescriptorSetLayout wren::vk::Shader::descriptor_layout_
private

◆ fragment_shader_module_

ShaderModule wren::vk::Shader::fragment_shader_module_
private

◆ pipeline_

::vk::Pipeline wren::vk::Shader::pipeline_
private

◆ pipeline_layout_

::vk::PipelineLayout wren::vk::Shader::pipeline_layout_
private

◆ vertex_shader_module_

ShaderModule wren::vk::Shader::vertex_shader_module_
private

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