shader

package
v0.0.0-...-6a0c17c Latest Latest
Warning

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

Go to latest
Published: Sep 27, 2018 License: Apache-2.0 Imports: 5 Imported by: 1

Documentation

Index

Constants

View Source
const InvalidID = 0

Variables

This section is empty.

Functions

This section is empty.

Types

type FragmentShader

type FragmentShader struct {
	Shader
}

func NewFragmentShader

func NewFragmentShader() *FragmentShader

func (*FragmentShader) Allocate

func (s *FragmentShader) Allocate() error

type Program

type Program struct {
	ID uint32
}

func NewProgram

func NewProgram() *Program

func (*Program) Allocate

func (p *Program) Allocate() error

func (*Program) AttachFragmentShader

func (p *Program) AttachFragmentShader(shader *FragmentShader)

func (*Program) AttachVertexShader

func (p *Program) AttachVertexShader(shader *VertexShader)

func (*Program) GetAttributeLocation

func (p *Program) GetAttributeLocation(name string) uint32

func (*Program) GetUniformLocation

func (p *Program) GetUniformLocation(name string) int32

func (*Program) LinkProgram

func (p *Program) LinkProgram() error

func (*Program) Release

func (p *Program) Release()

func (*Program) Use

func (p *Program) Use()

type Shader

type Shader struct {
	ID uint32
}

func DefaultShader

func DefaultShader() Shader

func (*Shader) Compile

func (s *Shader) Compile() error

func (*Shader) Release

func (s *Shader) Release()

func (*Shader) SetSourceCode

func (s *Shader) SetSourceCode(source string)

XXX: Would be nice if this worked with byte-array-based playground objects so that allocation is not needed

type VertexShader

type VertexShader struct {
	Shader
}

func NewVertexShader

func NewVertexShader() *VertexShader

func (*VertexShader) Allocate

func (s *VertexShader) Allocate() error

Jump to

Keyboard shortcuts

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