void drawPlatforms(void) { int i; for(i=0;i<NUMPLATFORMS;i++) { if(platform[i].used)drawPlatform(&platform[i]); } }
// debug mode/retro style void drawGame_TEST(Game * game) { drawWater(); drawTESTspikes(game); drawPlatform(game,5); drawTESTmissile(game); drawMissilesExp(game); drawTESTguy(game); }
void display(void) { glLoadIdentity(); glClearColor(0.0f,0.0f,0.0f,1.0f); //set the background colour // OK, now clear the screen with the background colour glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT | GL_STENCIL_BUFFER_BIT); /* Place the camera in various positions in the secene */ if(curTime >= 0 && curTime <= 3){ gluLookAt(-12,5,30,0,5,0,0,1,0); } else if(curTime > 3 && curTime <= 6){ gluLookAt(-12,5, 10, 0, 7, 0, 0, 1, 0); } else if(curTime > 6 && curTime <= 10.75){ gluLookAt(0, 5, 30, 0, 5, 0, 0, 1, 0); } else if(curTime > 10.75 && curTime <= 11.5){ gluLookAt(-12, 7, -8, 0, 4, -2, 0, 1, 0); } else if(curTime > 11.5 && curTime <= 12){ gluLookAt(11, 25, -30, -2,5, 0, 0, 1, 0); } else { gluLookAt(-12,5, 10, 0, 7, 0, 0, 1, 0); } drawWalls(); drawColumnSet(); drawStairs(); drawCube(); drawSphere(); drawPlatform(); drawPyramid(); glPushMatrix(); drawMan(); glPopMatrix(); drawHammer(); glFlush(); glutSwapBuffers(); if (recording) { int frame = (int)(curTime / tStep + 0.5); save_image(frame); } }
// all draw functions that get called in render funciton void drawGame_Textures(Game * game) { drawBackground(game); drawSpike(game); glBindTexture(GL_TEXTURE_2D, 0); drawWater(); drawPlatform(game,5); drawMissile(game); drawSkeleton(game); // used to allow non textures objects to maintain their color glBindTexture(GL_TEXTURE_2D, 0); }