diff options
author | Clément Foucault <foucault.clem@gmail.com> | 2017-02-24 03:16:33 +0300 |
---|---|---|
committer | Clément Foucault <foucault.clem@gmail.com> | 2017-02-24 03:26:45 +0300 |
commit | 6628446bdf47ae526e89755e5b0e31702a88457c (patch) | |
tree | ca9dabaabd0e697820ceb3150d1db86919344e51 /source/blender/editors | |
parent | 44ea6fb857fc9ea3b51734fb3782d8bfb5c05de6 (diff) |
Opengl glaDrawPixels removal: editors/render
Diffstat (limited to 'source/blender/editors')
-rw-r--r-- | source/blender/editors/render/render_internal.c | 20 | ||||
-rw-r--r-- | source/blender/editors/render/render_preview.c | 3 |
2 files changed, 11 insertions, 12 deletions
diff --git a/source/blender/editors/render/render_internal.c b/source/blender/editors/render/render_internal.c index 950214b895a..abb65d1ef13 100644 --- a/source/blender/editors/render/render_internal.c +++ b/source/blender/editors/render/render_internal.c @@ -1537,11 +1537,10 @@ void render_view3d_draw(RenderEngine *engine, const bContext *C) if (force_fallback == false) { if (IMB_colormanagement_setup_glsl_draw(&scene->view_settings, &scene->display_settings, dither, true)) { glEnable(GL_BLEND); - glColor4f(1.0f, 1.0f, 1.0f, 1.0f); - glPixelZoom(scale_x, scale_y); - glaDrawPixelsTex(xof, yof, rres.rectx, rres.recty, - GL_RGBA, GL_FLOAT, GL_NEAREST, rres.rectf); - glPixelZoom(1.0f, 1.0f); + glUseProgram(0); /* immDrawPixelsTex use it's own shader */ + immDrawPixelsTex(xof, yof, rres.rectx, rres.recty, + GL_RGBA, GL_FLOAT, GL_NEAREST, rres.rectf, + scale_x, scale_y, NULL);; glDisable(GL_BLEND); IMB_colormanagement_finish_glsl_draw(); @@ -1558,12 +1557,11 @@ void render_view3d_draw(RenderEngine *engine, const bContext *C) 4, dither, &scene->view_settings, &scene->display_settings); glEnable(GL_BLEND); - glColor4f(1.0f, 1.0f, 1.0f, 1.0f); - glPixelZoom(scale_x, scale_y); - glaDrawPixelsAuto(xof, yof, rres.rectx, rres.recty, - GL_RGBA, GL_UNSIGNED_BYTE, - GL_NEAREST, display_buffer); - glPixelZoom(1.0f, 1.0f); + glUseProgram(0); /* immDrawPixelsTex use it's own shader */ + immDrawPixelsTex(xof, yof, rres.rectx, rres.recty, + GL_RGBA, GL_UNSIGNED_BYTE, + GL_NEAREST, display_buffer, + scale_x, scale_y, NULL); glDisable(GL_BLEND); MEM_freeN(display_buffer); diff --git a/source/blender/editors/render/render_preview.c b/source/blender/editors/render/render_preview.c index b4c92ef0f9a..c651cfdce02 100644 --- a/source/blender/editors/render/render_preview.c +++ b/source/blender/editors/render/render_preview.c @@ -599,7 +599,8 @@ static bool ed_preview_draw_rect(ScrArea *sa, int split, int first, rcti *rect, if (re) RE_AcquiredResultGet32(re, &rres, (unsigned int *)rect_byte, 0); - glaDrawPixelsSafe(fx, fy, rres.rectx, rres.recty, rres.rectx, GL_RGBA, GL_UNSIGNED_BYTE, rect_byte); + immDrawPixelsTex(fx, fy, rres.rectx, rres.recty, GL_RGBA, GL_UNSIGNED_BYTE, GL_NEAREST, rect_byte, + 1.0f, 1.0f, NULL); MEM_freeN(rect_byte); |