Update updates the table values from the specified stats table
(s *Stats)
| 44 | |
| 45 | // Update updates the table values from the specified stats table |
| 46 | func (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 | |
| 69 | func (st *StatsTable) addRow(id, label string) { |
| 70 |