Documentation ¶
Index ¶
- Variables
- func BeginFrame(graphicsDriver graphicsdriver.Graphics) error
- func EndFrame(graphicsDriver graphicsdriver.Graphics) error
- type Image
- func (i *Image) DrawTriangles(srcs [graphics.ShaderImageCount]*Image, vertices []float32, indices []uint16, ...)
- func (i *Image) DumpScreenshot(graphicsDriver graphicsdriver.Graphics, name string, blackbg bool) (string, error)
- func (i *Image) MarkDisposed()
- func (i *Image) ReadPixels(graphicsDriver graphicsdriver.Graphics, pixels []byte, x, y, width, height int) error
- func (i *Image) WritePixels(pix []byte, x, y, width, height int)
- type Shader
Constants ¶
This section is empty.
Variables ¶
View Source
var ( NearestFilterShader = &Shader{shader: atlas.NearestFilterShader} LinearFilterShader = &Shader{shader: atlas.LinearFilterShader} )
Functions ¶
func BeginFrame ¶
func BeginFrame(graphicsDriver graphicsdriver.Graphics) error
func EndFrame ¶
func EndFrame(graphicsDriver graphicsdriver.Graphics) error
Types ¶
type Image ¶
type Image struct {
// contains filtered or unexported fields
}
func (*Image) DrawTriangles ¶
func (i *Image) DrawTriangles(srcs [graphics.ShaderImageCount]*Image, vertices []float32, indices []uint16, blend graphicsdriver.Blend, dstRegion, srcRegion graphicsdriver.Region, subimageOffsets [graphics.ShaderImageCount - 1][2]float32, shader *Shader, uniforms []uint32, evenOdd bool)
DrawTriangles draws the src image with the given vertices.
Copying vertices and indices is the caller's responsibility.
func (*Image) DumpScreenshot ¶ added in v2.1.4
func (*Image) MarkDisposed ¶
func (i *Image) MarkDisposed()
func (*Image) ReadPixels ¶ added in v2.4.0
func (*Image) WritePixels ¶ added in v2.4.0
WritePixels replaces the pixels at the specified region.
Click to show internal directories.
Click to hide internal directories.