Documentation
¶
Index ¶
- Variables
- func AddTextureToCache(t Texture)
- type ColorFormat
- type Cubemap
- type Texture
- func GetTextureFromCacheID(texID uint32) (Texture, bool)
- func GetTextureFromCachePath(path string) (Texture, bool)
- func LoadTextureInMemPngImg(img image.Image, loadOptions *TextureLoadOptions) (Texture, error)
- func LoadTextureJpeg(file string, loadOptions *TextureLoadOptions) (Texture, error)
- func LoadTexturePNG(file string, loadOptions *TextureLoadOptions) (Texture, error)
- type TextureLoadOptions
Constants ¶
This section is empty.
Variables ¶
Functions ¶
func AddTextureToCache ¶ added in v0.12.10
func AddTextureToCache(t Texture)
Types ¶
type ColorFormat ¶
type ColorFormat int
const ( ColorFormat_Unknown ColorFormat = iota ColorFormat_RGBA8 )
type Cubemap ¶ added in v0.14.0
type Cubemap struct { // These only exists for textures loaded from disk RightPath string LeftPath string TopPath string BotPath string FrontPath string BackPath string TexID uint32 }
func LoadCubemapTextures ¶ added in v0.14.0
func LoadCubemapTextures(rightTex, leftTex, topTex, botTex, frontTex, backTex string, loadOptions *TextureLoadOptions) (Cubemap, error)
LoadCubemapTextures only supports the 'TextureIsSrgba' option
type Texture ¶
type Texture struct { // Path only exists for textures loaded from disk Path string TexID uint32 // Width is the width of the texture in pixels (pixels per row). // Note that the number of bytes constituting a row is MORE than this (e.g. for RGBA8, bytesPerRow=width*4, since we have 4 bytes per pixel) Width int32 // Height is the height of the texture in pixels (pixels per column). // Note that the number of bytes constituting a column is MORE than this (e.g. for RGBA8, bytesPerColumn=height*4, since we have 4 bytes per pixel) Height int32 // Pixels usually stored in RGBA format Pixels []byte }
func GetTextureFromCacheID ¶ added in v0.12.10
func GetTextureFromCachePath ¶ added in v0.12.10
func LoadTextureInMemPngImg ¶ added in v0.14.0
func LoadTextureInMemPngImg(img image.Image, loadOptions *TextureLoadOptions) (Texture, error)
func LoadTextureJpeg ¶ added in v0.14.0
func LoadTextureJpeg(file string, loadOptions *TextureLoadOptions) (Texture, error)
func LoadTexturePNG ¶ added in v0.12.12
func LoadTexturePNG(file string, loadOptions *TextureLoadOptions) (Texture, error)
Click to show internal directories.
Click to hide internal directories.