Skip to main content

Posts

Showing posts with the label Sinking Ship

OpenGL program project on Sinking Ship

   OpenGL program project on Sinking Ship # include <stdio.h> # include <GL/glut.h> # include <stdlib.h> # include <GL/freeglut.h> # include <time.h> # include <bits/stdc++.h> # define WIDTH 768 # define HEIGHT 1024 using namespace std ; typedef struct { GLfloat x ; GLfloat y ; GLfloat z ; } vec3f ; const vec3f _FONT_SIZE_NORMAL = { 0.5f , 0.5f , 1.0f } ; const vec3f _FONT_SIZE_BIG = { 1.0f , 1.0f , 1.0f } ; const vec3f _FONT_SIZE_SMALL = { 0.25f , 0.25f , 1.0f } ; const vec3f * FONT_SIZE_NORMAL = & _FONT_SIZE_NORMAL ; const vec3f * FONT_SIZE_BIG = & _FONT_SIZE_BIG ; const vec3f * FONT_SIZE_SMALL = & _FONT_SIZE_SMALL ; struct timespec tim , tim2 ; void sun ( ) ; void ice ( ) ; void sky ( ) ; void display ( ) ; void display0 ( ) ; void display1 ( ) ; void display2 ( ) ; void display3 ( ) ; void display4 ( ) ; void ship ( int , double ) ; void rescueShip ( int , double ) ; void d...