gpu

package
v0.0.5 Latest Latest
Warning

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

Go to latest
Published: Jun 27, 2022 License: Unlicense, MIT, Unlicense Imports: 24 Imported by: 0

Documentation

Overview

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

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

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 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)
	// Collect the graphics operations from frame, given the viewport.
	Collect(viewport image.Point, frame *op.Ops)
	// Frame clears the color buffer and draws the collected operations.
	Frame() error
	// Profile returns the last available profiling information. Profiling
	// information is requested when Collect sees a ProfileOp, and the result
	// is available through Profile at some later time.
	Profile() string
}

func New

func New(api API) (GPU, error)

type OpenGL

type OpenGL = driver.OpenGL

OpenGL denotes the OpenGL or OpenGL ES API.

Directories

Path Synopsis
Package headless implements headless windows for rendering an operation list to an image.
Package headless implements headless windows for rendering an operation list to an image.
internal
rendertest
Package rendertest is intended for testing of drawing ops only.
Package rendertest is intended for testing of drawing ops only.

Jump to

Keyboard shortcuts

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