MCPcopy Index your code
hub / github.com/g3n/engine / Update

Method Update

util/stats/table.go:46–67  ·  view source on GitHub ↗

Update updates the table values from the specified stats table

(s *Stats)

Source from the content-addressed store, hash-verified

44
45// Update updates the table values from the specified stats table
46func (st *StatsTable) Update(s *Stats) {
47
48 for i := 0; i < len(st.fields); i++ {
49 f := st.fields[i]
50 switch f.id {
51 case "shaders":
52 st.Table.SetCell(f.row, "v", s.Glstats.Shaders)
53 case "vaos":
54 st.Table.SetCell(f.row, "v", s.Glstats.Vaos)
55 case "buffers":
56 st.Table.SetCell(f.row, "v", s.Glstats.Buffers)
57 case "textures":
58 st.Table.SetCell(f.row, "v", s.Glstats.Textures)
59 case "unisets":
60 st.Table.SetCell(f.row, "v", s.Unisets)
61 case "drawcalls":
62 st.Table.SetCell(f.row, "v", s.Drawcalls)
63 case "cgocalls":
64 st.Table.SetCell(f.row, "v", s.Cgocalls)
65 }
66 }
67}
68
69func (st *StatsTable) addRow(id, label string) {
70

Callers

nothing calls this directly

Calls 1

SetCellMethod · 0.80

Tested by

no test coverage detected