texture

package
v0.0.0-...-50c553c Latest Latest
Warning

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

Go to latest
Published: Apr 10, 2021 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Filtering = struct {
	Nearest,
	Linear,
	MipMap,
	MipMapNearestNearest,
	MipMapLinearNearest,
	MipMapNearestLinear,
	MipMapLinearLinear Filter
}{gl.NEAREST, gl.LINEAR, gl.LINEAR_MIPMAP_LINEAR, gl.NEAREST_MIPMAP_NEAREST, gl.LINEAR_MIPMAP_NEAREST, gl.NEAREST_MIPMAP_LINEAR, gl.LINEAR_MIPMAP_LINEAR}

Functions

This section is empty.

Types

type Filter

type Filter int32

type Texture

type Texture interface {
	GetID() uint32
	GetWidth() int32
	GetHeight() int32
	GetRegion() TextureRegion
	GetLayers() int32
	SetFiltering(min, mag Filter)
	Bind(loc uint)
	GetLocation() uint
	Dispose()
}

type TextureAtlas

type TextureAtlas struct {
	// contains filtered or unexported fields
}

func NewTextureAtlas

func NewTextureAtlas(size, mipmaps int) *TextureAtlas

func (*TextureAtlas) AddTexture

func (texture *TextureAtlas) AddTexture(name string, width, height int, data []uint8) *TextureRegion

func (*TextureAtlas) Bind

func (texture *TextureAtlas) Bind(loc uint)

func (*TextureAtlas) Dispose

func (texture *TextureAtlas) Dispose()

func (*TextureAtlas) GetHeight

func (texture *TextureAtlas) GetHeight() int32

func (*TextureAtlas) GetID

func (texture *TextureAtlas) GetID() uint32

func (*TextureAtlas) GetLayers

func (texture *TextureAtlas) GetLayers() int32

func (*TextureAtlas) GetLocation

func (texture *TextureAtlas) GetLocation() uint

func (*TextureAtlas) GetRegion

func (texture *TextureAtlas) GetRegion() TextureRegion

func (*TextureAtlas) GetTexture

func (texture *TextureAtlas) GetTexture(name string) *TextureRegion

func (*TextureAtlas) GetWidth

func (texture *TextureAtlas) GetWidth() int32

func (*TextureAtlas) SetData

func (texture *TextureAtlas) SetData(x, y, width, height, layer int, data []uint8)

func (*TextureAtlas) SetFiltering

func (texture *TextureAtlas) SetFiltering(min, mag Filter)

type TextureRegion

type TextureRegion struct {
	Texture        Texture
	U1, U2, V1, V2 float32
	Width, Height  int32
	Layer          int32
}

type TextureSingle

type TextureSingle struct {
	// contains filtered or unexported fields
}

func LoadTextureSingle

func LoadTextureSingle(img *image.NRGBA, mipmaps int) *TextureSingle

func NewTextureSingle

func NewTextureSingle(width, height, mipmaps int) *TextureSingle

func (*TextureSingle) Bind

func (texture *TextureSingle) Bind(loc uint)

func (*TextureSingle) Dispose

func (texture *TextureSingle) Dispose()

func (*TextureSingle) GetHeight

func (texture *TextureSingle) GetHeight() int32

func (*TextureSingle) GetID

func (texture *TextureSingle) GetID() uint32

func (*TextureSingle) GetLayers

func (texture *TextureSingle) GetLayers() int32

func (*TextureSingle) GetLocation

func (texture *TextureSingle) GetLocation() uint

func (*TextureSingle) GetRegion

func (texture *TextureSingle) GetRegion() TextureRegion

func (*TextureSingle) GetWidth

func (texture *TextureSingle) GetWidth() int32

func (*TextureSingle) SetData

func (texture *TextureSingle) SetData(x, y, width, height int, data []uint8)

func (*TextureSingle) SetFiltering

func (texture *TextureSingle) SetFiltering(min, mag Filter)

Jump to

Keyboard shortcuts

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