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

Method RenderSetup

graphic/points.go:36–47  ·  view source on GitHub ↗

RenderSetup is called by the engine before rendering this graphic.

(gs *gls.GLS, rinfo *core.RenderInfo)

Source from the content-addressed store, hash-verified

34
35// RenderSetup is called by the engine before rendering this graphic.
36func (p *Points) RenderSetup(gs *gls.GLS, rinfo *core.RenderInfo) {
37
38 // Transfer model view projection matrix uniform
39 mvpm := p.ModelViewProjectionMatrix()
40 location := p.uniMVPm.Location(gs)
41 gs.UniformMatrix4fv(location, 1, false, &mvpm[0])
42
43 // Transfer model view matrix uniform
44 mvm := p.ModelViewMatrix()
45 location = p.uniMVm.Location(gs)
46 gs.UniformMatrix4fv(location, 1, false, &mvm[0])
47}

Callers

nothing calls this directly

Calls 4

LocationMethod · 0.80
ModelViewMatrixMethod · 0.80
UniformMatrix4fvMethod · 0.45

Tested by

no test coverage detected