debug

package
v0.0.0-...-e1cee33 Latest Latest
Warning

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

Go to latest
Published: Jan 29, 2026 License: BSD-3-Clause Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TexFormatRGBA           = gl.RGBA
	TexFormatLuminanceAlpha = gl.LUMINANCE_ALPHA
)

Variables

This section is empty.

Functions

func DumpBuffer

func DumpBuffer[N number](buf gl.Buffer) []N

Returns a slice of the data as it exists in the given OpenGL buffer. This needs to be run on the 'render thread'.

func DumpTexture

func DumpTexture(textureId gl.Texture) (*image.NRGBA, error)

func DumpTextureAsPng

func DumpTextureAsPng(textureId gl.Texture, outfile io.Writer) error

func DumpTextureAsPngFile

func DumpTextureAsPngFile(textureId gl.Texture, path string) error

func GetActiveTextureUnit

func GetActiveTextureUnit() gl.GLenum

func GetBindingsSet

func GetBindingsSet() map[string]int

func GetColorMatrix

func GetColorMatrix() []float64

func GetColours

func GetColours() map[string]string

func GetDepthRange

func GetDepthRange() (float64, float64)

Returns the current (near, far) values as set from the last glDepthRange call.

func GetFlagSet

func GetFlagSet() map[string]gl.GLenum

func GetMatrixMode

func GetMatrixMode() gl.GLenum

Returns an enum denoting the current matrix mode.

func GetModelViewMatrix

func GetModelViewMatrix() []float64

func GetProjectionMatrix

func GetProjectionMatrix() []float64

func GetTextureMatrix

func GetTextureMatrix() []float64

func GetViewport

func GetViewport() (int32, int32, uint32, uint32)

Returns (x-pos, y-pos, width, height) of the current viewport.

func ScreenShot

func ScreenShot(width, height int, out io.Writer)

func ScreenShotNrgba

func ScreenShotNrgba(width, height int) *image.NRGBA

Types

type GlState

type GlState struct {
	MatrixMode       string
	ModelViewMatrix  []float64
	ProjectionMatrix []float64
	ColorMatrix      []float64
	TextureMatrix    []float64

	Colours  map[string]string
	Bindings map[string]int
	FlagSet  map[string]gl.GLenum
}

func GetGlState

func GetGlState() *GlState

Returns a high-level description of what the current GL state is.

func (*GlState) String

func (st *GlState) String() string

type TexFormat

type TexFormat int

func (TexFormat) String

func (tf TexFormat) String() string

Jump to

Keyboard shortcuts

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