Location returns the location of this uniform for the current shader program. The returned location can be -1 if not found.
(gs *GLS)
| 35 | // Location returns the location of this uniform for the current shader program. |
| 36 | // The returned location can be -1 if not found. |
| 37 | func (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. |
no test coverage detected