Documentation ¶
Index ¶
Constants ¶
View Source
const ( InvalidImageID = 0 InvalidShaderID = 0 )
Variables ¶
View Source
var BlendClear = Blend{ BlendFactorSourceRGB: BlendFactorZero, BlendFactorSourceAlpha: BlendFactorZero, BlendFactorDestinationRGB: BlendFactorZero, BlendFactorDestinationAlpha: BlendFactorZero, BlendOperationRGB: BlendOperationAdd, BlendOperationAlpha: BlendOperationAdd, }
View Source
var BlendCopy = Blend{ BlendFactorSourceRGB: BlendFactorOne, BlendFactorSourceAlpha: BlendFactorOne, BlendFactorDestinationRGB: BlendFactorZero, BlendFactorDestinationAlpha: BlendFactorZero, BlendOperationRGB: BlendOperationAdd, BlendOperationAlpha: BlendOperationAdd, }
View Source
var BlendSourceOver = Blend{ BlendFactorSourceRGB: BlendFactorOne, BlendFactorSourceAlpha: BlendFactorOne, BlendFactorDestinationRGB: BlendFactorOneMinusSourceAlpha, BlendFactorDestinationAlpha: BlendFactorOneMinusSourceAlpha, BlendOperationRGB: BlendOperationAdd, BlendOperationAlpha: BlendOperationAdd, }
Functions ¶
This section is empty.
Types ¶
type Blend ¶ added in v2.5.0
type Blend struct { BlendFactorSourceRGB BlendFactor BlendFactorSourceAlpha BlendFactor BlendFactorDestinationRGB BlendFactor BlendFactorDestinationAlpha BlendFactor BlendOperationRGB BlendOperation BlendOperationAlpha BlendOperation }
type BlendFactor ¶ added in v2.5.0
type BlendFactor byte
const ( BlendFactorZero BlendFactor = iota BlendFactorOne BlendFactorSourceColor BlendFactorOneMinusSourceColor BlendFactorSourceAlpha BlendFactorOneMinusSourceAlpha BlendFactorDestinationColor BlendFactorOneMinusDestinationColor BlendFactorDestinationAlpha BlendFactorOneMinusDestinationAlpha BlendFactorSourceAlphaSaturated )
type BlendOperation ¶ added in v2.5.0
type BlendOperation byte
const ( BlendOperationAdd BlendOperation = iota BlendOperationSubtract BlendOperationReverseSubtract BlendOperationMin BlendOperationMax )
type Graphics ¶
type Graphics interface { Initialize() error Begin() error End(present bool) error SetTransparent(transparent bool) SetVertices(vertices []float32, indices []uint32) error NewImage(width, height int) (Image, error) NewScreenFramebufferImage(width, height int) (Image, error) SetVsyncEnabled(enabled bool) NeedsClearingScreen() bool MaxImageSize() int NewShader(program *shaderir.Program) (Shader, error) // DrawTriangles draws an image onto another image with the given parameters. DrawTriangles(dst ImageID, srcs [graphics.ShaderImageCount]ImageID, shader ShaderID, dstRegions []DstRegion, indexOffset int, blend Blend, uniforms []uint32, fillRule FillRule) error }
type Image ¶
type Image interface { ID() ImageID Dispose() ReadPixels(args []PixelsArgs) error WritePixels(args []PixelsArgs) error }
type PixelsArgs ¶ added in v2.6.0
Directories ¶
Path | Synopsis |
---|---|
ca
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). |
mtl
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.