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:
authorKent Mein <mein@cs.umn.edu>2007-09-13 18:33:21 +0400
committerKent Mein <mein@cs.umn.edu>2007-09-13 18:33:21 +0400
commit56dba392610691e60618a89a3c6b98fc360e3ea8 (patch)
treeab5634ea74ddcf480eb813697c6fe5a08f61e5ef /source/blender/src/drawview.c
parentb0348226649af80c3f178894e8b188f8e1254b88 (diff)
This is patch [#6772] Background image drawing speedup
Thanks goto Matthew Plough (meestaplu) I've tested it on linux with both an nvidia and an ATI card, I've also tested it on a mac and solaris, as well as through a remote display. So I think this one is pretty safe. If it causes problems on older systems we can revert it but I don't think we will have any issues with it. Kent
Diffstat (limited to 'source/blender/src/drawview.c')
-rw-r--r--source/blender/src/drawview.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/source/blender/src/drawview.c b/source/blender/src/drawview.c
index e1585fbbaa0..efef8dbcac8 100644
--- a/source/blender/src/drawview.c
+++ b/source/blender/src/drawview.c
@@ -436,10 +436,13 @@ static void draw_bgpic(void)
glPushMatrix();
glaDefine2DArea(&curarea->winrct);
+
glEnable(GL_BLEND);
- glPixelTransferf(GL_ALPHA_SCALE, (1.0f-bgpic->blend));
+
glPixelZoom(zoomx, zoomy);
- glaDrawPixelsSafe(x1, y1, ibuf->x, ibuf->y, ibuf->x, GL_RGBA, GL_UNSIGNED_BYTE, ibuf->rect);
+ glColor4f(1.0, 1.0, 1.0, 1.0-bgpic->blend);
+ glaDrawPixelsTex(x1, y1, ibuf->x, ibuf->y, GL_UNSIGNED_BYTE, ibuf->rect);
+
glPixelZoom(1.0, 1.0);
glPixelTransferf(GL_ALPHA_SCALE, 1.0f);