Skip to content

Commit 94bea4b

Browse files
authored
Remove unneeded call to getProgram (#2302)
The program has already been obtained and the following lines use it, so this is an unnecessary virtual call that makes reading the code a bit confusing.
1 parent 34f430e commit 94bea4b

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

source/MaterialXView/RenderPipelineGL.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ void GLRenderPipeline::updatePrefilteredMap()
168168
imageHandler->bindImage(srcTex, samplingProperties);
169169
int textureLocation = glImageHandler->getBoundTextureLocation(srcTex->getResourceId());
170170
assert(textureLocation >= 0);
171-
material->getProgram()->bindUniform(mx::HW::ENV_RADIANCE, mx::Value::createValue(textureLocation));
171+
program->bindUniform(mx::HW::ENV_RADIANCE, mx::Value::createValue(textureLocation));
172172
// Bind other uniforms
173173
program->bindUniform(mx::HW::ENV_PREFILTER_MIP, mx::Value::createValue(i));
174174
const mx::Matrix44 yRotationPI = mx::Matrix44::createScale(mx::Vector3(-1, 1, -1));

0 commit comments

Comments
 (0)