diff options
author | Ton Roosendaal <ton@blender.org> | 2006-04-01 16:53:51 +0400 |
---|---|---|
committer | Ton Roosendaal <ton@blender.org> | 2006-04-01 16:53:51 +0400 |
commit | 766e6fe32184eaa51ce299dbf3082dc1aee78b4f (patch) | |
tree | 6735d8272900e1fa3fc2f731c2e29e625288e9d5 | |
parent | a82910b1b9a5ff1223763f7ff84503f67d7a9075 (diff) |
Sequence render bug: pressing ANIM didn't update renderwindow, when files
for input were 32 bits.
-rw-r--r-- | source/blender/src/renderwin.c | 30 |
1 files changed, 21 insertions, 9 deletions
diff --git a/source/blender/src/renderwin.c b/source/blender/src/renderwin.c index 0816618d7ca..8032d443b8f 100644 --- a/source/blender/src/renderwin.c +++ b/source/blender/src/renderwin.c @@ -791,7 +791,8 @@ static void glaDrawPixelsSafe_to32(float fx, float fy, int img_w, int img_h, int static void renderwin_progress(RenderWin *rw, RenderResult *rr, volatile rcti *renrect) { rcti win_rct; - float *rectf, fullrect[2][2]; + float *rectf= NULL, fullrect[2][2]; + unsigned int *rect32= NULL; int ymin, ymax; /* if renrect argument, we only display scanlines */ @@ -821,15 +822,21 @@ static void renderwin_progress(RenderWin *rw, RenderResult *rr, volatile rcti *r if(rr->rectf) rectf= rr->rectf; else { - if(rr->renlay==NULL || rr->renlay->rectf==NULL) return; - rectf= rr->renlay->rectf; + if(rr->rect32) + rect32= rr->rect32; + else { + if(rr->renlay==NULL || rr->renlay->rectf==NULL) return; + rectf= rr->renlay->rectf; + } } - /* if scanline updates... */ - rectf+= 4*rr->rectx*ymin; + if(rectf) { + /* if scanline updates... */ + rectf+= 4*rr->rectx*ymin; - /* when rendering more pixels than needed, we crop away cruft */ - if(rr->crop) - rectf+= 4*(rr->crop*rr->rectx + rr->crop); + /* when rendering more pixels than needed, we crop away cruft */ + if(rr->crop) + rectf+= 4*(rr->crop*rr->rectx + rr->crop); + } /* tilerect defines drawing offset from (0,0) */ /* however, tilerect (xmin, ymin) is first pixel */ @@ -844,7 +851,12 @@ static void renderwin_progress(RenderWin *rw, RenderResult *rr, volatile rcti *r glDrawBuffer(GL_FRONT); #endif glPixelZoom(rw->zoom, rw->zoom); - glaDrawPixelsSafe_to32(fullrect[0][0], fullrect[0][1], rr->rectx-2*rr->crop, ymax, rr->rectx, + + if(rect32) + glaDrawPixelsSafe(fullrect[0][0], fullrect[0][1], rr->rectx-2*rr->crop, ymax, rr->rectx, + GL_RGBA, GL_UNSIGNED_BYTE, rect32); + else + glaDrawPixelsSafe_to32(fullrect[0][0], fullrect[0][1], rr->rectx-2*rr->crop, ymax, rr->rectx, GL_RGBA, GL_FLOAT, rectf); glPixelZoom(1.0, 1.0); |