X-Git-Url: http://git.hungrycats.org/cgi-bin/gitweb.cgi?p=xscreensaver;a=blobdiff_plain;f=hacks%2Fglx%2Fglcells.c;h=0ec1af3f48e4ea8e91cb15f5efc766b2a0706088;hp=87c699745c5d333d2b4e657076a349f1ac1ce6b9;hb=f8cf5ac7b2f53510f80a0eaf286a25298be17bfe;hpb=ec8d2b32b63649e6d32bdfb306eda062769af823 diff --git a/hacks/glx/glcells.c b/hacks/glx/glcells.c index 87c69974..0ec1af3f 100644 --- a/hacks/glx/glcells.c +++ b/hacks/glx/glcells.c @@ -58,7 +58,9 @@ #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 @@ -242,7 +244,9 @@ static Object *create_sphere( State *st, int divisions ); 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, @@ -422,6 +426,7 @@ static Object *clone_Object( Object *obj ) return ret; } +#ifdef USE_VERTEX_ARRAY static VertexArray *array_from_ObjectSmooth( ObjectSmooth *obj ) { int i, j; @@ -449,6 +454,8 @@ static VertexArray *array_from_ObjectSmooth( ObjectSmooth *obj ) return array; } +#endif /* USE_VERTEX_ARRAY */ + /* create a smoothed version of the given Object by computing average normal vectors for the vertexes @@ -849,6 +856,8 @@ static int create_list( State *st, double fac ) ObjectSmooth *smooth; #ifdef USE_VERTEX_ARRAY VertexArray *vertex_array; +#else + int t, i; #endif int list = glGenLists(1);