ebiten: github.com/hajimehoshi/ebiten/internal/shareable Index | Files

package shareable

import "github.com/hajimehoshi/ebiten/internal/shareable"

Index

Package Files

image.go shader.go

Constants

const MaxCountForShare = 10

MaxCountForShare represents the time duration when the image can become shared.

This value is exported for testing.

func BeginFrame Uses

func BeginFrame() error

func DumpImages Uses

func DumpImages(dir string) error

func EndFrame Uses

func EndFrame() error

func SetGraphicsDriver Uses

func SetGraphicsDriver(graphics driver.Graphics)

type Image Uses

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

func NewImage Uses

func NewImage(width, height int, volatile bool) *Image

func NewScreenFramebufferImage Uses

func NewScreenFramebufferImage(width, height int) *Image

func (*Image) DrawTriangles Uses

func (i *Image) DrawTriangles(srcs [graphics.ShaderImageNum]*Image, vertices []float32, indices []uint16, colorm *affine.ColorM, mode driver.CompositeMode, filter driver.Filter, address driver.Address, sourceRegion driver.Region, shader *Shader, uniforms []interface{})

DrawTriangles draws triangles with the given image.

The vertex floats are:

0: Destination X in pixels
1: Destination Y in pixels
2: Source X in pixels (the upper-left is (0, 0))
3: Source Y in pixels
4: Color R [0.0-1.0]
5: Color G
6: Color B
7: Color Y

func (*Image) Dump Uses

func (i *Image) Dump(path string, blackbg bool) error

func (*Image) Fill Uses

func (i *Image) Fill(clr color.RGBA)

func (*Image) MarkDisposed Uses

func (i *Image) MarkDisposed()

MarkDisposed marks the image as disposed. The actual operation is deferred. MarkDisposed can be called from finalizers.

A function from finalizer must not be blocked, but disposing operation can be blocked. Defer this operation until it becomes safe. (#913)

func (*Image) Pixels Uses

func (img *Image) Pixels(x, y, width, height int) ([]byte, error)

func (*Image) ReplacePixels Uses

func (i *Image) ReplacePixels(pix []byte)

type Shader Uses

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

func NewShader Uses

func NewShader(program *shaderir.Program) *Shader

func (*Shader) MarkDisposed Uses

func (s *Shader) MarkDisposed()

MarkDisposed marks the shader as disposed. The actual operation is deferred. MarkDisposed can be called from finalizers.

A function from finalizer must not be blocked, but disposing operation can be blocked. Defer this operation until it becomes safe. (#913)

Package shareable imports 11 packages (graph) and is imported by 12 packages. Updated 2020-08-05. Refresh now. Tools for package owners.