opengl

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Feb 21, 2025 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewGraphics

func NewGraphics() (graphicsdriver.Graphics, error)

NewGraphics creates an implementation of graphicsdriver.Graphics for OpenGL. The returned graphics value is nil iff the error is not nil.

Types

type Graphics

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

func (*Graphics) Begin

func (g *Graphics) Begin() error

func (*Graphics) DrawTriangles

func (g *Graphics) DrawTriangles(dstID graphicsdriver.ImageID, srcIDs [graphics.ShaderSrcImageCount]graphicsdriver.ImageID, shaderID graphicsdriver.ShaderID, dstRegions []graphicsdriver.DstRegion, indexOffset int, blend graphicsdriver.Blend, uniforms []uint32, fillRule graphicsdriver.FillRule) error

func (*Graphics) End

func (g *Graphics) End(present bool) error

func (*Graphics) Initialize

func (g *Graphics) Initialize() error

func (*Graphics) MaxImageSize

func (g *Graphics) MaxImageSize() int

func (*Graphics) NeedsClearingScreen

func (g *Graphics) NeedsClearingScreen() bool

func (*Graphics) NewImage

func (g *Graphics) NewImage(width, height int) (graphicsdriver.Image, error)

func (*Graphics) NewScreenFramebufferImage

func (g *Graphics) NewScreenFramebufferImage(width, height int) (graphicsdriver.Image, error)

func (*Graphics) NewShader

func (g *Graphics) NewShader(program *shaderir.Program) (graphicsdriver.Shader, error)

func (*Graphics) Reset

func (g *Graphics) Reset() error

Reset resets or initializes the current OpenGL state.

func (*Graphics) SetGLFWWindow

func (g *Graphics) SetGLFWWindow(window *glfw.Window)

func (*Graphics) SetTransparent

func (g *Graphics) SetTransparent(transparent bool)

func (*Graphics) SetVertices

func (g *Graphics) SetVertices(vertices []float32, indices []uint32) error

func (*Graphics) SetVsyncEnabled

func (g *Graphics) SetVsyncEnabled(enabled bool)

type Image

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

func (*Image) Dispose

func (i *Image) Dispose()

func (*Image) ID

func (i *Image) ID() graphicsdriver.ImageID

func (*Image) ReadPixels

func (i *Image) ReadPixels(args []graphicsdriver.PixelsArgs) error

func (*Image) WritePixels

func (i *Image) WritePixels(args []graphicsdriver.PixelsArgs) error

type Shader

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

func (*Shader) Dispose

func (s *Shader) Dispose()

func (*Shader) ID

func (s *Shader) ID() graphicsdriver.ShaderID

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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