Class FrameBuffer
This class represent which color texture and depth texture are rendered to present.
Inheritance
Inherited Members
Namespace: Evergine.Common.Graphics
Assembly: Evergine.Common.dll
Syntax
public abstract class FrameBuffer : ILoadable, IDisposable, IDependencyObject
  Constructors
FrameBuffer()
Initializes a new instance of the FrameBuffer class.
Declaration
public FrameBuffer()
  FrameBuffer(FrameBufferAttachment?, FrameBufferAttachment[], bool)
Initializes a new instance of the FrameBuffer class.
Declaration
public FrameBuffer(FrameBufferAttachment? depthTarget, FrameBufferAttachment[] colorTargets, bool disposeAttachments)
  Parameters
| Type | Name | Description | 
|---|---|---|
| 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
disposeAttachments
A value indicating whether we need to dispose attachment textures when this framebuffer is disposed.
Declaration
protected bool disposeAttachments
  Field Value
| Type | Description | 
|---|---|
| bool | 
disposed
Holds if the instance has been disposed.
Declaration
protected bool disposed
  Field Value
| Type | Description | 
|---|---|
| bool | 
requireFlipProjection
Inticates if this FrameBuffer requires the projection matrix to be flipped.
Declaration
protected bool requireFlipProjection
  Field Value
| Type | Description | 
|---|---|
| bool | 
Properties
ArraySize
Gets or sets the array size of the FrameBuffer.
Declaration
public uint ArraySize { get; protected set; }
  Property Value
| Type | Description | 
|---|---|
| uint | 
ColorTargets
Gets or sets the collection of colors targets textures associated with this FrameBuffer.
Declaration
public virtual FrameBufferAttachment[] ColorTargets { get; protected set; }
  Property Value
| Type | Description | 
|---|---|
| FrameBufferAttachment[] | 
Dependencies
Gets the dependency list.
Declaration
public Lazy<List<IDependencyLink>> Dependencies { get; }
  Property Value
| Type | Description | 
|---|---|
| Lazy<List<IDependencyLink>> | 
DepthStencilTarget
Gets or sets the depth targets texture associated with this FrameBuffer.
Declaration
public virtual FrameBufferAttachment? DepthStencilTarget { get; protected set; }
  Property Value
| Type | Description | 
|---|---|
| FrameBufferAttachment? | 
Height
Gets or sets the height in pixels of the FrameBuffer.
Declaration
public uint Height { get; protected set; }
  Property Value
| Type | Description | 
|---|---|
| uint | 
Id
Gets or sets the asset Id.
Declaration
public Guid Id { get; set; }
  Property Value
| Type | Description | 
|---|---|
| Guid | 
IntermediateBufferAssociated
Gets or sets a value indicating whether the framebuffer is associates to a swapchain.
Declaration
public bool IntermediateBufferAssociated { get; set; }
  Property Value
| Type | Description | 
|---|---|
| bool | 
Name
Gets or sets a string identifying this instance. Can be used in graphics debuggers tools.
Declaration
public abstract string Name { get; set; }
  Property Value
| Type | Description | 
|---|---|
| string | 
OutputDescription
Gets or sets an OutputDescription which describes the number and formats of the depth and colors targets.
Declaration
public OutputDescription OutputDescription { get; protected set; }
  Property Value
| Type | Description | 
|---|---|
| OutputDescription | 
ReaderVersion
Gets the reader version.
Declaration
public Version ReaderVersion { get; }
  Property Value
| Type | Description | 
|---|---|
| Version | 
RequireFlipProjection
Gets or sets a value indicating whether this FrameBuffer requires the projection matrix to be flipped. By default they will indicate the default flip behavior, but the user can change it.
Declaration
public virtual bool RequireFlipProjection { get; set; }
  Property Value
| Type | Description | 
|---|---|
| bool | 
SampleCount
Gets or sets the sample count of the FrameBuffer.
Declaration
public TextureSampleCount SampleCount { get; protected set; }
  Property Value
| Type | Description | 
|---|---|
| TextureSampleCount | 
Width
Gets or sets the width in pixels of the FrameBuffer.
Declaration
public uint Width { get; protected set; }
  Property Value
| Type | Description | 
|---|---|
| uint | 
Methods
Dispose()
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
Declaration
public void Dispose()
  Dispose(bool)
Releases unmanaged and - optionally - managed resources.
Declaration
protected virtual void Dispose(bool disposing)
  Parameters
| Type | Name | Description | 
|---|---|---|
| bool | disposing | 
  | 
      
Invalidate(ILoadable)
Invalidates this instance and raise the Invalidated event with the new ILoadable instance.
Declaration
public void Invalidate(ILoadable newInstance)
  Parameters
| Type | Name | Description | 
|---|---|---|
| ILoadable | newInstance | The new ILoadable instance.  | 
      
ReleaseUnusedMemory()
Release unused memory.
Declaration
public void ReleaseUnusedMemory()
  Events
Invalidated
Occurs when this instance has been invalidated and all references must be reloaded.
Declaration
public event EventHandler<ILoadable> Invalidated
  Event Type
| Type | Description | 
|---|---|
| EventHandler<ILoadable> |