loader

package
v0.0.0-...-4901950 Latest Latest
Warning

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

Go to latest
Published: Feb 14, 2016 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LoadProgram

func LoadProgram(glctx gl.Context, vertexAsset, fragmentAsset string) (program gl.Program, err error)

LoadProgram reads shader sources from the asset repository, compiles, and links them into a program.

func LoadShaders

func LoadShaders(glctx gl.Context, program gl.Program, vertexAsset, fragmentAsset string) error

func ShaderLoader

func ShaderLoader(glctx gl.Context) *shaderLoader

Types

type Shader

type Shader interface {
	Use()
	Close() error
	Attrib(string) gl.Attrib
	Uniform(string) gl.Uniform
	Context() gl.Context
}

func NewShader

func NewShader(glctx gl.Context, vertAsset, fragAsset string) (Shader, error)

type Shaders

type Shaders interface {
	Load(...string) error
	Get(string) Shader
	Reload() error
	Close() error
}

type Textures

type Textures interface {
	Load(...string) error
	Get2D(string) gl.Texture
	GetCube(string) gl.Texture
	Close() error
}

func TextureLoader

func TextureLoader(glctx gl.Context) Textures

Jump to

Keyboard shortcuts

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