materials

package
v0.19.0 Latest Latest
Warning

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

Go to latest
Published: Oct 7, 2023 License: MIT Imports: 5 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Material

type Material struct {
	Name       string
	ShaderProg shaders.ShaderProgram

	DiffuseTex uint32

	UnifLocs   map[string]int32
	AttribLocs map[string]int32
}

func NewMaterial

func NewMaterial(matName, shaderPath string) *Material

func NewMaterialSrc added in v0.12.12

func NewMaterialSrc(matName string, shaderSrc []byte) *Material

func (*Material) Bind

func (m *Material) Bind()

func (*Material) Delete

func (m *Material) Delete()

func (*Material) DisableAttribute

func (m *Material) DisableAttribute(attribName string)

func (*Material) EnableAttribute

func (m *Material) EnableAttribute(attribName string)

func (*Material) GetAttribLoc

func (m *Material) GetAttribLoc(attribName string) int32

func (*Material) GetUnifLoc added in v0.0.6

func (m *Material) GetUnifLoc(uniformName string) int32

func (*Material) SetUnifFloat32

func (m *Material) SetUnifFloat32(uniformName string, val float32)

func (*Material) SetUnifInt32 added in v0.0.5

func (m *Material) SetUnifInt32(uniformName string, val int32)

func (*Material) SetUnifMat2

func (m *Material) SetUnifMat2(uniformName string, mat2 *gglm.Mat2)

func (*Material) SetUnifMat3

func (m *Material) SetUnifMat3(uniformName string, mat3 *gglm.Mat3)

func (*Material) SetUnifMat4

func (m *Material) SetUnifMat4(uniformName string, mat4 *gglm.Mat4)

func (*Material) SetUnifVec2

func (m *Material) SetUnifVec2(uniformName string, vec2 *gglm.Vec2)

func (*Material) SetUnifVec3

func (m *Material) SetUnifVec3(uniformName string, vec3 *gglm.Vec3)

func (*Material) SetUnifVec4

func (m *Material) SetUnifVec4(uniformName string, vec4 *gglm.Vec4)

func (*Material) UnBind

func (m *Material) UnBind()

Jump to

Keyboard shortcuts

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