-/* $Id: isosurf.c,v 1.14 2002/01/04 09:47:17 gareth Exp $ */
/*
* Display an isosurface of 3-D wind speed volume.
#include <math.h>
#ifdef _WIN32
#include <windows.h>
+#undef CLIP_MASK
#endif
-#define GL_GLEXT_LEGACY
+#define GL_GLEXT_PROTOTYPES
#include "GL/glut.h"
-#include "readtex.c" /* I know, this is a hack. KW: me too. */
+#include "readtex.h"
#define TEXTURE_FILE "../images/reflect.rgb"
#define LIT 0x00000001
#define POLYGON_MASK (POLYGON_FILL|POLYGON_LINE)
#define MAXVERTS 10000
-static GLuint maxverts = MAXVERTS;
+static GLint maxverts = MAXVERTS;
static float data[MAXVERTS][6];
static float compressed_data[MAXVERTS][6];
static float expanded_data[MAXVERTS*3][6];
{
unsigned int *v = tri_indices;
unsigned int parity = 0;
- unsigned int i, j;
+ int i, j;
for (j=2;j<numverts;j++,parity^=1) {
if (parity) {
#define MIN(x,y) (x < y) ? x : y
-static void draw_surface( int with_state )
+static void draw_surface( unsigned int with_state )
{
- GLuint i, j;
+ GLint i, j;
if (with_state & DISPLAYLIST) {
if ((with_state & (RENDER_STYLE_MASK|PRIMITIVE_MASK|MATERIAL_MASK)) !=
read_surface( "isosurf.dat" );
+ glutInit( &argc, argv);
glutInitWindowPosition(0, 0);
glutInitWindowSize(400, 400);