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 ¶
type Blend struct { BlendFactorSourceRGB BlendFactor BlendFactorSourceAlpha BlendFactor BlendFactorDestinationRGB BlendFactor BlendFactorDestinationAlpha BlendFactor BlendOperationRGB BlendOperation BlendOperationAlpha BlendOperation }
type BlendFactor ¶
type BlendFactor byte
const ( BlendFactorZero BlendFactor = iota BlendFactorOne BlendFactorSourceColor BlendFactorOneMinusSourceColor BlendFactorSourceAlpha BlendFactorOneMinusSourceAlpha BlendFactorDestinationColor BlendFactorOneMinusDestinationColor BlendFactorDestinationAlpha BlendFactorOneMinusDestinationAlpha BlendFactorSourceAlphaSaturated )
type BlendOperation ¶
type BlendOperation byte
const ( BlendOperationAdd BlendOperation = iota BlendOperationSubtract BlendOperationReverseSubtract )
type Graphics ¶
type Graphics interface { Initialize() error Begin() error End(present bool) error SetTransparent(transparent bool) SetVertices(vertices []float32, indices []uint16) error NewImage(width, height int) (Image, error) NewScreenFramebufferImage(width, height int) (Image, error) SetVsyncEnabled(enabled bool) NeedsRestoring() bool NeedsClearingScreen() bool IsGL() bool IsDirectX() 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, evenOdd bool) error }
type WritePixelsArgs ¶
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). |
ns
Package ns provides access to Apple's AppKit API (https://developer.apple.com/documentation/appkit).
|
Package ns provides access to Apple's AppKit API (https://developer.apple.com/documentation/appkit). |
Click to show internal directories.
Click to hide internal directories.