shading

package
v0.0.0-...-e182f7f Latest Latest
Warning

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

Go to latest
Published: Sep 14, 2022 License: GPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ShaderProgram

type ShaderProgram struct {
	// contains filtered or unexported fields
}

func NewShaderProgram

func NewShaderProgram(vertexShaderCode string, fragmentShaderCode string) (sh *ShaderProgram, err error)

NewShaderProgram Creates a new shader program with the given vertex and fragment shaders

func (*ShaderProgram) Bind

func (sh *ShaderProgram) Bind()

Bind Tells opengl to use this shader program

func (*ShaderProgram) CreateUniform

func (sh *ShaderProgram) CreateUniform(uniformName string) error

CreateUniform Creates a uniform to be used by the shaders in this shader program

func (*ShaderProgram) Destroy

func (sh *ShaderProgram) Destroy()

Destroy Cleanup the program, free memory and such

func (*ShaderProgram) SetUniform3f

func (sh *ShaderProgram) SetUniform3f(uniformName string, data mgl32.Vec3)

SetUniform3f Set the value of a uniform of type vec3

func (*ShaderProgram) Unbind

func (sh *ShaderProgram) Unbind()

Unbind Tells opengl not to use this shader program

Jump to

Keyboard shortcuts

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