This section is empty.


This section is empty.


func BeginFrame

func BeginFrame() error

func EndFrame

func EndFrame() error


type Image

type Image struct {
	// contains filtered or unexported fields

func NewImage

func NewImage(width, height int) *Image

func NewScreenFramebufferImage

func NewScreenFramebufferImage(width, height int) *Image

func (*Image) DrawTriangles

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

DrawTriangles draws the src image with the given vertices.

Copying vertices and indices is the caller's responsibility.

func (*Image) Dump

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

func (*Image) MarkDisposed

func (i *Image) MarkDisposed()

func (*Image) Pixels

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

func (*Image) ReplacePixels

func (i *Image) ReplacePixels(pix []byte, x, y, width, height int) error

func (*Image) SetVolatile

func (i *Image) SetVolatile(volatile bool)

type Shader

type Shader struct {
	// contains filtered or unexported fields

func NewShader

func NewShader(program *shaderir.Program) *Shader

func (*Shader) MarkDisposed

func (s *Shader) MarkDisposed()