shader

package
v0.0.0-...-3b1d20f Latest Latest
Warning

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

Go to latest
Published: Jun 28, 2021 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Compile

func Compile(source string, shaderType uint32) (uint32, error)

Compile shader

Types

type Program

type Program struct {
	Data uint32
}

Program data holder

func (*Program) BindFragment

func (p *Program) BindFragment(name string)

BindFragment .

func (Program) CreateProgram

func (p Program) CreateProgram(vertexShaderSource, fragmentShaderSource string) (Program, error)

CreateProgram compiles shader and links

func (*Program) SetCamera

func (p *Program) SetCamera(camera mgl32.Mat4)

SetCamera .

func (*Program) SetFloat32

func (p *Program) SetFloat32(name string, value float32)

SetFloat32 .

func (*Program) SetModel

func (p *Program) SetModel(model mgl32.Mat4)

SetModel .

func (*Program) SetProjectionMatrix

func (p *Program) SetProjectionMatrix(projection mgl32.Mat4)

SetProjectionMatrix .

func (*Program) SetUniform1i

func (p *Program) SetUniform1i(name string, value int32)

SetUniform1i .

func (*Program) SetUniformMat4fv

func (p *Program) SetUniformMat4fv(name string, uniformMat mgl32.Mat4, uIndex uint8, transpose bool)

SetUniformMat4fv .

func (*Program) SetVec2dF32

func (p *Program) SetVec2dF32(name string, value mgl32.Vec2)

SetVec2dF32 .

func (*Program) SetupVertexAttributeArrayAndPointer

func (p *Program) SetupVertexAttributeArrayAndPointer(name string, size, stride int32, pointerOffset int)

SetupVertexAttributeArrayAndPointer .

Jump to

Keyboard shortcuts

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