gfx

package
v0.0.0-...-87cb436 Latest Latest
Warning

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

Go to latest
Published: May 25, 2021 License: MIT Imports: 12 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InitGl

func InitGl()

Types

type AnimationManager

type AnimationManager struct {
	// contains filtered or unexported fields
}

func NewAnimationManager

func NewAnimationManager() *AnimationManager

func (*AnimationManager) AddAnimation

func (am *AnimationManager) AddAnimation(animation func(t float32), time float64)

func (*AnimationManager) AddContunuousAnimation

func (am *AnimationManager) AddContunuousAnimation(animation func())

func (*AnimationManager) GetAngle

func (am *AnimationManager) GetAngle() float64

func (*AnimationManager) GetElapsed

func (am *AnimationManager) GetElapsed() float64

func (*AnimationManager) Init

func (am *AnimationManager) Init()

func (*AnimationManager) Update

func (am *AnimationManager) Update()

type Program

type Program struct {
	// contains filtered or unexported fields
}

func NewProgram

func NewProgram(shaders ...*Shader) (*Program, error)

func (*Program) Attach

func (prog *Program) Attach(shaders ...*Shader)

func (*Program) Delete

func (prog *Program) Delete()

func (*Program) Get

func (prog *Program) Get() uint32

func (*Program) GetUniformLocation

func (prog *Program) GetUniformLocation(name string) int32
func (prog *Program) Link() error

func (*Program) Use

func (prog *Program) Use()

type Shader

type Shader struct {
	// contains filtered or unexported fields
}

func NewShader

func NewShader(src string, sType uint32) (*Shader, error)

func NewShaderFromFile

func NewShaderFromFile(file string, sType uint32) (*Shader, error)

func (*Shader) Delete

func (shader *Shader) Delete()

type Texture

type Texture struct {
	Width  int32
	Height int32
	// contains filtered or unexported fields
}

func NewTexture

func NewTexture(img image.Image, wrapR, wrapS int32) (*Texture, error)

func NewTextureFromFile

func NewTextureFromFile(file string, wrapR, wrapS int32) (*Texture, error)

func (*Texture) Bind

func (tex *Texture) Bind(texUnit uint32)

func (*Texture) SetUniform

func (tex *Texture) SetUniform(uniformLoc int32) error

func (*Texture) UnBind

func (tex *Texture) UnBind()

Jump to

Keyboard shortcuts

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