prog.cpp:9:1: error: 'GLsizei' does not name a type
GLsizei winWidth = 800, winHeight = 600;
^
prog.cpp:12:17: error: 'GLUT_BITMAP_8_BY_13' was not declared in this scope
int font = (int)GLUT_BITMAP_8_BY_13;
^
prog.cpp:13:1: error: 'GLfloat' does not name a type
GLfloat M = 100.0; // mass
^
prog.cpp:14:1: error: 'GLfloat' does not name a type
GLfloat T = 0.00; // time
^
prog.cpp:15:1: error: 'GLfloat' does not name a type
GLfloat skyColor = 1.0;
^
prog.cpp:16:1: error: 'GLfloat' does not name a type
GLfloat sunColor = 0.0;
^
prog.cpp:17:1: error: 'GLfloat' does not name a type
GLfloat sunPos = 2.0;
^
prog.cpp:18:1: error: 'GLfloat' does not name a type
GLfloat sheepHead = 0.5;
^
prog.cpp:19:1: error: 'GLfloat' does not name a type
GLfloat sheepHeadRot = 0.0;
^
prog.cpp:20:1: error: 'GLboolean' does not name a type
GLboolean sheepHeadDown = false;
^
prog.cpp:21:1: error: 'GLfloat' does not name a type
GLfloat pigHead = 0.5;
^
prog.cpp:22:1: error: 'GLboolean' does not name a type
GLboolean pigHeadDown = false;
^
prog.cpp:24:1: error: 'GLfloat' does not name a type
GLfloat rainPos = 0.5;
^
prog.cpp: In function 'void init()':
prog.cpp:29:8: error: 'GLubyte' does not name a type
const GLubyte *Vstr;
^
prog.cpp:30:2: error: 'Vstr' was not declared in this scope
Vstr = glGetString(GL_VERSION);
^
prog.cpp:30:21: error: 'GL_VERSION' was not declared in this scope
Vstr = glGetString(GL_VERSION);
^
prog.cpp:30:31: error: 'glGetString' was not declared in this scope
Vstr = glGetString(GL_VERSION);
^
prog.cpp:31:10: error: 'stderr' was not declared in this scope
fprintf(stderr, "Your OpenGL version is %s\n", Vstr);
^
prog.cpp:31:53: error: 'fprintf' was not declared in this scope
fprintf(stderr, "Your OpenGL version is %s\n", Vstr);
^
prog.cpp:34:27: error: 'skyColor' was not declared in this scope
glClearColor(0.0f, 0.0f, skyColor, 0.0f);
^
prog.cpp:34:41: error: 'glClearColor' was not declared in this scope
glClearColor(0.0f, 0.0f, skyColor, 0.0f);
^
prog.cpp:36:19: error: 'glClearDepth' was not declared in this scope
glClearDepth(1.0f);
^
prog.cpp:38:11: error: 'GL_DEPTH_TEST' was not declared in this scope
glEnable(GL_DEPTH_TEST);
^
prog.cpp:38:24: error: 'glEnable' was not declared in this scope
glEnable(GL_DEPTH_TEST);
^
prog.cpp:40:14: error: 'GL_LEQUAL' was not declared in this scope
glDepthFunc(GL_LEQUAL);
^
prog.cpp:40:23: error: 'glDepthFunc' was not declared in this scope
glDepthFunc(GL_LEQUAL);
^
prog.cpp: In function 'void renderBitmapString(float, float, void*, char*)':
prog.cpp:49:26: error: 'glRasterPos3f' was not declared in this scope
glRasterPos3f(x, y, -7.0);
^
prog.cpp:51:31: error: 'glutBitmapCharacter' was not declared in this scope
glutBitmapCharacter(font, *c);
^
prog.cpp: In function 'void animateAll()':
prog.cpp:57:8: error: 'WAITMS' was not declared in this scope
Sleep(WAITMS);
^
prog.cpp:57:14: error: 'Sleep' was not declared in this scope
Sleep(WAITMS);
^
prog.cpp:59:6: error: 'skyColor' was not declared in this scope
if (skyColor <= 0.0){
^
prog.cpp:61:3: error: 'GLfloat' was not declared in this scope
GLfloat mat_specular[] = { 0.5, 0.5, 0.5, 1.0 };
^
prog.cpp:62:11: error: expected ';' before 'mat_shininess'
GLfloat mat_shininess[] = { 100.0 };
^
prog.cpp:63:11: error: expected ';' before 'light_position'
GLfloat light_position[] = { 4.0, sunPos, -4.0, 0.0 };
^
prog.cpp:65:16: error: 'GL_FRONT' was not declared in this scope
glMaterialfv(GL_FRONT, GL_SPECULAR, mat_specular);
^
prog.cpp:65:26: error: 'GL_SPECULAR' was not declared in this scope
glMaterialfv(GL_FRONT, GL_SPECULAR, mat_specular);
^
prog.cpp:65:39: error: 'mat_specular' was not declared in this scope
glMaterialfv(GL_FRONT, GL_SPECULAR, mat_specular);
^
prog.cpp:65:51: error: 'glMaterialfv' was not declared in this scope
glMaterialfv(GL_FRONT, GL_SPECULAR, mat_specular);
^
prog.cpp:67:26: error: 'GL_SHININESS' was not declared in this scope
glMaterialfv(GL_FRONT, GL_SHININESS, mat_shininess);
^
prog.cpp:67:40: error: 'mat_shininess' was not declared in this scope
glMaterialfv(GL_FRONT, GL_SHININESS, mat_shininess);
^
prog.cpp:69:13: error: 'GL_LIGHT0' was not declared in this scope
glLightfv(GL_LIGHT0, GL_POSITION, light_position);
^
prog.cpp:69:24: error: 'GL_POSITION' was not declared in this scope
glLightfv(GL_LIGHT0, GL_POSITION, light_position);
^
prog.cpp:69:37: error: 'light_position' was not declared in this scope
glLightfv(GL_LIGHT0, GL_POSITION, light_position);
^
prog.cpp:69:51: error: 'glLightfv' was not declared in this scope
glLightfv(GL_LIGHT0, GL_POSITION, light_position);
^
prog.cpp:71:12: error: 'GL_LIGHTING' was not declared in this scope
glEnable(GL_LIGHTING);
^
prog.cpp:71:23: error: 'glEnable' was not declared in this scope
glEnable(GL_LIGHTING);
^
prog.cpp:75:13: error: 'GL_LIGHTING' was not declared in this scope
glDisable(GL_LIGHTING);
^
prog.cpp:75:24: error: 'glDisable' was not declared in this scope
glDisable(GL_LIGHTING);
^
prog.cpp:79:2: error: 'GLfloat' was not declared in this scope
GLfloat accel = 9.8 * M * pow(T, 2.0);
^
prog.cpp:80:6: error: 'T' was not declared in this scope
if (T < 0.03){
^
prog.cpp:83:2: error: 'rainPos' was not declared in this scope
rainPos -= accel;
^
prog.cpp:83:13: error: 'accel' was not declared in this scope
rainPos -= accel;
^
prog.cpp:85:3: error: 'T' was not declared in this scope
T = 0.0;
^
prog.cpp:90:6: error: 'sheepHeadDown' was not declared in this scope
if (sheepHeadDown == false){
^
prog.cpp:91:7: error: 'sheepHead' was not declared in this scope
if (sheepHead == 0.5 && sheepHeadRot > -50.0){
^
prog.cpp:91:27: error: 'sheepHeadRot' was not declared in this scope
if (sheepHead == 0.5 && sheepHeadRot > -50.0){
^
prog.cpp:102:7: error: 'sheepHead' was not declared in this scope
if (sheepHead < 0.5){
^
prog.cpp:105:32: error: 'sheepHeadRot' was not declared in this scope
else if (sheepHead == 0.5 && sheepHeadRot < 0.0){
^
prog.cpp:112:6: error: 'pigHeadDown' was not declared in this scope
if (pigHeadDown == false){
^
prog.cpp:113:7: error: 'pigHead' was not declared in this scope
if (pigHead > -0.3){
^
prog.cpp:121:7: error: 'pigHead' was not declared in this scope
if (pigHead < 0.5){
^
prog.cpp:128:6: error: 'sunPos' was not declared in this scope
if (sunPos > 0.0){
^
prog.cpp:131:6: error: 'sunPos' was not declared in this scope
if (sunPos <= 0.0 && sunPos > -2.2){
^
prog.cpp:133:7: error: 'skyColor' was not declared in this scope
if (skyColor > 0.0){
^
prog.cpp:136:28: error: 'skyColor' was not declared in this scope
glClearColor(0.0f, 0.0f, skyColor, 0.0f);
^
prog.cpp:136:42: error: 'glClearColor' was not declared in this scope
glClearColor(0.0f, 0.0f, skyColor, 0.0f);
^
prog.cpp:138:6: error: 'sunPos' was not declared in this scope
if (sunPos <= -2.2 && sunColor == 0.0){
^
prog.cpp:138:24: error: 'sunColor' was not declared in this scope
if (sunPos <= -2.2 && sunColor == 0.0){
^
prog.cpp:146:6: error: 'sunPos' was not declared in this scope
if (sunPos > 4.0 && sunColor == 0.0 && skyColor < 1.0){
^
prog.cpp:146:22: error: 'sunColor' was not declared in this scope
if (sunPos > 4.0 && sunColor == 0.0 && skyColor < 1.0){
^
prog.cpp:146:41: error: 'skyColor' was not declared in this scope
if (sunPos > 4.0 && sunColor == 0.0 && skyColor < 1.0){
^
prog.cpp:148:42: error: 'glClearColor' was not declared in this scope
glClearColor(0.0f, 0.0f, skyColor, 0.0f);
^
prog.cpp:151:20: error: 'glutPostRedisplay' was not declared in this scope
glutPostRedisplay();
^
prog.cpp: At global scope:
prog.cpp:154:12: error: variable or field 'sheep' declared void
void sheep(GLdouble x, GLdouble y, GLdouble z){
^
prog.cpp:154:12: error: 'GLdouble' was not declared in this scope
prog.cpp:154:24: error: 'GLdouble' was not declared in this scope
void sheep(GLdouble x, GLdouble y, GLdouble z){
^
prog.cpp:154:36: error: 'GLdouble' was not declared in this scope
void sheep(GLdouble x, GLdouble y, GLdouble z){
^
prog.cpp:187:10: error: variable or field 'pig' declared void
void pig(GLdouble x, GLdouble y, GLdouble z){
^
prog.cpp:187:10: error: 'GLdouble' was not declared in this scope
prog.cpp:187:22: error: 'GLdouble' was not declared in this scope
void pig(GLdouble x, GLdouble y, GLdouble z){
^
prog.cpp:187:34: error: 'GLdouble' was not declared in this scope
void pig(GLdouble x, GLdouble y, GLdouble z){
^
prog.cpp: In function 'void triangle(double, double, double)':
prog.cpp:220:17: error: 'glLoadIdentity' was not declared in this scope
glLoadIdentity();
^
prog.cpp:221:22: error: 'glTranslatef' was not declared in this scope
glTranslatef(x, y, z);
^
prog.cpp:222:25: error: 'glColor3f' was not declared in this scope
glColor3f(0.0, 1.0, 0.0);
^
prog.cpp:223:27: error: 'glScalef' was not declared in this scope
glScalef(0.1f, 0.1f, 0.1f);
^
prog.cpp:224:10: error: 'GL_POLYGON' was not declared in this scope
glBegin(GL_POLYGON);
^
prog.cpp:224:20: error: 'glBegin' was not declared in this scope
glBegin(GL_POLYGON);
^
prog.cpp:225:22: error: 'glVertex2i' was not declared in this scope
glVertex2i(0.0, 0.0);
^
prog.cpp:228:8: error: 'glEnd' was not declared in this scope
glEnd();
^
prog.cpp: In function 'void grass()':
prog.cpp:233:18: error: 'glLoadIdentity' was not declared in this scope
glLoadIdentity();
^
prog.cpp:237:18: error: 'glLoadIdentity' was not declared in this scope
glLoadIdentity();
^
prog.cpp:241:18: error: 'glLoadIdentity' was not declared in this scope
glLoadIdentity();
^
prog.cpp:245:18: error: 'glLoadIdentity' was not declared in this scope
glLoadIdentity();
^
prog.cpp:249:18: error: 'glLoadIdentity' was not declared in this scope
glLoadIdentity();
^
prog.cpp:253:18: error: 'glLoadIdentity' was not declared in this scope
glLoadIdentity();
^
prog.cpp:257:18: error: 'glLoadIdentity' was not declared in this scope
glLoadIdentity();
^
prog.cpp:261:18: error: 'glLoadIdentity' was not declared in this scope
glLoadIdentity();
^
prog.cpp: In function 'void clouds()':
prog.cpp:268:32: error: 'glTranslatef' was not declared in this scope
glTranslatef(-2.0f, 1.0, -8.0f);
^
prog.cpp:269:25: error: 'glColor3f' was not declared in this scope
glColor3f(0.5, 0.5, 0.5);
^
prog.cpp:270:30: error: 'glutSolidSphere' was not declared in this scope
glutSolidSphere(0.25, 15, 15);
^
prog.cpp: In function 'void rainDrop()':
prog.cpp:286:25: error: 'glColor3f' was not declared in this scope
glColor3f(0.0, 1.0, 1.0);
^
prog.cpp:287:2: error: 'GLubyte' was not declared in this scope
GLubyte bitShape2[72] = {
^
prog.cpp:313:16: error: 'GL_UNPACK_ALIGNMENT' was not declared in this scope
glPixelStorei(GL_UNPACK_ALIGNMENT, 1);
^
prog.cpp:313:38: error: 'glPixelStorei' was not declared in this scope
glPixelStorei(GL_UNPACK_ALIGNMENT, 1);
^
prog.cpp:315:22: error: 'rainPos' was not declared in this scope
glTranslatef(-0.1f, rainPos, -9.0f);
^
prog.cpp:315:36: error: 'glTranslatef' was not declared in this scope
glTranslatef(-0.1f, rainPos, -9.0f);
^
prog.cpp:316:25: error: 'glRasterPos2i' was not declared in this scope
glRasterPos2i(-4.0, 0.0);
^
prog.cpp:318:44: error: 'bitShape2' was not declared in this scope
glBitmap(24.0, 24.0, 0.0, 0.0, 36.0, 0.0, bitShape2);
^
prog.cpp:318:53: error: 'glBitmap' was not declared in this scope
glBitmap(24.0, 24.0, 0.0, 0.0, 36.0, 0.0, bitShape2);
^
prog.cpp:323:10: error: 'glFlush' was not declared in this scope
glFlush();
^
prog.cpp: In function 'void Menu()':
prog.cpp:328:28: error: 'glColor3f' was not declared in this scope
glColor3f(1.0f, 1.0f, 0.0f);
^
prog.cpp:329:79: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
renderBitmapString(-0.8, 2.7, (void *)font, "Press \"a\" to start animation.");
^
prog.cpp:330:79: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
renderBitmapString(-0.8, 2.4, (void *)font, "Press \"s\" to pause animation.");
^
prog.cpp: In function 'void displayMain()':
prog.cpp:335:10: error: 'GL_COLOR_BUFFER_BIT' was not declared in this scope
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
^
prog.cpp:335:32: error: 'GL_DEPTH_BUFFER_BIT' was not declared in this scope
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
^
prog.cpp:335:51: error: 'glClear' was not declared in this scope
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
^
prog.cpp:338:15: error: 'GL_MODELVIEW' was not declared in this scope
glMatrixMode(GL_MODELVIEW);
^
prog.cpp:338:27: error: 'glMatrixMode' was not declared in this scope
glMatrixMode(GL_MODELVIEW);
^
prog.cpp:340:17: error: 'glLoadIdentity' was not declared in this scope
glLoadIdentity();
^
prog.cpp:341:26: error: 'sheep' was not declared in this scope
sheep(-1.15, -0.7, -7.0f);
^
prog.cpp:342:24: error: 'pig' was not declared in this scope
pig(3.0f, -0.7f, -7.0f);
^
prog.cpp:347:29: error: 'glTranslatef' was not declared in this scope
glTranslatef(0.0, 0.0, -8.0);
^
prog.cpp:348:25: error: 'glColor3f' was not declared in this scope
glColor3f(0.5, 0.5, 0.0);
^
prog.cpp:349:35: error: 'glRecti' was not declared in this scope
glRecti(-5.0, -5.0, 5.0, -1.99999);
^
prog.cpp:353:20: error: 'sunPos' was not declared in this scope
glTranslatef(2.0, sunPos, -10.0);
^
prog.cpp:354:22: error: 'sunColor' was not declared in this scope
glColor3f(1.0, 1.0, sunColor);
^
prog.cpp:355:27: error: 'glutSolidSphere' was not declared in this scope
glutSolidSphere(1.0,15,15);
^
prog.cpp:371:18: error: 'glutSwapBuffers' was not declared in this scope
glutSwapBuffers();
^
prog.cpp: In function 'void keyboard(unsigned char, int, int)':
prog.cpp:379:26: error: 'glutIdleFunc' was not declared in this scope
glutIdleFunc(animateAll);
^
prog.cpp:383:16: error: 'NULL' was not declared in this scope
glutIdleFunc(NULL);
^
prog.cpp: At global scope:
prog.cpp:391:20: error: variable or field 'winReshapeFcn' declared void
void winReshapeFcn(GLsizei width, GLsizei height) {
^
prog.cpp:391:20: error: 'GLsizei' was not declared in this scope
prog.cpp:391:35: error: 'GLsizei' was not declared in this scope
void winReshapeFcn(GLsizei width, GLsizei height) {
^
prog.cpp:410:32: error: '::main' must return 'int'
void main(int argc, char** argv) {
^
prog.cpp: In function 'int main(int, char**)':
prog.cpp:411:22: error: 'glutInit' was not declared in this scope
glutInit(&argc, argv);
^
prog.cpp:412:22: error: 'GLUT_DOUBLE' was not declared in this scope
glutInitDisplayMode(GLUT_DOUBLE);
^
prog.cpp:412:33: error: 'glutInitDisplayMode' was not declared in this scope
glutInitDisplayMode(GLUT_DOUBLE);
^
prog.cpp:414:21: error: 'winWidth' was not declared in this scope
glutInitWindowSize(winWidth, winHeight);
^
prog.cpp:414:31: error: 'winHeight' was not declared in this scope
glutInitWindowSize(winWidth, winHeight);
^
prog.cpp:414:40: error: 'glutInitWindowSize' was not declared in this scope
glutInitWindowSize(winWidth, winHeight);
^
prog.cpp:416:31: error: 'glutInitWindowPosition' was not declared in this scope
glutInitWindowPosition(50, 50);
^
prog.cpp:418:24: error: 'glutCreateWindow' was not declared in this scope
glutCreateWindow(title);
^
prog.cpp:420:29: error: 'glutDisplayFunc' was not declared in this scope
glutDisplayFunc(displayMain);
^
prog.cpp:422:18: error: 'winReshapeFcn' was not declared in this scope
glutReshapeFunc(winReshapeFcn);
^
prog.cpp:422:31: error: 'glutReshapeFunc' was not declared in this scope
glutReshapeFunc(winReshapeFcn);
^
prog.cpp:427:27: error: 'glutKeyboardFunc' was not declared in this scope
glutKeyboardFunc(keyboard);
^
prog.cpp:430:15: error: 'glutMainLoop' was not declared in this scope
glutMainLoop();
^