Skip to content

Commit

Permalink
Clean up OpenGL code
Browse files Browse the repository at this point in the history
  • Loading branch information
ApoorvaJ committed Sep 18, 2023
1 parent 9b66cae commit 87d9bdb
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions source/MaterialXView/RenderPipelineGL.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,9 @@ void GLRenderPipeline::convolveEnvironment()

// Create texture to hold the convolved environment.
mx::ImagePtr outTex = mx::Image::create(w, h, 3, mx::Image::BaseType::HALF);
glImageHandler->createRenderResources(outTex, true); // TODO: Is this needed?
glImageHandler->createRenderResources(outTex, true);

mx::GlslProgramPtr program = material->getProgram();

int i = 0;
while (w > 0 && h > 0)
Expand All @@ -151,8 +153,6 @@ void GLRenderPipeline::convolveEnvironment()
glViewport(0, 0, w, h);
material->bindShader();

// TODO: Can this be moved out of the loop?
mx::GlslProgramPtr program = material->getProgram();
// Bind the source texture
mx::ImageSamplingProperties samplingProperties;
samplingProperties.uaddressMode = mx::ImageSamplingProperties::AddressMode::PERIODIC;
Expand Down

0 comments on commit 87d9bdb

Please sign in to comment.