texture

package
v0.0.0-...-0eb4fad Latest Latest
Warning

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

Go to latest
Published: Aug 8, 2018 License: BSD-3-Clause Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ETC1ImgFormat = gl.Enum(0x8D64) //ETC1_RGB8_OES 0x8D64
)

Variables

This section is empty.

Functions

func Build2D

func Build2D(t *Texture, ctMaxTexureU int) gl.Texture

func BuildCubeMap

func BuildCubeMap(t *Texture, ctMaxTexureU int) gl.Texture

func BuildTextureAttachment

func BuildTextureAttachment(w, h int, unit gl.Enum) gl.Texture

Requires OES_depth_texture

func DescrFromGob

func DescrFromGob(fname string, am assets.FileManager) map[string]*Texture

func Etc1

func Etc1(t *Texture, am assets.FileManager, startAt int)

func Load

func Load(t *Texture, am assets.FileManager, maxTextureUnits int, startAt int)

Load single texture to GPU

func LoadAll

func LoadAll(txs map[string]*Texture, am assets.FileManager, maxTextureUnits int, startAt int)

Load all texures in set to GPU

func Png

func Png(t *Texture, am assets.FileManager)

Types

type CompressedETC1Textures

type CompressedETC1Textures struct {
	Available    bool `json:"Available"`
	Mipmaps      []*MipmapETC1
	MipmapLevels int `json:"MipmapLevels"`
}

type ImageTextures

type ImageTextures struct {
	Images  []*image.RGBA
	Format  gl.Enum `json:"Format"`
	FileExt string  `json:"FileExt"`
	GenMips bool    `json:"GenMips"`
}

type MipmapETC1

type MipmapETC1 struct {
	W      int
	H      int
	Level  int
	Mipmap []byte
	Target gl.Enum
}

type Texture

type Texture struct {
	Target     gl.Enum   `json:"target"`
	Sources    []string  `json:"sources"`
	Texturemap []gl.Enum `json:"texturemap"`
	Unit       gl.Enum   `json:"unit"`

	Texture       gl.Texture
	WrapS         int `json:"wrap_s"`
	WrapT         int `json:"wrap_t"`
	MagFilter     int `json:"MagFilter"`
	MinFilter     int `json:"MinFilter"`
	Disabled      bool
	Images        *ImageTextures          `json:"Img"`
	ComprETC1     *CompressedETC1Textures `json:"Compr"`
	UseCompressed bool
	AtlassMap     map[string][8]float32 `json:"atlassMap"`
	// contains filtered or unexported fields
}

Jump to

Keyboard shortcuts

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