ED_view3d_draw_offscreen_imbuf_simple and ED_view3d_draw_offscreen_imbuf now accept the imbuf flag so they can get the float buffer from opengl directly.

This commit is contained in:
2010-08-26 23:30:15 +00:00
parent 50bce31dbb
commit ea3be03743
8 changed files with 19 additions and 18 deletions

View File

@@ -144,12 +144,8 @@ static void screen_opengl_render_apply(OGLRender *oglrender)
GPU_offscreen_unbind(oglrender->ofs); /* unbind */
}
else {
ImBuf *ibuf_view= ED_view3d_draw_offscreen_imbuf_simple(scene, oglrender->sizex, oglrender->sizey, OB_SOLID);
ibuf_view->profile = IB_PROFILE_NONE; /* ensures no conversion!, see note above */
IMB_float_from_rect(ibuf_view);
ImBuf *ibuf_view= ED_view3d_draw_offscreen_imbuf_simple(scene, oglrender->sizex, oglrender->sizey, IB_rectfloat, OB_SOLID);
memcpy(rr->rectf, ibuf_view->rect_float, sizeof(float) * 4 * oglrender->sizex * oglrender->sizey);
IMB_freeImBuf(ibuf_view);
}