diff options
author | Campbell Barton <ideasman42@gmail.com> | 2010-10-20 13:18:55 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2010-10-20 13:18:55 +0400 |
commit | a044486d7d8faf3acc32d7c1d6dbf505c03e3631 (patch) | |
tree | b329a5de607c5aff7ae60e202347a0eefb025d5d /source/blender/editors | |
parent | c2aa5d6dc01dbc42ef9815bdbe8917b6164bf840 (diff) |
[#24267] Hook fails after Solidify
Solidify modifier wasn't assigning origindex values.
- BLI_math.h array functions: range_vni(), mul_vn_fl(), mul_vn_vn_fl(), add_vn_vn(), fill_vni().
- define 'AT' as __FILE__ ":" STRINGIFY(__LINE__), useful for quick debug prints.
Diffstat (limited to 'source/blender/editors')
-rw-r--r-- | source/blender/editors/render/render_opengl.c | 15 |
1 files changed, 3 insertions, 12 deletions
diff --git a/source/blender/editors/render/render_opengl.c b/source/blender/editors/render/render_opengl.c index 825a6fc7043..ef56a596855 100644 --- a/source/blender/editors/render/render_opengl.c +++ b/source/blender/editors/render/render_opengl.c @@ -157,8 +157,7 @@ static void screen_opengl_render_apply(OGLRender *oglrender) float winmat_jitter[4][4]; float *accum_buffer= MEM_mallocN(sizex * sizey * sizeof(float) * 4, "accum1"); float *accum_tmp= MEM_mallocN(sizex * sizey * sizeof(float) * 4, "accum2"); - int j, i; - float *from, *to; + int j; /* first sample buffer, also initializes 'rv3d->persmat' */ ED_view3d_draw_offscreen(scene, v3d, ar, sizex, sizey, NULL, winmat); @@ -171,19 +170,11 @@ static void screen_opengl_render_apply(OGLRender *oglrender) ED_view3d_draw_offscreen(scene, v3d, ar, sizex, sizey, NULL, winmat_jitter); glReadPixels(0, 0, sizex, sizey, GL_RGBA, GL_FLOAT, accum_tmp); - - i= (sizex*sizey * 4) - 1; - from= accum_tmp; - to= accum_buffer; - do {*to++ += *from++; } while (i--); + add_vn_vn(accum_buffer, accum_tmp, sizex*sizey*sizeof(float)); } - from= accum_buffer; - to= rr->rectf; + mul_vn_vn_fl(rr->rectf, accum_buffer, sizex*sizey*sizeof(float), 1.0/SAMPLES); - i= (sizex * sizey * 4) - 1; - do { *to++= *from++ * (1.0/SAMPLES); } while (i--); - MEM_freeN(accum_buffer); MEM_freeN(accum_tmp); } |