diff options
author | Clément Foucault <foucault.clem@gmail.com> | 2017-02-24 03:20:30 +0300 |
---|---|---|
committer | Clément Foucault <foucault.clem@gmail.com> | 2017-02-24 03:26:45 +0300 |
commit | ccec97ea0a43dc2c3befbabe26474a890ac7f26f (patch) | |
tree | 889ce0effcd8baac74108ba5a0d30147a49e5e78 /source/blender/editors/space_view3d/view3d_draw_legacy.c | |
parent | c9e8584e7f9af60f9e7b6d1ae136915e300a52cb (diff) |
Opengl glaDrawPixels removal: editors/spaces
Diffstat (limited to 'source/blender/editors/space_view3d/view3d_draw_legacy.c')
-rw-r--r-- | source/blender/editors/space_view3d/view3d_draw_legacy.c | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/source/blender/editors/space_view3d/view3d_draw_legacy.c b/source/blender/editors/space_view3d/view3d_draw_legacy.c index 84f0e296a1f..e7b76c47177 100644 --- a/source/blender/editors/space_view3d/view3d_draw_legacy.c +++ b/source/blender/editors/space_view3d/view3d_draw_legacy.c @@ -780,16 +780,12 @@ static void view3d_draw_bgpic(Scene *scene, ARegion *ar, View3D *v3d, zoomy *= -1.0f; y1 = y2; } - glPixelZoom(zoomx, zoomy); - glColor4f(1.0f, 1.0f, 1.0f, 1.0f - bgpic->blend); - /* could not use glaDrawPixelsAuto because it could fallback to - * glaDrawPixelsSafe in some cases, which will end up in missing - * alpha transparency for the background image (sergey) - */ - glaDrawPixelsTex(x1 - centx, y1 - centy, ibuf->x, ibuf->y, GL_RGBA, GL_UNSIGNED_BYTE, GL_LINEAR, ibuf->rect); + float col[4] = {1.0f, 1.0f, 1.0f, 1.0f - bgpic->blend}; + glUseProgram(0); /* immDrawPixelsTex use it's own shader */ + immDrawPixelsTex(x1 - centx, y1 - centy, ibuf->x, ibuf->y, GL_RGBA, GL_UNSIGNED_BYTE, GL_LINEAR, ibuf->rect, + zoomx, zoomy, col); - glPixelZoom(1.0, 1.0); glPixelTransferf(GL_ALPHA_SCALE, 1.0f); glMatrixMode(GL_PROJECTION); |