gls.go 905 B

123456789101112131415161718192021222324252627282930313233
  1. package gls
  2. import (
  3. "math"
  4. "unsafe"
  5. )
  6. // Stats contains counters of WebGL resources being used as well
  7. // the cumulative numbers of some WebGL calls for performance evaluation.
  8. type Stats struct {
  9. Shaders int // Current number of shader programs
  10. Vaos int // Number of Vertex Array Objects
  11. Buffers int // Number of Buffer Objects
  12. Textures int // Number of Textures
  13. Caphits uint64 // Cumulative number of hits for Enable/Disable
  14. UnilocHits uint64 // Cumulative number of uniform location cache hits
  15. UnilocMiss uint64 // Cumulative number of uniform location cache misses
  16. Unisets uint64 // Cumulative number of uniform sets
  17. Drawcalls uint64 // Cumulative number of draw calls
  18. }
  19. const (
  20. capUndef = 0
  21. capDisabled = 1
  22. capEnabled = 2
  23. uintUndef = math.MaxUint32
  24. intFalse = 0
  25. intTrue = 1
  26. )
  27. const (
  28. FloatSize = int32(unsafe.Sizeof(float32(0)))
  29. )