MCPcopy
hub / github.com/g3n/engine / Items

Method Items

geometry/geometry.go:182–192  ·  view source on GitHub ↗

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.

()

Source from the content-addressed store, hash-verified

180// (The number of items should be same for all VBOs)
181// An item is a complete group of attributes in the VBO buffer.
182func (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.
195func (g *Geometry) SetAttributeName(atype gls.AttribType, attribName string) {

Callers 1

RenderMethod · 0.80

Calls 4

AttribCountMethod · 0.80
BufferMethod · 0.80
StrideSizeMethod · 0.80
BytesMethod · 0.45

Tested by

no test coverage detected