Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'source/blender/editors/space_view3d/view3d_draw.c')
-rw-r--r--source/blender/editors/space_view3d/view3d_draw.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/source/blender/editors/space_view3d/view3d_draw.c b/source/blender/editors/space_view3d/view3d_draw.c
index 20b1df6ef2c..32e553262e2 100644
--- a/source/blender/editors/space_view3d/view3d_draw.c
+++ b/source/blender/editors/space_view3d/view3d_draw.c
@@ -2379,7 +2379,7 @@ ImBuf *ED_view3d_draw_offscreen_imbuf(Scene *scene, View3D *v3d, ARegion *ar, in
glPushAttrib(GL_LIGHTING_BIT);
/* bind */
- ofs= GPU_offscreen_create(&sizex, &sizey, err_out);
+ ofs= GPU_offscreen_create(sizex, sizey, err_out);
if(ofs == NULL)
return NULL;
@@ -2403,9 +2403,9 @@ ImBuf *ED_view3d_draw_offscreen_imbuf(Scene *scene, View3D *v3d, ARegion *ar, in
ibuf= IMB_allocImBuf(sizex, sizey, 32, flag);
if(ibuf->rect_float)
- glReadPixels(0, 0, sizex, sizey, GL_RGBA, GL_FLOAT, ibuf->rect_float);
+ GPU_offscreen_read_pixels(ofs, GL_FLOAT, ibuf->rect_float);
else if(ibuf->rect)
- glReadPixels(0, 0, sizex, sizey, GL_RGBA, GL_UNSIGNED_BYTE, ibuf->rect);
+ GPU_offscreen_read_pixels(ofs, GL_UNSIGNED_BYTE, ibuf->rect);
//if((scene->r.stamp & R_STAMP_ALL) && (scene->r.stamp & R_STAMP_DRAW))
// BKE_stamp_buf(scene, NULL, rr->rectf, rr->rectx, rr->recty, 4);