gl

package
v2.1.2-rc2 Latest Latest
Warning

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

Go to latest
Published: Dec 2, 2021 License: BSD-3-Clause Imports: 17 Imported by: 0

Documentation

Overview

Package gl provides a full Fyne render implementation using system OpenGL libraries.

Index

Constants

This section is empty.

Variables

View Source
var NoTexture = Texture(0)

NoTexture is the zero value for a Texture

Functions

This section is empty.

Types

type Buffer

type Buffer uint32

Buffer represents a GL buffer

type Painter

type Painter interface {
	// Init tell a new painter to initialise, usually called after a context is available
	Init()
	// Capture requests that the specified canvas be drawn to an in-memory image
	Capture(fyne.Canvas) image.Image
	// Clear tells our painter to prepare a fresh paint
	Clear()
	// Free is used to indicate that a certain canvas object is no longer needed
	Free(fyne.CanvasObject)
	// Paint a single fyne.CanvasObject but not its children.
	Paint(fyne.CanvasObject, fyne.Position, fyne.Size)
	// SetFrameBufferScale tells us when we have more than 1 framebuffer pixel for each output pixel
	SetFrameBufferScale(float32)
	// SetOutputSize is used to change the resolution of our output viewport
	SetOutputSize(int, int)
	// StartClipping tells us that the following paint actions should be clipped to the specified area.
	StartClipping(fyne.Position, fyne.Size)
	// StopClipping stops clipping paint actions.
	StopClipping()
}

Painter defines the functionality of our OpenGL based renderer

func NewPainter

func NewPainter(c fyne.Canvas, ctx driver.WithContext) Painter

NewPainter creates a new GL based renderer for the provided canvas. If it is a master painter it will also initialise OpenGL

type Program

type Program uint32

Program represents a compiled GL program

type Texture

type Texture uint32

Texture represents an uploaded GL texture

Jump to

Keyboard shortcuts

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