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:
authorAntony Riakiotakis <kalast@gmail.com>2014-03-29 02:11:35 +0400
committerAntony Riakiotakis <kalast@gmail.com>2014-03-29 02:11:35 +0400
commitaec4367226e16912709f43cc777a6afe9ee9e1e9 (patch)
tree87400240db969484d419948806d790151b7c8649 /source/blender
parentd3309ac5c9be791dbc45aafc8a79c94e184b406a (diff)
Fix building without openmp continued
Diffstat (limited to 'source/blender')
-rw-r--r--source/blender/editors/sculpt_paint/paint_cursor.c11
-rw-r--r--source/blender/editors/sculpt_paint/sculpt.c3
2 files changed, 11 insertions, 3 deletions
diff --git a/source/blender/editors/sculpt_paint/paint_cursor.c b/source/blender/editors/sculpt_paint/paint_cursor.c
index a3e69a1024b..81177dd8199 100644
--- a/source/blender/editors/sculpt_paint/paint_cursor.c
+++ b/source/blender/editors/sculpt_paint/paint_cursor.c
@@ -210,6 +210,13 @@ static int load_tex(Brush *br, ViewContext *vc, float zoom, bool col, bool prima
int i;
float y;
float len;
+ int thread_num;
+
+#ifdef _OPENMP
+ thread_num = omp_get_thread_num();
+#else
+ thread_num = 0;
+#endif
for (i = 0; i < size; i++) {
@@ -249,7 +256,7 @@ static int load_tex(Brush *br, ViewContext *vc, float zoom, bool col, bool prima
if (col) {
float rgba[4];
- paint_get_tex_pixel_col(mtex, x, y, rgba, pool, omp_get_thread_num());
+ paint_get_tex_pixel_col(mtex, x, y, rgba, pool, thread_num);
buffer[index * 4] = rgba[0] * 255;
buffer[index * 4 + 1] = rgba[1] * 255;
@@ -257,7 +264,7 @@ static int load_tex(Brush *br, ViewContext *vc, float zoom, bool col, bool prima
buffer[index * 4 + 3] = rgba[3] * 255;
}
else {
- float avg = paint_get_tex_pixel(mtex, x, y, pool, omp_get_thread_num());
+ float avg = paint_get_tex_pixel(mtex, x, y, pool, thread_num);
avg += br->texture_sample_bias;
diff --git a/source/blender/editors/sculpt_paint/sculpt.c b/source/blender/editors/sculpt_paint/sculpt.c
index b2f76d7ee3d..7752101c64c 100644
--- a/source/blender/editors/sculpt_paint/sculpt.c
+++ b/source/blender/editors/sculpt_paint/sculpt.c
@@ -988,9 +988,10 @@ static float tex_strength(SculptSession *ss, Brush *br,
x += br->mtex.ofs[0];
y += br->mtex.ofs[1];
- thread_num = 0;
#ifdef _OPENMP
thread_num = omp_get_thread_num();
+#else
+ thread_num = 0;
#endif
avg = paint_get_tex_pixel(&br->mtex, x, y, ss->tex_pool, thread_num);