#undef countof
#define countof(x) (sizeof((x))/sizeof((*x)))
-#define USE_VERTEX_ARRAY
+#ifndef HAVE_JWZGLES /* glDrawElements unimplemented... */
+# define USE_VERTEX_ARRAY
+#endif
#define TEX_SIZE 64
static Object *clone_Object( Object * );
/* return 1 if cell is capable to divide */
static int can_divide( State *st, Cell *cell );
+#ifdef USE_VERTEX_ARRAY
static VertexArray *array_from_ObjectSmooth( ObjectSmooth * );
+#endif
static void create_nucleus_texture( State *st );
ENTRYPOINT ModeSpecOpt glcells_opts = { countof(opts), opts, countof(vars), vars,
return ret;
}
+#ifdef USE_VERTEX_ARRAY
static VertexArray *array_from_ObjectSmooth( ObjectSmooth *obj )
{
int i, j;
return array;
}
+#endif /* USE_VERTEX_ARRAY */
+
/* create a smoothed version of the given Object
by computing average normal vectors for the vertexes
fprintf( stderr, "tick %d\n", usec );
gettimeofday( &tv1, NULL );
#endif
- glClearColor( 0, 0, 0, 0 );
-
+
glClear( GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT );
glDepthFunc(GL_LESS);
glEnable(GL_DEPTH_TEST);
ObjectSmooth *smooth;
#ifdef USE_VERTEX_ARRAY
VertexArray *vertex_array;
+#else
+ int t, i;
#endif
int list = glGenLists(1);
if (st->food) free( st->food );
st->food = (int *)malloc( ((width*height)/16)*sizeof(int) );
-
- create_cells( st );
+ /* create_cells( st );*/
}
ENTRYPOINT void