-/* $Id: isosurf.c,v 1.10 2001/05/11 12:08:15 keithw Exp $ */
+/* $Id: isosurf.c,v 1.11 2001/05/11 15:47:02 keithw Exp $ */
/*
* Display an isosurface of 3-D wind speed volume.
static float expanded_data[MAXVERTS*3][6];
static GLuint indices[MAXVERTS];
static GLuint tri_indices[MAXVERTS*3];
+static GLuint strip_indices[MAXVERTS];
static GLfloat col[100][4];
static GLint numverts, num_tri_verts, numuniq;
col[j][1] = myrand(1);
col[j][0] = myrand(1);
}
+
+ for (i = 0; i < numverts ; i++)
+ strip_indices[i] = i;
}
#define MIN(x,y) (x < y) ? x : y
glDrawArraysEXT( GL_TRIANGLE_STRIP, 0, numverts );
break;
case (DRAW_ELTS|STRIPS):
- glDrawElements( GL_TRIANGLE_STRIP, numverts, GL_UNSIGNED_INT, indices );
+ glDrawElements( GL_TRIANGLE_STRIP, numverts,
+ GL_UNSIGNED_INT, strip_indices );
break;
/* Uses the original arrays (including duplicate elements):
glEnable( GL_VERTEX_ARRAY_EXT );
glEnable( GL_NORMAL_ARRAY_EXT );
- InitMaterials();
-
glMatrixMode(GL_PROJECTION);
glLoadIdentity();
glFrustum( -1.0, 1.0, -1.0, 1.0, 5, 25 );
glLoadIdentity();
glClipPlane(GL_CLIP_PLANE0, plane);
+ InitMaterials();
+
set_matrix();
glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_REPLACE);