stats

package
v0.0.0-...-682a2af Latest Latest
Warning

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

Go to latest
Published: Jul 30, 2024 License: BSD-2-Clause Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Stats

type Stats struct {
	Glstats    gls.Stats // GLS statistics structure
	UnilocHits int       // Uniform location cache hits per frame
	UnilocMiss int       // Uniform location cache misses per frame
	Unisets    int       // Uniform sets per frame
	Drawcalls  int       // Draw calls per frame
	Cgocalls   int       // Cgo calls per frame
	// contains filtered or unexported fields
}

Stats contains several statistics useful for performance evaluation

func NewStats

func NewStats(gs *gls.GLS) *Stats

NewStats creates and returns a pointer to a new statistics object

func (*Stats) Update

func (s *Stats) Update(d time.Duration) bool

Update should be called in the render loop with the desired update interval. Returns true when the interval has elapsed and the statistics has been updated.

type StatsTable

type StatsTable struct {
	*gui.Table // embedded table panel
	// contains filtered or unexported fields
}

StatsTable is a gui.Table panel with statistics

func NewStatsTable

func NewStatsTable(width, height float32) *StatsTable

NewStatsTable creates and returns a pointer to a new statistics table panel

func (*StatsTable) Update

func (st *StatsTable) Update(s *Stats)

Update updates the table values from the specified stats table

Jump to

Keyboard shortcuts

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