void render() { glClear(GL_COLOR_BUFFER_BIT); //glViewport(0, 0, 640, 480); /* glMatrixMode(GL_PROJECTION); */ /* glLoadIdentity(); */ /* gluOrtho2D(0, 320, 240, 0); */ glMatrixMode(GL_MODELVIEW); glLoadIdentity(); glScalef(1.25,1.25,1.25); drawBackground(); if (help) { drawEnemySet(helplevel); drawDefenses(helplevel); drawShip(helpship); drawShots(helplevel); drawHelpText(); } else { drawEnemySet(level); drawDefenses(level); drawShip(ship); drawShots(level); drawGameText(); } glFlush(); glutSwapBuffers(); }
static void draw() { switch ( status ) { case TITLE: drawBackground(); drawBoss(); drawBulletsWake(); drawBullets(); startDrawBoards(); drawSideBoards(); drawTitle(); endDrawBoards(); break; case IN_GAME: case STAGE_CLEAR: drawBackground(); drawBoss(); drawLasers(); drawShots(); drawBulletsWake(); drawFrags(); drawShip(); drawBullets(); startDrawBoards(); drawSideBoards(); drawBossState(); endDrawBoards(); break; case GAMEOVER: drawBackground(); drawBoss(); drawBulletsWake(); drawFrags(); drawBullets(); startDrawBoards(); drawSideBoards(); drawGameover(); endDrawBoards(); break; case PAUSE: drawBackground(); drawBoss(); drawLasers(); drawShots(); drawBulletsWake(); drawFrags(); drawShip(); drawBullets(); startDrawBoards(); drawSideBoards(); drawBossState(); drawPause(); endDrawBoards(); break; } }
void drawScene(void) { if (renderMode == DEF_RENDER) { drawAllAlxes(); drawGrid(); drawRelevantParameters(); drawBackground(3.5*dim); drawLight(); drawBoard(); drawPath(); drawShots(); } drawMinions(); drawObjects(); }
static void draw() { switch ( status ) { case TITLE: // Draw background. drawBackground(); drawFoes(); drawBulletsWake(); blendScreen(); // Draw forground. drawBullets(); drawScore(); drawTitleMenu(); break; case IN_GAME: // Draw background. drawBackground(); drawBonuses(); drawFoes(); drawBulletsWake(); drawFrags(); blendScreen(); // Draw forground. drawShots(); drawShip(); drawBullets(); drawScore(); break; case GAMEOVER: // Draw background. drawBackground(); drawFoes(); drawBulletsWake(); drawFrags(); blendScreen(); // Draw forground. drawShots(); drawBullets(); drawScore(); drawGameover(); break; case STAGE_CLEAR: // Draw background. drawBackground(); drawBonuses(); drawFrags(); blendScreen(); // Draw forground. drawShots(); drawShip(); drawScore(); drawStageClear(); break; case PAUSE: // Draw background. drawBackground(); drawBonuses(); drawFoes(); drawBulletsWake(); drawFrags(); blendScreen(); // Draw forground. drawShots(); drawShip(); drawBullets(); drawScore(); drawPause(); break; } }