mipmap

package
v2.6.0-alpha Latest Latest
Warning

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

Go to latest
Published: Mar 15, 2023 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	NearestFilterShader = &Shader{shader: buffered.NearestFilterShader}
	LinearFilterShader  = &Shader{shader: buffered.LinearFilterShader}
)

Functions

This section is empty.

Types

type Mipmap

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

Mipmap is a set of buffered.Image sorted by the order of mipmap level. The level 0 image is a regular image and higher-level images are used for mipmap.

func New

func New(width, height int, imageType atlas.ImageType) *Mipmap

func (*Mipmap) DrawTriangles

func (m *Mipmap) DrawTriangles(srcs [graphics.ShaderImageCount]*Mipmap, vertices []float32, indices []uint16, blend graphicsdriver.Blend, dstRegion, srcRegion graphicsdriver.Region, subimageOffsets [graphics.ShaderImageCount - 1][2]float32, shader *Shader, uniforms []uint32, evenOdd bool, canSkipMipmap bool)

func (*Mipmap) DumpScreenshot added in v2.1.4

func (m *Mipmap) DumpScreenshot(graphicsDriver graphicsdriver.Graphics, name string, blackbg bool) (string, error)

func (*Mipmap) MarkDisposed

func (m *Mipmap) MarkDisposed()

func (*Mipmap) ReadPixels added in v2.4.0

func (m *Mipmap) ReadPixels(graphicsDriver graphicsdriver.Graphics, pixels []byte, x, y, width, height int) error

func (*Mipmap) WritePixels added in v2.4.0

func (m *Mipmap) WritePixels(pix []byte, x, y, width, height int)

type Shader

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

func NewShader

func NewShader(ir *shaderir.Program) *Shader

func (*Shader) MarkDisposed

func (s *Shader) MarkDisposed()

Jump to

Keyboard shortcuts

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