Index: trunk/nv/core/common.hh
===================================================================
--- trunk/nv/core/common.hh	(revision 371)
+++ trunk/nv/core/common.hh	(revision 372)
@@ -136,4 +136,5 @@
 #define NV_RESTRICT __declspec(restrict)
 #define NV_RESTRICT_VAR __restrict
+#define NV_NOEXCEPT throw()
 //#define NV_CONSTEXPR 
 #elif NV_COMPILER == NV_GNUC || NV_COMPILER == NV_CLANG
@@ -143,4 +144,5 @@
 #define NV_RESTRICT __restrict__
 #define NV_RESTRICT_VAR __restrict__
+#define NV_NOEXCEPT noexcept
 //#define NV_CONSTEXPR constexpr 
 #else
@@ -150,4 +152,5 @@
 #define NV_RESTRICT
 #define NV_RESTRICT_VAR
+#define NV_NOEXCEPT 
 //#define NV_CONSTEXPR 
 #endif 
Index: trunk/nv/core/position.hh
===================================================================
--- trunk/nv/core/position.hh	(revision 371)
+++ trunk/nv/core/position.hh	(revision 372)
@@ -17,5 +17,4 @@
 #include <nv/stl/math.hh>
 #include <nv/stl/range.hh>
-#include <utility>
 
 namespace nv
Index: trunk/nv/core/random.hh
===================================================================
--- trunk/nv/core/random.hh	(revision 371)
+++ trunk/nv/core/random.hh	(revision 372)
@@ -10,5 +10,5 @@
 #include <nv/core/common.hh>
 #include <nv/stl/math.hh>
-#include <random>
+#include <nv/stl/type_traits.hh>
 
 namespace nv
@@ -18,6 +18,6 @@
 	{
 	public:
-		typedef std::mt19937::result_type result_type;
-		typedef std::mt19937::result_type seed_type;
+		typedef unsigned int result_type; // std::mt19937::result_type
+		typedef unsigned int seed_type;
 
 		random( seed_type seed = 0 );
@@ -38,6 +38,6 @@
 		{
 			return glm::detail::tvec2<T>( 
-				range_impl( min.x, max.x, std::is_floating_point<T>() ), 
-				range_impl( min.y, max.y, std::is_floating_point<T>() )
+				range_impl( min.x, max.x, is_floating_point<T>() ), 
+				range_impl( min.y, max.y, is_floating_point<T>() )
 				);
 		}
@@ -47,7 +47,7 @@
 		{
 			return glm::detail::tvec3<T>( 
-				range_impl( min.x, max.x, std::is_floating_point<T>() ), 
-				range_impl( min.y, max.y, std::is_floating_point<T>() ),
-				range_impl( min.z, max.z, std::is_floating_point<T>() )
+				range_impl( min.x, max.x, is_floating_point<T>() ), 
+				range_impl( min.y, max.y, is_floating_point<T>() ),
+				range_impl( min.z, max.z, is_floating_point<T>() )
 				);
 		}
@@ -57,8 +57,8 @@
 		{
 			return glm::detail::tvec4<T>( 
-				range_impl( min.x, max.x, std::is_floating_point<T>() ), 
-				range_impl( min.y, max.y, std::is_floating_point<T>() ),
-				range_impl( min.z, max.z, std::is_floating_point<T>() ), 
-				range_impl( min.w, max.w, std::is_floating_point<T>() ) 
+				range_impl( min.x, max.x, is_floating_point<T>() ), 
+				range_impl( min.y, max.y, is_floating_point<T>() ),
+				range_impl( min.z, max.z, is_floating_point<T>() ), 
+				range_impl( min.w, max.w, is_floating_point<T>() ) 
 				);
 		}
@@ -163,18 +163,17 @@
 
 		template <typename T>
-		T range_impl( T min, T max, const std::true_type& )
+		T range_impl( T min, T max, const true_type& )
 		{
-			std::uniform_real_distribution<T> dist( min, max );
-			return dist( rng );
+			return frange( min, max );
 		}
 
 		template <typename T>
-		T range_impl( T min, T max, const std::false_type& )
+		T range_impl( T min, T max, const false_type& )
 		{
-			std::uniform_int_distribution<T> dist( min, max );
-			return dist( rng );
+			return srange( min, max );
 		}
 	private:
-		std::mt19937 rng;
+		// temporary solution until we get rid of std::random
+		char m_data[16 * 1024];
 	};
 
Index: trunk/nv/core/types.hh
===================================================================
--- trunk/nv/core/types.hh	(revision 371)
+++ trunk/nv/core/types.hh	(revision 372)
@@ -12,4 +12,16 @@
 #include <unordered_map>
 #include <vector>
+
+namespace std
+{
+	template<>
+	struct hash < nv::type_index >
+	{
+		size_t operator()( nv::type_index key ) const
+		{
+			return ( key.hash_code() );
+		}
+	};
+}
 
 namespace nv
Index: trunk/nv/stl/memory.hh
===================================================================
--- trunk/nv/stl/memory.hh	(revision 371)
+++ trunk/nv/stl/memory.hh	(revision 372)
@@ -18,4 +18,5 @@
 #include <nv/core/common.hh>
 #include <nv/stl/type_traits.hh>
+#include <iterator>
 
 namespace nv
Index: trunk/nv/stl/string.hh
===================================================================
--- trunk/nv/stl/string.hh	(revision 371)
+++ trunk/nv/stl/string.hh	(revision 372)
@@ -294,4 +294,43 @@
 #endif
 
+	// These could be done much better
+	template <typename T>
+	struct is_cstring
+		: public integral_constant < bool,
+		is_same<       char *, typename std::decay< T >::type >::value ||
+		is_same< const char *, typename std::decay< T >::type >::value >
+	{
+	};
+
+	template <typename T>
+	struct is_stdstring
+		: public integral_constant < bool,
+		is_same< std::string, typename std::decay< T >::type >::value
+		>
+	{
+	};
+
+	template < typename T > struct is_string : public integral_constant < bool, is_stdstring<T>::value || is_cstring<T>::value > {};
+
+	template<typename T>
+	struct is_container
+	{
+	private:
+		typedef char                      yes;
+		typedef struct { char array[2]; } no;
+		template<typename C> static yes test( typename C::iterator* );
+		template<typename C> static no  test( ... );
+	public:
+		static const bool value = sizeof( test<T>( 0 ) ) == sizeof( yes );
+	};
+
+	template<>
+	struct is_container < std::string >
+	{
+		static const bool value = false;
+	};
+
+
+
 	class string_ref;
 
Index: trunk/nv/stl/type_traits.hh
===================================================================
--- trunk/nv/stl/type_traits.hh	(revision 371)
+++ trunk/nv/stl/type_traits.hh	(revision 372)
@@ -19,35 +19,304 @@
 #include <type_traits>
 #include <typeinfo>
-#include <string>
 
 namespace nv
 {
 
-	// These could be done much better
-	template <typename T>
-	struct is_cstring
-		: public std::integral_constant<bool,
-		std::is_same<       char *, typename std::decay< T >::type >::value ||
-		std::is_same< const char *, typename std::decay< T >::type >::value >
-		{};
-
-	template <typename T>
-	struct is_stdstring
-		: public std::integral_constant<bool,
-		std::is_same< std::string, typename std::decay< T >::type >::value 
-		>
-	{};
-
-	template < typename T > struct is_string : public std::integral_constant<bool, is_stdstring<T>::value || is_cstring<T>::value> {};
-
-	// Just for once, MSVC is the good guy, and everybody else sucks.
-	// Remove, once requiring standard-compliant CLANG/GCC versions.
-#if NV_COMPILER == NV_MSVC
-	using std::underlying_type;
-#elif NV_COMPILER == NV_CLANG
+	template< typename T, T VALUE>
+	struct integral_constant
+	{
+		static const T value = VALUE;
+		typedef T value_type;
+		typedef integral_constant<T, VALUE> type;
+		operator value_type() const { return ( value ); }
+	};
+
+	typedef integral_constant<bool, true> true_type;
+	typedef integral_constant<bool, false> false_type;
+
+	template< bool TEST, typename T = void>
+	struct enable_if {};
+
+	template< typename T > 
+	struct enable_if< true, T >
+	{
+		typedef T type;
+	};
+
+	template< bool TEST, typename T1, typename T2 >
+	struct conditional
+	{
+		typedef T2 type;
+	};
+
+	template< typename T1, typename T2>
+	struct conditional < true, T1, T2 >
+	{
+		typedef T1 type;
+	};
+
+	template< typename T1, typename T2 >
+	struct is_same : false_type {};
+
+	template< typename T >
+	struct is_same < T, T > : true_type{};
+
+	template< typename T >
+	struct is_lvalue_reference : false_type {};
+
+	template< typename T >
+	struct is_lvalue_reference < T& > : true_type{};
+
+	template< typename T >
+	struct is_rvalue_reference : false_type {};
+
+	template< typename T >
+	struct is_rvalue_reference < T&& > : true_type{};
+
+	template < typename T >
+	struct is_enum : integral_constant < bool, __is_enum( T ) > {};
+
+	template< typename T >
+	struct remove_reference
+	{
+		typedef T type;
+	};
+
+	template< typename T >
+	struct remove_reference < T& >
+	{
+		typedef T type;
+	};
+
+	template< typename T >
+	struct remove_reference < T&& >
+	{
+		typedef T type;
+	};
+
+	template< typename T >
+	struct remove_const
+	{
+		typedef T type;
+	};
+
+	template< typename T >
+	struct remove_const < const T >
+	{
+		typedef T type;
+	};
+
+	template< typename T >
+	struct remove_const < const T[] >
+	{
+		typedef T type[];
+	};
+
+	template< typename T, unsigned int N >
+	struct remove_const < const T[N] >
+	{
+		typedef T type[N];
+	};
+
+	template< typename T >
+	struct remove_volatile
+	{
+		typedef T type;
+	};
+
+	template< typename T >
+	struct remove_volatile < volatile T >
+	{
+		typedef T type;
+	};
+
+	template< typename T >
+	struct remove_volatile < volatile T[] >
+	{
+		typedef T type[];
+	};
+
+	template< typename T, unsigned int N >
+	struct remove_volatile < volatile T[N] >
+	{
+		typedef T type[N];
+	};
+
+	template< typename T >
+	struct remove_cv
+	{
+		typedef typename remove_const< typename remove_volatile<T>::type >::type
+			type;
+	};
+
+	namespace detail
+	{
+		// TODO: these seem to simple compared to MSVC/GCC - so we'll leave them in
+		// detail - research why it is so.
+		template < typename T >
+		struct is_const : public false_type {};
+		template < typename T >
+		struct is_const < T const > : public true_type {};
+		template < typename T > 
+		struct is_volatile : public false_type {};
+		template < typename T >
+		struct is_volatile < T volatile > : public true_type {};
+		// TODO END
+
+		template< typename T, bool CONST, bool VOLATILE>
+		struct cv_selector;
+
+		template< typename T >
+		struct cv_selector < T, false, false > { typedef T type; };
+
+		template< typename T >
+		struct cv_selector < T, true, false > { typedef const T type; };
+
+		template< typename T >
+		struct cv_selector < T, false, true > { typedef volatile T type; };
+
+		template< typename T >
+		struct cv_selector < T, true, true > { typedef const volatile T type; };
+
+		template< typename SOURCE, typename TARGET,
+			bool CONST    = is_const<SOURCE>::value,
+			bool VOLATILE = is_volatile<SOURCE>::value >
+		struct match_cv
+		{
+			typedef typename cv_selector< TARGET, CONST, VOLATILE >::type type;
+		};
+
+		template< typename T > 
+		struct is_integral_impl : false_type {};
+
+		template<> struct is_integral_impl< bool > : true_type {};
+		template<> struct is_integral_impl< char > : true_type {};
+		template<> struct is_integral_impl< signed char > : true_type {};
+		template<> struct is_integral_impl< unsigned char > : true_type {};
+		template<> struct is_integral_impl< wchar_t > : true_type {};
+		template<> struct is_integral_impl< signed short > : true_type {};
+		template<> struct is_integral_impl< unsigned short > : true_type {};
+		template<> struct is_integral_impl< signed int > : true_type {};
+		template<> struct is_integral_impl< unsigned int > : true_type {};
+		template<> struct is_integral_impl< signed long > : true_type {};
+		template<> struct is_integral_impl< unsigned long > : true_type {};
+		template<> struct is_integral_impl< sint64 > : true_type {};
+		template<> struct is_integral_impl< uint64 > : true_type {};
+
+		template< typename T > struct is_floating_point_impl : false_type {};
+
+		template<> struct is_floating_point_impl< float > : true_type{};
+		template<> struct is_floating_point_impl< double > : true_type{};
+		template<> struct is_floating_point_impl< long double > : true_type{};
+
+		template < typename T > 
+		struct signed_type
+		{
+			typedef T type;
+		};
+
+		template<> struct signed_type < char > { typedef signed char type; };
+		template<> struct signed_type < unsigned char > { typedef signed char type; };
+		template<> struct signed_type < unsigned short > { typedef signed short type; };
+		template<> struct signed_type < unsigned int > { typedef signed int type; };
+		template<> struct signed_type < unsigned long > { typedef signed long type; };
+		template<> struct signed_type < uint64 > { typedef sint64 type; };
+
+		template < typename T >
+		struct unsigned_type
+		{
+			typedef T type;
+		};
+
+		template<> struct unsigned_type < char > { typedef unsigned char type; };
+		template<> struct unsigned_type < signed char > { typedef unsigned char type; };
+		template<> struct unsigned_type < signed short > { typedef unsigned short type; };
+		template<> struct unsigned_type < signed int > { typedef unsigned int type; };
+		template<> struct unsigned_type < signed long > { typedef unsigned long type; };
+		template<> struct unsigned_type < sint64 > { typedef uint64 type; };
+
+		template < typename T, bool IS_ENUM = is_enum< T >::value >
+		struct make_signed_impl;
+
+		template < typename T >
+		struct make_signed_impl < T, false >
+		{
+		private:
+			typedef signed_type<typename remove_cv<T>::type> signed_type_result;
+		public:
+			typedef match_cv< T, typename signed_type_result::type > type;
+		};
+
+		template < typename T >
+		struct make_signed_impl < T, true >
+		{
+		private:
+			static const bool size1test = sizeof( T ) <= sizeof( signed char );
+			static const bool size2test = sizeof( T ) <= sizeof( signed short );
+			static const bool size4test = sizeof( T ) <= sizeof( signed int );
+			typedef typename conditional<size4test, signed int, signed long>::type test4type;
+			typedef typename conditional<size2test, signed short, test4type>::type test2type;
+		public:
+			typedef typename conditional<size1test, signed char, test2type>::type type;
+		};
+
+		template < typename T, bool IS_ENUM = is_enum< T >::value >
+		struct make_unsigned_impl;
+
+		template < typename T >
+		struct make_unsigned_impl < T, false >
+		{
+		private:
+			typedef unsigned_type<typename remove_cv<T>::type> unsigned_type_result;
+		public:
+			typedef match_cv< T, typename unsigned_type_result::type > type;
+		};
+
+		template < typename T >
+		struct make_unsigned_impl < T, true >
+		{
+		private:
+			static const bool size1test = sizeof( T ) <= sizeof( unsigned char );
+			static const bool size2test = sizeof( T ) <= sizeof( unsigned short );
+			static const bool size4test = sizeof( T ) <= sizeof( unsigned int );
+			typedef typename conditional<size4test, unsigned int, unsigned long>::type test4type;
+			typedef typename conditional<size2test, unsigned short, test4type>::type test2type;
+		public:
+			typedef typename conditional<size1test, unsigned char, test2type>::type type;
+		};
+	}
+
+	template < typename T >
+	struct make_signed
+	{
+		typedef typename detail::make_signed_impl<T>::type type;
+	};
+
+	template <> struct make_signed < bool > ;
+
+	template < typename T >
+	struct make_unsigned
+	{ 
+		typedef typename detail::make_unsigned_impl<T>::type type;
+	};
+	
+	template <> struct make_unsigned < bool > ;
+
+
+	template< typename T > 
+	struct is_integral : detail::is_integral_impl< typename remove_cv<T>::type >
+	{
+	};
+
+	template< typename T > 
+	struct is_floating_point : detail::is_floating_point_impl< typename remove_cv<T>::type >
+	{
+	};
+
+#if NV_COMPILER == NV_MSVC || NV_COMPILER == NV_CLANG
 	template < typename T >
 	struct underlying_type
 	{
-		typedef __underlying_type(T) type;
+		typedef __underlying_type( T ) type;
 	};
 #else
@@ -55,9 +324,9 @@
 	struct underlying_type
 	{
-		typedef typename std::conditional<
+		typedef typename conditional <
 			T( -1 ) < T( 0 ),
-			typename std::make_signed< T >::type,
-			typename std::make_unsigned< T >::type
-			>::type type;
+			typename make_signed< T >::type,
+			typename make_unsigned< T >::type
+			> ::type type;
 	};
 #endif
@@ -128,21 +397,4 @@
 	};
 
-	template<typename T>
-	struct is_container
-	{
-	private:
-		typedef char                      yes;
-		typedef struct { char array[2]; } no;
-		template<typename C> static yes test(typename C::iterator*);
-		template<typename C> static no  test(...);
-	public:
-		static const bool value = sizeof(test<T>(0)) == sizeof(yes);
-	};
-
-	template<>
-	struct is_container< std::string > {
-		static const bool value = false;
-	};
-
 	template <typename TYPE> 
 	void construct_object(void* object)
@@ -163,7 +415,7 @@
 
 	template< typename T >
-	struct base_underlying_type_helper< T, std::true_type >
-	{
-		typedef typename nv::underlying_type<T>::type type;
+	struct base_underlying_type_helper< T, true_type >
+	{
+		typedef typename underlying_type<T>::type type;
 	};
 
@@ -172,5 +424,5 @@
 	struct base_underlying_type
 	{
-		typedef typename base_underlying_type_helper< T, typename std::is_enum<T>::type >::type type;
+		typedef typename base_underlying_type_helper< T, typename is_enum<T>::type >::type type;
 	};
 
@@ -218,15 +470,3 @@
 }
 
-namespace std
-{
-	template<>
-	struct hash< nv::type_index >
-	{
-		size_t operator()( nv::type_index key ) const
-		{
-			return ( key.hash_code() );
-		}
-	};
-}
-
 #endif // NV_CORE_TYPE_TRAITS_HH
Index: trunk/nv/stl/utility.hh
===================================================================
--- trunk/nv/stl/utility.hh	(revision 372)
+++ trunk/nv/stl/utility.hh	(revision 372)
@@ -0,0 +1,50 @@
+// Copyright (C) 2014 ChaosForge Ltd
+// http://chaosforge.org/
+//
+// This file is part of NV Libraries.
+// For conditions of distribution and use, see copyright notice in nv.hh
+
+/**
+* @file utility.hh
+* @author Kornel Kisielewicz epyon@chaosforge.org
+* @brief STL utility library
+*/
+
+#ifndef NV_STL_UTILITY_HH
+#define NV_STL_UTILITY_HH
+
+#include <nv/core/common.hh>
+
+namespace nv
+{
+
+	template< typename T >
+	inline typename remove_reference<T>::type&& move( T&& arg ) NV_NOEXCEPT
+	{
+		return ( ( typename remove_reference<T>::type&& )arg );
+	}
+
+	template < typename T >
+	inline T&& forward( typename remove_reference<T>::type& t ) NV_NOEXCEPT
+	{
+		return static_cast<T&&>( t );
+	}
+
+	template < typename T >
+	inline T&& forward( typename remove_reference<T>::type&& t ) NV_NOEXCEPT
+	{
+		static_assert( !is_lvalue_reference<T>::value, "Can not forward an rvalue as an lvalue." );
+		return static_cast<T&&>( t );
+	}
+
+	template< typename T >
+	void swap( T& x, T& y )
+	{
+		T t = move( x );
+		x = move( y );
+		y = move( t );
+	}
+
+}
+
+#endif NV_STL_UTILITY_HH
Index: trunk/src/core/random.cc
===================================================================
--- trunk/src/core/random.cc	(revision 371)
+++ trunk/src/core/random.cc	(revision 372)
@@ -7,15 +7,17 @@
 #include "nv/core/random.hh"
 #include "nv/core/time.hh"
+#include <random>
 
 using namespace nv;
 
 random::random( random::seed_type seed /*= 0 */ )
-	: rng( seed == 0 ? randomized_seed() : seed )
-{
-	
+{
+	static_assert( sizeof( std::mt19937 ) < sizeof( random::m_data ), "No room for mersenne twister!" );
+	new (m_data)std::mt19937( seed == 0 ? randomized_seed() : seed );
 }
 
 random::seed_type random::randomize()
 {
+	std::mt19937& rng = *(( std::mt19937* )m_data);
 	seed_type seed = randomized_seed();
 	rng.seed( seed );
@@ -25,4 +27,5 @@
 void random::set_seed( random::seed_type seed /*= 0 */ )
 {
+	std::mt19937& rng = *( ( std::mt19937* )m_data );
 	rng.seed( seed == 0 ? randomized_seed() : seed );
 }
@@ -36,4 +39,5 @@
 random::result_type random::rand()
 {
+	std::mt19937& rng = *( ( std::mt19937* )m_data );
 	return rng();
 }
@@ -41,4 +45,5 @@
 sint32 random::srand( sint32 val )
 {
+	std::mt19937& rng = *( ( std::mt19937* )m_data );
 	std::uniform_int_distribution<sint32> dist( 0, val - 1 );
 	return dist( rng );
@@ -47,4 +52,5 @@
 uint32 random::urand( uint32 val )
 {
+	std::mt19937& rng = *( ( std::mt19937* )m_data );
 	std::uniform_int_distribution<uint32> dist( 0, val - 1 );
 	return dist( rng );
@@ -53,4 +59,5 @@
 f32 random::frand( f32 val )
 {
+	std::mt19937& rng = *( ( std::mt19937* )m_data );
 	std::uniform_real_distribution<f32> dist( 0, val );
 	return dist( rng );
@@ -59,4 +66,5 @@
 sint32 random::srange( sint32 min, sint32 max )
 {
+	std::mt19937& rng = *( ( std::mt19937* )m_data );
 	std::uniform_int_distribution<sint32> dist( min, max );
 	return dist( rng );
@@ -65,4 +73,5 @@
 uint32 random::urange( uint32 min, uint32 max )
 {
+	std::mt19937& rng = *( ( std::mt19937* )m_data );
 	std::uniform_int_distribution<uint32> dist( min, max );
 	return dist( rng );
@@ -71,4 +80,5 @@
 f32 random::frange( f32 min, f32 max )
 {
+	std::mt19937& rng = *( ( std::mt19937* )m_data );
 	std::uniform_real_distribution<f32> dist( min, max );
 	return dist( rng );
@@ -77,4 +87,5 @@
 uint32 random::dice( uint32 count, uint32 sides )
 {
+	std::mt19937& rng = *( ( std::mt19937* )m_data );
 	std::uniform_int_distribution<uint32> dist( 1, sides );
 	uint32 result = 0;
@@ -88,4 +99,6 @@
 random::seed_type random::randomized_seed()
 {
+	// TODO: this seems off, as it might often seed the same, use general time 
+	// instead
 	return narrow_cast< seed_type >( get_ticks() );
 }
@@ -93,4 +106,5 @@
 nv::vec2 nv::random::precise_unit_vec2()
 {
+	std::mt19937& rng = *( ( std::mt19937* )m_data );
 	std::uniform_real_distribution<f32> dist( 0, glm::pi<float>() * 2.f );
 	float angle = dist( rng );
@@ -100,4 +114,5 @@
 nv::vec3 nv::random::precise_unit_vec3()
 {
+	std::mt19937& rng = *( ( std::mt19937* )m_data );
 	std::uniform_real_distribution<f32> dist11( -1.0f, 1.0f );
 	std::uniform_real_distribution<f32> dist02pi( 0.0f, 2*glm::pi<float>() );
@@ -114,4 +129,5 @@
 nv::vec2 nv::random::fast_disk_point()
 {
+	std::mt19937& rng = *( ( std::mt19937* )m_data );
 	std::uniform_real_distribution<f32> dist( 0.0f, 1.0f );
 	float r1 = dist( rng );
@@ -124,4 +140,5 @@
 nv::vec2 nv::random::precise_disk_point()
 {
+	std::mt19937& rng = *( ( std::mt19937* )m_data );
 	std::uniform_real_distribution<f32> unit( 0.0f, 1.0f );
 	std::uniform_real_distribution<f32> angle( 0.0f, glm::pi<float>() );
@@ -133,4 +150,5 @@
 nv::vec3 nv::random::fast_sphere_point()
 {
+	std::mt19937& rng = *( ( std::mt19937* )m_data );
 	std::uniform_real_distribution<f32> dist01( 0.0f, 1.0f );
 	std::uniform_real_distribution<f32> dist11( -1.0f, 1.0f );
@@ -150,4 +168,5 @@
 nv::vec3 nv::random::precise_sphere_point()
 {
+	std::mt19937& rng = *( ( std::mt19937* )m_data );
 	std::uniform_real_distribution<f32> dist01( 0.0f, 1.0f );
 	std::uniform_real_distribution<f32> dist11( -1.0f, 1.0f );
@@ -166,4 +185,5 @@
 nv::vec2 nv::random::precise_ellipse_point( const vec2& radii )
 {
+	std::mt19937& rng = *( ( std::mt19937* )m_data );
 	std::uniform_real_distribution<f32> distx( -radii.x, radii.x );
 	std::uniform_real_distribution<f32> disty( -radii.y, radii.y );
@@ -184,4 +204,5 @@
 nv::vec3 nv::random::precise_ellipsoid_point( const vec3& radii )
 {
+	std::mt19937& rng = *( ( std::mt19937* )m_data );
 	std::uniform_real_distribution<f32> distx( -radii.x, radii.x );
 	std::uniform_real_distribution<f32> disty( -radii.y, radii.y );
@@ -204,4 +225,5 @@
 nv::vec2 nv::random::fast_hollow_disk_point( float iradius, float oradius )
 {
+	std::mt19937& rng = *( ( std::mt19937* )m_data );
 	float idist2 = iradius * iradius;
 	float odist2 = oradius * oradius;
@@ -217,4 +239,5 @@
 nv::vec3 nv::random::fast_hollow_sphere_point( float iradius, float oradius )
 {
+	std::mt19937& rng = *( ( std::mt19937* )m_data );
 	float idist3 = iradius * iradius * iradius;
 	float odist3 = oradius * oradius * oradius;
@@ -231,5 +254,6 @@
 nv::vec2 nv::random::fast_hollow_ellipse_point( const vec2& iradii, const vec2& oradii )
 {
-	vec2 iradii2    = iradii * iradii;
+	std::mt19937& rng = *( ( std::mt19937* )m_data );
+	vec2 iradii2 = iradii * iradii;
 	vec2 opoint     = ellipse_edge( oradii );
 	vec2 opoint2    = opoint * opoint;
@@ -251,5 +275,6 @@
 nv::vec3 nv::random::fast_hollow_ellipsoid_point( const vec3& iradii, const vec3& oradii )
 {
-	vec3 iradii2    = iradii * iradii;
+	std::mt19937& rng = *( ( std::mt19937* )m_data );
+	vec3 iradii2 = iradii * iradii;
 	vec3 opoint     = ellipsoid_edge( oradii );
 	vec3 opoint2    = opoint * opoint;
