17 #ifndef RV_ShaderVariableSet_h
18 #define RV_ShaderVariableSet_h
56 const char*
name =
nullptr);
63 const char*
name =
nullptr);
75 VkDescriptorSet getVkDescriptorSet();
78 {
return *myLayout.get(); }
95 bool getBufferBlock(
int binding_num,
const RV_ShaderBlock*& out_block)
106 bool getTexture(
int binding_num,
RV_VKImage*& out_image);
109 bool getTexture(
int binding_num,
const RV_VKImage*& out_image)
const;
119 bool getBufferView(
int binding_num,
RV_VKBuffer*& out_buffer);
122 bool getBufferView(
int binding_num,
const RV_VKBuffer*& out_buffer)
const;
131 bool attachBufferBlock(
139 bool attachBufferBlock(
148 bool attachBufferView(
156 bool attachBufferView(
182 void clearBinding(
RV_Render* inst,
int binding_num);
195 inline bool isDirty()
const;
206 {
return mySetNumber; }
219 int& out_binding_num,
255 RV_BINDING_UNKNOWN = 0,
262 struct BindingResource
264 BindingResource(RV_BindingType
type,
275 : myType(RV_BINDING_BLOCK)
280 : myType(RV_BINDING_BUFFER)
285 : myType(RV_BINDING_IMAGE)
289 RV_BindingType myType = RV_BINDING_UNKNOWN;
298 const BindingResource &res);
311 bool myIsSetDirty =
false;
A collection of Vulkan UBO, SSBO, and Image shader bindings (descriptor set)
GLenum GLenum GLsizei void * image
const RV_VKDescriptorSetInfo & getSetInfo() const
The raw Vulkan descritor set create info.
std::unique_ptr< T, Deleter > UT_UniquePtr
A smart pointer for unique ownership of dynamically allocated objects.
GLuint const GLchar * name
Handle to the main interface of Vulkan.
int getSetNumber() const
Return the binding number of the set that this set was created with.
FMT_INLINE void print(format_string< T...> fmt, T &&...args)
bool bindSet(RV_ShaderVariableSet *set, const RV_ShaderProgramBase *shr)
Bind a variable set to the specific shader program.