Class GLVertexBufferObject<T>
- Namespace
- SearchAThing.OpenGL.Core
- Assembly
- netcore-opengl-core.dll
Manage mapping of given template typed data to gpu memory.
public class GLVertexBufferObject<T> : IDisposable where T : unmanaged
Type Parameters
TType of packet structure.
- Inheritance
-
GLVertexBufferObject<T>
- Implements
- Inherited Members
Constructors
GLVertexBufferObject(GL, BufferTargetARB, Span<T>, BufferUsageARB)
Executes gLGenBuffer() to create buffer handle and gLBindBuffer() on given target,
then gLBufferData() to map on given data.
It will be automatically disposed with the call of glDeleteBuffer().
public GLVertexBufferObject(GL GL, BufferTargetARB target, Span<T> data, BufferUsageARB usage = BufferUsageARB.DynamicDraw)
Parameters
GLGLtargetBufferTargetARBdataSpan<T>usageBufferUsageARB
Methods
Dispose()
public void Dispose()
Dispose(bool)
protected virtual void Dispose(bool disposing)
Parameters
disposingbool
~GLVertexBufferObject()
protected ~GLVertexBufferObject()
ReplaceItems(int, Span<T>)
public void ReplaceItems(int offset, Span<T> newdata)
Parameters
ToString()
public override string ToString()