gfx

package
v0.0.0-...-7042f52 Latest Latest
Warning

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

Go to latest
Published: Jun 5, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	//go:embed shaders/basic.frag
	Fragment string
	//go:embed shaders/basic.vert
	Vertex string
)

Functions

This section is empty.

Types

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) 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 {
	// contains filtered or unexported fields
}

func NewTexture

func NewTexture(img image.Image, 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