Documentation
¶
Index ¶
- Constants
- type FragmentShader
- type Program
- func (p *Program) Allocate() error
- func (p *Program) AttachFragmentShader(shader *FragmentShader)
- func (p *Program) AttachVertexShader(shader *VertexShader)
- func (p *Program) GetAttributeLocation(name string) uint32
- func (p *Program) GetUniformLocation(name string) int32
- func (p *Program) LinkProgram() error
- func (p *Program) Release()
- func (p *Program) Use()
- type Shader
- type VertexShader
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) AttachFragmentShader ¶
func (p *Program) AttachFragmentShader(shader *FragmentShader)
func (*Program) AttachVertexShader ¶
func (p *Program) AttachVertexShader(shader *VertexShader)
func (*Program) GetAttributeLocation ¶
func (*Program) GetUniformLocation ¶
func (*Program) LinkProgram ¶
type Shader ¶
type Shader struct {
ID uint32
}
func DefaultShader ¶
func DefaultShader() Shader
func (*Shader) SetSourceCode ¶
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
Click to show internal directories.
Click to hide internal directories.