Class FrameBuffer
This class represents which color texture and depth texture are rendered to present.
Inheritance
Namespace: Evergine.Common.Graphics
Assembly: Evergine.Common.dll
Syntax
public abstract class FrameBuffer : ILoadable, 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 be created with the DepthStencil flag. |
FrameBufferAttachment[] | colorTargets | The array of color textures, all of which must be created with the RenderTarget flags. |
bool | disposeAttachments | When this framebuffer is disposed, dispose of the attachment textures too. |
Fields
disposeAttachments
A value indicating whether attachment textures need to be disposed of when this framebuffer is disposed.
Declaration
protected bool disposeAttachments
Field Value
Type | Description |
---|---|
bool |
disposed
Indicates if the instance has been disposed.
Declaration
protected bool disposed
Field Value
Type | Description |
---|---|
bool |
requireFlipProjection
Indicates 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 color target textures associated with this FrameBuffer.
Declaration
public virtual FrameBufferAttachment[] ColorTargets { get; protected set; }
Property Value
Type | Description |
---|---|
FrameBufferAttachment[] |
Dependencies
Gets the list of dependencies.
Declaration
public Lazy<List<IDependencyLink>> Dependencies { get; }
Property Value
Type | Description |
---|---|
Lazy<List<IDependencyLink>> |
DepthStencilTarget
Gets or sets the depth target 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 associated with a swapchain.
Declaration
public bool IntermediateBufferAssociated { get; set; }
Property Value
Type | Description |
---|---|
bool |
Name
Gets or sets a string identifying this instance. It 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 that describes the number and formats of the depth and color 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, it 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 raises 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()
Releases unused memory.
Declaration
public void ReleaseUnusedMemory()
Events
Invalidated
Occurs when this instance is invalidated and all references must be reloaded.
Declaration
public event EventHandler<ILoadable> Invalidated
Event Type
Type | Description |
---|---|
EventHandler<ILoadable> |