[cig-commits] commit: gLucifer wasn't synchronising it's scalar fields

Mercurial hg at geodynamics.org
Mon Nov 24 11:28:46 PST 2008


changeset:   8:b5469c3eeb67
user:        LukeHodkinson
date:        Mon May 21 22:10:05 2007 +0000
files:       DrawingObjects/src/ScalarFieldCrossSection.c
description:
gLucifer wasn't synchronising it's scalar fields
before rendering them.


diff -r fac677b225ad -r b5469c3eeb67 DrawingObjects/src/ScalarFieldCrossSection.c
--- a/DrawingObjects/src/ScalarFieldCrossSection.c	Mon May 21 04:55:10 2007 +0000
+++ b/DrawingObjects/src/ScalarFieldCrossSection.c	Mon May 21 22:10:05 2007 +0000
@@ -39,13 +39,14 @@
 *+		Patrick Sunter
 *+		Greg Watson
 *+
-** $Id: ScalarFieldCrossSection.c 628 2006-10-12 08:23:07Z SteveQuenette $
+** $Id: ScalarFieldCrossSection.c 693 2007-05-21 22:10:05Z LukeHodkinson $
 ** 
 **~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
 
 
 #include <mpi.h>
 #include <StGermain/StGermain.h>
+#include <StgFEM/StgFEM.h>
 
 #include <glucifer/Base/Base.h>
 #include <glucifer/RenderingEngines/RenderingEngines.h>
@@ -288,6 +289,9 @@ void lucScalarFieldCrossSection_DrawCros
 	double         aLength;
 	double         bLength;
 	Dimension_Index dim_I;
+
+	/* Ensure the field is synchronised. */
+	FeVariable_SyncShadowValues( self->fieldVariable );
 	
 	glDisable(GL_LIGHTING);
 	
@@ -362,6 +366,7 @@ void lucScalarFieldCrossSection_DrawCros
 
 Bool lucScalarFieldCrossSection_PlotColouredVertex( void* drawingObject, Coord interpolationCoord, Coord plotCoord ) {
 	lucScalarFieldCrossSection*       self            = (lucScalarFieldCrossSection*)drawingObject;
+	Bool result;
 	FieldVariable* fieldVariable = self->fieldVariable;
 	lucColourMap*  cmap          = self->colourMap;
 	double         quantity;
@@ -370,7 +375,8 @@ Bool lucScalarFieldCrossSection_PlotColo
 			__func__, interpolationCoord[0], interpolationCoord[1], interpolationCoord[2] );
 
 	/* Interpolate value to this position */
-	if ( LOCAL == FieldVariable_InterpolateValueAt( fieldVariable, interpolationCoord, &quantity )) {
+	result = FieldVariable_InterpolateValueAt( fieldVariable, interpolationCoord, &quantity );
+	if ( LOCAL == result || SHADOW == result ) {
 		/* Get colour for this value from colour map */
 		lucColourMap_SetOpenGLColourFromValue( cmap, quantity );
 



More information about the CIG-COMMITS mailing list