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
Click to show internal directories.
Click to hide internal directories.