From 931bec76fbf8ea3c740d099eb29198ef95cdf5df Mon Sep 17 00:00:00 2001 From: Oliver Wang Date: Fri, 19 Sep 2003 22:40:32 +0000 Subject: [PATCH] *** empty log message *** svn path=/trunk/boinc/; revision=2341 --- api/gutil.C | 12 +++-- api/reduce.C | 108 ++++++++++++++++++++++++++++++++----------- api/windows_opengl.C | 11 +++-- 3 files changed, 95 insertions(+), 36 deletions(-) diff --git a/api/gutil.C b/api/gutil.C index 35fee880ac..e02f84d082 100755 --- a/api/gutil.C +++ b/api/gutil.C @@ -459,9 +459,6 @@ void draw_text_new( if (q) *q = 0; glRasterPos3d(pos[0],pos[1],pos[2]); print_text(listBase, p); -// draw_text_start(pos, char_height, line_width); - /// draw_text_line_aux(p); - // draw_text_end(); pos[1] -= line_spacing; if (!q) break; p = q+1; @@ -759,7 +756,7 @@ void draw_texture(float* p, float* size) { //star drawing functions -- #define STARFIELD_SIZE 1000 -#define STAR_SPEED 80.0f +#define STAR_SPEED 20.0f #define PI 3.14159265358979323846264 //pointer to the begining of the list @@ -841,10 +838,15 @@ void update_stars() continue; } +// tmpStar->x+=(0)*tmpStar->v*STAR_SPEED; +// tmpStar->y+=(0)*tmpStar->v*STAR_SPEED; +// tmpStar->z+=(1)*tmpStar->v*STAR_SPEED; + + tmpStar->x+=(eye[0])*tmpStar->v*STAR_SPEED; tmpStar->y+=(eye[1])*tmpStar->v*STAR_SPEED; tmpStar->z+=(eye[2])*tmpStar->v*STAR_SPEED; - + //grow objects as the approach you if(dist>900) glPointSize(1.0f); diff --git a/api/reduce.C b/api/reduce.C index cbcec8f162..d7a4cd89cc 100644 --- a/api/reduce.C +++ b/api/reduce.C @@ -278,7 +278,7 @@ void REDUCED_ARRAY::draw_row_rect_x(DrawType type,int row) glBegin(GL_QUADS); for (i=0; i 1) hue -= 1; + double sat = 1.; + double lum = .5 + h/2; + COLOR color; + HLStoRGB(hue, lum, sat, color); + glColor4f(color.r, color.g, color.b, alpha); + + glVertex3f(x0+((x1-x0)/2.0f), y1, z0); + float z2 = draw_pos[2] + (draw_size[2]*row+1)/rdimy; + float y2 = draw_pos[1]; + if(i==0) glVertex3f(x0,y2,z2); + else if(i==rdimx-1) glVertex3f(x0+((x1-x0)/2.0f),y2,z2); + else glVertex3f(x0+((x1-x0)/2.0f), y2, z2); + } + glEnd(); break; case TYPE_WAVE: z0 = draw_pos[2] + (draw_size[2]*row)/rdimy; @@ -426,6 +475,7 @@ void REDUCED_ARRAY::draw_row_rect_x(DrawType type,int row) row0 = rrow(row); if(row!=0) trow0 = rrow(trow); + glEnable(GL_LINE_SMOOTH); glBegin(GL_LINES); glVertex3f(draw_pos[0],draw_pos[1],z0); for (i=0; i