cpuimport

package
v0.1.6 Latest Latest
Warning

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

Go to latest
Published: Oct 29, 2026 License: MIT, Unlicense Imports: 8 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 cpuimport is the CPU driver of the extimage contract: over any driver.Device, it maps a frame's memory, converts it to sRGB RGBA and uploads it. Every device draws frames this way when it has no importer of its own, or for a tuple its importer does not list.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Importer

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

Importer is the CPU driver. It is used on the renderer's goroutine only.

func New

func New(dev driver.Device) *Importer

New is the CPU driver over dev.

func (*Importer) ExternalTuples

func (im *Importer) ExternalTuples() []extimage.Tuple

ExternalTuples are memory frames of every format, and the platform's own kinds it can map (platformTuples): a CPU path, never zero-copy.

func (*Importer) ImportExternal

func (im *Importer) ImportExternal(d extimage.Desc, minFilter, magFilter driver.TextureFilter) (driver.Texture, error)

ImportExternal uploads the whole of d into a texture of its size: a pooled one if one is idle.

func (*Importer) ReleaseExternal

func (im *Importer) ReleaseExternal(t driver.Texture)

ReleaseExternal pools t for reuse, or frees it when its pool is full. The renderer calls it once no submission samples t.

func (*Importer) UpdateExternal

func (im *Importer) UpdateExternal(t driver.Texture, d extimage.Desc) bool

UpdateExternal uploads only d.Dirty into t.

Jump to

Keyboard shortcuts

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