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:
authorCampbell Barton <ideasman42@gmail.com>2013-12-24 10:20:37 +0400
committerCampbell Barton <ideasman42@gmail.com>2013-12-24 10:20:37 +0400
commit890170180863e3d37d44baf7e7af9f6e051d5518 (patch)
tree3bd397ced1e4dce3cef90678875b6d82382ecb63 /source/blender/editors/screen
parent8a3d3de3aea71e042ad2c1a3443c059c5bc40803 (diff)
UI: Display alpha checkers in image info's color swatch.
Diffstat (limited to 'source/blender/editors/screen')
-rw-r--r--source/blender/editors/screen/glutil.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/source/blender/editors/screen/glutil.c b/source/blender/editors/screen/glutil.c
index 230c3a11108..9cdb6de99b0 100644
--- a/source/blender/editors/screen/glutil.c
+++ b/source/blender/editors/screen/glutil.c
@@ -137,6 +137,16 @@ const GLubyte stipple_diag_stripes_neg[128] = {
0x0f, 0xf0, 0x0f, 0xf0, 0x1f, 0xe0, 0x1f, 0xe0,
0x3f, 0xc0, 0x3f, 0xc0, 0x7f, 0x80, 0x7f, 0x80};
+const GLubyte stipple_checker_8px[128] = {
+ 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};
+
void fdrawbezier(float vec[4][3])
{
@@ -204,22 +214,12 @@ 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);
+ glPolygonStipple(stipple_checker_8px);
glRectf(x1, y1, x2, y2);
glDisable(GL_POLYGON_STIPPLE);
}