Documentation
¶
Overview ¶
Package gpu renders vecmap scenes with OpenGL ES 3 in an offscreen context. Its output is an opaque image suitable for Fyne's canvas.Image. Successful renders wait for GPU completion and readback. No Fyne or GLFW context is modified.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrClosed = errors.New("OpenGL renderer closed")
Functions ¶
This section is empty.
Types ¶
type Options ¶
type Options struct {
// Samples is 1, 2, 4, or 8. Zero requests four samples per pixel.
Samples int
// SampleBudget caps a picture's pixels times its antialiasing samples.
// A picture too large for Samples is drawn with fewer, two at the least.
// Phone GPUs draw in tiles and slow down many times over past a size.
// Zero is no cap.
SampleBudget uint64
// MaxBytes bounds resident buffers, textures and framebuffer attachments.
// Zero permits 256 MiB. Driver overhead and the caller's image are extra.
MaxBytes uint64
}
type Renderer ¶
type Renderer struct {
// contains filtered or unexported fields
}
Renderer owns a context on a dedicated OS thread. Close releases it. Use one renderer per retained scene namespace. Scene resources are immutable: changed payloads must have a new revision, as required by scene.Scene.
Click to show internal directories.
Click to hide internal directories.