shaders

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: 6 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
	ShaderType 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
}

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 (sp *ShaderProgram) Link()

type ShaderType

type ShaderType int
const (
	VertexShaderType   ShaderType = gl.VERTEX_SHADER
	FragmentShaderType ShaderType = gl.FRAGMENT_SHADER
)

Jump to

Keyboard shortcuts

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