Documentation ¶
Rendered for darwin/amd64
Index ¶
- func NewGraphics(colorSpace graphicsdriver.ColorSpace) (graphicsdriver.Graphics, error)
- func RegisterPrecompiledLibrary(source []byte, bin []byte)
- type Graphics
- func (g *Graphics) Begin() error
- func (g *Graphics) DrawTriangles(dstID graphicsdriver.ImageID, ...) error
- func (g *Graphics) End(present bool) error
- func (g *Graphics) Initialize() error
- func (g *Graphics) MaxImageSize() int
- func (g *Graphics) NeedsClearingScreen() bool
- func (g *Graphics) NewImage(width, height int) (graphicsdriver.Image, error)
- func (g *Graphics) NewScreenFramebufferImage(width, height int) (graphicsdriver.Image, error)
- func (g *Graphics) NewShader(program *shaderir.Program) (graphicsdriver.Shader, error)
- func (g *Graphics) SetTransparent(transparent bool)
- func (g *Graphics) SetUIView(uiview uintptr)
- func (g *Graphics) SetVertices(vertices []float32, indices []uint32) error
- func (g *Graphics) SetVsyncEnabled(enabled bool)
- func (g *Graphics) SetWindow(window uintptr)
- type Image
- type Shader
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewGraphics ¶ added in v2.4.0
func NewGraphics(colorSpace graphicsdriver.ColorSpace) (graphicsdriver.Graphics, error)
NewGraphics creates an implementation of graphicsdriver.Graphics for Metal. The returned graphics value is nil iff the error is not nil.
func RegisterPrecompiledLibrary ¶ added in v2.8.0
Types ¶
type Graphics ¶
type Graphics struct {
// contains filtered or unexported fields
}
func (*Graphics) DrawTriangles ¶ added in v2.2.0
func (g *Graphics) DrawTriangles(dstID graphicsdriver.ImageID, srcIDs [graphics.ShaderSrcImageCount]graphicsdriver.ImageID, shaderID graphicsdriver.ShaderID, dstRegions []graphicsdriver.DstRegion, indexOffset int, blend graphicsdriver.Blend, uniforms []uint32, fillRule graphicsdriver.FillRule) error
func (*Graphics) Initialize ¶ added in v2.2.0
func (*Graphics) MaxImageSize ¶
func (*Graphics) NeedsClearingScreen ¶ added in v2.2.0
func (*Graphics) NewImage ¶
func (g *Graphics) NewImage(width, height int) (graphicsdriver.Image, error)
func (*Graphics) NewScreenFramebufferImage ¶
func (g *Graphics) NewScreenFramebufferImage(width, height int) (graphicsdriver.Image, error)
func (*Graphics) SetTransparent ¶
func (*Graphics) SetVertices ¶
func (*Graphics) SetVsyncEnabled ¶
type Image ¶
type Image struct {
// contains filtered or unexported fields
}
func (*Image) ID ¶
func (i *Image) ID() graphicsdriver.ImageID
func (*Image) ReadPixels ¶ added in v2.3.0
func (i *Image) ReadPixels(args []graphicsdriver.PixelsArgs) error
func (*Image) WritePixels ¶ added in v2.4.0
func (i *Image) WritePixels(args []graphicsdriver.PixelsArgs) error
type Shader ¶
type Shader struct {
// contains filtered or unexported fields
}
func (*Shader) ID ¶
func (s *Shader) ID() graphicsdriver.ShaderID
func (*Shader) RenderPipelineState ¶
func (s *Shader) RenderPipelineState(view *view, blend graphicsdriver.Blend, stencilMode stencilMode, screen bool) (mtl.RenderPipelineState, error)
Source Files ¶
Directories ¶
Path | Synopsis |
---|---|
Package ca provides access to Apple's Core Animation API (https://developer.apple.com/documentation/quartzcore).
|
Package ca provides access to Apple's Core Animation API (https://developer.apple.com/documentation/quartzcore). |
Package mtl provides access to Apple's Metal API (https://developer.apple.com/documentation/metal).
|
Package mtl provides access to Apple's Metal API (https://developer.apple.com/documentation/metal). |
Click to show internal directories.
Click to hide internal directories.