Commit 8111a7ea authored by Ken Martin's avatar Ken Martin

minor changes

parent 1467ef32
......@@ -21,6 +21,7 @@ set(Module_SRCS
vtkOpenGL2Actor.cxx
vtkOpenGL2Camera.cxx
vtkOpenGL2Light.cxx
vtkOpenGL2PolyDataMapper2D.cxx
vtkOpenGL2Property.cxx
vtkVBOPolyDataMapper.cxx
${CMAKE_CURRENT_BINARY_DIR}/${vtk-module}ObjectFactory.cxx
......@@ -82,11 +83,12 @@ if(VTK_REPLACE_OPENGL_OVERRIDES)
Actor
Camera
Light
PolyDataMapper2D
Property
)
endif()
vtk_add_override(vtkPolyDataMapper vtkVBOPolyDataMapper)
vtk_add_override(vtkPolyDataMapper vtkVBOPolyDataMapper)
foreach(_override ${opengl_overrides})
vtk_add_override(vtk${_override} vtkOpenGL2${_override})
endforeach()
......
......@@ -34,8 +34,8 @@
int TestVBOPLYMapper(int argc, char *argv[])
{
vtkNew<vtkActor> actor;
vtkNew<vtkVBOPolyDataMapper> mapper;
vtkNew<vtkRenderer> renderer;
vtkNew<vtkPolyDataMapper> mapper;
renderer->SetBackground(0.0, 0.0, 0.0);
vtkNew<vtkRenderWindow> renderWindow;
renderWindow->SetSize(300, 300);
......
......@@ -73,7 +73,11 @@ public:
vtkTimeStamp propertiesTime;
vtkTimeStamp shaderBuildTime;
Private() : colorAttributes(false), buidNormals(true) { }
Private() : colorAttributes(false), buidNormals(true)
{
this->vertexShader.setType(vtkgl::Shader::Vertex);
this->fragmentShader.setType(vtkgl::Shader::Fragment);
}
};
// Process the string, and return a version with replacements.
......@@ -198,9 +202,7 @@ void vtkVBOPolyDataMapper::UpdateShader(vtkRenderer* ren, vtkActor *vtkNotUsed(a
}
cout << "VS: " << vertexShaderSource << endl;
this->Internal->vertexShader.setType(vtkgl::Shader::Vertex);
this->Internal->vertexShader.setSource(vertexShaderSource);
this->Internal->fragmentShader.setType(vtkgl::Shader::Fragment);
this->Internal->fragmentShader.setSource(this->Internal->fragmentShaderFile);
if (!this->Internal->vertexShader.compile())
{
......
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