texcontainer

package
v0.1.6 Latest Latest
Warning

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

Go to latest
Published: Nov 13, 2026 License: MIT Imports: 1 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package texcontainer describes the byte layout of the block-compressed texture container a build packs in place of a source image.

It deliberately depends on nothing. A packaged project keeps the source path for a packed texture, so code that only has to recognize a container or read its dimensions must not link the rendering stack to do it.

Index

Constants

View Source
const (
	// MagicSize is the length of the container signature.
	MagicSize = 8
	// HeaderSize is the fixed prefix that precedes the payload.
	HeaderSize = 20
)

Variables

View Source
var Magic = [MagicSize]byte{'O', 'N', 'I', 'X', 'T', 'E', 'X', '1'}

Magic identifies the container.

Functions

func Dimensions

func Dimensions(data []byte) (width, height int, ok bool)

Dimensions reads the stored texel dimensions from a container header. It reports false when data is not a complete container header.

func Encoded

func Encoded(data []byte) bool

Encoded reports whether a payload starts with the container signature.

Types

This section is empty.

Jump to

Keyboard shortcuts

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