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/screen/glutil.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/screen/glutil.c')
-rw-r--r-- | source/blender/editors/screen/glutil.c | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/source/blender/editors/screen/glutil.c b/source/blender/editors/screen/glutil.c index 28fe8caf34b..66abbaecbe7 100644 --- a/source/blender/editors/screen/glutil.c +++ b/source/blender/editors/screen/glutil.c @@ -191,6 +191,31 @@ void fdrawbox(float x1, float y1, float x2, float y2) glEnd(); } +void fdrawcheckerboard(float x1, float y1, float x2, float y2) +{ + unsigned char col1[4]= {40, 40, 40}, col2[4]= {50, 50, 50}; + + GLubyte checker_stipple[32*32/8] = { + 255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0, + 255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0, + 0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255, + 0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255, + 255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0, + 255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0, + 0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255, + 0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255, + }; + + glColor3ubv(col1); + glRectf(x1, y1, x2, y2); + glColor3ubv(col2); + + glEnable(GL_POLYGON_STIPPLE); + glPolygonStipple(checker_stipple); + glRectf(x1, y1, x2, y2); + glDisable(GL_POLYGON_STIPPLE); +} + void sdrawline(short x1, short y1, short x2, short y2) { short v[2]; |