MCPcopy Create free account
hub / github.com/OpenNFS/OpenNFS / getAllUniformLocations

Method getAllUniformLocations

src/Shaders/TrackShader.cpp:24–42  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

22}
23
24void TrackShader::getAllUniformLocations() {
25 // Get handles for uniforms
26 transformationMatrixLocation = getUniformLocation("transformationMatrix");
27 projectionMatrixLocation = getUniformLocation("projectionMatrix");
28 viewMatrixLocation = getUniformLocation("viewMatrix");
29 lightSpaceMatrixLocation = getUniformLocation("lightSpaceMatrix");
30 trackTextureArrayLocation = getUniformLocation("texture_array");
31 shineDamperLocation= getUniformLocation("shineDamper");
32 reflectivityLocation = getUniformLocation("reflectivity");
33 useClassicLocation = getUniformLocation("useClassic");
34 shadowMapTextureLocation = getUniformLocation("shadowMap");
35 ambientFactorLocation = getUniformLocation("ambientFactor");
36
37 for(int i = 0; i < MAX_LIGHTS; ++i){
38 lightPositionLocation[i] = getUniformLocation("lightPosition[" + std::to_string(i) + "]");
39 lightColourLocation[i] = getUniformLocation("lightColour[" + std::to_string(i) + "]");
40 attenuationLocation[i] = getUniformLocation("attenuation[" + std::to_string(i) + "]");
41 }
42}
43
44void TrackShader::customCleanup(){
45

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected