forked from g3n/engine
-
Notifications
You must be signed in to change notification settings - Fork 0
/
gls.go
33 lines (29 loc) · 905 Bytes
/
gls.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
package gls
import (
"math"
"unsafe"
)
// Stats contains counters of WebGL resources being used as well
// the cumulative numbers of some WebGL calls for performance evaluation.
type Stats struct {
Shaders int // Current number of shader programs
Vaos int // Number of Vertex Array Objects
Buffers int // Number of Buffer Objects
Textures int // Number of Textures
Caphits uint64 // Cumulative number of hits for Enable/Disable
UnilocHits uint64 // Cumulative number of uniform location cache hits
UnilocMiss uint64 // Cumulative number of uniform location cache misses
Unisets uint64 // Cumulative number of uniform sets
Drawcalls uint64 // Cumulative number of draw calls
}
const (
capUndef = 0
capDisabled = 1
capEnabled = 2
uintUndef = math.MaxUint32
intFalse = 0
intTrue = 1
)
const (
FloatSize = int32(unsafe.Sizeof(float32(0)))
)