assets

package
v0.0.8 Latest Latest
Warning

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

Go to latest
Published: Feb 24, 2022 License: MIT Imports: 6 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Textures     map[uint32]Texture = make(map[uint32]Texture)
	TexturePaths map[string]uint32  = make(map[string]uint32)
)

Functions

func SetTexture

func SetTexture(t Texture)

Types

type ColorFormat

type ColorFormat int
const (
	ColorFormat_RGBA8 ColorFormat = iota
)

type Texture

type Texture struct {
	Path   string
	TexID  uint32
	Width  int32
	Height int32
	Pixels []byte
}

func GetTexture

func GetTexture(texID uint32) (Texture, bool)

func GetTexturePath

func GetTexturePath(path string) (Texture, bool)

func LoadPNGTexture added in v0.0.6

func LoadPNGTexture(file string) (Texture, error)

Jump to

Keyboard shortcuts

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