Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrecht Van Lommel <brechtvanlommel@gmail.com>2019-05-15 00:36:50 +0300
committerBrecht Van Lommel <brechtvanlommel@gmail.com>2019-05-15 00:45:14 +0300
commitb20cefdab3086a80bbc70cb4e0e0912a914d8e82 (patch)
treeb5087aabb06bbe2b51bea35be65ed069691d175e /source/blender/blenlib
parentf4902fa268862c9c024b6d68a8b848dd00d2cd41 (diff)
Fix T64623: Freestyle procedural noise not consistent across platforms
Use the Blender RNG instead of rand() to solve it.
Diffstat (limited to 'source/blender/blenlib')
-rw-r--r--source/blender/blenlib/BLI_rand.h8
1 files changed, 8 insertions, 0 deletions
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__ */