diff options
author | Mike Erwin <significant.bit@gmail.com> | 2015-12-27 06:23:12 +0300 |
---|---|---|
committer | Mike Erwin <significant.bit@gmail.com> | 2016-01-04 09:38:49 +0300 |
commit | d2b4f9c627e6a9621797d7b9b8b3b83d3bfc2db5 (patch) | |
tree | ad136cfdaf45d9554637ae777882a98e998e7f57 /source/blender/editors/space_view3d/drawobject.c | |
parent | ed2daace76c0a101ce929031cfdbb7c3269df363 (diff) |
OpenGL: image drawing tweaks
- no need to allocate client memory up front
- delete unneeded GL calls
- set default alpha test function on exit
Diffstat (limited to 'source/blender/editors/space_view3d/drawobject.c')
-rw-r--r-- | source/blender/editors/space_view3d/drawobject.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/source/blender/editors/space_view3d/drawobject.c b/source/blender/editors/space_view3d/drawobject.c index 41b22f49613..f3a3472f0cf 100644 --- a/source/blender/editors/space_view3d/drawobject.c +++ b/source/blender/editors/space_view3d/drawobject.c @@ -663,13 +663,12 @@ static void draw_empty_image(Object *ob, const short dflag, const unsigned char /* Draw the Image on the screen */ glaDrawPixelsTex(ofs_x, ofs_y, ima_x, ima_y, GL_RGBA, GL_UNSIGNED_BYTE, zoomfilter, ibuf->rect); - glPixelTransferf(GL_ALPHA_SCALE, 1.0f); glDisable(GL_BLEND); if (use_clip) { glDisable(GL_ALPHA_TEST); - glAlphaFunc(GL_GREATER, 0.0f); + glAlphaFunc(GL_ALWAYS, 0.0f); } } @@ -686,7 +685,6 @@ static void draw_empty_image(Object *ob, const short dflag, const unsigned char glEnd(); /* Reset GL settings */ - glMatrixMode(GL_MODELVIEW); glPopMatrix(); BKE_image_release_ibuf(ima, ibuf, NULL); |