Table of Contents

Class GLClassExtensions

Namespace
ReFuel.Graphics.OpenGL
Assembly
ReFuel.dll

Class extensions that are used by OpenGL rendering backends.

public static class GLClassExtensions
Inheritance
GLClassExtensions
Inherited Members

Methods

GetBufferUsageHint(BufferMode)

Get the buffer usage hint for a certain buffer mode.

public static BufferUsage GetBufferUsageHint(this BufferMode mode)

Parameters

mode BufferMode

The buffer mode.

Returns

BufferUsage

OpenGL buffer usage hints.

GetGLBuffer(BufferResource)

Get the GL buffer associated with this buffer resource.

public static GLObject GetGLBuffer(this BufferResource buffer)

Parameters

buffer BufferResource

The buffer resource to get the GL buffer for.

Returns

GLObject

The GLObject that tracks the GL buffer.

Exceptions

Exception

The buffer resource has no memory associated with it.

SetVertexAttrib(AttributeBindingEx, int)

public static void SetVertexAttrib(this AttributeBindingEx binding, int location)

Parameters

binding AttributeBindingEx
location int

ToDrawElementsType(ElementBufferType)

public static DrawElementsType ToDrawElementsType(this ElementBufferType type)

Parameters

type ElementBufferType

Returns

DrawElementsType

ToVertexAttribPointerType(AttributeType)

Convert ReFuel AttributeType to OpenGL VertexAttribPointerType.

public static VertexAttribPointerType ToVertexAttribPointerType(this AttributeType type)

Parameters

type AttributeType

The vertex attribute value type.

Returns

VertexAttribPointerType

The OpenGL vertex attribute value type.

Exceptions

ArgumentOutOfRangeException

Unrecognized vertex attribute type.