forked from bartvdbraak/blender
Fix building without openmp continued
This commit is contained in:
parent
d3309ac5c9
commit
aec4367226
@ -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;
|
||||
|
||||
|
@ -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);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user