Commit f1535309 authored by Ken Martin's avatar Ken Martin

More cleanups

vtkgl::CellBO renamed vtkOpenGLHelper
vtkgl::substitute moved to vtkShaderProgram::Substitute
Creation of vtkOpenGLIndexBufferObject
Creation of vtkOpenGLVertexBufferObject
Move methods that were in vtkglVBOHelper into new classes
Move IndexCount from CellBO to vtkOpenGLIndexBufferObject
etc
parent 37f39403
......@@ -13,14 +13,15 @@
=========================================================================*/
#include "vtkOpenGLSphereMapper.h"
#include "vtkglVBOHelper.h"
#include "vtkOpenGLHelper.h"
#include "vtkMath.h"
#include "vtkMatrix4x4.h"
#include "vtkOpenGLActor.h"
#include "vtkOpenGLCamera.h"
#include "vtkOpenGLBufferObject.h"
#include "vtkOpenGLIndexBufferObject.h"
#include "vtkOpenGLVertexArrayObject.h"
#include "vtkOpenGLVertexBufferObject.h"
#include "vtkObjectFactory.h"
#include "vtkPointData.h"
#include "vtkPolyData.h"
......@@ -32,7 +33,7 @@
#include "vtk_glew.h"
using vtkgl::substitute;
//-----------------------------------------------------------------------------
vtkStandardNewMacro(vtkOpenGLSphereMapper)
......@@ -63,12 +64,12 @@ void vtkOpenGLSphereMapper::ReplaceShaderValues(std::string &VSSource,
vtkRenderer* ren,
vtkActor *actor)
{
substitute(VSSource,
vtkShaderProgram::Substitute(VSSource,
"//VTK::Camera::Dec",
"uniform mat4 VCDCMatrix;\n"
"uniform mat4 MCVCMatrix;");
substitute(FSSource,
vtkShaderProgram::Substitute(FSSource,
"//VTK::PositionVC::Dec",
"varying vec4 vertexVCClose;");
......@@ -80,9 +81,9 @@ void vtkOpenGLSphereMapper::ReplaceShaderValues(std::string &VSSource,
"varying float radiusVC;\n"
"varying vec3 centerVC;\n"
"uniform mat4 VCDCMatrix;\n";
substitute(FSSource,"//VTK::Normal::Dec",replacement);
vtkShaderProgram::Substitute(FSSource,"//VTK::Normal::Dec",replacement);
substitute(FSSource,"//VTK::Normal::Impl",
vtkShaderProgram::Substitute(FSSource,"//VTK::Normal::Impl",
// compute the eye position and unit direction
"vec4 vertexVC = vertexVCClose;\n"
" vec3 EyePos;\n"
......@@ -128,7 +129,7 @@ void vtkOpenGLSphereMapper::ReplaceShaderValues(std::string &VSSource,
if (ren->GetLastRenderingUsedDepthPeeling())
{
substitute(FSSource,
vtkShaderProgram::Substitute(FSSource,
"//VTK::DepthPeeling::Impl",
"float odepth = texture2D(opaqueZTexture, gl_FragCoord.xy/screenSize).r;\n"
" if (gl_FragDepth >= odepth) { discard; }\n"
......@@ -150,7 +151,7 @@ vtkOpenGLSphereMapper::~vtkOpenGLSphereMapper()
//-----------------------------------------------------------------------------
void vtkOpenGLSphereMapper::SetCameraShaderParameters(
vtkgl::CellBO &cellBO,
vtkOpenGLHelper &cellBO,
vtkRenderer* ren, vtkActor *actor)
{
vtkShaderProgram *program = cellBO.Program;
......@@ -182,17 +183,16 @@ void vtkOpenGLSphereMapper::SetCameraShaderParameters(
//-----------------------------------------------------------------------------
void vtkOpenGLSphereMapper::SetMapperShaderParameters(
vtkgl::CellBO &cellBO,
vtkOpenGLHelper &cellBO,
vtkRenderer *ren, vtkActor *actor)
{
if (cellBO.IndexCount && (this->VBOBuildTime > cellBO.AttributeUpdateTime ||
if (cellBO.IBO->IndexCount && (this->VBOBuildTime > cellBO.AttributeUpdateTime ||
cellBO.ShaderSourceTime > cellBO.AttributeUpdateTime))
{
vtkgl::VBOLayout &layout = this->Layout;
cellBO.VAO->Bind();
if (!cellBO.VAO->AddAttributeArray(cellBO.Program, this->VBO,
"offsetMC", layout.ColorOffset+sizeof(float),
layout.Stride, VTK_FLOAT, 2, false))
"offsetMC", this->VBO->ColorOffset+sizeof(float),
this->VBO->Stride, VTK_FLOAT, 2, false))
{
vtkErrorMacro(<< "Error setting 'offsetMC' in shader VAO.");
}
......@@ -212,30 +212,28 @@ void vtkOpenGLSphereMapper::PrintSelf(ostream& os, vtkIndent indent)
namespace
{
// internal function called by CreateVBO
vtkgl::VBOLayout vtkOpenGLSphereMapperCreateVBO(float * points, vtkIdType numPts,
void vtkOpenGLSphereMapperCreateVBO(float * points, vtkIdType numPts,
unsigned char *colors, int colorComponents,
float *sizes,
vtkOpenGLBufferObject *vertexBuffer)
vtkOpenGLVertexBufferObject *VBO)
{
vtkgl::VBOLayout layout;
// Figure out how big each block will be, currently 6 or 7 floats.
int blockSize = 3;
layout.VertexOffset = 0;
layout.NormalOffset = 0;
layout.TCoordOffset = 0;
layout.TCoordComponents = 0;
layout.ColorComponents = colorComponents;
layout.ColorOffset = sizeof(float) * blockSize;
VBO->VertexOffset = 0;
VBO->NormalOffset = 0;
VBO->TCoordOffset = 0;
VBO->TCoordComponents = 0;
VBO->ColorComponents = colorComponents;
VBO->ColorOffset = sizeof(float) * blockSize;
++blockSize;
// two more floats
blockSize += 2;
layout.Stride = sizeof(float) * blockSize;
VBO->Stride = sizeof(float) * blockSize;
// Create a buffer, and copy the data over.
std::vector<float> packedVBO;
packedVBO.resize(blockSize * numPts*3);
std::vector<float>::iterator it = packedVBO.begin();
VBO->PackedVBO.resize(blockSize * numPts*3);
std::vector<float>::iterator it = VBO->PackedVBO.begin();
float *pointPtr;
unsigned char *colorPtr;
......@@ -270,9 +268,9 @@ vtkgl::VBOLayout vtkOpenGLSphereMapperCreateVBO(float * points, vtkIdType numPts
*(it++) = 0.0f;
*(it++) = 2.0f*radius;
}
vertexBuffer->Upload(packedVBO, vtkOpenGLBufferObject::ArrayBuffer);
layout.VertexCount = numPts*3;
return layout;
VBO->Upload(VBO->PackedVBO, vtkOpenGLBufferObject::ArrayBuffer);
VBO->VertexCount = numPts*3;
return;
}
}
......@@ -313,19 +311,19 @@ void vtkOpenGLSphereMapper::BuildBufferObjects(
// Iterate through all of the different types in the polydata, building OpenGLs
// and IBOs as appropriate for each type.
this->Layout =
vtkOpenGLSphereMapperCreateVBO(static_cast<float *>(poly->GetPoints()->GetVoidPointer(0)),
poly->GetPoints()->GetNumberOfPoints(),
this->Colors ? (unsigned char *)this->Colors->GetVoidPointer(0) : NULL,
this->Colors ? this->Colors->GetNumberOfComponents() : 0,
static_cast<float *>(poly->GetPointData()->GetArray(this->ScaleArray)->GetVoidPointer(0)),
this->VBO);
vtkOpenGLSphereMapperCreateVBO(
static_cast<float *>(poly->GetPoints()->GetVoidPointer(0)),
poly->GetPoints()->GetNumberOfPoints(),
this->Colors ? (unsigned char *)this->Colors->GetVoidPointer(0) : NULL,
this->Colors ? this->Colors->GetNumberOfComponents() : 0,
static_cast<float *>(poly->GetPointData()->GetArray(this->ScaleArray)->GetVoidPointer(0)),
this->VBO);
// create the IBO
this->Points.IndexCount = 0;
this->Lines.IndexCount = 0;
this->TriStrips.IndexCount = 0;
this->Tris.IndexCount = this->Layout.VertexCount;
this->Points.IBO->IndexCount = 0;
this->Lines.IBO->IndexCount = 0;
this->TriStrips.IBO->IndexCount = 0;
this->Tris.IBO->IndexCount = this->VBO->VertexCount;
}
......@@ -348,14 +346,12 @@ void vtkOpenGLSphereMapper::Render(vtkRenderer *ren, vtkActor *act)
//-----------------------------------------------------------------------------
void vtkOpenGLSphereMapper::RenderPieceDraw(vtkRenderer* ren, vtkActor *actor)
{
vtkgl::VBOLayout &layout = this->Layout;
// draw polygons
if (this->Tris.IndexCount)
if (this->Tris.IBO->IndexCount)
{
// First we do the triangles, update the shader, set uniforms, etc.
this->UpdateShader(this->Tris, ren, actor);
glDrawArrays(GL_TRIANGLES, 0,
static_cast<GLuint>(layout.VertexCount));
static_cast<GLuint>(this->VBO->VertexCount));
}
}
......@@ -59,11 +59,11 @@ protected:
// Description:
// Set the shader parameters related to the Camera
virtual void SetCameraShaderParameters(vtkgl::CellBO &cellBO, vtkRenderer *ren, vtkActor *act);
virtual void SetCameraShaderParameters(vtkOpenGLHelper &cellBO, vtkRenderer *ren, vtkActor *act);
// Description:
// Set the shader parameters related to the actor/mapper
virtual void SetMapperShaderParameters(vtkgl::CellBO &cellBO, vtkRenderer *ren, vtkActor *act);
virtual void SetMapperShaderParameters(vtkOpenGLHelper &cellBO, vtkRenderer *ren, vtkActor *act);
const char *ScaleArray;
......
......@@ -63,11 +63,11 @@ protected:
// Description:
// Set the shader parameters related to the Camera
virtual void SetCameraShaderParameters(vtkgl::CellBO &cellBO, vtkRenderer *ren, vtkActor *act);
virtual void SetCameraShaderParameters(vtkOpenGLHelper &cellBO, vtkRenderer *ren, vtkActor *act);
// Description:
// Set the shader parameters related to the actor/mapper
virtual void SetMapperShaderParameters(vtkgl::CellBO &cellBO, vtkRenderer *ren, vtkActor *act);
virtual void SetMapperShaderParameters(vtkOpenGLHelper &cellBO, vtkRenderer *ren, vtkActor *act);
const char *ScaleArray;
const char *OrientationArray;
......
......@@ -23,8 +23,8 @@
#include "vtkMathTextUtilities.h"
#include "vtkMatrix3x3.h"
#include "vtkObjectFactory.h"
#include "vtkOpenGLBufferObject.h"
#include "vtkOpenGLError.h"
#include "vtkOpenGLIndexBufferObject.h"
#include "vtkOpenGLRenderWindow.h"
#include "vtkOpenGLRenderer.h"
#include "vtkOpenGLShaderCache.h"
......@@ -43,7 +43,7 @@
#include "vtkVector.h"
#include "vtkViewport.h"
#include "vtkWindow.h"
#include "vtkglVBOHelper.h"
#include "vtkOpenGLHelper.h"
#include "vtkObjectFactory.h"
......@@ -68,11 +68,11 @@ vtkOpenGLContextDevice2D::vtkOpenGLContextDevice2D()
this->MaximumMarkerCacheSize = 20;
this->ProjectionMatrix = vtkTransform::New();
this->ModelMatrix = vtkTransform::New();
this->VBO = new vtkgl::CellBO;
this->VCBO = new vtkgl::CellBO;
this->VTBO = new vtkgl::CellBO;
this->SBO = new vtkgl::CellBO;
this->SCBO = new vtkgl::CellBO;
this->VBO = new vtkOpenGLHelper;
this->VCBO = new vtkOpenGLHelper;
this->VTBO = new vtkOpenGLHelper;
this->SBO = new vtkOpenGLHelper;
this->SCBO = new vtkOpenGLHelper;
}
//-----------------------------------------------------------------------------
......@@ -293,7 +293,7 @@ void vtkOpenGLContextDevice2D::SetMatrices(vtkShaderProgram *prog)
}
void vtkOpenGLContextDevice2D::BuildVBO(
vtkgl::CellBO *cellBO,
vtkOpenGLHelper *cellBO,
float *f, int nv,
unsigned char *colors, int nc,
float *tcoords)
......@@ -557,7 +557,7 @@ void vtkOpenGLContextDevice2D::DrawPoly(float *f, int n, unsigned char *colors,
vtkOpenGLClearErrorMacro();
this->SetLineType(this->Pen->GetLineType());
vtkgl::CellBO *cbo = 0;
vtkOpenGLHelper *cbo = 0;
if (colors)
{
this->ReadyVCBOProgram();
......@@ -651,7 +651,7 @@ void vtkOpenGLContextDevice2D::DrawLines(float *f, int n, unsigned char *colors,
this->SetLineType(this->Pen->GetLineType());
vtkgl::CellBO *cbo = 0;
vtkOpenGLHelper *cbo = 0;
if (colors)
{
this->ReadyVCBOProgram();
......@@ -735,7 +735,7 @@ void vtkOpenGLContextDevice2D::DrawPoints(float *f, int n, unsigned char *c,
{
vtkOpenGLClearErrorMacro();
vtkgl::CellBO *cbo = 0;
vtkOpenGLHelper *cbo = 0;
if (c)
{
this->ReadyVCBOProgram();
......@@ -773,7 +773,7 @@ void vtkOpenGLContextDevice2D::DrawPointSprites(vtkImageData *sprite,
{
this->SetPointSize(this->Pen->GetWidth());
vtkgl::CellBO *cbo = 0;
vtkOpenGLHelper *cbo = 0;
if (colors)
{
this->ReadySCBOProgram();
......@@ -878,7 +878,7 @@ void vtkOpenGLContextDevice2D::CoreDrawTriangles(
vtkOpenGLClearErrorMacro();
float* texCoord = 0;
vtkgl::CellBO *cbo = 0;
vtkOpenGLHelper *cbo = 0;
if (this->Brush->GetTexture())
{
this->ReadyVTBOProgram();
......@@ -1290,7 +1290,7 @@ void vtkOpenGLContextDevice2D::DrawString(float *point,
vtkOpenGLClearErrorMacro();
vtkgl::CellBO *cbo = 0;
vtkOpenGLHelper *cbo = 0;
this->ReadyVTBOProgram();
cbo = this->VTBO;
int tunit = vtkOpenGLTexture::SafeDownCast(texture)->GetTextureUnit();
......@@ -1402,7 +1402,7 @@ void vtkOpenGLContextDevice2D::DrawMathTextString(float point[2],
vtkOpenGLClearErrorMacro();
vtkgl::CellBO *cbo = 0;
vtkOpenGLHelper *cbo = 0;
this->ReadyVTBOProgram();
cbo = this->VTBO;
int tunit = vtkOpenGLTexture::SafeDownCast(texture)->GetTextureUnit();
......@@ -1446,7 +1446,7 @@ void vtkOpenGLContextDevice2D::DrawImage(float p[2], float scale,
vtkOpenGLClearErrorMacro();
vtkgl::CellBO *cbo = 0;
vtkOpenGLHelper *cbo = 0;
this->ReadyVTBOProgram();
cbo = this->VTBO;
int tunit = vtkOpenGLTexture::SafeDownCast(
......@@ -1503,7 +1503,7 @@ void vtkOpenGLContextDevice2D::DrawImage(const vtkRectf& pos,
0.0f, tex[1]};
vtkgl::CellBO *cbo = 0;
vtkOpenGLHelper *cbo = 0;
this->ReadyVTBOProgram();
cbo = this->VTBO;
int tunit = this->RenderWindow->GetTextureUnitManager()->Allocate();
......
......@@ -34,18 +34,15 @@
#include <list> // for std::list
class vtkMatrix4x4;
class vtkWindow;
class vtkViewport;
class vtkOpenGLExtensionManager;
class vtkOpenGLHelper;
class vtkOpenGLRenderWindow;
class vtkRenderer;
class vtkShaderProgram;
class vtkStringToImage;
class vtkOpenGLRenderWindow;
class vtkOpenGLExtensionManager;
class vtkTransform;
class vtkShaderProgram;
namespace vtkgl
{
class CellBO;
}
class vtkViewport;
class vtkWindow;
class VTKRENDERINGCONTEXTOPENGL2_EXPORT vtkOpenGLContextDevice2D : public vtkContextDevice2D
{
......@@ -334,19 +331,19 @@ protected:
// The OpenGL render window being used by the device
vtkOpenGLRenderWindow* RenderWindow;
vtkgl::CellBO *VCBO; // vertex + color
vtkOpenGLHelper *VCBO; // vertex + color
void ReadyVCBOProgram();
vtkgl::CellBO *VBO; // vertex
vtkOpenGLHelper *VBO; // vertex
void ReadyVBOProgram();
vtkgl::CellBO *VTBO; // vertex + tcoord
vtkOpenGLHelper *VTBO; // vertex + tcoord
void ReadyVTBOProgram();
vtkgl::CellBO *SCBO; // sprite + color
vtkOpenGLHelper *SCBO; // sprite + color
void ReadySCBOProgram();
vtkgl::CellBO *SBO; // sprite
vtkOpenGLHelper *SBO; // sprite
void ReadySBOProgram();
void SetMatrices(vtkShaderProgram *prog);
void BuildVBO(vtkgl::CellBO *cbo,
void BuildVBO(vtkOpenGLHelper *cbo,
float *v, int nv,
unsigned char *coolors, int nc,
float *tcoords);
......
......@@ -24,7 +24,7 @@
#include "vtkOpenGLRenderer.h"
#include "vtkOpenGLRenderWindow.h"
#include "vtkOpenGLError.h"
#include "vtkOpenGLBufferObject.h"
#include "vtkOpenGLIndexBufferObject.h"
#include "vtkOpenGLVertexArrayObject.h"
#include "vtkObjectFactory.h"
......@@ -33,7 +33,7 @@
#include "vtkShaderProgram.h"
#include "vtkTransform.h"
#include "vtkglVBOHelper.h"
#include "vtkOpenGLHelper.h"
class vtkOpenGLContextDevice3D::Private
{
......@@ -119,8 +119,8 @@ vtkOpenGLContextDevice3D::vtkOpenGLContextDevice3D() : Storage(new Private)
{
this->ModelMatrix = vtkTransform::New();
this->ModelMatrix->Identity();
this->VBO = new vtkgl::CellBO;
this->VCBO = new vtkgl::CellBO;
this->VBO = new vtkOpenGLHelper;
this->VCBO = new vtkOpenGLHelper;
this->ClippingPlaneStates.resize(6,false);
this->ClippingPlaneValues.resize(24);
}
......@@ -189,7 +189,7 @@ void vtkOpenGLContextDevice3D::SetMatrices(vtkShaderProgram *prog)
}
void vtkOpenGLContextDevice3D::BuildVBO(
vtkgl::CellBO *cellBO,
vtkOpenGLHelper *cellBO,
const float *f, int nv,
const unsigned char *colors, int nc,
float *tcoords)
......@@ -385,7 +385,7 @@ void vtkOpenGLContextDevice3D::DrawPoly(const float *verts, int n,
}
glLineWidth(this->Pen->GetWidth());
vtkgl::CellBO *cbo = 0;
vtkOpenGLHelper *cbo = 0;
if (colors)
{
this->ReadyVCBOProgram();
......@@ -438,7 +438,7 @@ void vtkOpenGLContextDevice3D::DrawLines(const float *verts, int n,
}
glLineWidth(this->Pen->GetWidth());
vtkgl::CellBO *cbo = 0;
vtkOpenGLHelper *cbo = 0;
if (colors)
{
this->ReadyVCBOProgram();
......@@ -478,7 +478,7 @@ void vtkOpenGLContextDevice3D::DrawPoints(const float *verts, int n,
glPointSize(this->Pen->GetWidth());
vtkgl::CellBO *cbo = 0;
vtkOpenGLHelper *cbo = 0;
if (colors)
{
this->ReadyVCBOProgram();
......@@ -516,7 +516,7 @@ void vtkOpenGLContextDevice3D::DrawTriangleMesh(const float *mesh, int n,
this->EnableDepthBuffer();
vtkgl::CellBO *cbo = 0;
vtkOpenGLHelper *cbo = 0;
if (colors)
{
this->ReadyVCBOProgram();
......
......@@ -28,16 +28,13 @@
#include <vector> // STL Header
class vtkBrush;
class vtkOpenGLRenderWindow;
class vtkOpenGLContextDevice2D;
class vtkOpenGLHelper;
class vtkOpenGLRenderWindow;
class vtkPen;
class vtkRenderer;
class vtkTransform;
class vtkShaderProgram;
namespace vtkgl
{
class CellBO;
}
class vtkTransform;
class VTKRENDERINGCONTEXTOPENGL2_EXPORT vtkOpenGLContextDevice3D : public vtkContextDevice3D
{
......@@ -136,13 +133,13 @@ protected:
// End drawing, turn off the depth buffer.
virtual void DisableDepthBuffer();
vtkgl::CellBO *VCBO; // vertex + color
vtkOpenGLHelper *VCBO; // vertex + color
void ReadyVCBOProgram();
vtkgl::CellBO *VBO; // vertex
vtkOpenGLHelper *VBO; // vertex
void ReadyVBOProgram();
void SetMatrices(vtkShaderProgram *prog);
void BuildVBO(vtkgl::CellBO *cbo,
void BuildVBO(vtkOpenGLHelper *cbo,
const float *v, int nv,
const unsigned char *coolors, int nc,
float *tcoords);
......
......@@ -55,7 +55,7 @@ protected:
// Description:
// Set the shader parameteres related to the property, called by UpdateShader
virtual void SetPropertyShaderParameters(vtkgl::CellBO &cellBO, vtkRenderer *ren, vtkActor *act);
virtual void SetPropertyShaderParameters(vtkOpenGLHelper &cellBO, vtkRenderer *ren, vtkActor *act);
private:
vtkCompositeLICHelper(const vtkCompositeLICHelper&); // Not implemented.
......@@ -64,7 +64,7 @@ private:
vtkStandardNewMacro(vtkCompositeLICHelper);
void vtkCompositeLICHelper::SetPropertyShaderParameters(vtkgl::CellBO &cellBO,
void vtkCompositeLICHelper::SetPropertyShaderParameters(vtkOpenGLHelper &cellBO,
vtkRenderer *ren, vtkActor *actor)
{
this->Superclass::SetPropertyShaderParameters(cellBO, ren, actor);
......
......@@ -43,7 +43,7 @@
#include <deque>
using std::deque;
#include "vtkglVBOHelper.h"
#include "vtkOpenGLHelper.h"
#include "vtkTextureObjectVS.h"
#define vtkImageDataLIC2DDEBUG 0
......
......@@ -16,8 +16,8 @@
#include "vtk_glew.h"
#include "vtkglVBOHelper.h"
using vtkgl::substitute;
#include "vtkOpenGLHelper.h"
#include "vtkFloatArray.h"
#include "vtkFrameBufferObject2.h"
......@@ -685,7 +685,7 @@ public:
float computeBoundsPt0[2],
float computeBoundsPt1[2],
vtkPixelExtent computeExtent,
vtkgl::CellBO *cbo)
vtkOpenGLHelper *cbo)
{
float computeBounds[4] = {
computeBoundsPt0[0], computeBoundsPt1[0],
......@@ -699,7 +699,7 @@ public:
void RenderQuad(
float computeBounds[4],
vtkPixelExtent computeExtent,
vtkgl::CellBO *cbo)
vtkOpenGLHelper *cbo)
{
float quadBounds[4];
computeExtent.CellToNode();
......@@ -1187,11 +1187,11 @@ void vtkLineIntegralConvolution2D::SetAAVShader(vtkShaderProgram * prog)
namespace {
void BuildAShader(vtkOpenGLRenderWindow *renWin,
vtkgl::CellBO **cbor, const char *frag)
vtkOpenGLHelper **cbor, const char *frag)
{
if (*cbor == NULL)
{
*cbor = new vtkgl::CellBO;
*cbor = new vtkOpenGLHelper;
std::string VSSource = vtkTextureObjectVS;
std::string GSSource;
(*cbor)->Program =
......@@ -1212,7 +1212,7 @@ void vtkLineIntegralConvolution2D::BuildShaders()
vtkOpenGLRenderWindow *renWin = this->Context;
std::string FSSource = vtkLineIntegralConvolution2D_VT;
substitute(FSSource,"//VTK::LICComponentSelection::Impl",
vtkShaderProgram::Substitute(FSSource,"//VTK::LICComponentSelection::Impl",
"vec2 V = texture2D(texVectors, tcoordVC.st)" +
GetComponentSelectionProgram(this->ComponentIds) + ";"
);
......@@ -1223,7 +1223,7 @@ void vtkLineIntegralConvolution2D::BuildShaders()
vtkLineIntegralConvolution2D_LIC0);
FSSource = vtkLineIntegralConvolution2D_LICI;
substitute(FSSource,"//VTK::LICVectorLookup::Impl",
vtkShaderProgram::Substitute(FSSource,"//VTK::LICVectorLookup::Impl",
GetVectorLookupProgram(this->NormalizeVectors)
);
BuildAShader(renWin, &this->LICIShader,
......
......@@ -94,17 +94,14 @@
#include "vtkRenderingLICOpenGL2Module.h" // for export macro
#include <deque> // for deque
class vtkFrameBufferObject2;
class vtkOpenGLHelper;
class vtkOpenGLRenderWindow;
class vtkPainterCommunicator;
class vtkPixelExtent;
class vtkRenderWindow;
class vtkShaderProgram;
class vtkTextureObject;
class vtkPixelExtent;
class vtkFrameBufferObject2;