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

Method loadLights

src/Shaders/CarShader.cpp:130–142  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

128}
129
130void CarShader::loadLights(std::vector<Light> lights) {
131 for(int i = 0; i < MAX_CAR_CONTRIB_LIGHTS; ++i){
132 if(i < lights.size()){
133 loadVec3(lightPositionLocation[i], lights[i].position);
134 loadVec4(lightColourLocation[i], lights[i].colour);
135 loadVec3(attenuationLocation[i], lights[i].attenuation);
136 } else {
137 loadVec3(lightPositionLocation[i], glm::vec3(0,0,0));
138 loadVec4(lightColourLocation[i], glm::vec4(0,0,0,0));
139 loadVec3(attenuationLocation[i], glm::vec3(1,0,0));
140 }
141 }
142}
143
144void CarShader::loadCarColor(glm::vec3 color){
145 loadVec3(colourLocation, color);

Callers 2

renderTrackMethod · 0.45
renderMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected