C# Class CSharpGL.Data2Buffer

Datei anzeigen Open project: bitzhuwei/CSharpGL Class Usage Examples

Public Methods

Method Description
GenVertexBuffer ( this array, VBOConfig config, string varNameInVertexShader, BufferUsage usage, uint instancedDivisor, int patchVertexes ) : VertexBuffer

生成顶点属性Buffer。描述顶点的位置或颜色或UV等各种属性。

每个VertexBuffer仅描述其中一个属性。

Vertex Buffer Object that describes vertex' property(position, color, uv coordinate, etc.).

Each VertexBuffer describes only 1 property.

Private Methods

Method Description
GenIndependentBuffer ( this array, IndependentBufferTarget bufferTarget, BufferUsage usage ) : Buffer

Generates an atomic counter buffer.

Generates a pixel pack buffer.

Generates a pixel unpack buffer.

Generates a shader storage buffer.

Generates a texture buffer.

Generates an uniform buffer.

Generates an independent buffer.

InitFunctions ( ) : void

Method Details

GenVertexBuffer() public static method

生成顶点属性Buffer。描述顶点的位置或颜色或UV等各种属性。

每个VertexBuffer仅描述其中一个属性。

Vertex Buffer Object that describes vertex' property(position, color, uv coordinate, etc.).

Each VertexBuffer describes only 1 property.

public static GenVertexBuffer ( this array, VBOConfig config, string varNameInVertexShader, BufferUsage usage, uint instancedDivisor, int patchVertexes ) : VertexBuffer
array this
config VBOConfig This decides parameters' values in glVertexAttribPointer(attributeLocation, size, type, false, 0, IntPtr.Zero);
varNameInVertexShader string 此顶点属性VBO对应于vertex shader中的哪个in变量?Mapping variable's name in vertex shader.
usage BufferUsage
instancedDivisor uint 0: not instanced. 1: instanced divisor is 1.
patchVertexes int How many vertexes makes a patch? No patch if is 0.
return VertexBuffer