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:
authorTon Roosendaal <ton@blender.org>2006-01-11 17:20:35 +0300
committerTon Roosendaal <ton@blender.org>2006-01-11 17:20:35 +0300
commit1eee258449cd446aa0d9a503e45e3602ee4bc17c (patch)
treed81cb11205b88dd7fadc130171fd2fc9ea77b4ad /source/blender/src/glutil.c
parent305fdec0eb3cfb166d2a5fd56382af5372b657e3 (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.c4
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);