Documentation ¶
Index ¶
- Constants
- type ComputeShader
- func (shader *ComputeShader) Bind()
- func (shader *ComputeShader) Delete()
- func (shader *ComputeShader) Run(numGroupsX, numGroupsY, numGroupsZ uint32)
- func (shader *ComputeShader) UploadUniformArrayInt32(name string, values []int32)
- func (shader *ComputeShader) UploadUniformFloat32(name string, value float32)
- func (shader *ComputeShader) UploadUniformInt32(name string, value int32)
- func (shader *ComputeShader) UploadUniformVec2Float32(name string, value *gogm.Vec2[float32])
- func (shader *ComputeShader) UploadUniformVec3Float32(name string, value *gogm.Vec3[float32])
- func (shader *ComputeShader) UploadUniformVec4Float32(name string, value *gogm.Vec4[float32])
- type IndexBuffer
- type LayoutElement
- type Shader
- func (shader *Shader) Bind()
- func (shader *Shader) Delete()
- func (shader *Shader) UploadUniformArrayInt32(name string, values []int32)
- func (shader *Shader) UploadUniformFloat32(name string, value float32)
- func (shader *Shader) UploadUniformInt32(name string, value int32)
- func (shader *Shader) UploadUniformVec2Float32(name string, value *gogm.Vec2[float32])
- func (shader *Shader) UploadUniformVec3Float32(name string, value *gogm.Vec3[float32])
- func (shader *Shader) UploadUniformVec4Float32(name string, value *gogm.Vec4[float32])
- type ShaderStorageBufferObject
- type VertexBuffer
- type Window
Constants ¶
View Source
const ( ShaderDataTypeFloat32 shaderDataType = iota ShaderDataTypeInt32 ShaderDataTypeUint32 ShaderDataTypeBool )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ComputeShader ¶
type ComputeShader struct {
// contains filtered or unexported fields
}
func NewComputeShader ¶
func NewComputeShader(computeShader string) *ComputeShader
func (*ComputeShader) Bind ¶
func (shader *ComputeShader) Bind()
func (*ComputeShader) Delete ¶
func (shader *ComputeShader) Delete()
func (*ComputeShader) Run ¶
func (shader *ComputeShader) Run(numGroupsX, numGroupsY, numGroupsZ uint32)
func (*ComputeShader) UploadUniformArrayInt32 ¶
func (shader *ComputeShader) UploadUniformArrayInt32(name string, values []int32)
func (*ComputeShader) UploadUniformFloat32 ¶
func (shader *ComputeShader) UploadUniformFloat32(name string, value float32)
func (*ComputeShader) UploadUniformInt32 ¶
func (shader *ComputeShader) UploadUniformInt32(name string, value int32)
func (*ComputeShader) UploadUniformVec2Float32 ¶
func (shader *ComputeShader) UploadUniformVec2Float32(name string, value *gogm.Vec2[float32])
func (*ComputeShader) UploadUniformVec3Float32 ¶
func (shader *ComputeShader) UploadUniformVec3Float32(name string, value *gogm.Vec3[float32])
func (*ComputeShader) UploadUniformVec4Float32 ¶
func (shader *ComputeShader) UploadUniformVec4Float32(name string, value *gogm.Vec4[float32])
type IndexBuffer ¶
type IndexBuffer struct {
// contains filtered or unexported fields
}
func NewIndexBuffer ¶
func NewIndexBuffer(data []uint32) *IndexBuffer
func (*IndexBuffer) Bind ¶
func (indexBuffer *IndexBuffer) Bind()
func (*IndexBuffer) Delete ¶
func (indexBuffer *IndexBuffer) Delete()
type LayoutElement ¶
type LayoutElement struct { ShaderDataType shaderDataType Count uint32 }
type Shader ¶
type Shader struct {
// contains filtered or unexported fields
}
func (*Shader) UploadUniformArrayInt32 ¶
func (*Shader) UploadUniformFloat32 ¶
func (*Shader) UploadUniformInt32 ¶
func (*Shader) UploadUniformVec2Float32 ¶
func (*Shader) UploadUniformVec3Float32 ¶
type ShaderStorageBufferObject ¶
type ShaderStorageBufferObject struct {
// contains filtered or unexported fields
}
func NewShaderStorageBufferObject ¶
func NewShaderStorageBufferObject(data interface{}, index uint32) *ShaderStorageBufferObject
func (*ShaderStorageBufferObject) Bind ¶
func (ssbo *ShaderStorageBufferObject) Bind()
func (*ShaderStorageBufferObject) Delete ¶
func (ssbo *ShaderStorageBufferObject) Delete()
type VertexBuffer ¶
type VertexBuffer struct {
// contains filtered or unexported fields
}
func NewVertexBuffer ¶
func NewVertexBuffer(data interface{}, layout []LayoutElement) *VertexBuffer
func (*VertexBuffer) Bind ¶
func (vertexBuffer *VertexBuffer) Bind()
func (*VertexBuffer) Delete ¶
func (vertexBuffer *VertexBuffer) Delete()
type Window ¶
type Window struct {
// contains filtered or unexported fields
}
func (*Window) Draw ¶
func (window *Window) Draw(vb *VertexBuffer, ib *IndexBuffer, shader *Shader)
func (*Window) ShouldClose ¶
Click to show internal directories.
Click to hide internal directories.