This section is empty.


View Source
var InvalidTexture textureNative


This section is empty.


type Graphics

type Graphics struct {
	// contains filtered or unexported fields

func Get

func Get() *Graphics

func (*Graphics) Begin

func (g *Graphics) Begin()

func (*Graphics) Draw

func (g *Graphics) Draw(dst, src driver.ImageID, indexLen int, indexOffset int, mode driver.CompositeMode, colorM *affine.ColorM, filter driver.Filter, address driver.Address, sourceRegion driver.Region) error

func (*Graphics) DrawShader

func (g *Graphics) DrawShader(dst driver.ImageID, srcs [graphics.ShaderImageNum]driver.ImageID, offsets [graphics.ShaderImageNum - 1][2]float32, shader driver.ShaderID, indexLen int, indexOffset int, sourceRegion driver.Region, mode driver.CompositeMode, uniforms []interface{}) error

func (*Graphics) End

func (g *Graphics) End()

func (*Graphics) FramebufferYDirection

func (g *Graphics) FramebufferYDirection() driver.YDirection

func (*Graphics) HasHighPrecisionFloat

func (g *Graphics) HasHighPrecisionFloat() bool

func (*Graphics) InvalidImageID

func (g *Graphics) InvalidImageID() driver.ImageID

func (*Graphics) IsGL

func (g *Graphics) IsGL() bool

func (*Graphics) MaxImageSize

func (g *Graphics) MaxImageSize() int

func (*Graphics) NeedsRestoring

func (g *Graphics) NeedsRestoring() bool

func (*Graphics) NewImage

func (g *Graphics) NewImage(width, height int) (driver.Image, error)

func (*Graphics) NewScreenFramebufferImage

func (g *Graphics) NewScreenFramebufferImage(width, height int) (driver.Image, error)

func (*Graphics) NewShader

func (g *Graphics) NewShader(program *shaderir.Program) (driver.Shader, error)

func (*Graphics) Reset

func (g *Graphics) Reset() error

Reset resets or initializes the current OpenGL state.

func (*Graphics) SetThread

func (g *Graphics) SetThread(thread *thread.Thread)

func (*Graphics) SetTransparent

func (g *Graphics) SetTransparent(transparent bool)

func (*Graphics) SetVertices

func (g *Graphics) SetVertices(vertices []float32, indices []uint16)

func (*Graphics) SetVsyncEnabled

func (g *Graphics) SetVsyncEnabled(enabled bool)

type Image

type Image struct {
	// contains filtered or unexported fields

func (*Image) Dispose

func (i *Image) Dispose()

func (*Image) ID

func (i *Image) ID() driver.ImageID

func (*Image) IsInvalidated

func (i *Image) IsInvalidated() bool

func (*Image) Pixels

func (i *Image) Pixels() ([]byte, error)

func (*Image) ReplacePixels

func (i *Image) ReplacePixels(args []*driver.ReplacePixelsArgs)

type Shader

type Shader struct {
	// contains filtered or unexported fields

func (*Shader) Dispose

func (s *Shader) Dispose()

func (*Shader) ID

func (s *Shader) ID() driver.ShaderID


Path Synopsis
gl Package gl implements Go bindings to OpenGL.