Commit 6455c581 authored by Burlen Loring's avatar Burlen Loring
Browse files

OpenGL error hunt -- dashboard cleanup

Use static version of vtkOpenGLCheckErrorMacro in helper class
that's not a vtkObject in vtkPistonMapper. Don't check for OpenGL
errors in vtkGL2PSExporter::Write it doesn't use OpenGL directly.
Fix warning about narrowing cast. Use vtkOpenGLCheckErrorMacro
before return in vtkOpenGLImageSliceMapper::TextureSizeOK.

Change-Id: Ia05575d571c230b68b2035e8a866f0ec7519d887
parent 7e49ccd4
......@@ -60,7 +60,7 @@ namespace vtkpiston {
~PistonGLRAII()
{
glPopAttrib();
vtkOpenGLCheckErrorMacro("failed after ~PistonGLRAII");
vtkOpenGLStaticCheckErrorMacro("failed after ~PistonGLRAII");
}
};
}
......
......@@ -116,8 +116,6 @@ void vtkGL2PSExporter::WriteData()
return;
}
vtkOpenGLClearErrorMacro();
// Get the renderers. We'll be walking through them a lot later.
vtkRendererCollection *renCol = this->RenderWindow->GetRenderers();
......@@ -299,7 +297,6 @@ void vtkGL2PSExporter::WriteData()
// Cleanup memory
delete[] fName;
vtkOpenGLCheckErrorMacro("failed after WriteData");
vtkDebugMacro(<<"Finished writing file using GL2PS");
vtkGL2PSUtilities::FinishExport();
}
......
......@@ -592,8 +592,8 @@ void vtkFrameBufferObject2::Download(
vtkPixelBufferObject *pbo)
{
unsigned int extentSize[2] = {
extent[1] - extent[0] + 1,
extent[3] - extent[2] + 1
static_cast<unsigned int>(extent[1] - extent[0] + 1),
static_cast<unsigned int>(extent[3] - extent[2] + 1)
};
unsigned int nTups = extentSize[0]*extentSize[1];
......
......@@ -962,6 +962,8 @@ bool vtkOpenGLImageSliceMapper::TextureSizeOK(const int size[2])
glGetTexLevelParameteriv(GL_PROXY_TEXTURE_2D, 0, GL_TEXTURE_WIDTH,
&params);
vtkOpenGLCheckErrorMacro("failed after TextureSizeOK");
// if it does fit, we will render it later
return (params == 0 ? 0 : 1);
#else
......@@ -969,8 +971,6 @@ bool vtkOpenGLImageSliceMapper::TextureSizeOK(const int size[2])
// can do 1024x1024
return (size[0] <= 1024 && size[1] <= 1024);
#endif
vtkOpenGLCheckErrorMacro("failed after TextureSizeOK");
}
//----------------------------------------------------------------------------
......
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