renderer

package
v0.0.0-...-42adfe7 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 28, 2022 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

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 NewShader

func NewShader(vertexShader, fragmentShader string) *Shader

func (*Shader) Bind

func (shader *Shader) Bind()

func (*Shader) Delete

func (shader *Shader) Delete()

func (*Shader) UploadUniformArrayInt32

func (shader *Shader) UploadUniformArrayInt32(name string, values []int32)

func (*Shader) UploadUniformFloat32

func (shader *Shader) UploadUniformFloat32(name string, value float32)

func (*Shader) UploadUniformInt32

func (shader *Shader) UploadUniformInt32(name string, value int32)

func (*Shader) UploadUniformVec2Float32

func (shader *Shader) UploadUniformVec2Float32(name string, value *gogm.Vec2[float32])

func (*Shader) UploadUniformVec3Float32

func (shader *Shader) UploadUniformVec3Float32(name string, value *gogm.Vec3[float32])

func (*Shader) UploadUniformVec4Float32

func (shader *Shader) UploadUniformVec4Float32(name string, value *gogm.Vec4[float32])

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 NewWindow

func NewWindow(width, height int, title string) (*Window, error)

func (*Window) Clear

func (window *Window) Clear()

func (*Window) Delete

func (window *Window) Delete()

func (*Window) Draw

func (window *Window) Draw(vb *VertexBuffer, ib *IndexBuffer, shader *Shader)

func (*Window) KeyPressed

func (window *Window) KeyPressed(key glfw.Key) bool

func (*Window) ShouldClose

func (window *Window) ShouldClose() bool

func (*Window) Update

func (window *Window) Update()

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL