X-Git-Url: http://git.hungrycats.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=hacks%2Fglx%2Fbuildlwo.c;h=c20c9e2d81a21ffff228f8666b5db46f57c1a7ee;hb=7edd66e6bd3209013ee059819747b10b5835635b;hp=7ae9e5f575495c63eab6ec1eec432fec3bf36349;hpb=96a411663168b0ba5432b407a83be55f3df0c802;p=xscreensaver diff --git a/hacks/glx/buildlwo.c b/hacks/glx/buildlwo.c index 7ae9e5f5..c20c9e2d 100644 --- a/hacks/glx/buildlwo.c +++ b/hacks/glx/buildlwo.c @@ -22,19 +22,15 @@ static const char sccsid[] = "@(#)buildlwo.c 4.02 97/04/20 xlockmore"; #ifdef USE_GL -#ifdef STANDALONE -#include -#endif -#include -#include #include "buildlwo.h" GLuint -BuildLWO(int wireframe, struct lwo *object) +BuildLWO(int wireframe, const struct lwo *object) { GLuint dl_num; - GLfloat *pnts, *normals, three[3], *grab; - unsigned short int *pols; + const GLfloat *pnts, *normals, *grab; + const unsigned short int *pols; + GLfloat three[3]; int p, num_pnts = 0; dl_num = glGenLists(1); @@ -83,7 +79,7 @@ BuildLWO(int wireframe, struct lwo *object) grab = pnts + ((int) (*pols) * 3); three[0] = *(grab++); three[1] = *(grab++); - three[2] = *(grab++); + three[2] = *(grab); glVertex3fv(three); } --num_pnts;