metal

package
v2.4.0-alpha.3 Latest Latest
Warning

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

Go to latest
Published: May 21, 2022 License: Apache-2.0 Imports: 15 Imported by: 0

README

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

  • github.com/hajimehoshi/ebiten/v2/internal/graphicsdriver/metal/ca (copied from dmitri.shuralyov.com/gpu/mtl/example/movingtriangle/internal/ca)
  • github.com/hajimehoshi/ebiten/v2/internal/graphicsdriver/metal/mtl (copied from dmitri.shuralyov.com/gpu/mtl)
  • github.com/hajimehoshi/ebiten/v2/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

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

func Get

func Get() *Graphics

func (*Graphics) Begin

func (g *Graphics) Begin() error

func (*Graphics) DrawTriangles added in v2.2.0

func (g *Graphics) DrawTriangles(dstID graphicsdriver.ImageID, srcIDs [graphics.ShaderImageNum]graphicsdriver.ImageID, offsets [graphics.ShaderImageNum - 1][2]float32, shaderID graphicsdriver.ShaderID, indexLen int, indexOffset int, mode graphicsdriver.CompositeMode, colorM graphicsdriver.ColorM, filter graphicsdriver.Filter, address graphicsdriver.Address, dstRegion, srcRegion graphicsdriver.Region, uniforms [][]float32, evenOdd bool) error

func (*Graphics) End

func (g *Graphics) End(present bool) error

func (*Graphics) FramebufferYDirection

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

func (*Graphics) Initialize added in v2.2.0

func (g *Graphics) Initialize() error

func (*Graphics) IsDirectX added in v2.3.0

func (g *Graphics) IsDirectX() bool

func (*Graphics) IsGL

func (g *Graphics) IsGL() bool

func (*Graphics) MaxImageSize

func (g *Graphics) MaxImageSize() int

func (*Graphics) NeedsClearingScreen added in v2.2.0

func (g *Graphics) NeedsClearingScreen() bool

func (*Graphics) NeedsRestoring

func (g *Graphics) NeedsRestoring() bool

func (*Graphics) NewImage

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

func (*Graphics) NewScreenFramebufferImage

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

func (*Graphics) NewShader

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

func (*Graphics) SetFullscreen added in v2.2.0

func (g *Graphics) SetFullscreen(fullscreen bool)

func (*Graphics) SetTransparent

func (g *Graphics) SetTransparent(transparent bool)

func (*Graphics) SetUIView

func (g *Graphics) SetUIView(uiview uintptr)

func (*Graphics) SetVertices

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

func (*Graphics) SetVsyncEnabled

func (g *Graphics) SetVsyncEnabled(enabled bool)

func (*Graphics) SetWindow

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

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

func (*Image) IsInvalidated

func (i *Image) IsInvalidated() bool

func (*Image) ReadPixels added in v2.3.0

func (i *Image) ReadPixels(buf []byte) error

func (*Image) ReplacePixels

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

type Shader

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

func (*Shader) Dispose

func (s *Shader) Dispose()

func (*Shader) ID

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

func (*Shader) RenderPipelineState

func (s *Shader) RenderPipelineState(device mtl.Device, compositeMode graphicsdriver.CompositeMode, stencilMode stencilMode) (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