Skip to content
Snippets Groups Projects
Commit 272ea092 authored by Jaswant Panchumarti (Kitware)'s avatar Jaswant Panchumarti (Kitware)
Browse files

OpenGL: Remove unused shader variable for gradient background

- screeSize is not used
parent e38a1d04
No related branches found
No related tags found
No related merge requests found
...@@ -669,7 +669,6 @@ void vtkOpenGLRenderer::Clear() ...@@ -669,7 +669,6 @@ void vtkOpenGLRenderer::Clear()
{ {
vtkShaderProgram::Substitute(fs, "//VTK::FSQ::Decl", vtkShaderProgram::Substitute(fs, "//VTK::FSQ::Decl",
"uniform vec3 stopColors[2];\n" "uniform vec3 stopColors[2];\n"
"uniform vec2 screenSize;\n"
"//VTK::FSQ::Decl"); "//VTK::FSQ::Decl");
switch (this->GradientMode) switch (this->GradientMode)
{ {
...@@ -733,11 +732,7 @@ void vtkOpenGLRenderer::Clear() ...@@ -733,11 +732,7 @@ void vtkOpenGLRenderer::Clear()
std::copy(this->Background, this->Background + 3, &stopColors[0][0]); std::copy(this->Background, this->Background + 3, &stopColors[0][0]);
std::copy(this->Background2, this->Background2 + 3, &stopColors[1][0]); std::copy(this->Background2, this->Background2 + 3, &stopColors[1][0]);
int vp[4]; // llX, llY, width, height
this->GetTiledSizeAndOrigin(&vp[2], &vp[3], &vp[0], &vp[1]);
float screenSize[2] = { static_cast<float>(vp[3]), static_cast<float>(vp[4]) };
this->BackgroundRenderer->Program->SetUniform3fv("stopColors", 2, stopColors); this->BackgroundRenderer->Program->SetUniform3fv("stopColors", 2, stopColors);
this->BackgroundRenderer->Program->SetUniform1fv("screenSize", 2, screenSize);
} }
// draw the background. // draw the background.
this->BackgroundRenderer->Render(); this->BackgroundRenderer->Render();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment