diff options
author | Ton Roosendaal <ton@blender.org> | 2006-01-11 17:20:35 +0300 |
---|---|---|
committer | Ton Roosendaal <ton@blender.org> | 2006-01-11 17:20:35 +0300 |
commit | 1eee258449cd446aa0d9a503e45e3602ee4bc17c (patch) | |
tree | d81cb11205b88dd7fadc130171fd2fc9ea77b4ad /source/blender/src/glutil.c | |
parent | 305fdec0eb3cfb166d2a5fd56382af5372b657e3 (diff) |
Orange: ImageWindow goodies
- options to show with alpha-over (checkered backdrop), only alpha (BW) and
when available: the zbuffer.
Note: it's icons in the header, I just re-used existing ones, no time now
for fancy design. :)
Also: recoded the way alpha-only draws, also in renderwindow. Mucho faster!
Oh, and sampling the buffer with LMB now displays z values in float range
of 0.0 to 1.0. Note that we still save signed int in files for Z...
Diffstat (limited to 'source/blender/src/glutil.c')
-rw-r--r-- | source/blender/src/glutil.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/source/blender/src/glutil.c b/source/blender/src/glutil.c index ae7cf300844..cc5c2f3c9ec 100644 --- a/source/blender/src/glutil.c +++ b/source/blender/src/glutil.c @@ -343,6 +343,10 @@ void glaDrawPixelsSafe(float x, float y, int img_w, int img_h, int format, void float *f_rect= (float *)rect; glDrawPixels(draw_w, draw_h, GL_RGBA, GL_FLOAT, f_rect + (off_y*img_w + off_x)*4); } + else if(format==GL_INT || format==GL_UNSIGNED_INT) { + int *i_rect= (int *)rect; + glDrawPixels(draw_w, draw_h, GL_LUMINANCE, format, i_rect + (off_y*img_w + off_x)); + } else { unsigned char *uc_rect= (unsigned char *) rect; glDrawPixels(draw_w, draw_h, GL_RGBA, GL_UNSIGNED_BYTE, uc_rect + (off_y*img_w + off_x)*4); |