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

Method Location

gls/uniform.go:37–45  ·  view source on GitHub ↗

Location returns the location of this uniform for the current shader program. The returned location can be -1 if not found.

(gs *GLS)

Source from the content-addressed store, hash-verified

35// Location returns the location of this uniform for the current shader program.
36// The returned location can be -1 if not found.
37func (u *Uniform) Location(gs *GLS) int32 {
38
39 handle := gs.prog.Handle()
40 if handle != u.handle {
41 u.location = gs.prog.GetUniformLocation(u.name)
42 u.handle = handle
43 }
44 return u.location
45}
46
47// LocationIdx returns the location of this indexed uniform for the current shader program.
48// The returned location can be -1 if not found.

Callers 15

RenderSetupMethod · 0.80
RenderSetupMethod · 0.80
RenderSetupMethod · 0.80
RenderSetupMethod · 0.80
RenderSetupMethod · 0.80
RenderSetupMethod · 0.80
RenderSetupMethod · 0.80
RenderSetupMethod · 0.80
RenderSetupMethod · 0.80
RenderSetupMethod · 0.80
RenderSetupMethod · 0.80
RenderSetupMethod · 0.80

Calls 2

HandleMethod · 0.80
GetUniformLocationMethod · 0.45

Tested by

no test coverage detected