metal

package
v1.13.0-alpha Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 21, 2020 License: Apache-2.0 Imports: 14 Imported by: 0

README

These packages are copied from Dmitri Shuralyov's mtl packages and edited with Dmitri's permission:

  • github.com/hajimehoshi/ebiten/internal/graphicsdriver/metal/ca (copied from dmitri.shuralyov.com/gpu/mtl/example/movingtriangle/internal/ca)
  • github.com/hajimehoshi/ebiten/internal/graphicsdriver/metal/mtl (copied from dmitri.shuralyov.com/gpu/mtl)
  • github.com/hajimehoshi/ebiten/internal/graphicsdriver/metal/ns (copied from dmitri.shuralyov.com/gpu/mtl/example/movingtriangle/internal/ns)

Documentation

Rendered for darwin/amd64

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Graphics added in v1.12.0

type Graphics struct {
	// contains filtered or unexported fields
}

func Get

func Get() *Graphics

func (*Graphics) Begin added in v1.12.0

func (g *Graphics) Begin()

func (*Graphics) Draw added in v1.12.0

func (g *Graphics) Draw(dstID, srcID 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 added in v1.12.0

func (g *Graphics) DrawShader(dstID driver.ImageID, srcIDs [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 added in v1.12.0

func (g *Graphics) End()

func (*Graphics) FramebufferYDirection added in v1.12.0

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

func (*Graphics) HasHighPrecisionFloat added in v1.12.0

func (g *Graphics) HasHighPrecisionFloat() bool

func (*Graphics) InvalidImageID added in v1.12.0

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

func (*Graphics) IsGL added in v1.12.0

func (g *Graphics) IsGL() bool

func (*Graphics) MaxImageSize added in v1.12.0

func (g *Graphics) MaxImageSize() int

func (*Graphics) NeedsRestoring added in v1.12.0

func (g *Graphics) NeedsRestoring() bool

func (*Graphics) NewImage added in v1.12.0

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

func (*Graphics) NewScreenFramebufferImage added in v1.12.0

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

func (*Graphics) NewShader added in v1.12.0

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

func (*Graphics) Reset added in v1.12.0

func (g *Graphics) Reset() error

func (*Graphics) SetThread added in v1.12.0

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

func (*Graphics) SetTransparent added in v1.12.0

func (g *Graphics) SetTransparent(transparent bool)

func (*Graphics) SetUIView added in v1.12.0

func (g *Graphics) SetUIView(uiview uintptr)

func (*Graphics) SetVertices added in v1.12.0

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

func (*Graphics) SetVsyncEnabled added in v1.12.0

func (g *Graphics) SetVsyncEnabled(enabled bool)

func (*Graphics) SetWindow added in v1.12.0

func (g *Graphics) SetWindow(window uintptr)

type Image

type Image struct {
	// contains filtered or unexported fields
}

func (*Image) Dispose

func (i *Image) Dispose()

func (*Image) ID added in v1.12.0

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 added in v1.12.0

type Shader struct {
	// contains filtered or unexported fields
}

func (*Shader) Dispose added in v1.12.0

func (s *Shader) Dispose()

func (*Shader) ID added in v1.12.0

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

func (*Shader) RenderPipelineState added in v1.12.0

func (s *Shader) RenderPipelineState(device mtl.Device, c driver.CompositeMode) (mtl.RenderPipelineState, error)

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).
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).

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL