diff options
author | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2012-03-28 13:07:10 +0400 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2012-03-28 13:07:10 +0400 |
commit | 33740c5eb56884929b70a394e5b3dc7ceb0cfc91 (patch) | |
tree | 9c70fcb068f0514a4fccaaf399e0606f8f4119b5 /source/blender/editors/space_view3d | |
parent | 30d128c7a723bb6ed68c763d175c845e1cfa3c4f (diff) |
Cycles: viewport rendered draw mode now shows background images, also changed the
image editor checkerboard pattern to be the same as cycles viewport.
Diffstat (limited to 'source/blender/editors/space_view3d')
-rw-r--r-- | source/blender/editors/space_view3d/view3d_draw.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/source/blender/editors/space_view3d/view3d_draw.c b/source/blender/editors/space_view3d/view3d_draw.c index b6ed8f65c68..59a19782f1d 100644 --- a/source/blender/editors/space_view3d/view3d_draw.c +++ b/source/blender/editors/space_view3d/view3d_draw.c @@ -2728,6 +2728,7 @@ static int view3d_main_area_draw_engine(const bContext *C, ARegion *ar) RegionView3D *rv3d = CTX_wm_region_view3d(C); RenderEngineType *type; + /* create render engine */ if (!rv3d->render_engine) { type = RE_engines_find(scene->r.engine); @@ -2738,13 +2739,21 @@ static int view3d_main_area_draw_engine(const bContext *C, ARegion *ar) type->view_update(rv3d->render_engine, C); } + /* setup view matrices */ view3d_main_area_setup_view(scene, v3d, ar, NULL, NULL); + /* background draw */ glClearColor(0.0f, 0.0f, 0.0f, 0.0f); glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); ED_region_pixelspace(ar); + /* render result draw */ + if (v3d->flag & V3D_DISPBGPICS) + draw_bgpic(scene, ar, v3d); + else + fdrawcheckerboard(0, 0, ar->winx, ar->winy); + type = rv3d->render_engine->type; type->view_draw(rv3d->render_engine, C); |