gioui.orggioui.org/gpu Index | Files | Directories

package gpu

import "gioui.org/gpu"

Package gpu implements the rendering of Gio drawing operations. It is used by package app and package app/headless and is otherwise not useful except for integrating with external window implementations.

Index

Variables

var ErrDeviceLost = driver.ErrDeviceLost

ErrDeviceLost is returned from GPU operations when the underlying GPU device is lost and should be recreated.

Types

type API

type API = driver.API

An API carries the necessary GPU API specific resources to create a Device. There is an API type for each supported GPU API such as OpenGL and Direct3D.

type Direct3D11

type Direct3D11 = driver.Direct3D11

Direct3D11 denotes the Direct3D API.

type Direct3D11RenderTarget

type Direct3D11RenderTarget = driver.Direct3D11RenderTarget

Direct3D11RenderTarget is a render target suitable for the Direct3D 11 backend.

type FBO

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

type GPU

type GPU interface {
	// Release non-Go resources. The GPU is no longer valid after Release.
	Release()
	// Clear sets the clear color for the next Frame.
	Clear(color color.NRGBA)
	// Frame draws the graphics operations from op into a viewport of target.
	Frame(frame *op.Ops, target RenderTarget, viewport image.Point) error
}

func New

func New(api API) (GPU, error)

New creates a GPU for the given API.

func NewWithDevice

func NewWithDevice(d driver.Device) (GPU, error)

NewWithDevice creates a GPU with a pre-existing device.

Note: for internal use only.

type Metal

type Metal = driver.Metal

Metal denotes the Apple Metal API.

type MetalRenderTarget

type MetalRenderTarget = driver.MetalRenderTarget

MetalRenderTarget is a render target suitable for the Metal backend.

type OpenGL

type OpenGL = driver.OpenGL

OpenGL denotes the OpenGL or OpenGL ES API.

type OpenGLRenderTarget

type OpenGLRenderTarget = driver.OpenGLRenderTarget

OpenGLRenderTarget is a render target suitable for the OpenGL backend.

type RenderTarget

type RenderTarget = driver.RenderTarget

A RenderTarget denotes the destination framebuffer for a frame.

type Vulkan

type Vulkan = driver.Vulkan

Vulkan denotes the Vulkan API.

type VulkanRenderTarget

type VulkanRenderTarget = driver.VulkanRenderTarget

VulkanRenderTarget is a render target suitable for the Vulkan backend.

Source Files

api.go caches.go clip.go gpu.go pack.go path.go timer.go

Directories

PathSynopsis
gpu/headlessPackage headless implements headless windows for rendering an operation list to an image.
gpu/internal
Version
v0.8.0 (latest)
Published
Jan 14, 2025
Platform
linux/amd64
Imports
24 packages
Last checked
12 hours ago

Tools for package owners.