C# Class CSharpGL.UniformBuffer

Buffer object that not work as input variable in shader.
Inheritance: Buffer
ファイルを表示 Open project: bitzhuwei/CSharpGL Class Usage Examples

Public Methods

Method Description
Binding ( ShaderProgram program, uint uniformBlockIndex, uint uniformBlockBindingPoint ) : void

Bind this uniform buffer object and a uniform block to the same binding point.

Create ( Type elementType, int length, BufferUsage usage ) : UniformBuffer

Creates a UniformBuffer object directly in server side(GPU) without initializing its value.

Private Methods

Method Description
UniformBuffer ( uint bufferId, int length, int byteLength ) : System

pixel unpack buffer's pointer.

Method Details

Binding() public method

Bind this uniform buffer object and a uniform block to the same binding point.
public Binding ( ShaderProgram program, uint uniformBlockIndex, uint uniformBlockBindingPoint ) : void
program ShaderProgram shader program.
uniformBlockIndex uint index of uniform block got by (glGetUniformBlockIndex).
uniformBlockBindingPoint uint binding point maintained by OpenGL context.
return void

Create() public static method

Creates a UniformBuffer object directly in server side(GPU) without initializing its value.
public static Create ( Type elementType, int length, BufferUsage usage ) : UniformBuffer
elementType System.Type
length int
usage BufferUsage
return UniformBuffer