void renderLightVolume(const MVPPipeline &program, const PointLight &light) { Matrix4x4f modelMatrix = Matrix4x4f::identity(); modelMatrix = modelMatrix.translate(light.position); float scale = calcPointLightScale(light); modelMatrix = modelMatrix.scale({scale, scale, scale}); glUniformMatrix4fv(program.modelMatrix, 1, GL_FALSE, modelMatrix.const_value_ptr()); Matrix4x4f viewMatrix = camera.getMatrix(); glUniformMatrix4fv(program.viewMatrix, 1, GL_FALSE, viewMatrix.const_value_ptr()); Matrix4x4f projectionMatrix = Matrix4x4f::perspective(60.0f, WINDOW_WIDTH * 1.0f / WINDOW_HEIGHT, 1.0f, 100.0f); glUniformMatrix4fv(program.projectionMatrix, 1, GL_FALSE, projectionMatrix.const_value_ptr()); pSphereMesh->Render(); }