Vulkan Schnee 0.0.1
High-performance rendering engine
Loading...
Searching...
No Matches
EngineCore::LayoutBindingsBuilder Class Reference

#include <LayoutBindingsBuilder.h>

Collaboration diagram for EngineCore::LayoutBindingsBuilder:

Public Member Functions

 LayoutBindingsBuilder ()=default
LayoutBindingsBuilderaddUniformBuffer (uint32_t binding, VkShaderStageFlags stageFlags)
 Adds a uniform buffer for binding.
LayoutBindingsBuilderaddStorageBuffer (uint32_t binding, VkShaderStageFlags stageFlags)
 Adds a storage buffer to for binding.
LayoutBindingsBuilderaddTextureBuffer (uint32_t binding, VkShaderStageFlags stageFlags)
 Adds a texture buffer for binding.
void build ()
 Decorative. Finishes the nodiscard chain of added buffers.
const std::vector< VkDescriptorSetLayoutBinding > & getBindings () const
 Getter for the descriptor bindings.
const std::vector< VkDescriptorBindingFlags > & getFlags () const
 Getter for the descriptor flags.

Private Attributes

std::vector< VkDescriptorSetLayoutBinding > bindings
std::vector< VkDescriptorBindingFlags > flags

Detailed Description

Definition at line 21 of file LayoutBindingsBuilder.h.

Constructor & Destructor Documentation

◆ LayoutBindingsBuilder()

EngineCore::LayoutBindingsBuilder::LayoutBindingsBuilder ( )
default

References LayoutBindingsBuilder().

Referenced by addStorageBuffer(), addTextureBuffer(), addUniformBuffer(), and LayoutBindingsBuilder().

Here is the call graph for this function:
Here is the caller graph for this function:

Member Function Documentation

◆ addStorageBuffer()

LayoutBindingsBuilder & EngineCore::LayoutBindingsBuilder::addStorageBuffer ( uint32_t binding,
VkShaderStageFlags stageFlags )
nodiscard

Adds a storage buffer to for binding.

Parameters
bindingwhich index of the descriptor set layout to bind to
stageFlagswhich stages this buffer is used by
Returns
reference to the builder for further chaining
Author
Konstantin Passig
Date
15.12.2025

Definition at line 19 of file LayoutBindingsBuilder.cpp.

References bindings, flags, and LayoutBindingsBuilder().

Here is the call graph for this function:

◆ addTextureBuffer()

LayoutBindingsBuilder & EngineCore::LayoutBindingsBuilder::addTextureBuffer ( uint32_t binding,
VkShaderStageFlags stageFlags )
nodiscard

Adds a texture buffer for binding.

Parameters
bindingwhich index to bind to. Usually set by enums
stageFlagswhich stages this buffer is used by
Returns
reference to the builder for further chaining
Author
Konstantin Passig
Date
15.12.2025

Definition at line 31 of file LayoutBindingsBuilder.cpp.

References bindings, flags, LayoutBindingsBuilder(), and MAX_TEXTURE_COUNT.

Here is the call graph for this function:

◆ addUniformBuffer()

LayoutBindingsBuilder & EngineCore::LayoutBindingsBuilder::addUniformBuffer ( uint32_t binding,
VkShaderStageFlags stageFlags )
nodiscard

Adds a uniform buffer for binding.

Parameters
bindingwhich index of the descriptor set layout to bind to
stageFlagswhich stages this buffer is used by
Returns
reference to the builder for further chaining
Author
Konstantin Passig
Date
15.12.2025

Definition at line 7 of file LayoutBindingsBuilder.cpp.

References bindings, flags, and LayoutBindingsBuilder().

Here is the call graph for this function:

◆ build()

void EngineCore::LayoutBindingsBuilder::build ( )

Decorative. Finishes the nodiscard chain of added buffers.

Author
Konstantin Passig
Date
15.12.2025

Definition at line 43 of file LayoutBindingsBuilder.cpp.

◆ getBindings()

const std::vector< VkDescriptorSetLayoutBinding > & EngineCore::LayoutBindingsBuilder::getBindings ( ) const
inlinenodiscard

Getter for the descriptor bindings.

Returns
bindings descriptor set layout bindings
Author
Konstantin Passig
Date
15.12.2025

Definition at line 71 of file LayoutBindingsBuilder.h.

References bindings.

◆ getFlags()

const std::vector< VkDescriptorBindingFlags > & EngineCore::LayoutBindingsBuilder::getFlags ( ) const
inlinenodiscard

Getter for the descriptor flags.

Returns
bindings and flags are the same length
Author
Konstantin Passig
Date
15.12.2025

Definition at line 80 of file LayoutBindingsBuilder.h.

References flags.

Member Data Documentation

◆ bindings

std::vector<VkDescriptorSetLayoutBinding> EngineCore::LayoutBindingsBuilder::bindings
private

◆ flags

std::vector<VkDescriptorBindingFlags> EngineCore::LayoutBindingsBuilder::flags
private

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