Class GLBuffer
Represents an OpenGL buffer object.
Inherited Members
Namespace: Evergine.OpenGL
Assembly: Evergine.OpenGL.dll
Syntax
public class GLBuffer : Buffer
Constructors
GLBuffer(GLGraphicsContext, nint, ref BufferDescription)
Initializes a new instance of the GLBuffer class.
Declaration
public GLBuffer(GLGraphicsContext context, nint data, ref BufferDescription description)
Parameters
Type | Name | Description |
---|---|---|
GLGraphicsContext | context | Graphics context. |
nint | data | Data pointer. |
BufferDescription | description | Buffer description. |
Properties
Name
Gets or sets a string identifying this instance. It can be used in graphics debugging tools.
Declaration
public override string Name { get; set; }
Property Value
Type | Description |
---|---|
string |
Overrides
NativePointer
Gets the native pointer.
Declaration
public override nint NativePointer { get; }
Property Value
Type | Description |
---|---|
nint |
Overrides
Methods
CopyTo(Buffer, uint, uint, uint)
Copies between buffers.
Declaration
public void CopyTo(Buffer destination, uint sizeInBytes, uint sourceOffset = 0, uint destinationOffset = 0)
Parameters
Type | Name | Description |
---|---|---|
Buffer | destination | Destination buffer. |
uint | sizeInBytes | Size in bytes. |
uint | sourceOffset | Source offset. |
uint | destinationOffset | Destination offset. |
Dispose()
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
Declaration
public override void Dispose()
Overrides
SetData(nint, uint, uint, BufferTargetARB)
Sets buffer data.
Declaration
public void SetData(nint source, uint sourceSizeInBytes, uint destinationOffsetInBytes = 0, BufferTargetARB bufferTarget = BufferTargetARB.CopyWriteBuffer)
Parameters
Type | Name | Description |
---|---|---|
nint | source | Source pointer. |
uint | sourceSizeInBytes | Source size in bytes. |
uint | destinationOffsetInBytes | Destination offset in bytes. |
BufferTargetARB | bufferTarget | The buffer target. |