11 #ifndef RV_VKFramebuffer_h
12 #define RV_VKFramebuffer_h
36 class rv_VKAttachment;
77 return !(*
this == other);
98 virtual bool beginRendering(
104 virtual void endRendering(
112 int getMaxLayers()
const;
118 myWidth =
w; myHeight =
h;
123 void setSampleCount(
int samples);
144 static const int ALL_LAYERS = -1;
150 int buffer_target = 0,
157 int buffer_target = 0);
159 void detachColorImage(
RV_Render *
r,
int buffer_target = 0);
168 {
return myColorAttachments; }
170 {
return myDepthAttachment; }
172 virtual void attachmentsChanged();
175 uint32_t myWidth = 0;
176 uint32_t myHeight = 0;
178 uint32_t mySamples = 1;
185 bool myIsMultiview =
false;
186 bool myIsReadOnlyDepth =
false;
243 bool myIsDirty =
false;
247 bool myLastMultiview =
false;
259 : myInst(inst), myVkFramebuffer(vk_handle)
263 : myInst(other.myInst), myVkFramebuffer(other.myVkFramebuffer)
265 other.myInst =
nullptr;
266 other.myVkFramebuffer = 0;
278 myInst->
getDevice(), myVkFramebuffer,
nullptr);
285 VkFramebuffer myVkFramebuffer = 0;
299 : myInst(inst), myVkRenderPass(vk_handle)
303 : myInst(other.myInst), myVkRenderPass(other.myVkRenderPass)
305 other.myInst =
nullptr;
306 other.myVkRenderPass = 0;
318 myInst->
getDevice(), myVkRenderPass,
nullptr);
325 VkRenderPass myVkRenderPass = 0;
void setSize(int w, int h)
void setClearColor(UT_Vector4F c)
RV_VKFramebuffer(RV_VKFramebuffer &&other)
virtual ~RV_VKFramebuffer()
UT_UniquePtr< RV_VKImage > RV_VKImagePtr
VKAPI_ATTR void VKAPI_CALL vkDestroyFramebuffer(VkDevice device, VkFramebuffer framebuffer, const VkAllocationCallbacks *pAllocator)
bool getMultiview() const
const UT_Array< rv_VKAttachmentPtr > & colorAttachments() const
GLenum GLuint GLint GLint layer
std::unique_ptr< T, Deleter > UT_UniquePtr
A smart pointer for unique ownership of dynamically allocated objects.
rv_VKAttachmentPtr myDepthAttachment
UT_Vector4T< int32 > UT_Vector4i
std::array< T, N > UT_FixedArray
VKAPI_ATTR void VKAPI_CALL vkDestroyRenderPass(VkDevice device, VkRenderPass renderPass, const VkAllocationCallbacks *pAllocator)
UT_Array< rv_VKAttachmentPtr > myColorAttachments
UT_Vector4i getClearInt() const
void setClearInt(UT_Vector4i i)
virtual ~RV_VKRenderPass()
GLuint const GLchar * name
virtual bool fillPipelineInfo(RV_RenderPassFormatInfo &info)=0
VkRenderPass getVkRenderPass() const
Handle to the main interface of Vulkan.
RV_VKRenderPass(RV_Instance *inst, VkRenderPass vk_handle)
void setReadOnlyDepth(bool enable)
const rv_VKAttachmentPtr & depthAttachment() const
GLfloat GLfloat GLfloat GLfloat h
bool getReadOnlyDepth() const
void setClearDepth(fpreal32 d)
RV_VKFramebuffer(RV_Instance *inst, VkFramebuffer vk_handle)
UT_Vector4T< fpreal32 > UT_Vector4F
virtual void attachmentsChanged()
void setMultiview(bool enable)
VkDevice getDevice()
Get the raw vulkan device assocated with this instance.
GLubyte GLubyte GLubyte GLubyte w
static UT_UniquePtr< RV_VKRenderPass > create(RV_Instance *inst, const RV_RenderPassFormatInfo &pass_info, RV_ImageOp load_op)
RV_VKFramebuffer & operator=(RV_VKFramebuffer &&rhs) noexcept=delete
virtual bool beginRendering(RV_Instance *inst, RV_VKCommandBuffer *cb, RV_ImageOp img_op=RV_IMAGE_LOAD, RV_RenderPassType type=RV_PASS_WHOLE)=0
RV_VKRenderPass(RV_VKRenderPass &&other)
UT_Vector4F getClearColor() const
fpreal32 getClearDepth() const
const UT_StringHolder & name() const
RV_VKRenderPass & operator=(RV_VKRenderPass &&rhs) noexcept=delete
VkFramebuffer getVkFramebuffer() const
virtual void endRendering(RV_Instance *inst, RV_VKCommandBuffer *cb)=0
RAII wrapper class for VkImageView.
UT_UniquePtr< rv_VKAttachment > rv_VKAttachmentPtr