diff --git a/api/reduce.cpp b/api/reduce.cpp index 4bca02847b..5078b5013c 100644 --- a/api/reduce.cpp +++ b/api/reduce.cpp @@ -70,13 +70,14 @@ void REDUCED_ARRAY::reset() { last_ry_count = 0; } -void REDUCED_ARRAY::init_draw(float* p, float* s, double h0, double dh) { +void REDUCED_ARRAY::init_draw(float* p, float* s, double h0, double dh, float trans) { memcpy(draw_pos, p, sizeof(draw_pos)); memcpy(draw_size, s, sizeof(draw_size)); draw_deltax = draw_size[0]/rdimx; draw_deltaz = draw_size[2]/rdimy; hue0 = h0; dhue = dh; + alpha = trans; } // reduce a single row. This is called only if sdimx > rdimx; @@ -218,7 +219,7 @@ void REDUCED_ARRAY::draw_row_quad(int row) { double lum = .5 + h/2; COLOR color; HLStoRGB(hue, lum, sat, color); - glColor3f(color.r, color.g, color.b); + glColor4f(color.r, color.g, color.b, alpha); glVertex3f(x0, y00, z0); glVertex3f(x1, y01, z0); @@ -230,7 +231,7 @@ void REDUCED_ARRAY::draw_row_quad(int row) { // draw a black line on front and right edge of each quad // glBegin(GL_LINES); - glColor3f(0., 0., 0.); + glColor4f(0., 0., 0., 0.); for (i=0; i