shaders

package
v0.28.0 Latest Latest
Warning

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

Go to latest
Published: Sep 15, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Shader

type Shader struct {
	Id   uint32
	Type ShaderType
}

func CompileShaderOfType added in v0.12.12

func CompileShaderOfType(shaderSource []byte, shaderType ShaderType) (Shader, error)

func (*Shader) Delete

func (s *Shader) Delete()

type ShaderProgram

type ShaderProgram struct {
	Id           uint32
	VertShaderId uint32
	FragShaderId uint32
	GeomShaderId uint32
}

func LoadAndCompileCombinedShader added in v0.12.12

func LoadAndCompileCombinedShader(shaderPath string) (ShaderProgram, error)

func LoadAndCompileCombinedShaderSrc added in v0.12.12

func LoadAndCompileCombinedShaderSrc(shaderSrc []byte) (ShaderProgram, error)

func NewShaderProgram

func NewShaderProgram() (ShaderProgram, error)

func (*ShaderProgram) AttachShader

func (sp *ShaderProgram) AttachShader(shader Shader)

func (*ShaderProgram) Bind added in v0.22.0

func (s *ShaderProgram) Bind()
func (sp *ShaderProgram) Link()

func (*ShaderProgram) UnBind added in v0.22.0

func (s *ShaderProgram) UnBind()

type ShaderType

type ShaderType int32
const (
	ShaderType_Unknown ShaderType = iota
	ShaderType_Vertex
	ShaderType_Fragment
	ShaderType_Geometry
)

func (ShaderType) ToGl added in v0.22.0

func (s ShaderType) ToGl() uint32

Jump to

Keyboard shortcuts

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