From b20cefdab3086a80bbc70cb4e0e0912a914d8e82 Mon Sep 17 00:00:00 2001 From: Brecht Van Lommel Date: Tue, 14 May 2019 23:36:50 +0200 Subject: Fix T64623: Freestyle procedural noise not consistent across platforms Use the Blender RNG instead of rand() to solve it. --- source/blender/blenlib/BLI_rand.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'source/blender/blenlib') diff --git a/source/blender/blenlib/BLI_rand.h b/source/blender/blenlib/BLI_rand.h index 151b02a33aa..eec4e885493 100644 --- a/source/blender/blenlib/BLI_rand.h +++ b/source/blender/blenlib/BLI_rand.h @@ -25,6 +25,10 @@ * \brief Random number functions. */ +#ifdef __cplusplus +extern "C" { +#endif + /* RNG is an abstract random number generator type that avoids using globals. * Always use this instead of the global RNG unless you have a good reason, * the global RNG is not thread safe and will not give repeatable results. @@ -106,4 +110,8 @@ void BLI_hammersley_1d(unsigned int n, double *r); void BLI_halton_2d_sequence(unsigned int prime[2], double offset[2], int n, double *r); void BLI_hammersley_2d_sequence(unsigned int n, double *r); +#ifdef __cplusplus +} +#endif + #endif /* __BLI_RAND_H__ */ -- cgit v1.2.3