X-Git-Url: http://git.hungrycats.org/cgi-bin/gitweb.cgi?p=xscreensaver;a=blobdiff_plain;f=hacks%2Fglx%2Fstonerview-view.c;h=baf40e4179364497e1ba8260d0c15ec650e685aa;hp=d66eab28ce505ac2a271f448a7f3841ddcb88651;hb=d5186197bc394e10a4402f7f6d23fbb14103bc50;hpb=6afd6db0ae9396cd7ff897ade597cd5483f49b0e diff --git a/hacks/glx/stonerview-view.c b/hacks/glx/stonerview-view.c index d66eab28..baf40e41 100644 --- a/hacks/glx/stonerview-view.c +++ b/hacks/glx/stonerview-view.c @@ -19,6 +19,19 @@ # include "config.h" #endif +#ifdef HAVE_COCOA +# include "jwxyz.h" +#elif defined(HAVE_ANDROID) +# include +#else /* real Xlib */ +# include +# include +#endif /* !HAVE_COCOA */ + +#ifdef HAVE_JWZGLES +# include "jwzgles.h" +#endif /* HAVE_JWZGLES */ + #include #include "stonerview.h" @@ -95,7 +108,12 @@ stonerview_win_draw(stonerview_state *st) if (st->wireframe) continue; /* fill the square */ - glMaterialfv(GL_FRONT_AND_BACK, GL_AMBIENT_AND_DIFFUSE, el->col); + { + GLfloat col[4]; + col[0] = el->col[0]; col[1] = el->col[1]; + col[2] = el->col[2]; col[3] = el->col[3]; + glMaterialfv(GL_FRONT_AND_BACK, GL_AMBIENT_AND_DIFFUSE, col); + } glBegin(GL_QUADS); glVertex3f(el->pos[0]-el->vervec[0], el->pos[1]-el->vervec[1], el->pos[2]); glVertex3f(el->pos[0]+el->vervec[1], el->pos[1]-el->vervec[0], el->pos[2]);