Table of Contents

Class GLShaderStorageBlock<T>

Namespace
SearchAThing.OpenGL.Core
Assembly
netcore-opengl-core.dll

Manage mapping of given template typed data to gpu memory.

public class GLShaderStorageBlock<T> : IDisposable where T : unmanaged

Type Parameters

T

Type of packet structure.

Inheritance
GLShaderStorageBlock<T>
Implements
Inherited Members

Constructors

GLShaderStorageBlock(GLContext, GLPipeline, string, Span<T>)

Execute glGenBuffer to create buffer handle and glBindBuffer() on given target, finally glBufferData() to map given data onto block storage.

public GLShaderStorageBlock(GLContext glCtx, GLPipeline shader, string blockName, Span<T> data)

Parameters

glCtx GLContext
shader GLPipeline
blockName string
data Span<T>

Remarks

It will dispose automatically with the call of glDeleteBuffer().

Properties

Target

public GLEnum Target { get; }

Property Value

GLEnum

Methods

Dispose()

public void Dispose()

Dispose(bool)

protected virtual void Dispose(bool disposing)

Parameters

disposing bool

~GLShaderStorageBlock()

protected ~GLShaderStorageBlock()

ReplaceItems(int, Span<T>)

public void ReplaceItems(int offset, Span<T> newdata)

Parameters

offset int
newdata Span<T>

ToString()

public override string ToString()

Returns

string