Commit 4c88df66 authored by whitlocb's avatar whitlocb

I merged the RC to the trunk.



git-svn-id: http://visit.ilight.com/svn/visit/trunk/src@7532 18c085ea-50e0-402c-830e-de6fd14e8384
parent aef11ee4
......@@ -177,8 +177,11 @@
# Thomas R. Treadway, Tue Mar 27 12:52:26 PDT 2007
# Added $(MESA_LIBS)
#
# Thomas R. Treadway, Wed May 9 11:39:17 PDT 2007
# Added OpenGL libraries (framework) for MacOS X10.3 build
# Thomas R. Treadway, Wed May 9 11:39:17 PDT 2007
# Added OpenGL libraries (framework) for MacOS X10.3 build
#
# Brad Whitlock, Wed Jun 10, 12:13:23 PDT 2009
# I changed how Mesa sources are added to the project.
#
##############################################################################
......@@ -211,8 +214,8 @@ SRC=avtLegend.C avtVariableLegend.C avtGeometryDrawable.C avtActor.C \
CPPFLAGS=-I../../include/visit @COMPONENT_CPPFLAGS@ @CPPFLAGS@
SEROBJ=$(SRC:.C=.o) $(SEROPENGL_OBJ) $(SERMESA_OBJ)
PAROBJ=$(SRC:.C=_par.o) $(PAROPENGL_OBJ) $(PARMESA_OBJ)
SEROBJ=$(SRC:.C=.o) $(SEROPENGL_OBJ) @SERMESA_OBJ@
PAROBJ=$(SRC:.C=_par.o) $(PAROPENGL_OBJ) @PARMESA_OBJ@
LIB=libplotter
LIBS_FOR_MACOSX_PREBINDING=$(MESA_LIBS) $(GL_LIBS) $(ZLIB_LIB) $(GLEW_LIBS)
SERLIBS=-ldbatts -lmisc -lcomm -lstate -lexpr -lparser -lutility -lpipeline_ser -lavtview -lavtmath_ser -lavtfilters_ser -lavtexceptions -lvisit_vtk -lrendering_visit_vtk -llightweight_visit_vtk -lparallel_visit_vtk_ser $(LIBS_FOR_MACOSX_PREBINDING) $(VTK_LIBS) $(X_LIBS)
......
......@@ -46,7 +46,6 @@
#include <vtkCamera.h>
#include <vtkImageData.h>
//#include <vtkMesaRenderWindow.h>
#include <vtkRenderer.h>
#include <vtkRenderWindow.h>
#include <vtkWindowToImageFilter.h>
......@@ -182,8 +181,6 @@ avtDrawer::Execute(void)
vtkCamera *camera = ren->GetActiveCamera();
viewInfo.SetCameraFromView(camera);
// vtkMesaRenderWindow *win = vtkMesaRenderWindow::New();
// win->SetOffScreenRendering(1);
vtkRenderWindow *win = vtkRenderWindow::New();
win->SetSize(windowSize);
win->AddRenderer(ren);
......
......@@ -53,7 +53,9 @@
#include <avtCallback.h>
#include <avtOpenGLSurfaceAndWireframeRenderer.h>
#ifdef VTK_USE_MANGLED_MESA
#include <avtMesaSurfaceAndWireframeRenderer.h>
#endif
#include <ImproperUseException.h>
......@@ -186,19 +188,20 @@ avtSurfaceAndWireframeRenderer::~avtSurfaceAndWireframeRenderer()
// Hank Childs, Sat Dec 3 20:37:07 PST 2005
// Change test for whether or not we are doing software rendering.
//
// Brad Whitlock, Wed Jun 10 12:14:32 PDT 2009
// Conditional compilation for Mesa.
//
// ****************************************************************************
avtSurfaceAndWireframeRenderer *
avtSurfaceAndWireframeRenderer::New(void)
{
#ifdef VTK_USE_MANGLED_MESA
if (avtCallback::GetSoftwareRendering())
{
return new avtMesaSurfaceAndWireframeRenderer;
}
else
{
#endif
return new avtOpenGLSurfaceAndWireframeRenderer;
}
}
......
......@@ -65,6 +65,7 @@
// HACK HACK
#include <GL/gl.h>
#ifdef VTK_USE_MANGLED_MESA
extern "C" {
#if defined(_WIN32)
// On Windows, we get these functions from a DLL so we have to have
......@@ -76,6 +77,7 @@ void mglDepthMask(GLboolean);
void mglColorMask(GLboolean,GLboolean,GLboolean,GLboolean);
#endif
}
#endif
static void RemoveCullers(vtkRenderer *);
......@@ -995,7 +997,11 @@ VisWinRendering::GetCaptureRegion(int& r0, int& c0, int& w, int& h,
// Hank Childs, Wed Mar 1 11:26:15 PST 2006
// Add some exception handling.
//
// Brad Whitlock, Wed Jun 10 12:26:48 PDT 2009
// Don't use mgl functions unless we have mangled mesa.
//
// ****************************************************************************
void
VisWinRendering::ScreenRender(bool doViewportOnly, bool doCanvasZBufferToo,
bool doOpaque, bool doTranslucent,
......@@ -1041,6 +1047,7 @@ VisWinRendering::ScreenRender(bool doViewportOnly, bool doCanvasZBufferToo,
// data. Unless I override vtkRenderWindow, vtkOpenGLRenderWindow,
// vtkXOpenGLRenderWindow, vtkWin32OpenGLRenderWindow,
// vtkMesaRenderWindow, vtkXMesaRenderWindow, and so on....
#ifdef VTK_USE_MANGLED_MESA
if (renWin->IsA("vtkMesaRenderWindow"))
{
mglDepthMask(GL_FALSE);
......@@ -1053,6 +1060,7 @@ VisWinRendering::ScreenRender(bool doViewportOnly, bool doCanvasZBufferToo,
}
else
{
#endif
glDepthMask(GL_FALSE);
renWin->SetPixelData(r0,c0,w-1,h-1,rgbbuf,renWin->GetDoubleBuffer());
glDepthMask(GL_TRUE);
......@@ -1060,7 +1068,9 @@ VisWinRendering::ScreenRender(bool doViewportOnly, bool doCanvasZBufferToo,
glColorMask(GL_FALSE,GL_FALSE,GL_FALSE,GL_FALSE);
renWin->SetZbufferData(r0,c0,w-1,h-1,zbuf);
glColorMask(GL_TRUE,GL_TRUE,GL_TRUE,GL_TRUE);
#ifdef VTK_USE_MANGLED_MESA
}
#endif
}
//
......
......@@ -331,6 +331,10 @@ VisWinUserInfo::SetVisibility(bool val)
// Brad Whitlock, Wed Mar 26 14:41:55 PDT 2008
// Changed height to scale in the text attributes.
//
// Brad Whitlock, Thu Jun 11 11:18:13 PDT 2009
// If we can't get the username, use the string "user" as the username so
// the code doesn't crash.
//
// ****************************************************************************
void
......@@ -350,9 +354,9 @@ VisWinUserInfo::UpdateUserText()
#else
user = getenv("USER");
if (user == NULL)
{
user = getenv("LOGNAME");
}
if(user == NULL)
user = "user";
#endif
//
......
......@@ -1631,7 +1631,12 @@ for ($os) {
push @supportedarchs, "linux-x86_64";
}
elsif ($mach =~ /ppc64/) {
push @supportedarchs, "linux-ppc64";
if ($exe_name eq "engine" && $req_compiler eq "powerpc-bgp-linux-g++") {
push @supportedarchs, "linux-ppc64-powerpc-bgp-linux-g++";
}
else {
push @supportedarchs, "linux-ppc64";
}
}
else {
if ($req_compiler eq "icc") {
......
......@@ -37,6 +37,7 @@
*****************************************************************************/
#include <SocketConnection.h>
#include <visit-config.h>
#if defined(_WIN32)
#include <winsock2.h>
#include <win32commhelpers.h>
......@@ -47,7 +48,9 @@
#include <unistd.h>
#include <signal.h>
#endif
#ifdef HAVE_SELECT
#include <SysCall.h>
#endif
#include <LostConnectionException.h>
// ****************************************************************************
......@@ -470,11 +473,15 @@ SocketConnection::DirectWrite(const unsigned char *buf, long ntotal)
// Tom Fogal, Sat Feb 16 15:47:15 EST 2008
// Restart the system call if it gets interrupted.
//
// Brad Whitlock, Thu Jun 11 15:14:50 PST 2009
// Don't call select if we don't have it.
//
// ****************************************************************************
bool
SocketConnection::NeedsRead(bool blocking) const
{
#ifdef HAVE_SELECT
// Set up a file descriptor set that only consists of the descriptor
// used by this connection.
fd_set readSet;
......@@ -500,4 +507,8 @@ SocketConnection::NeedsRead(bool blocking) const
}
return (ret > 0);
#else
// Assume that read will block for input.
return true;
#endif
}
......@@ -2,22 +2,29 @@
## Compiler flags.
##
if test "$BUILD_MODE" == "ComputeNode"; then
# My current configure line is:
# configure CXXFLAGS=-g BUILD_MODE=ComputeNode --enable-engine-only --disable-glew --enable-parallel --without-x --disable-select --disable-nospin-bcast
CC="/bgsys/drivers/ppcfloor/gnu-linux/powerpc-bgp-linux/bin/gcc"
CXX="/bgsys/drivers/ppcfloor/gnu-linux/powerpc-bgp-linux/bin/g++"
CFLAGS="-O2 -fPIC"
CXXFLAGS="-O2 -fPIC"
EXE_LDFLAGS="-shared"
# CFLAGS="-O2 -fPIC"
# CXXFLAGS="-O2 -fPIC"
CFLAGS="-g -fPIC"
CXXFLAGS="-g -fPIC"
LDFLAGS="-g"
EXE_LDFLAGS="-Wl,-call_shared"
VISITARCH="linux-ppc64_bgp_gcc-4.1.2"
QTARCH="linux-ppc64_gcc-4.1.2"
XML2MAKEFILE_CXX="g++"
MESA_VERSION="6.4.2"
SILO_VERSION="4.7"
# Set the parallel options
BGP_DRIVER_PATH="/bgsys/drivers/ppcfloor"
LDFLAGS="-L$BGP_DRIVER_PATH/comm/lib $LDFLAGS"
CPPFLAGS="-DMPICH_IGNORE_CXX_SEEK -I$BGP_DRIVER_PATH/comm/include $CPPFLAGS"
MPI_LIBS="-lcxxmpich.cnk -lmpich.cnk -ldcmfcoll.cnk -ldcmf.cnk -lpthread -lrt -L$BGP_DRIVER_PATH/runtime/SPI -lSPI.cna"
BGP="/bgsys/drivers/ppcfloor"
MPI_LDFLAGS="-L$BGP/comm/lib -Wl,-rpath,$BGP/comm/default/lib -L$BGP/comm/sys/lib -Wl,-rpath,$BGP/comm/sys/lib -L$BGP/runtime/SPI -Wl,-rpath,$BGP/runtime/SPI $LDFLAGS"
CPPFLAGS="-DMPICH_IGNORE_CXX_SEEK -I$BGP/comm/include $CPPFLAGS"
MPI_LIBS="$MPI_LDFLAGS -lcxxmpich.cnk -lmpich.cnk -ldcmfcoll.cnk -ldcmf.cnk -lpthread -lrt -L$BGP/runtime/SPI -lSPI.cna"
else
# These are the options that are for xlc. They are right but there's an
# error somewhere that prevents libvisit_vtk from loading.
......@@ -36,6 +43,7 @@ else
QTARCH="linux-ppc64_gcc-4.1.2"
MESA_VERSION="5.0"
SILO_VERSION="4.6.2"
fi
##
......@@ -138,5 +146,5 @@ DEFAULT_SZIP_LIB=$VISITHOME/szip/2.1/$VISITARCH/lib
##
## Silo
##
DEFAULT_SILO_LIBLOC=$VISITHOME/silo/4.6.2/$VISITARCH
DEFAULT_SILO_LIBLOC=$VISITHOME/silo/$SILO_VERSION/$VISITARCH
DEFAULT_SILO_LIBDEP=-L$DEFAULT_HDF5_LIBLOC/lib,-lhdf5,$DEFAULT_HDF5_LIBDEP
This diff is collapsed.
......@@ -956,6 +956,11 @@ dnl
dnl Hank Childs, Tue May 5 01:03:49 CDT 2009
dnl Put -lGLU into the SLIVR libs.
dnl
dnl Brad Whitlock, Thu Jun 11 15:31:48 PST 2009
dnl I've made many changes, including: --enable-engine-only,
dnl --enable-server-components-only, --disable-select, --disable-nospin-bcast.
dnl These are aimed at getting VisIt to build on BlueGene/P.
dnl
dnl --------------------------------------------------------------------------
dnl
......@@ -1386,6 +1391,9 @@ AC_LANG_C
# Set up some VTK variables.
#
AC_MSG_CHECKING(for VTK)
MESA_OBJ=""
SERMESA_OBJ=""
PARMESA_OBJ=""
if test -n "$VTK"; then
AC_MSG_RESULT(found)
VTK_DIR=$VTK
......@@ -1397,6 +1405,16 @@ if test -n "$VTK"; then
else
VTK_LIGHTWEIGHT_LIBS="-lvtkCommon -lvtkFiltering -lvtkzlib -lvtkexpat -lvtksys"
fi
# Determine whether VTK was built with mangled Mesa support. If it wasn't
# then there is code in VisIt that we do not want to compile.
useMangledMesa=`grep "define VTK_USE_MANGLED_MESA" $VTK/vtkToolkits.h`
if test -n "$useMangledMesa" ; then
AC_DEFINE(VISIT_USE_MANGLED_MESA, [1], [Enable use of mangled Mesa classes in VisIt.])
MESA_OBJ="$""(MESA_OBJ)"
SERMESA_OBJ="$""(SERMESA_OBJ)"
PARMESA_OBJ="$""(PARMESA_OBJ)"
fi
else
AC_MSG_RESULT(not found)
VTK_DIR=""
......@@ -1408,7 +1426,9 @@ AC_SUBST(VTK_DIR)
AC_SUBST(VTK_INCLUDES)
AC_SUBST(VTK_LIBS)
AC_SUBST(VTK_LIGHTWEIGHT_LIBS)
AC_SUBST(MESA_OBJ)
AC_SUBST(SERMESA_OBJ)
AC_SUBST(PARMESA_OBJ)
#
# Check for the avtprep directory
......@@ -3404,10 +3424,13 @@ fi
#
if test "$no_x" != "yes"; then
AC_CHECK_LIB(X11, main, X_LIBS="-lX11 -lXt $X_LIBS" ,,$X_LIBS)
X_CPPFLAGS="-DHAVE_XLIB"
else
X_LIBS=""
X_CPPFLAGS="-DHAVE_XLIB"
fi
AC_SUBST(X_LIBS)
AC_SUBST(X_CPPFLAGS)
#
# Look for pthreads. If they are present then define a flag
......@@ -3586,19 +3609,35 @@ this might have happened.]
AC_TYPE_UID_T
#
# If tflops_override is 'no' then do the following checks.
# Check to see if we want to use VisIt's no-spin Bcast function. We want to use it
# unless the user gave --disable-nospin-bcast
#
if test 'no' = $tflops_override; then
dnl
dnl Check for library functions. If we don't have one, we can't continue.
dnl
AC_CHECK_FUNCS(select div strerror,
,
AC_MSG_ERROR([$0 wasn't able to find a necessary library
function (see above).])
)
AC_ARG_ENABLE(nospin-bcast,
[ --disable-nospin-bcast Use straight MPI_BCast instead of VisIt's no-spin BCast for getting commands from rank 0],
UseSelect="$enable_nospin_bcast",UseNoSpinBCast=yes)
if test "$UseNoSpinBCast" == "yes" ; then
AC_DEFINE(VISIT_USE_NOSPIN_BCAST, [1], [Define if we want to use VisIt's no-spin BCast.])
fi
#
# Check to see if we want to use the select() function. We want to use it
# unless the user gave --disable-select
#
AC_ARG_ENABLE(select,
[ --disable-select build without using the select function],
UseSelect="$enable_select",UseSelect=yes)
if test "$UseSelect" == "yes" ; then
SELECT_FUNCTION="select"
fi
#
# Check for library functions. If we don't have one, we can't continue.
#
AC_CHECK_FUNCS($SELECT_FUNCTION div strerror,
,
AC_MSG_ERROR([$0 wasn't able to find a necessary library
function (see above).])
)
#
# Figure out how to create shared libraries
......
......@@ -1423,6 +1423,9 @@ Engine::PAR_ProcessInput()
// Sean Ahern, Wed Dec 12 12:04:15 EST 2007
// Made a distinction between the execution and the idle timeouts.
//
// Brad Whitlock, Thu Jun 11 15:12:36 PST 2009
// I disabled the call to NeedsRead when we don't have select().
//
// ****************************************************************************
bool
......@@ -1444,8 +1447,10 @@ Engine::EventLoop()
// Block until the connection needs to be read. Then process its
// new input.
//
#ifdef HAVE_SELECT
if (xfer->GetInputConnection()->NeedsRead(true))
{
#endif
TRY
{
// We've got some work to do. Reset the alarm.
......@@ -1467,7 +1472,9 @@ Engine::EventLoop()
errFlag = true;
}
ENDTRY
#ifdef HAVE_SELECT
}
#endif
}
return errFlag;
......@@ -2506,12 +2513,16 @@ Engine::SendKeepAliveReply()
//
// Mark C. Miller, Mon Jan 22 22:09:01 PST 2007
// Changed MPI_COMM_WORLD to VISIT_MPI_COMM
//
// Brad Whitlock, Thu Jun 11 15:08:46 PST 2009
// I disabled this code if we don't have select().
//
// ****************************************************************************
bool
Engine::EngineAbortCallbackParallel(void *data, bool informSlaves)
{
#ifdef HAVE_SELECT
#ifdef PARALLEL
MPIXfer *xfer = (MPIXfer*)data;
#else
......@@ -2556,6 +2567,9 @@ Engine::EngineAbortCallbackParallel(void *data, bool informSlaves)
xfer->SendInterruption(INTERRUPT_MESSAGE_TAG);
#endif
return abort;
#else
return false;
#endif
}
// ****************************************************************************
......
......@@ -46,8 +46,13 @@
#include <TimingsManager.h>
#include <visitstream.h>
#include <visit-config.h>
#if defined(HAVE_SELECT) && defined(VISIT_USE_NOSPIN_BCAST)
int MPIXfer::nanoSecsOfSleeps = 50000000; // 1/20th of a second
#else
int MPIXfer::nanoSecsOfSleeps = 0; // Use MPI_Bcast
#endif
int MPIXfer::secsOfSpinBeforeSleeps = 5; // 5 seconds
void (*MPIXfer::slaveProcessInstruction)() = NULL;
const int UI_BCAST_TAG = GetUniqueStaticMessageTag();
......
......@@ -196,9 +196,12 @@ enhancements and bug-fixes that were added to this release.</p>
<p><b><font size="4">Changes for VisIt developers in version 1.12</font></b></p>
<ul>
<li>xml2projectfile is now built by default</li>
<li></li>
<li></li>
<li></li>
<li>VisIt's configure script now provides an --enable-engine-only option that lets you
build just the compute engine and its plugins. This option is useful when you need to
build just a compute engine for a remote server.</li>
<li>VisIt's configure script now provides an --enable-server-components-only option that
lets you build only the compute engine, mdserver, vcl, and their plugins.</li>
<li>VisIt's compute engine was ported to BlueGene/P.</li>
</ul>
<p>Click the following link to view the release notes for the previous version
......
......@@ -81,9 +81,6 @@
/* Define if you have pyparsing. */
#undef HAVE_PYPARSING
/* Define to 1 if you have the `select' function. */
#undef HAVE_SELECT
/* Define to 1 if you have the `setenv' function. */
#undef HAVE_SETENV
......@@ -235,6 +232,12 @@
/* VisIt version */
#undef VISIT_VERSION
/* Enable use of mangled Mesa classes in VisIt. */
#undef VISIT_USE_MANGLED_MESA
/* Define if we want to use VisIt's no-spin BCast. */
#undef VISIT_USE_NOSPIN_BCAST
/* Define to 1 if your processor stores words with the most significant byte
first (like Motorola and SPARC, unlike Intel and VAX). */
#undef WORDS_BIGENDIAN
......
......@@ -180,6 +180,10 @@
# builds, this can lead to very bad things, like removing everything in
# this directory! So, I added logic for all these cases to test for
# non-empty string before doing something with it.
#
# Brad Whitlock, Fri Jun 12 14:34:34 PST 2009
# I changed the links for libGLU in case it has several names.
#
##############################################################################
@SET_MAKE@
......@@ -293,8 +297,8 @@ libmesagl:
-test -n "$(LIBMESAGL)" && ln -s @MESA_DIR@/lib/$(LIBMESAGL)* .
libGLU:
-test -n "$(LIBGLU)" && $(RM) $(LIBGLU)
-test -n "$(LIBGLU)" && ln -s @MESA_DIR@/lib/$(LIBGLU) .
-test -n "$(LIBGLU)" && $(RM) $(LIBGLU)*
-test -n "$(LIBGLU)" && ln -s @MESA_DIR@/lib/$(LIBGLU)* .
libosmesa:
-test -n "$(LIBOSMESA)" && $(RM) $(LIBOSMESA)*
......
......@@ -49,7 +49,9 @@
#include <avtWarpFilter.h>
#include <avtCallback.h>
#ifdef VTK_USE_MANGLED_MESA
#include <avtMesaCurveRenderer.h>
#endif
#include <avtOpenGLCurveRenderer.h>
#include <LineAttributes.h>
......@@ -81,6 +83,9 @@
// Brad Whitlock, Mon Nov 20 10:16:08 PDT 2006
// Changed to a curve renderer.
//
// Brad Whitlock, Wed Jun 10 14:06:34 PST 2009
// I made Mesa support be conditional.
//
// ****************************************************************************
avtCurvePlot::avtCurvePlot()
......@@ -90,9 +95,11 @@ avtCurvePlot::avtCurvePlot()
CurveFilter = new avtCurveFilter();
WarpFilter = new avtWarpFilter();
#ifdef VTK_USE_MANGLED_MESA
if (avtCallback::GetSoftwareRendering())
renderer = new avtMesaCurveRenderer;
else
#endif
renderer = new avtOpenGLCurveRenderer;
avtCustomRenderer_p ren;
CopyTo(ren, renderer);
......
......@@ -49,7 +49,9 @@
#include <avtLabelFilter.h>
#include <avtLabelsMapper.h>
#include <avtLabelSubsetsFilter.h>
#ifdef VTK_USE_MANGLED_MESA
#include <avtMesaLabelRenderer.h>
#endif
#include <avtOpenGLLabelRenderer.h>
#include <vtkLookupTable.h>
#include <avtUserDefinedMapper.h>
......@@ -71,6 +73,9 @@
// Hank Childs, Sat Dec 3 20:39:35 PST 2005
// Change test for whether or not we are doing software rendering.
//
// Brad Whitlock, Wed Jun 10 14:03:23 PST 2009
// I made Mesa support be conditional.
//
// ****************************************************************************
avtLabelPlot::avtLabelPlot() : avtSurfaceDataPlot()
......@@ -81,9 +86,11 @@ avtLabelPlot::avtLabelPlot() : avtSurfaceDataPlot()
normalFilter = NULL;
labelSubsetsFilter = NULL;
#ifdef VTK_USE_MANGLED_MESA
if (avtCallback::GetSoftwareRendering())
renderer = new avtMesaLabelRenderer;
else
#endif
renderer = new avtOpenGLLabelRenderer;
varLegend = new avtVariableLegend;
......
......@@ -54,7 +54,9 @@
#include <avtCallback.h>
#include <avtOpenGLMoleculeRenderer.h>
#ifdef VTK_USE_MANGLED_MESA
#include <avtMesaMoleculeRenderer.h>
#endif
#include <ImproperUseException.h>
#include <InvalidLimitsException.h>
......@@ -163,6 +165,9 @@ avtMoleculeRenderer::New(void)
// Brad Whitlock, Fri Apr 7 11:36:04 PDT 2006
// Pass window size to the renderer implementation.
//
// Brad Whitlock, Wed Jun 10 14:08:34 PST 2009
// I made Mesa support be conditional.
//
// ****************************************************************************
void
......@@ -173,14 +178,12 @@ avtMoleculeRenderer::Render(vtkDataSet *ds)
if (rendererImplementation)
delete rendererImplementation;
#ifdef VTK_USE_MANGLED_MESA
if (avtCallback::GetNowinMode())
{
rendererImplementation = new avtMesaMoleculeRenderer;
}
else
{
#endif
rendererImplementation = new avtOpenGLMoleculeRenderer;
}
currentRendererIsValid = true;
rendererImplementation->SetLevelsLUT(levelsLUT);
......
......@@ -47,7 +47,9 @@
#include <avtCallback.h>
#include <avtOpenGLSpreadsheetTraceRenderer.h>
#ifdef VTK_USE_MANGLED_MESA
#include <avtMesaSpreadsheetTraceRenderer.h>
#endif
// ****************************************************************************
// Method: avtSpreadsheetRenderer::avtSpreadsheetRenderer
......@@ -207,6 +209,9 @@ avtSpreadsheetRenderer::SetForegroundColor(const double *fg)
// Support showing current cell outline. Calculate bounds from data set if
// "avtOriginalBounds" does not exist.
//
// Brad Whitlock, Wed Jun 10 14:10:34 PST 2009
// I made Mesa suport be conditional.
//
// ****************************************************************************
void
......@@ -229,9 +234,11 @@ avtSpreadsheetRenderer::RenderTracePlane(vtkDataSet *ds)
{
if(rendererImplementation == 0)
{
#ifdef VTK_USE_MANGLED_MESA
if(avtCallback::GetSoftwareRendering())
rendererImplementation = new avtMesaSpreadsheetTraceRenderer;
else
#endif
rendererImplementation = new avtOpenGLSpreadsheetTraceRenderer;
}
......
......@@ -52,15 +52,17 @@
#include <avtCallback.h>
#include <avtOpenGLSplattingVolumeRenderer.h>
#include <avtMesaSplattingVolumeRenderer.h>
#include <avtOpenGL3DTextureVolumeRenderer.h>
#include <avtMesa3DTextureVolumeRenderer.h>
#ifdef USE_TUVOK
# include <avtOpenGLTuvokVolumeRenderer.h>
#endif
#ifdef HAVE_LIBSLIVR
# include <avtOpenGLSLIVRVolumeRenderer.h>
#endif
#ifdef VTK_USE_MANGLED_MESA
#include <avtMesaSplattingVolumeRenderer.h>
#include <avtMesa3DTextureVolumeRenderer.h>
#endif
#include <DebugStream.h>
#include <ImproperUseException.h>
......@@ -250,6 +252,9 @@ avtVolumeRenderer::ReducedDetailModeOff()
// Tom Fogal, Wed Mar 25 13:19:40 MST 2009
// Don't try to instantiate a Tuvok renderer unless USE_TUVOK is defined.
//
// Brad Whitlock, Wed Jun 10 14:00:37 PST 2009
// I made Mesa support be conditional.
//
// ****************************************************************************
void
......@@ -262,6 +267,7 @@ avtVolumeRenderer::Render(vtkDataSet *ds)
if (rendererImplementation)
delete rendererImplementation;
#ifdef VTK_USE_MANGLED_MESA
if (avtCallback::GetSoftwareRendering())
{
if (atts.GetRendererType() == VolumeAttributes::Splatting)
......@@ -292,7 +298,8 @@ avtVolumeRenderer::Render(vtkDataSet *ds)
}
}
else
{
{
#endif
if (atts.GetRendererType() == VolumeAttributes::Splatting)
{
debug5 << "Creating a (HW) Splatting renderer." << std::endl;
......@@ -319,7 +326,9 @@ avtVolumeRenderer::Render(vtkDataSet *ds)
}
}
currentRendererIsValid = true;
#ifdef VTK_USE_MANGLED_MESA
}
#endif
if (!initialized)
{
......
......@@ -248,6 +248,10 @@
// Brad Whitlock, Wed Oct 15 14:27:59 PDT 2008
// Added support for additional Java source.
//
// Brad Whitlock, Wed Jun 10 11:44:51 PDT 2009
// I changed the code so Mesa sources are not added unless configure
// detected that VTK uses mangled mesa.
//
// ****************************************************************************
class MakefileGeneratorPlugin : public Plugin
......@@ -597,8 +601,10 @@ class MakefileGeneratorPlugin : public Plugin
int suffix = vfiles[i].lastIndexOf(".");
if(suffix > 0 && vfiles[i].indexOf("Mesa") != -1)
{
#ifdef VISIT_USE_MANGLED_MESA
if(vGraphicsObjects.length() == 0) vGraphicsObjects += " ";
vGraphicsObjects += (vfiles[i].left(suffix) + "_mesa.o ");
#endif
}
else if(suffix > 0 && vfiles[i].indexOf("OpenGL") != -1)
{
......@@ -628,12 +634,14 @@ class MakefileGeneratorPlugin : public Plugin
int suffix = efiles[i].lastIndexOf(".");
if(suffix > 0 && efiles[i].indexOf("Mesa") != -1)
{
#ifdef VISIT_USE_MANGLED_MESA
QString root(efiles[i].left(suffix));
if(eserGraphicsObjects.length() == 0) eserGraphicsObjects += " ";
if(eparGraphicsObjects.length() == 0) eparGraphicsObjects += " ";
eserGraphicsObjects += (root + "_mesa.o ");
eparGraphicsObjects += (root + "_par_mesa.o ");
#endif
}
else if(suffix > 0 && efiles[i].indexOf("OpenGL") != -1)
{
......
......@@ -400,6 +400,12 @@ ViewerEngineManager::EngineExists(const EngineKey &ek) const
// some firewalls that try to close sockets that don't send data within
// some short period of time.
//
// Brad Whitlock, Wed Jun 10 16:46:39 PST 2009
// I added code to catch LostConnectionException. I was getting it while
// debugging an engine that crashed right after connecting. We were
// were allowing the exception to propagate to a level where the viewer
// self-quit because it incorrectly thought the GUI had died.
//
// ****************************************************************************
bool
......@@ -614,6 +620,18 @@ ViewerEngineManager::CreateEngine(const EngineKey &ek,
arg(ek.HostName().c_str()).arg(ek.HostName().c_str());
Error(msg);
}