Commit 94dfcdac authored by Alvaro Sanchez's avatar Alvaro Sanchez Committed by Kitware Robot

Merge topic 'fix-value-pass-invertible'

b1658cca Sets the correct input in UseInvertibleColorFor.
Acked-by: Kitware Robot's avatarKitware Robot <kwrobot@kitware.com>
Reviewed-by: David E. DeMarle's avatarDavid E DeMarle <dave.demarle@kitware.com>
Merge-request: !1986
parents b43ec782 b1658cca
Pipeline #27043 running with stage
in 393 minutes and 26 seconds
......@@ -2677,7 +2677,7 @@ void vtkOpenGLPolyDataMapper::UpdateBufferObjects(vtkRenderer *ren, vtkActor *ac
// Checks for the pass's rendering mode and updates its configuration.
// Depending on the case, updates the mapper's color mapping or allocates
// a buffer.
this->ValuePassHelper->UpdateConfiguration(ren, act, this);
this->ValuePassHelper->UpdateConfiguration(ren, act, this, this->CurrentInput);
// Rebuild buffers if needed
if (this->GetNeedToRebuildBufferObjects(ren,act))
......
......@@ -8,6 +8,7 @@
#include "vtkOpenGLHelper.h"
#include "vtkOpenGLRenderWindow.h"
#include "vtkOpenGLVertexArrayObject.h"
#include "vtkPolyData.h"
#include "vtkRenderer.h"
#include "vtkShaderProgram.h"
#include "vtkTextureObject.h"
......@@ -179,7 +180,7 @@ void vtkValuePassHelper::RenderPieceStart(vtkActor* actor, vtkDataSet* input)
//-----------------------------------------------------------------------------
void vtkValuePassHelper::UpdateConfiguration(vtkRenderer* ren, vtkActor* act,
vtkMapper* mapper)
vtkMapper* mapper, vtkPolyData* input)
{
this->RenderingMode = -1;
vtkInformation *info = act->GetPropertyKeys();
......@@ -203,7 +204,8 @@ void vtkValuePassHelper::UpdateConfiguration(vtkRenderer* ren, vtkActor* act,
case vtkValuePass::INVERTIBLE_LUT:
default:
{
mapper->UseInvertibleColorFor(info->Get(vtkValuePass::SCALAR_MODE()),
mapper->UseInvertibleColorFor(input,
info->Get(vtkValuePass::SCALAR_MODE()),
info->Get(vtkValuePass::ARRAY_MODE()),
info->Get(vtkValuePass::ARRAY_ID()),
info->Get(vtkValuePass::ARRAY_NAME()),
......
......@@ -45,6 +45,7 @@ class vtkMapper;
class vtkOpenGLHelper;
class vtkRenderer;
class vtkWindow;
class vtkPolyData;
class VTKRENDERINGOPENGL2_EXPORT vtkValuePassHelper : public vtkObject
{
......@@ -66,7 +67,8 @@ protected:
// Description:
// Configure the internal state depending on the settings defined by the
// vtkValuePass (RenderingMode, RENDER_VALUES, SCALAR_MODE, etc.).
void UpdateConfiguration(vtkRenderer* ren, vtkActor* act, vtkMapper* mapper);
void UpdateConfiguration(vtkRenderer* ren, vtkActor* act, vtkMapper* mapper,
vtkPolyData* input);
// Description:
// Upload new data if necessary, bind textures, etc.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment