Versions in this module Expand all Collapse all v1 v1.0.1 Jun 29, 2023 Changes in this version + const InvalidImageID + const InvalidShaderID + var BlendClear = Blend + var BlendCopy = Blend + var BlendSourceOver = Blend + type Blend struct + BlendFactorDestinationAlpha BlendFactor + BlendFactorDestinationRGB BlendFactor + BlendFactorSourceAlpha BlendFactor + BlendFactorSourceRGB BlendFactor + BlendOperationAlpha BlendOperation + BlendOperationRGB BlendOperation + type BlendFactor byte + const BlendFactorDestinationAlpha + const BlendFactorDestinationColor + const BlendFactorOne + const BlendFactorOneMinusDestinationAlpha + const BlendFactorOneMinusDestinationColor + const BlendFactorOneMinusSourceAlpha + const BlendFactorOneMinusSourceColor + const BlendFactorSourceAlpha + const BlendFactorSourceAlphaSaturated + const BlendFactorSourceColor + const BlendFactorZero + type BlendOperation byte + const BlendOperationAdd + const BlendOperationReverseSubtract + const BlendOperationSubtract + type DstRegion struct + IndexCount int + Region Region + type Graphics interface + Begin func() error + DrawTriangles func(dst ImageID, srcs [graphics.ShaderImageCount]ImageID, shader ShaderID, ...) error + End func(present bool) error + Initialize func() error + IsDirectX func() bool + IsGL func() bool + MaxImageSize func() int + NeedsClearingScreen func() bool + NeedsRestoring func() bool + NewImage func(width, height int) (Image, error) + NewScreenFramebufferImage func(width, height int) (Image, error) + NewShader func(program *shaderir.Program) (Shader, error) + SetTransparent func(transparent bool) + SetVertices func(vertices []float32, indices []uint16) error + SetVsyncEnabled func(enabled bool) + type Image interface + Dispose func() + ID func() ImageID + IsInvalidated func() bool + ReadPixels func(buf []byte, region image.Rectangle) error + WritePixels func(args []*WritePixelsArgs) error + type ImageID int + type Region struct + Height float32 + Width float32 + X float32 + Y float32 + type Resetter interface + Reset func() error + type Shader interface + Dispose func() + ID func() ShaderID + type ShaderID int + type WritePixelsArgs struct + Pixels []byte + Region image.Rectangle