diff --git a/Abstract/VariableManager.cpp b/Abstract/VariableManager.cpp index 30212d2..2cb8a92 100644 --- a/Abstract/VariableManager.cpp +++ b/Abstract/VariableManager.cpp @@ -101,6 +101,13 @@ void VariableManager::prepareScalarVariable(int scalarVariableIndex) /* Calculate the scalar extractor's value range: */ sv.valueRange=dataSet->calcScalarValueRange(sv.scalarExtractor); + /* Check for and correct an empty value range: */ + if(sv.valueRange.first==sv.valueRange.second) + { + sv.valueRange.first-=1.0; + sv.valueRange.second+=1.0; + } + /* Create a 256-entry OpenGL color map for rendering: */ sv.colorMap=new GLColorMap(GLColorMap::GREYSCALE|GLColorMap::RAMP_ALPHA,1.0f,1.0f,sv.valueRange.first,sv.valueRange.second); ++sv.colorMapVersion; diff --git a/HISTORY b/HISTORY index 46a7a98..445e0f5 100644 --- a/HISTORY +++ b/HISTORY @@ -121,3 +121,11 @@ - Bumped required Vrui version number to 2.5-001. - Fixed line parser error in StructuredHexahedralTecplotASCIIFile. - Small changes to build system in line with Vrui. +- Fixed build error; forgot an object file. Pointed out by Rob Porritt. + +3D Visualizer 1.13: +- Fixed matrix stack handling error in Visualizer::display that affected + rendering of embedded scene graphs. +- Bumped required Vrui version number to 2.7-001. +- Improved variable manager to properly handle "empty" scalar value + ranges. diff --git a/README b/README index 4d17ba8..7ed65cb 100644 --- a/README +++ b/README @@ -1,6 +1,6 @@ ======================================================================== -README for 3D Visualizer version 1.12 -Copyright (c) 2005-2012 Oliver Kreylos +README for 3D Visualizer version 1.13 +Copyright (c) 2005-2013 Oliver Kreylos ======================================================================== Overview @@ -28,7 +28,7 @@ Science Foundation. Requirements ============ -3D Visualizer version 1.12 requires Vrui version 2.5 build 001 or newer. +3D Visualizer version 1.13 requires Vrui version 2.5 build 001 or newer. To read images in PNG, JPEG, or TIFF formats, libpng, libjpeg, or libtiff have to be installed, respectively, and Vrui has to be configured with support for these image formats (see Vrui README file). diff --git a/VERSION b/VERSION index ea2bea8..a216979 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -3DVisualizer 1.12 +3DVisualizer 1.13 diff --git a/Visualizer.cpp b/Visualizer.cpp index 76a725e..5bf1e78 100644 --- a/Visualizer.cpp +++ b/Visualizer.cpp @@ -1,7 +1,7 @@ /*********************************************************************** Visualizer - Test application for the new visualization component framework. -Copyright (c) 2005-2012 Oliver Kreylos +Copyright (c) 2005-2013 Oliver Kreylos This file is part of the 3D Data Visualizer (Visualizer). @@ -56,12 +56,13 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA #include #include #include +#include #include #include -#include #include #include #include +#include #ifdef VISUALIZER_USE_COLLABORATION #include #endif @@ -1101,15 +1102,22 @@ void Visualizer::display(GLContextData& contextData) const /* Save OpenGL state: */ glPushAttrib(GL_ENABLE_BIT|GL_LIGHTING_BIT|GL_TEXTURE_BIT); - /* Create a render state to traverse the scene graph: */ - SceneGraph::GLRenderState renderState(contextData,Vrui::getHeadPosition(),Vrui::getInverseNavigationTransformation().transform(Vrui::getUpDirection())); + /* Save the modelview matrix: */ + renderState.setMatrixMode(1); + glPushMatrix(); + + /* Create a render state to traverse the scene graphs: */ + SceneGraph::GLRenderState* sgRenderState=Vrui::createRenderState(true,contextData); /* Render all additional scene graphs: */ for(std::vector::const_iterator sgIt=sceneGraphs.begin();sgIt!=sceneGraphs.end();++sgIt) if(sgIt->render) - sgIt->root->glRenderAction(renderState); + sgIt->root->glRenderAction(*sgRenderState); + + delete sgRenderState; /* Restore OpenGL state: */ + glPopMatrix(); glPopAttrib(); } diff --git a/Visualizer.h b/Visualizer.h index 77051ca..98b33a6 100644 --- a/Visualizer.h +++ b/Visualizer.h @@ -1,7 +1,7 @@ /*********************************************************************** Visualizer - Test application for the new visualization component framework. -Copyright (c) 2005-2012 Oliver Kreylos +Copyright (c) 2005-2013 Oliver Kreylos This file is part of the 3D Data Visualizer (Visualizer). diff --git a/makefile b/makefile index 5809f88..bfca0ef 100644 --- a/makefile +++ b/makefile @@ -1,7 +1,7 @@ ######################################################################## # Makefile for 3D Visualizer, a generic visualization program for 3D # multivariate gridded data. -# Copyright (c) 1999-2012 Oliver Kreylos +# Copyright (c) 1999-2013 Oliver Kreylos # # This file is part of the WhyTools Build Environment. # @@ -25,7 +25,7 @@ # matches the default Vrui installation; if Vrui's installation # directory was changed during Vrui's installation, the directory below # must be adapted. -VRUI_MAKEDIR := $(HOME)/Vrui-2.5/share/make +VRUI_MAKEDIR := $(HOME)/Vrui-2.7/share/make ifdef DEBUG VRUI_MAKEDIR := $(VRUI_MAKEDIR)/debug endif @@ -105,7 +105,7 @@ PACKAGEROOT := $(shell pwd) # subsequent release versions of 3D Visualizer from clobbering each # other. The value should be identical to the major.minor version # number found in VERSION in the root package directory. -VERSION = 1.12 +VERSION = 1.13 # Set up resource directories: */ PLUGINSDIREXT = 3DVisualizer-$(VERSION) @@ -276,6 +276,7 @@ VISUALIZER_SOURCES = $(ABSTRACT_SOURCES) \ Visualizer.cpp ifneq ($(USE_SHADERS),0) VISUALIZER_SOURCES += TwoSidedSurfaceShader.cpp \ + TwoSided1DTexturedSurfaceShader.cpp \ Polyhedron.cpp \ Raycaster.cpp \ SingleChannelRaycaster.cpp \ diff --git a/share/3DVisualizer-1.12/EarthTopography.png b/share/3DVisualizer-1.13/EarthTopography.png similarity index 100% rename from share/3DVisualizer-1.12/EarthTopography.png rename to share/3DVisualizer-1.13/EarthTopography.png diff --git a/share/3DVisualizer-1.12/EarthTopography.ppm b/share/3DVisualizer-1.13/EarthTopography.ppm similarity index 100% rename from share/3DVisualizer-1.12/EarthTopography.ppm rename to share/3DVisualizer-1.13/EarthTopography.ppm diff --git a/share/3DVisualizer-1.12/Shaders/SingleChannelRaycaster.fs b/share/3DVisualizer-1.13/Shaders/SingleChannelRaycaster.fs similarity index 100% rename from share/3DVisualizer-1.12/Shaders/SingleChannelRaycaster.fs rename to share/3DVisualizer-1.13/Shaders/SingleChannelRaycaster.fs diff --git a/share/3DVisualizer-1.12/Shaders/SingleChannelRaycaster.vs b/share/3DVisualizer-1.13/Shaders/SingleChannelRaycaster.vs similarity index 100% rename from share/3DVisualizer-1.12/Shaders/SingleChannelRaycaster.vs rename to share/3DVisualizer-1.13/Shaders/SingleChannelRaycaster.vs diff --git a/share/3DVisualizer-1.12/Shaders/TripleChannelRaycaster.fs b/share/3DVisualizer-1.13/Shaders/TripleChannelRaycaster.fs similarity index 100% rename from share/3DVisualizer-1.12/Shaders/TripleChannelRaycaster.fs rename to share/3DVisualizer-1.13/Shaders/TripleChannelRaycaster.fs diff --git a/share/3DVisualizer-1.12/Shaders/TripleChannelRaycaster.vs b/share/3DVisualizer-1.13/Shaders/TripleChannelRaycaster.vs similarity index 100% rename from share/3DVisualizer-1.12/Shaders/TripleChannelRaycaster.vs rename to share/3DVisualizer-1.13/Shaders/TripleChannelRaycaster.vs