stats

package
Version: v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Aug 19, 2021 License: BSD-2-Clause Imports: 4 Imported by: 3

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, gs *gls.GLS) *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

Source Files

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL