Class GLBuffer
Represents a OpenGL buffer object.
Implements
Inherited Members
Namespace: Evergine.OpenGL
Assembly: Evergine.OpenGL.dll
Syntax
public class GLBuffer : Buffer, IDisposable
Constructors
GLBuffer(GLGraphicsContext, IntPtr, ref BufferDescription)
Initializes a new instance of the GLBuffer class.
Declaration
public GLBuffer(GLGraphicsContext context, IntPtr data, ref BufferDescription description)
Parameters
Type | Name | Description |
---|---|---|
GLGraphicsContext | context | Graphics Context. |
IntPtr | data | Data pointer. |
BufferDescription | description | Buffer description. |
Properties
Name
Gets or sets a string identifying this instance. Can be used in graphics debuggers tools.
Declaration
public override string Name { get; set; }
Property Value
Type | Description |
---|---|
string |
Overrides
NativePointer
Gets the native pointer.
Declaration
public override IntPtr NativePointer { get; }
Property Value
Type | Description |
---|---|
IntPtr |
Overrides
Methods
CopyTo(Buffer, uint, uint, uint)
Copy between buffers.
Declaration
public void CopyTo(Buffer destination, uint sizeInBytes, uint sourceOffset = 0, uint destinationOffset = 0)
Parameters
Type | Name | Description |
---|---|---|
Buffer | destination | Buffer destination. |
uint | sizeInBytes | Destination size in bytes. |
uint | sourceOffset | Source offset. |
uint | destinationOffset | Destination offset. |
Dispose()
Dispose this instance.
Declaration
public override void Dispose()
Overrides
SetData(IntPtr, uint, uint, BufferTargetARB)
Set buffer Data.
Declaration
public void SetData(IntPtr source, uint sourceSizeInBytes, uint destinationOffsetInBytes = 0, BufferTargetARB bufferTarget = BufferTargetARB.CopyWriteBuffer)
Parameters
Type | Name | Description |
---|---|---|
IntPtr | source | Source pointer. |
uint | sourceSizeInBytes | Source size in bytes. |
uint | destinationOffsetInBytes | Destination offset in bytes. |
BufferTargetARB | bufferTarget | The buffer target. |