Class VKFrameBuffer
This class represents a native FrameBuffer object in Vulkan.
Inherited Members
Namespace: Evergine.Vulkan
Assembly: Evergine.Vulkan.dll
Syntax
public class VKFrameBuffer : VKFrameBufferBase, ILoadable, IDependencyObject
Constructors
VKFrameBuffer(VKGraphicsContext, FrameBufferAttachment?, FrameBufferAttachment[], bool)
Initializes a new instance of the VKFrameBuffer class.
Declaration
public VKFrameBuffer(VKGraphicsContext context, FrameBufferAttachment? depthTarget, FrameBufferAttachment[] colorTargets, bool disposeAttachments)
Parameters
Type | Name | Description |
---|---|---|
VKGraphicsContext | context | The graphics context. |
FrameBufferAttachment? | depthTarget | The depth texture, which must have been created with the DepthStencil flag. |
FrameBufferAttachment[] | colorTargets | The array of color textures, all of which must have been created with the RenderTarget flags. |
bool | disposeAttachments | When this framebuffer is disposed, dispose of the attachment textures too. |
Fields
NativeFrameBuffer
The Vulkan Framebuffer struct.
Declaration
public VkFramebuffer NativeFrameBuffer
Field Value
Type | Description |
---|---|
VkFramebuffer |
defaultRenderPasses
Default Render Pass.
Declaration
public VkRenderPass[] defaultRenderPasses
Field Value
Type | Description |
---|---|
VkRenderPass[] |
Properties
Name
Gets or sets a string identifying this instance. It can be used in graphics debuggers tools.
Declaration
public override string Name { get; set; }
Property Value
Type | Description |
---|---|
string |
Overrides
Methods
CreateImageView(VKTexture, uint, uint, VkImageAspectFlags, bool)
Generates a VKImageView from FrameBufferAttachment.
Declaration
protected VkImageView CreateImageView(VKTexture vkTexture, uint mipSlice, uint firstSlice, VkImageAspectFlags flags = VkImageAspectFlags.VK_IMAGE_ASPECT_COLOR_BIT, bool depthTexture = false)
Parameters
Type | Name | Description |
---|---|---|
VKTexture | vkTexture | Texture instance. |
uint | mipSlice | Mip level slice. |
uint | firstSlice | First slice. |
VkImageAspectFlags | flags | Aspect flags. |
bool | depthTexture | Indicates if this image view is a depth texture. |
Returns
Type | Description |
---|---|
VkImageView | VkImageView instance. |
Dispose(bool)
Releases unmanaged and optionally managed resources.
Declaration
protected override void Dispose(bool disposing)
Parameters
Type | Name | Description |
---|---|---|
bool | disposing |
|
Overrides
TransitionToFinalLayout(VkCommandBuffer)
Transition to a ready-to-use layout.
Declaration
public override void TransitionToFinalLayout(VkCommandBuffer cb)
Parameters
Type | Name | Description |
---|---|---|
VkCommandBuffer | cb | The command buffer to execute this change. |
Overrides
TransitionToIntermedialLayout(VkCommandBuffer)
Transitions the framebuffer to an intermediate layout.
Declaration
public override void TransitionToIntermedialLayout(VkCommandBuffer cb)
Parameters
Type | Name | Description |
---|---|---|
VkCommandBuffer | cb | The command buffer to execute this change. |