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
- type API
- type Direct3D11
- type Direct3D11RenderTarget
- type FBO
- type GPU
- type Metal
- type MetalRenderTarget
- type OpenGL
- type OpenGLRenderTarget
- type RenderTarget
- type Vulkan
- type VulkanRenderTarget
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 ¶
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 ¶
New creates a GPU for the given API.
func NewWithDevice ¶
NewWithDevice creates a GPU with a pre-existing device.
Note: for internal use only.
type 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 ¶
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 ¶
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 ¶
Path | Synopsis |
---|---|
gpu/headless | Package 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.