texture

package
v0.0.0-...-2114137 Latest Latest
Warning

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

Go to latest
Published: Jul 10, 2026 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Texture

type Texture struct {
	ID     uint32
	Width  int
	Height int
}

Texture wraps an OpenGL 2D texture resource.

func NewFromImage

func NewFromImage(img image.Image) *Texture

NewFromImage uploads an image as an RGBA texture.

func (*Texture) Delete

func (t *Texture) Delete()

Delete releases the OpenGL texture.

func (*Texture) Update

func (t *Texture) Update(img image.Image)

Update replaces the texture contents.

Jump to

Keyboard shortcuts

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