X-Git-Url: http://git.hungrycats.org/cgi-bin/gitweb.cgi?p=xscreensaver;a=blobdiff_plain;f=hacks%2Fglx%2Fantspotlight.c;h=cec2676d9a33b20befbf845b283aeb3b536b45b0;hp=30f2404d87d8866b0ab01e861c6bf938fca63ab2;hb=f8cf5ac7b2f53510f80a0eaf286a25298be17bfe;hpb=ec8d2b32b63649e6d32bdfb306eda062769af823 diff --git a/hacks/glx/antspotlight.c b/hacks/glx/antspotlight.c index 30f2404d..cec2676d 100644 --- a/hacks/glx/antspotlight.c +++ b/hacks/glx/antspotlight.c @@ -25,6 +25,20 @@ #include "xlock.h" #endif +#ifdef HAVE_COCOA +# include "jwxyz.h" +#else +# include +# include +# include +#endif + +#ifdef HAVE_JWZGLES +# include "jwzgles.h" +#endif /* HAVE_JWZGLES */ + +#include "sphere.h" +#include "tube.h" #include "rotator.h" #include "gltrackball.h" @@ -243,6 +257,7 @@ static Bool draw_ant(ModeInfo *mi, antspotlightstruct *mp, /* filled sphere */ static Bool mySphere(float radius) { +#if 0 GLUquadricObj *quadObj; if((quadObj = gluNewQuadric()) == 0) @@ -251,13 +266,20 @@ static Bool mySphere(float radius) gluQuadricDrawStyle(quadObj, (GLenum) GLU_FILL); gluSphere(quadObj, radius, 16, 16); gluDeleteQuadric(quadObj); - +#else + glPushMatrix(); + glScalef (radius, radius, radius); + glRotatef (90, 1, 0, 0); + unit_sphere (16, 16, False); + glPopMatrix(); +#endif return True; } /* silhouette sphere */ static Bool mySphere2(float radius) { +#if 0 GLUquadricObj *quadObj; if((quadObj = gluNewQuadric()) == 0) @@ -265,7 +287,14 @@ static Bool mySphere2(float radius) gluQuadricDrawStyle(quadObj, (GLenum) GLU_LINE); gluSphere(quadObj, radius, 16, 8); gluDeleteQuadric(quadObj); - +#else + /* #### no GLU_LINE */ + glPushMatrix(); + glScalef (radius, radius, radius); + glRotatef (90, 1, 0, 0); + unit_sphere (16, 16, True); + glPopMatrix(); +#endif return True; } @@ -751,6 +780,7 @@ ENTRYPOINT void draw_antspotlight(ModeInfo * mi) glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); glPushMatrix(); + glRotatef(current_device_rotation(), 0, 0, 1); /* position camera */