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...
This commit is contained in:
2006-01-11 14:20:35 +00:00
parent 305fdec0eb
commit 1eee258449
7 changed files with 94 additions and 23 deletions

View File

@@ -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);