MCPcopy
hub / github.com/EngoEngine/engo / updateBuffer

Method updateBuffer

common/render_shaders_blendmap.go:408–415  ·  view source on GitHub ↗
(ren *RenderComponent, space *SpaceComponent)

Source from the content-addressed store, hash-verified

406}
407
408func (s *blendmapShader) updateBuffer(ren *RenderComponent, space *SpaceComponent) {
409 // For backwards compatibility, ren.Buffer is set to the VBO and ren.BufferContent
410 // is set to the slice of the vertex buffer for the current sprite. This same slice is
411 // populated with vertex data via generateBufferContent.
412 ren.Buffer = s.vertexBuffer
413 ren.BufferContent = s.vertices[s.idx : s.idx+20]
414 s.generateBufferContent(ren, space, ren.BufferContent)
415}
416
417func (s *blendmapShader) makeModelMatrix(ren *RenderComponent, space *SpaceComponent) *engo.Matrix {
418 // Instead of creating a new model matrix every time, we instead store a global one as a struct member

Callers 1

DrawMethod · 0.95

Calls 1

generateBufferContentMethod · 0.95

Tested by

no test coverage detected