Commit d3eda3b9 authored by slevy's avatar slevy
Browse files

Use GL_LINE_STRIP rather than GL_LINE_LOOP when drawing an ellipsoid in PLANE...

Use GL_LINE_STRIP rather than GL_LINE_LOOP when drawing an ellipsoid in PLANE style.  Make usetextaxes work for ellipsoids too.
parent 7227a295
......@@ -16,6 +16,9 @@ static char copyright[] = "Copyright (c) 2002 NCSA, University of Illinois Urban
/*
* $Log$
* Revision 1.132 2017/08/01 21:13:54 slevy
* Use GL_LINE_STRIP rather than GL_LINE_LOOP when drawing an ellipsoid in PLANE style. Make usetextaxes work for ellipsoids too.
*
* Revision 1.131 2013/11/30 21:33:08 slevy
* Tidy.
*
......@@ -3044,7 +3047,7 @@ void drawspecks( struct stuff *st )
if(st->usetext && st->textsize != 0) {
int cment = -1;
int textmin = abs(st->textmin);
int textmin = fabsf(st->textmin);
int label_stubs = (st->textmin < 0);
glColor3f(1,1,1);
......@@ -3235,20 +3238,33 @@ void specks_draw_ellipsoid( struct stuff *st, struct ellipsoid *e )
glEnd();
}
break;
case S_PLANE:
glBegin( GL_LINE_LOOP );
for(u = 0; u < nu; u++)
glBegin( GL_LINE_STRIP );
for(u = 0; u < nu/2; u++)
glVertex3f( cu[u], su[u], 0 );
glEnd();
glBegin( GL_LINE_LOOP );
for(u = 0; u < nu; u++)
glBegin( GL_LINE_STRIP );
for(u = 0; u < nu/2; u++)
glVertex3f( cu[u], 0, su[u] );
glEnd();
glBegin( GL_LINE_LOOP );
for(u = 0; u < nu; u++)
glBegin( GL_LINE_STRIP );
for(u = 0; u < nu/2; u++)
glVertex3f( 0, cu[u], su[u] );
glEnd();
if(st->usetextaxes) {
static unsigned char col[3][3] = {255,0,0, 0,255,0, 0,0,255};
int k;
glBegin(GL_LINES);
for(k = 0; k < 3; k++) {
glColor3ubv( &col[k][0] );
glVertex3f( 0,0,0 );
glVertex3f( k==0?1:0, k==1?1:0, k==2?1:0 );
}
glEnd();
}
break;
case S_POINT:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment