Skip to content
Snippets Groups Projects
Commit 3fcd1831 authored by David C. Lonie's avatar David C. Lonie
Browse files

Add VTK_USE_LEGACY_DEPTH_PEELING env var handling.

Some drivers seem to have bugs that prevent the dual depth peeling from
functioning properly. Add an environment variable that will force the
renderer to use the old implementation.
parent 9f385d3a
No related branches found
No related tags found
No related merge requests found
......@@ -50,6 +50,7 @@ PURPOSE. See the above copyright notice for more information.
#include <cmath>
#include <cassert>
#include <cstdlib>
#include <list>
#include <string>
......@@ -319,6 +320,19 @@ void vtkOpenGLRenderer::DeviceRenderTranslucentPolygonalGeometry()
}
}
// The old implemention can be force by defining the environment var
// "VTK_USE_LEGACY_DEPTH_PEELING":
if (dualDepthPeelingSupported)
{
const char *forceLegacy = getenv("VTK_USE_LEGACY_DEPTH_PEELING");
if (forceLegacy)
{
vtkDebugMacro("Disabling dual depth peeling -- "
"VTK_USE_LEGACY_DEPTH_PEELING defined in environment.");
dualDepthPeelingSupported = false;
}
}
if (dualDepthPeelingSupported)
{
#if GL_ES_VERSION_2_0 != 1 // vtkDualDepthPeelingPass is not built on ES2
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment