texture

package
v0.0.0-...-ddc071b Latest Latest
Warning

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

Go to latest
Published: Feb 26, 2023 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	RGBA32 = 32
)

Variables

This section is empty.

Functions

This section is empty.

Types

type TexLibrary

type TexLibrary struct {
	ID        map[string]uint32 //Maps Texture.Names to their GLInt Gen Texture IDS
	Textures  []Texture
	Base      string
	HasDevice bool
}

func NewTexLibrary

func NewTexLibrary() TexLibrary

func (*TexLibrary) CommitTexLibGL

func (t *TexLibrary) CommitTexLibGL()

Commits Textures into OpenGL Texture Memory Bindings

func (*TexLibrary) Load

func (t *TexLibrary) Load(path string, texIndex int32) error

Direcly loads texture into the texture library, does not interface with GL/GPU operations

func (*TexLibrary) RemoveTexLibGL

func (t *TexLibrary) RemoveTexLibGL()

RemoveTexLibGL removes entire Texture Library Binding from gl texture memory

type TexSampler

type TexSampler struct {
	MagFilter int32
	MinFilter int32
	WrapS     int32
	WrapT     int32
}

TexSampler holds GL / Driver sampler constants

type Texture

type Texture struct {
	Name           string
	Image          image.Image
	TexGLUnit      int32
	TexUVCoordAttr int32
	Sampler        TexSampler
}

Holds GoLang Image Interface Type

Jump to

Keyboard shortcuts

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