load

package
v0.0.0-...-e0df81a Latest Latest
Warning

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

Go to latest
Published: Aug 6, 2024 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FileExists

func FileExists(filename string) bool

FileExists checks if the given file exists.

Types

type Audio

type Audio struct {
	Audio   *mix.Music
	Volume  uint32
	Channel uint32
}

func NewAudio

func NewAudio(path string) *Audio

func (*Audio) GetVolume

func (a *Audio) GetVolume() uint32

func (*Audio) IsPlaying

func (a *Audio) IsPlaying() bool

func (*Audio) Play

func (a *Audio) Play(loops int32)

func (*Audio) SetVolume

func (a *Audio) SetVolume(volume uint32)

func (*Audio) Stop

func (a *Audio) Stop()

type Font

type Font struct {
	Path      string
	Context   *freetype.Context
	Size, DPI float32
}

func NewFont

func NewFont(path string, size, dpi float32) *Font

func (*Font) RenderTextToTexture

func (f *Font) RenderTextToTexture(text string) Texture

type Obj

type Obj struct {
	Vertices []vec3.Type
	UVs      []vec2.Type
	Normals  []vec3.Type
	Indices  []uint32
}

func OBJ

func OBJ(filename string) Obj

OBJ loads a .obj file and returns an Obj.

type Texture

type Texture struct {
	Path  string
	Image uint32
	Size  vec2.Type
}

func NewEmptyTexture

func NewEmptyTexture() Texture

func NewTexture

func NewTexture(filePath string) Texture

Jump to

Keyboard shortcuts

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