Text archives Help
- From: boulos@sci.utah.edu
- To: manta@sci.utah.edu
- Subject: [Manta] r1777 - trunk/Model/Textures
- Date: Mon, 15 Oct 2007 12:37:08 -0600 (MDT)
Author: boulos
Date: Mon Oct 15 12:37:08 2007
New Revision: 1777
Modified:
trunk/Model/Textures/ImageTexture.h
Log:
Model/Textures/ImageTexture.h
Adding an explicit check for whether or not we need to actually do a
%= resulting in decent perf benefit when we don't.
Modified: trunk/Model/Textures/ImageTexture.h
==============================================================================
--- trunk/Model/Textures/ImageTexture.h (original)
+++ trunk/Model/Textures/ImageTexture.h Mon Oct 15 12:37:08 2007
@@ -79,7 +79,7 @@
// that.
ImageTexture<Color>* LoadColorImageTexture( const std::string& file_name,
std::ostream* stream = 0 );
-
+
// Whatever type ValueType ends up being, it needs to have
// ValueType::ScalarType defined. I'm not sure what to do for
// things that aren't. If the occasion arrises such that you need
@@ -153,8 +153,10 @@
// interpolation.
weight_high = -weight_high;
}
- low %= size;
- high %= size;
+ if (low >= size)
+ low %= size;
+ if (high >= size)
+ high %= size;
break;
case Clamp:
if (val < 0) {
@@ -317,7 +319,7 @@
break;
}
}
-
+
} // end namespace Manta
#endif // Manta_Model_ImageTexture_h
- [Manta] r1777 - trunk/Model/Textures, boulos, 10/15/2007
Archive powered by MHonArc 2.6.16.