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

Method getAllUniformLocations

src/Shaders/CarShader.cpp:43–64  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

41}
42
43void CarShader::getAllUniformLocations() {
44 // Get handles for uniforms
45 transformationMatrixLocation = getUniformLocation("transformationMatrix");
46 projectionMatrixLocation = getUniformLocation("projectionMatrix");
47 viewMatrixLocation = getUniformLocation("viewMatrix");
48 envMapTextureLocation = getUniformLocation("envMapTextureSampler");
49 carTextureLocation = getUniformLocation("carTextureSampler");
50 colourLocation = getUniformLocation("carColour");
51
52 for(int i = 0; i < MAX_CAR_CONTRIB_LIGHTS; ++i){
53 lightPositionLocation[i] = getUniformLocation("lightPosition[" + std::to_string(i) + "]");
54 lightColourLocation[i] = getUniformLocation("lightColour[" + std::to_string(i) + "]");
55 attenuationLocation[i] = getUniformLocation("attenuation[" + std::to_string(i) + "]");
56 }
57
58 shineDamperLocation= getUniformLocation("shineDamper");
59 reflectivityLocation = getUniformLocation("reflectivity");
60 envReflectivityLocation = getUniformLocation("envReflectivity");
61 carTextureArrayLocation = getUniformLocation("textureArray");
62 isMultiTexturedLocation = getUniformLocation("multiTextured");
63 hasPolyFlagsLocation = getUniformLocation("polyFlagged");
64}
65
66void CarShader::setMultiTextured(bool multiTextured){
67 loadBool(isMultiTexturedLocation, multiTextured);

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected