Class GLClassExtensions
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
BufferModeThe 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
BufferResourceThe 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
AttributeBindingExlocation
int
ToDrawElementsType(ElementBufferType)
public static DrawElementsType ToDrawElementsType(this ElementBufferType type)
Parameters
type
ElementBufferType
Returns
ToVertexAttribPointerType(AttributeType)
Convert ReFuel AttributeType to OpenGL VertexAttribPointerType.
public static VertexAttribPointerType ToVertexAttribPointerType(this AttributeType type)
Parameters
type
AttributeTypeThe vertex attribute value type.
Returns
- VertexAttribPointerType
The OpenGL vertex attribute value type.
Exceptions
- ArgumentOutOfRangeException
Unrecognized vertex attribute type.