diff options
author | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2012-03-28 13:07:10 +0400 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2012-03-28 13:07:10 +0400 |
commit | 33740c5eb56884929b70a394e5b3dc7ceb0cfc91 (patch) | |
tree | 9c70fcb068f0514a4fccaaf399e0606f8f4119b5 /source/blender/editors/space_image/image_draw.c | |
parent | 30d128c7a723bb6ed68c763d175c845e1cfa3c4f (diff) |
Cycles: viewport rendered draw mode now shows background images, also changed the
image editor checkerboard pattern to be the same as cycles viewport.
Diffstat (limited to 'source/blender/editors/space_image/image_draw.c')
-rw-r--r-- | source/blender/editors/space_image/image_draw.c | 25 |
1 files changed, 2 insertions, 23 deletions
diff --git a/source/blender/editors/space_image/image_draw.c b/source/blender/editors/space_image/image_draw.c index 59ca1925abf..684e541043a 100644 --- a/source/blender/editors/space_image/image_draw.c +++ b/source/blender/editors/space_image/image_draw.c @@ -393,28 +393,8 @@ static void draw_image_grid(ARegion *ar, float zoomx, float zoomy) glEnd(); } -static void sima_draw_alpha_backdrop(float x1, float y1, float xsize, float ysize, float zoomx, float zoomy, unsigned char col1[3], unsigned char col2[3]) +static void sima_draw_alpha_backdrop(float x1, float y1, float xsize, float ysize, float zoomx, float zoomy) { - GLubyte checker_stipple[32*32/8] = - { - 255,255,0,0,255,255,0,0,255,255,0,0,255,255,0,0, - 255,255,0,0,255,255,0,0,255,255,0,0,255,255,0,0, - 255,255,0,0,255,255,0,0,255,255,0,0,255,255,0,0, - 255,255,0,0,255,255,0,0,255,255,0,0,255,255,0,0, - 0,0,255,255,0,0,255,255,0,0,255,255,0,0,255,255, - 0,0,255,255,0,0,255,255,0,0,255,255,0,0,255,255, - 0,0,255,255,0,0,255,255,0,0,255,255,0,0,255,255, - 0,0,255,255,0,0,255,255,0,0,255,255,0,0,255,255, - }; - - glColor3ubv(col1); - glRectf(x1, y1, x1 + zoomx*xsize, y1 + zoomy*ysize); - glColor3ubv(col2); - - glEnable(GL_POLYGON_STIPPLE); - glPolygonStipple(checker_stipple); - glRectf(x1, y1, x1 + zoomx*xsize, y1 + zoomy*ysize); - glDisable(GL_POLYGON_STIPPLE); } static void sima_draw_alpha_pixels(float x1, float y1, int rectx, int recty, unsigned int *recti) @@ -528,8 +508,7 @@ static void draw_image_buffer(SpaceImage *sima, ARegion *ar, Scene *scene, Image } else { if (sima->flag & SI_USE_ALPHA) { - unsigned char col1[3]= {100, 100, 100}, col2[3]= {160, 160, 160}; - sima_draw_alpha_backdrop(x, y, ibuf->x, ibuf->y, zoomx, zoomy, col1, col2); + fdrawcheckerboard(x, y, x + ibuf->x*zoomx, y + ibuf->y*zoomy); glEnable(GL_BLEND); glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); |