Class VKFrameBuffer
This class represents a native FrameBuffer object on Vulkan.
Inherited Members
Namespace: Evergine.Vulkan
Assembly: Evergine.Vulkan.dll
Syntax
public class VKFrameBuffer : VKFrameBufferBase, ILoadable, IDisposable, 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 DepthStencil flag.  | 
      
| FrameBufferAttachment[] | colorTargets | The array of color textures, all of which must have been created with RenderTarget flags.  | 
      
| bool | disposeAttachments | When this framebuffer is disposed, dispose the attachment textures too.  | 
      
Fields
NativeFrameBuffer
The Vulkan frameBuffer struct.
Declaration
public VkFramebuffer NativeFrameBuffer
  Field Value
| Type | Description | 
|---|---|
| VkFramebuffer | 
defaultRenderPasses
Default Render Passes.
Declaration
public VkRenderPass[] defaultRenderPasses
  Field Value
| Type | Description | 
|---|---|
| VkRenderPass[] | 
Properties
Name
Gets or sets a string identifying this instance. 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)
Generate 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 | Miplevel slice.  | 
      
| uint | firstSlice | First slice.  | 
      
| VkImageAspectFlags | flags | Aspect flags.  | 
      
| bool | depthTexture | 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 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)
Transition framebuffer to intermediate layout.
Declaration
public override void TransitionToIntermedialLayout(VkCommandBuffer cb)
  Parameters
| Type | Name | Description | 
|---|---|---|
| VkCommandBuffer | cb | The command buffer to execute this change.  |