directx

package
v2.5.5 Latest Latest
Warning

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

Go to latest
Published: Jun 24, 2023 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Rendered for windows/amd64

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewGraphics added in v2.4.0

func NewGraphics() (graphicsdriver.Graphics, error)

NewGraphics creates an implementation of graphicsdriver.Graphics for DirectX. The returned graphics value is nil iff the error is not nil.

Types

type Graphics

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

func (*Graphics) Begin

func (g *Graphics) Begin() error

func (*Graphics) DrawTriangles

func (g *Graphics) DrawTriangles(dstID graphicsdriver.ImageID, srcs [graphics.ShaderImageCount]graphicsdriver.ImageID, shaderID graphicsdriver.ShaderID, dstRegions []graphicsdriver.DstRegion, indexOffset int, blend graphicsdriver.Blend, uniforms []uint32, evenOdd bool) error

func (*Graphics) End

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

func (*Graphics) Initialize

func (g *Graphics) Initialize() (err error)

func (*Graphics) IsDirectX

func (g *Graphics) IsDirectX() bool

func (*Graphics) IsGL

func (g *Graphics) IsGL() bool

func (*Graphics) MaxImageSize

func (g *Graphics) MaxImageSize() int

func (*Graphics) NeedsClearingScreen

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

func (g *Graphics) SetTransparent(transparent bool)

func (*Graphics) SetVertices

func (g *Graphics) SetVertices(vertices []float32, indices []uint16) (ferr 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 (*Image) IsInvalidated() bool

func (*Image) ReadPixels

func (i *Image) ReadPixels(buf []byte, x, y, width, height int) error

func (*Image) WritePixels added in v2.4.0

func (i *Image) WritePixels(args []*graphicsdriver.WritePixelsArgs) 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

Jump to

Keyboard shortcuts

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