Commit 898b425b authored by Ben Boeckel's avatar Ben Boeckel

vtkOpenGLPolyDataMapper2D: comment possible divide-by-zero

Change-Id: Ib0d2ef47d1a09c710324602e1e73217603e2f34c
parent a59bd8c8
......@@ -319,10 +319,12 @@ void vtkOpenGLPolyDataMapper2D::SetCameraShaderParameters(
vtkMatrix4x4 *tmpMat = vtkMatrix4x4::New();
tmpMat->SetElement(0,0,2.0/(right - left));
tmpMat->SetElement(1,1,2.0/(top - bottom));
// XXX(cppcheck): possible division by zero
tmpMat->SetElement(2,2,-2.0/(farV - nearV));
tmpMat->SetElement(3,3,1.0);
tmpMat->SetElement(0,3,-1.0*(right+left)/(right-left));
tmpMat->SetElement(1,3,-1.0*(top+bottom)/(top-bottom));
// XXX(cppcheck): possible division by zero
tmpMat->SetElement(2,3,-1.0*(farV+nearV)/(farV-nearV));
tmpMat->Transpose();
program->SetUniformMatrix("WCVCMatrix", tmpMat);
......
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