Items returns the number of items in the first VBO. (The number of items should be same for all VBOs) An item is a complete group of attributes in the VBO buffer.
()
| 180 | // (The number of items should be same for all VBOs) |
| 181 | // An item is a complete group of attributes in the VBO buffer. |
| 182 | func (g *Geometry) Items() int { |
| 183 | |
| 184 | if len(g.vbos) == 0 { |
| 185 | return 0 |
| 186 | } |
| 187 | vbo := g.vbos[0] |
| 188 | if vbo.AttribCount() == 0 { |
| 189 | return 0 |
| 190 | } |
| 191 | return vbo.Buffer().Bytes() / vbo.StrideSize() |
| 192 | } |
| 193 | |
| 194 | // SetAttributeName sets the name of the VBO attribute associated with the provided attribute type. |
| 195 | func (g *Geometry) SetAttributeName(atype gls.AttribType, attribName string) { |
no test coverage detected