X-Git-Url: http://git.hungrycats.org/cgi-bin/gitweb.cgi?p=xscreensaver;a=blobdiff_plain;f=hacks%2Fglx%2Fglschool.c;h=1ef4c130db171c0969c93526a194406e376de92f;hp=8d52b6689923621b33274d0c9a9d015ead6c84ea;hb=f8cf5ac7b2f53510f80a0eaf286a25298be17bfe;hpb=ec8d2b32b63649e6d32bdfb306eda062769af823 diff --git a/hacks/glx/glschool.c b/hacks/glx/glschool.c index 8d52b668..1ef4c130 100644 --- a/hacks/glx/glschool.c +++ b/hacks/glx/glschool.c @@ -109,6 +109,7 @@ typedef struct { GLuint bboxList; GLuint goalList; GLuint fishList; + int fish_polys, box_polys; XColor *colors; School *school; GLXContext *context; @@ -127,7 +128,7 @@ reshape_glschool(ModeInfo *mi, int width, int height) if (sc->school != (School *)0) { setBBox(sc->school, -aspect*160, aspect*160, -130, 130, -450, -50.0); glDeleteLists(sc->bboxList, 1); - createBBoxList(&SCHOOL_BBOX(sc->school), &sc->bboxList, wire); + createBBoxList(&SCHOOL_BBOX(sc->school), &sc->bboxList, wire); } reshape(width, height); } @@ -173,7 +174,8 @@ init_glschool(ModeInfo *mi) initGLEnv(DoFog); initFishes(sc->school); - createDrawLists(&SCHOOL_BBOX(sc->school), &sc->bboxList, &sc->goalList, &sc->fishList, wire); + createDrawLists(&SCHOOL_BBOX(sc->school), &sc->bboxList, &sc->goalList, &sc->fishList, + &sc->fish_polys, &sc->box_polys, wire); computeAccelerations(sc->school); } @@ -191,6 +193,8 @@ draw_glschool(ModeInfo *mi) glXMakeCurrent(MI_DISPLAY(mi), MI_WINDOW(mi), *(sc->context)); + mi->polygon_count = 0; + if ((sc->goalCounter % GoalChgFreq) == 0) newGoal(sc->school); sc->goalCounter++; @@ -199,7 +203,9 @@ draw_glschool(ModeInfo *mi) sc->rotCounter = (sc->rotCounter%360); applyMovements(sc->school); - drawSchool(sc->colors, sc->school, sc->bboxList, sc->goalList, sc->fishList, sc->rotCounter, sc->drawGoal, sc->drawBBox); + drawSchool(sc->colors, sc->school, sc->bboxList, sc->goalList, sc->fishList, sc->rotCounter, sc->drawGoal, sc->drawBBox, + sc->fish_polys, sc->box_polys, + &mi->polygon_count); computeAccelerations(sc->school); if (mi->fps_p)