Table of Contents

Class Framebuffer

Namespace
ValveResourceFormat.Renderer
Assembly
Renderer.dll

OpenGL framebuffer object with color and depth attachments.

public class Framebuffer

Inheritance

Derived

Inherited Members

Constructors

Framebuffer(string)

public Framebuffer(string name)

Parameters

name string

Properties

ClearColor

public Color4 ClearColor { get; set; }

Property Value

Color4

ClearMask

public ClearBufferMask ClearMask { get; set; }

Property Value

ClearBufferMask

Color

public RenderTexture? Color { get; protected set; }

Property Value

RenderTexture?

ColorFormat

public Framebuffer.AttachmentFormat? ColorFormat { get; protected set; }

Property Value

Framebuffer.AttachmentFormat?

Depth

public RenderTexture? Depth { get; protected set; }

Property Value

RenderTexture?

DepthFormat

public Framebuffer.DepthAttachmentFormat? DepthFormat { get; protected set; }

Property Value

Framebuffer.DepthAttachmentFormat?

FboHandle

public int FboHandle { get; }

Property Value

int

GLDefaultFramebuffer

public static Framebuffer GLDefaultFramebuffer { get; }

Property Value

Framebuffer

Height

public int Height { get; protected set; }

Property Value

int

InitialStatus

public FramebufferErrorCode InitialStatus { get; }

Property Value

FramebufferErrorCode

NumMips

public int NumMips { get; set; }

Property Value

int

NumSamples

public int NumSamples { get; set; }

Property Value

int

Stencil

public RenderTexture? Stencil { get; protected set; }

Property Value

RenderTexture?

Target

public TextureTarget Target { get; protected set; }

Property Value

TextureTarget

TargetState

public FramebufferTarget TargetState { get; set; }

Property Value

FramebufferTarget

Width

public int Width { get; protected set; }

Property Value

int

Methods

AttachColorMipLevel(int)

public void AttachColorMipLevel(int mipLevel)

Parameters

mipLevel int

Bind(FramebufferTarget)

public void Bind(FramebufferTarget targetState)

Parameters

targetState FramebufferTarget

BindAndClear(FramebufferTarget)

public void BindAndClear(FramebufferTarget targetState = FramebufferTarget.Framebuffer)

Parameters

targetState FramebufferTarget

ChangeFormat(AttachmentFormat?, DepthAttachmentFormat?, FramebufferAttachment?)

public void ChangeFormat(Framebuffer.AttachmentFormat? colorFormat, Framebuffer.DepthAttachmentFormat? depthFormat, FramebufferAttachment? framebufferAttachment = null)

Parameters

colorFormat Framebuffer.AttachmentFormat?
depthFormat Framebuffer.DepthAttachmentFormat?
framebufferAttachment FramebufferAttachment?

CheckStatus_ThrowIfIncomplete(string)

public void CheckStatus_ThrowIfIncomplete(string name = "")

Parameters

name string

Delete()

public void Delete()

Equals(object?)

Determines whether the specified object is equal to the current object.

public override bool Equals(object? obj)

Parameters

obj object?

The object to compare with the current object.

Returns

bool

true if the specified object is equal to the current object; otherwise, false.

GetHashCode()

Serves as the default hash function.

public override int GetHashCode()

Returns

int

A hash code for the current object.

GetMipSize(int)

public Vector2i GetMipSize(int level)

Parameters

level int

Returns

Vector2i

HasValidDimensions()

public bool HasValidDimensions()

Returns

bool

Initialize()

public FramebufferErrorCode Initialize()

Returns

FramebufferErrorCode

Prepare(string, int, int, int, AttachmentFormat?, DepthAttachmentFormat?)

public static Framebuffer Prepare(string name, int width, int height, int msaa, Framebuffer.AttachmentFormat? colorFormat, Framebuffer.DepthAttachmentFormat? depthFormat)

Parameters

name string
width int
height int
msaa int
colorFormat Framebuffer.AttachmentFormat?
depthFormat Framebuffer.DepthAttachmentFormat?

Returns

Framebuffer

Resize(int, int, int)

public void Resize(int width, int height, int msaa)

Parameters

width int
height int
msaa int

Resize(int, int)

public void Resize(int width, int height)

Parameters

width int
height int

Operators

operator ==(Framebuffer?, Framebuffer?)

public static bool operator ==(Framebuffer? left, Framebuffer? right)

Parameters

left Framebuffer?
right Framebuffer?

Returns

bool

operator !=(Framebuffer?, Framebuffer?)

public static bool operator !=(Framebuffer? left, Framebuffer? right)

Parameters

left Framebuffer?
right Framebuffer?

Returns

bool