diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2015-11-17 13:31:35 +0300 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2015-11-17 13:31:35 +0300 |
commit | d81b9555e5c095354b4d474b51981b4594c9a6e0 (patch) | |
tree | 36e7a76073f53badedd6633a5bdb64ef50911189 /source | |
parent | a3530b35bdbbaf214f4113915e6e7a672fef2cbd (diff) |
Fix T46793: VSE OpenGL renderer crashes when using grease pencil
Own regression in recent speedup commit.
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/editors/render/render_opengl.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/source/blender/editors/render/render_opengl.c b/source/blender/editors/render/render_opengl.c index 04c1d682cde..a194178ef40 100644 --- a/source/blender/editors/render/render_opengl.c +++ b/source/blender/editors/render/render_opengl.c @@ -254,7 +254,6 @@ static void screen_opengl_render_doit(OGLRender *oglrender, RenderResult *rr) RegionView3D *rv3d = oglrender->rv3d; Object *camera = NULL; ImBuf *ibuf; - float *rectf = RE_RenderViewGetById(rr, oglrender->view_id)->rectf; int sizex = oglrender->sizex; int sizey = oglrender->sizey; const short view_context = (v3d != NULL); @@ -303,6 +302,7 @@ static void screen_opengl_render_doit(OGLRender *oglrender, RenderResult *rr) if (gpd) { int i; unsigned char *gp_rect; + unsigned char *rect = (unsigned char*)RE_RenderViewGetById(rr, oglrender->view_id)->rect32; GPU_offscreen_bind(oglrender->ofs, true); @@ -319,12 +319,8 @@ static void screen_opengl_render_doit(OGLRender *oglrender, RenderResult *rr) gp_rect = MEM_mallocN(sizex * sizey * sizeof(unsigned char) * 4, "offscreen rect"); GPU_offscreen_read_pixels(oglrender->ofs, GL_UNSIGNED_BYTE, gp_rect); - BLI_assert(rectf != NULL); - for (i = 0; i < sizex * sizey * 4; i += 4) { - float col_src[4]; - rgba_uchar_to_float(col_src, &gp_rect[i]); - blend_color_mix_float(&rectf[i], &rectf[i], col_src); + blend_color_mix_byte(&rect[i], &rect[i], &gp_rect[i]); } GPU_offscreen_unbind(oglrender->ofs, true); |