fork download
  1. //main.cpp
  2.  
  3. //include...
  4.  
  5. int main( int argc, char * argv[] )
  6. {
  7. for(int i=0;i<255;i++)
  8. key[i]=true;
  9. for(int i=0;i<128;i++)
  10. specialkey[i]=true;
  11. glutInit(& argc, argv);
  12. // TWORZENIE OKNA
  13. glutInitDisplayMode(GLUT_DOUBLE | GLUT_RGB);
  14. glutInitWindowSize(1000, 700);
  15. #ifdef WIN32
  16. glutCreateWindow("Gra w kotka i myszkę");
  17. #else
  18. glutCreateWindow("Gra w kotka i myszke");
  19. #endif
  20.  
  21. //inicjalizacja macierzy
  22. glViewport(0, 0, 1000, 700);
  23. glMatrixMode(GL_MODELVIEW);
  24. glLoadIdentity();
  25.  
  26. glutDisplayFunc(Display);
  27. glutReshapeFunc(Reshape);
  28. glutKeyboardFunc(Key);
  29. glutKeyboardUpFunc(KeyUp);
  30.  
  31. glutSpecialFunc(SpecialKey);
  32. glutSpecialUpFunc(SpecialKeyUp);
  33.  
  34. int submenu2 = glutCreateMenu(Menu);
  35. #ifdef WIN32
  36. glutAddMenuEntry( "kot", PL_CAT );
  37. glutAddMenuEntry( "mysz", PL_MOUSE );
  38. #else
  39. glutAddMenuEntry( "kot", PL_CAT );
  40. glutAddMenuEntry( "mysz", PL_MOUSE );
  41. #endif
  42. int submenu1 = glutCreateMenu(Menu);
  43. #ifdef WIN32
  44. glutAddMenuEntry( "2 graczy", PL_PL );
  45. #else
  46. glutAddMenuEntry( "2 graczy", PL_PL );
  47. #endif
  48. glutAddSubMenu("1 gracz", submenu2);
  49. glutCreateMenu(Menu);
  50. #ifdef WIN32
  51. glutAddMenuEntry( "Wyjście", EXIT );
  52. #else
  53. glutAddMenuEntry( "Wyjscie", EXIT );
  54. #endif
  55.  
  56. glutAddSubMenu("Nowa gra", submenu1);
  57. glutAttachMenu(GLUT_RIGHT_BUTTON);
  58.  
  59. glutSetKeyRepeat(GLUT_KEY_REPEAT_OFF);
  60.  
  61. glutMainLoop();
  62.  
  63. return 0;
  64. }
  65.  
  66. //klawiatura.cpp
  67.  
  68. //include...
  69.  
  70. //funkcja zmieniajaca zapisana pozycje wierzcholkow jednej figury po rotacji
  71. void pozAfterRot(char animal, float angle)
  72. {
  73. }
  74.  
  75. void pozAfterTr(char animal, double vector) //aktualizowanie pozycji wierzcholkow (modyfikowanie oryginalnej tablicy wierzcholkow)
  76. {
  77. if(animal == 'm') //translacja myszy
  78. {
  79. if(mrotation == 0 || mrotation == 180 || mrotation == -180 || mrotation == 360 || mrotation == -360)
  80. {
  81. mousepoz[0][1] +=vector; //translacja wg osi OY
  82. mousepoz[1][1] +=vector;
  83. mousepoz[2][1] +=vector;
  84. mousepoz[3][1] +=vector;
  85. }
  86. else if(mrotation == 90 || mrotation == -90 || mrotation == 270 || mrotation == -270)
  87. {
  88. mousepoz[0][0] +=vector; //translacja wg osi OX
  89. mousepoz[1][0] +=vector;
  90. mousepoz[2][0] +=vector;
  91. mousepoz[3][0] +=vector;
  92. }
  93. else if(mrotation == 45 || mrotation == -45 || mrotation == 135 || mrotation == -135 || mrotation == 225 || mrotation == -225 || mrotation == 315 || mrotation == -315)
  94. {
  95. mousepoz[0][1] +=vector; //translacja wg osi OY
  96. mousepoz[1][1] +=vector;
  97. mousepoz[2][1] +=vector;
  98. mousepoz[3][1] +=vector;
  99. mousepoz[0][0] +=vector; //translacja wg osi OX
  100. mousepoz[1][0] +=vector;
  101. mousepoz[2][0] +=vector;
  102. mousepoz[3][0] +=vector;
  103. }
  104. }
  105. else if(animal == 'c') //translacja kota
  106. {
  107. if(crotation == 0 || crotation == 180 || crotation == -180 || crotation == 360 || crotation == -360)
  108. {
  109. catpoz[0][1] +=vector; //translacja wg osi OY
  110. catpoz[1][1] +=vector;
  111. catpoz[2][1] +=vector;
  112. catpoz[3][1] +=vector;
  113. }
  114. else if(crotation == 90 || crotation == -90 || crotation == 270 || crotation == -270)
  115. {
  116. catpoz[0][0] +=vector; //translacja wg osi OX
  117. catpoz[1][0] +=vector;
  118. catpoz[2][0] +=vector;
  119. catpoz[3][0] +=vector;
  120. }
  121. else if(crotation == 45 || crotation == -45 || crotation == 135 || crotation == -135 || crotation == 225 || crotation == -225 || crotation == 315 || crotation == -315)
  122. {
  123. catpoz[0][1] +=vector; //translacja wg osi OY
  124. catpoz[1][1] +=vector;
  125. catpoz[2][1] +=vector;
  126. catpoz[3][1] +=vector;
  127. catpoz[0][0] +=vector; //translacja wg osi OX
  128. catpoz[1][0] +=vector;
  129. catpoz[2][0] +=vector;
  130. catpoz[3][0] +=vector;
  131. }
  132. }
  133. }
  134.  
  135. bool* key= new bool[256]();
  136. bool* specialkey = new bool[128]();
  137.  
  138. void KeyUp(unsigned char k, int x, int y)
  139. {
  140. key[k]=true;
  141. glutPostRedisplay();
  142. }
  143.  
  144. void SpecialKeyUp(int k, int x, int y)
  145. {
  146. specialkey[k]=true;
  147. glutPostRedisplay();
  148. }
  149.  
  150. void Key(unsigned char k, int x, int y)
  151. {
  152. key[k] = false;
  153. switch(k)
  154. {
  155. case 27: //esc
  156. if(MessageBox(0, L"Czy na pewno chcesz wyjść?", L"Wyjscie", MB_OKCANCEL)== IDCANCEL)
  157. break;
  158. else
  159. {
  160. exit(0);
  161. break;
  162. }
  163. }
  164. glutPostRedisplay();
  165. }
  166.  
  167. void SpecialKey( int k, int x, int y )
  168. {
  169. specialkey[k]=false;
  170. glutPostRedisplay();
  171. }
  172.  
  173. void KeyOperations()
  174. {
  175. //sterowanie kotem - wasd
  176. if(key['w'])
  177. {
  178. DoEngine('c');
  179. pozAfterTr('c', -0.1);
  180. }
  181. if(key['s'])
  182. {
  183. Reverse('c');
  184. pozAfterTr('c', 0.1);
  185. }
  186. if(key['a'])
  187. {
  188. if(cangle == -315) {cangle = 0; crotation = 0; pozAfterRot('c', crotation);}
  189. else
  190. {
  191. cangle -= 45;
  192. crotation -= 45;
  193. pozAfterRot('c', crotation);
  194. }
  195. }
  196. if(key['d'])
  197. {
  198. if(cangle == 315) {cangle = 0; crotation = 0; pozAfterRot('c', crotation);}
  199. else
  200. {
  201. cangle +=45;
  202. crotation +=45;
  203. pozAfterRot('c', crotation);
  204. }
  205. }
  206.  
  207. }
  208.  
  209. void SpecialKeyOperations()
  210. {
  211. //strzalki - sterowanie mysza
  212. if(specialkey[GLUT_KEY_UP])
  213. {
  214. DoEngine('m');
  215. pozAfterTr('m', -0.1);
  216. }
  217. if(specialkey[GLUT_KEY_DOWN])
  218. {
  219. Reverse('m');
  220. pozAfterTr('m', 0.1);
  221. }
  222. if(specialkey[GLUT_KEY_LEFT])
  223. {
  224. if(mangle == -315) {mangle = 0; mrotation = 0;}
  225. else
  226. {
  227. mangle -=45;
  228. mrotation -=45;
  229. //pozAfterRot('m', mrotation);
  230. }
  231. }
  232. if(specialkey[GLUT_KEY_RIGHT])
  233. {
  234. if(mangle == 315) {mangle = 0; mrotation = 0;}
  235. else
  236. {
  237. mangle +=45;
  238. mrotation +=45;
  239. //pozAfterRot('m', mrotation);
  240. }
  241. }
  242. }
  243.  
  244. //scena3d.cpp
  245.  
  246. //include...
  247.  
  248. void renderRoom()
  249. {
  250. glPushMatrix();
  251.  
  252. glTranslatef( 0, 0, - 4.0 );
  253.  
  254. glBegin(GL_QUADS);
  255.  
  256. //prawa sciana
  257. glColor3f(0.33, 0.28, 0.19);
  258.  
  259. glVertex3f(10.0, 7.0, 0.5);
  260. glVertex3f(10.0, 7.0, 0.0);
  261. glVertex3f(10.0,-7.0, 0.0);
  262. glVertex3f(10.0,-7.0, 0.5);
  263.  
  264. //tylna sciana
  265. glColor3f(0.71, 0.58, 0.36);
  266.  
  267. glVertex3f(10.0, 7.0, 0.0);
  268. glVertex3f(-10.0, 7.0, 0.0);
  269. glVertex3f(-10.0,-7.0, 0.0);
  270. glVertex3f(10.0,-7.0, 0.0);
  271.  
  272. //lewa sciana
  273. glColor3f(0.20, 0.17, 0.12);
  274.  
  275. glVertex3f(-10.0, 7.0, 0.5);
  276. glVertex3f(-10.0, 7.0, 0.0);
  277. glVertex3f(-10.0,-7.0, 0.0);
  278. glVertex3f(-10.0,-7.0, 0.5);
  279.  
  280. //gorna sciana
  281. glColor3f(0.51, 0.40, 0.28);
  282.  
  283. glVertex3f(-10.0, 7.0, 0.0);
  284. glVertex3f(10.0, 7.0, 0.0);
  285. glVertex3f(10.0, 7.0, 0.5);
  286. glVertex3f(-10.0, 7.0, 0.5);
  287.  
  288. //dolna sciana
  289. glColor3f(0.15, 0.13, 0.10);
  290.  
  291. glVertex3f(-10.0,-7.0, 0.5);
  292. glVertex3f(10.0,-7.0, 0.5);
  293. glVertex3f(10.0,-7.0, 0.0);
  294. glVertex3f(-10.0,-7.0, 0.0);
  295.  
  296. glEnd(); //koniec definiowania obiektu
  297.  
  298. glPopMatrix();
  299.  
  300. }
  301.  
  302. void renderMouse()
  303. {
  304. glPushMatrix();
  305.  
  306. if( ((gracz1.type == 'h' && gracz1.animal == 'm') && (gracz2.type == 'h' && gracz2.animal == 'c')) || ((gracz1.type == 'h' && gracz1.animal == 'm') && (gracz2.type == 'c' && gracz2.animal == 'c')) )
  307. {
  308. glRotatef(mangle, 0.0, 0.0, 1.0);
  309. glTranslatef(mmovex, mmovey, 0.0);
  310. }
  311. else if((gracz1.type == 'h' && gracz1.animal == 'c') && (gracz2.type == 'c' && gracz2.animal == 'm'))
  312. {
  313. //...
  314. }
  315.  
  316. glBegin(GL_POLYGON);
  317. glColor3f(0.0, 0.0, 0.0);
  318.  
  319. glVertex3f(mousepoz[0][0], mousepoz[0][1], mousepoz[0][2]); //prawy dolny 9.0, -6.0, 0.1
  320. glVertex3f(mousepoz[1][0], mousepoz[1][1], mousepoz[1][2]); //prawy gorny 9.0, -5.0, 0.1
  321. glVertex3f(mousepoz[2][0], mousepoz[2][1], mousepoz[2][2]); //lewy gorny 8.0, -5.0, 0.1
  322. glVertex3f(mousepoz[3][0], mousepoz[3][1], mousepoz[3][2]); //lewy dolny 8.0, -6.0, 0.1
  323.  
  324. glEnd();
  325.  
  326. glPopMatrix();
  327. }
  328.  
  329. void renderCat()
  330. {
  331. glPushMatrix();
  332.  
  333. if( ((gracz1.type == 'h' && gracz1.animal == 'm') && (gracz2.type == 'h' && gracz2.animal == 'c'))||((gracz1.type == 'h' && gracz1.animal == 'c') && (gracz2.type == 'c' && gracz2.animal == 'm')) )
  334. {
  335.  
  336. glRotatef(cangle, 0.0, 0.0, 1.0);
  337. glTranslatef(cmovex, cmovey, 0.0);
  338. }
  339. else if((gracz1.type == 'h' && gracz1.animal == 'm') && (gracz2.type == 'c' && gracz2.animal == 'c'))
  340. {
  341. //...
  342. }
  343.  
  344. glBegin(GL_POLYGON);
  345. glColor3f(0.0, 0.0, 0.0);
  346.  
  347. glVertex3f(catpoz[0][0], catpoz[0][1], catpoz[0][2]); //prawy dolny -8.0, 5.0, 0.1
  348. glVertex3f(catpoz[1][0], catpoz[1][1], catpoz[1][2]); //prawy gorny -8.0, 6.0, 0.1
  349. glVertex3f(catpoz[2][0], catpoz[2][1], catpoz[2][2]); //lewy dolny -9.0, 6.0, 0.1
  350. glVertex3f(catpoz[3][0], catpoz[3][1], catpoz[3][2]); //lewy gorny -9.0, 5.0, 0.1
  351.  
  352.  
  353. glEnd();
  354.  
  355.  
  356. glPopMatrix();
  357.  
  358. }
  359.  
  360.  
  361.  
  362. void renderObstacle()
  363. {
  364. glBegin(GL_POLYGON);
  365. glColor3f(0.20, 0.17, 0.12);
  366.  
  367. glVertex3f(1.0, 1.0, 0.1); //prawy gorny
  368. glVertex3f(1.0, -1.0, 0.1); //prawy dolny
  369. glVertex3f(-1.0, -1.0, 0.1); //lewy dolny
  370. glVertex3f(-1.0, 1.0, 0.1); //lewy gorny
  371.  
  372. glEnd();
  373. }
  374.  
  375.  
  376. void Display() //generowanie sceny 3D
  377. {
  378. KeyOperations();
  379. SpecialKeyOperations();
  380.  
  381. renderRoom();
  382.  
  383. //
  384. glPushMatrix();
  385. glTranslatef(5.0, 2.0, 0.0);
  386. glScalef(1.5, 1.5, 0.0);
  387. renderObstacle();
  388. glPopMatrix();
  389.  
  390. glPushMatrix();
  391. glTranslatef(-6.0, -3.0, 0.0);
  392. glScalef(2.0, 0.9, 0.0);
  393. renderObstacle();
  394. glPopMatrix();
  395.  
  396. glPushMatrix();
  397. glTranslatef(-3.0, 4.0, 0.0);
  398. glScalef(2.0, 1.5, 0.0);
  399. renderObstacle();
  400. glPopMatrix();
  401.  
  402. glPushMatrix();
  403. glTranslatef(2.0, -4.0, 0.0);
  404. glScalef(1.9, 1.8, 0.0);
  405. renderObstacle();
  406. glPopMatrix();
  407. //
  408.  
  409.  
  410. renderMouse(); //dodanie myszy
  411.  
  412. renderCat(); // kot
  413.  
  414.  
  415. glFlush(); // wywolanie dotychczasowych polecen
  416.  
  417. glutSwapBuffers(); // zamiana buforów koloru
  418.  
  419. }
  420.  
  421.  
  422. void Reshape(int width, int height)
  423. {
  424. //...
  425. }
  426.  
  427.  
  428.  
  429.  
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.cpp: In function ‘int main(int, char**)’:
prog.cpp:8: error: ‘key’ was not declared in this scope
prog.cpp:10: error: ‘specialkey’ was not declared in this scope
prog.cpp:11: error: ‘glutInit’ was not declared in this scope
prog.cpp:13: error: ‘GLUT_DOUBLE’ was not declared in this scope
prog.cpp:13: error: ‘GLUT_RGB’ was not declared in this scope
prog.cpp:13: error: ‘glutInitDisplayMode’ was not declared in this scope
prog.cpp:14: error: ‘glutInitWindowSize’ was not declared in this scope
prog.cpp:18: error: ‘glutCreateWindow’ was not declared in this scope
prog.cpp:22: error: ‘glViewport’ was not declared in this scope
prog.cpp:23: error: ‘GL_MODELVIEW’ was not declared in this scope
prog.cpp:23: error: ‘glMatrixMode’ was not declared in this scope
prog.cpp:24: error: ‘glLoadIdentity’ was not declared in this scope
prog.cpp:26: error: ‘Display’ was not declared in this scope
prog.cpp:26: error: ‘glutDisplayFunc’ was not declared in this scope
prog.cpp:27: error: ‘Reshape’ was not declared in this scope
prog.cpp:27: error: ‘glutReshapeFunc’ was not declared in this scope
prog.cpp:28: error: ‘Key’ was not declared in this scope
prog.cpp:28: error: ‘glutKeyboardFunc’ was not declared in this scope
prog.cpp:29: error: ‘KeyUp’ was not declared in this scope
prog.cpp:29: error: ‘glutKeyboardUpFunc’ was not declared in this scope
prog.cpp:31: error: ‘SpecialKey’ was not declared in this scope
prog.cpp:31: error: ‘glutSpecialFunc’ was not declared in this scope
prog.cpp:32: error: ‘SpecialKeyUp’ was not declared in this scope
prog.cpp:32: error: ‘glutSpecialUpFunc’ was not declared in this scope
prog.cpp:34: error: ‘Menu’ was not declared in this scope
prog.cpp:34: error: ‘glutCreateMenu’ was not declared in this scope
prog.cpp:39: error: ‘PL_CAT’ was not declared in this scope
prog.cpp:39: error: ‘glutAddMenuEntry’ was not declared in this scope
prog.cpp:40: error: ‘PL_MOUSE’ was not declared in this scope
prog.cpp:46: error: ‘PL_PL’ was not declared in this scope
prog.cpp:48: error: ‘glutAddSubMenu’ was not declared in this scope
prog.cpp:53: error: ‘EXIT’ was not declared in this scope
prog.cpp:57: error: ‘GLUT_RIGHT_BUTTON’ was not declared in this scope
prog.cpp:57: error: ‘glutAttachMenu’ was not declared in this scope
prog.cpp:59: error: ‘GLUT_KEY_REPEAT_OFF’ was not declared in this scope
prog.cpp:59: error: ‘glutSetKeyRepeat’ was not declared in this scope
prog.cpp:61: error: ‘glutMainLoop’ was not declared in this scope
prog.cpp: In function ‘void pozAfterTr(char, double)’:
prog.cpp:79: error: ‘mrotation’ was not declared in this scope
prog.cpp:81: error: ‘mousepoz’ was not declared in this scope
prog.cpp:88: error: ‘mousepoz’ was not declared in this scope
prog.cpp:95: error: ‘mousepoz’ was not declared in this scope
prog.cpp:107: error: ‘crotation’ was not declared in this scope
prog.cpp:109: error: ‘catpoz’ was not declared in this scope
prog.cpp:116: error: ‘catpoz’ was not declared in this scope
prog.cpp:123: error: ‘catpoz’ was not declared in this scope
prog.cpp: In function ‘void KeyUp(unsigned char, int, int)’:
prog.cpp:141: error: ‘glutPostRedisplay’ was not declared in this scope
prog.cpp: In function ‘void SpecialKeyUp(int, int, int)’:
prog.cpp:147: error: ‘glutPostRedisplay’ was not declared in this scope
prog.cpp: In function ‘void Key(unsigned char, int, int)’:
prog.cpp:156: error: ‘MB_OKCANCEL’ was not declared in this scope
prog.cpp:156: error: ‘MessageBox’ was not declared in this scope
prog.cpp:156: error: ‘IDCANCEL’ was not declared in this scope
prog.cpp:160: error: ‘exit’ was not declared in this scope
prog.cpp:164: error: ‘glutPostRedisplay’ was not declared in this scope
prog.cpp: In function ‘void SpecialKey(int, int, int)’:
prog.cpp:170: error: ‘glutPostRedisplay’ was not declared in this scope
prog.cpp: In function ‘void KeyOperations()’:
prog.cpp:178: error: ‘DoEngine’ was not declared in this scope
prog.cpp:183: error: ‘Reverse’ was not declared in this scope
prog.cpp:188: error: ‘cangle’ was not declared in this scope
prog.cpp:188: error: ‘crotation’ was not declared in this scope
prog.cpp:192: error: ‘crotation’ was not declared in this scope
prog.cpp:198: error: ‘cangle’ was not declared in this scope
prog.cpp:198: error: ‘crotation’ was not declared in this scope
prog.cpp:202: error: ‘crotation’ was not declared in this scope
prog.cpp: In function ‘void SpecialKeyOperations()’:
prog.cpp:212: error: ‘GLUT_KEY_UP’ was not declared in this scope
prog.cpp:214: error: ‘DoEngine’ was not declared in this scope
prog.cpp:217: error: ‘GLUT_KEY_DOWN’ was not declared in this scope
prog.cpp:219: error: ‘Reverse’ was not declared in this scope
prog.cpp:222: error: ‘GLUT_KEY_LEFT’ was not declared in this scope
prog.cpp:224: error: ‘mangle’ was not declared in this scope
prog.cpp:224: error: ‘mrotation’ was not declared in this scope
prog.cpp:228: error: ‘mrotation’ was not declared in this scope
prog.cpp:232: error: ‘GLUT_KEY_RIGHT’ was not declared in this scope
prog.cpp:234: error: ‘mangle’ was not declared in this scope
prog.cpp:234: error: ‘mrotation’ was not declared in this scope
prog.cpp:238: error: ‘mrotation’ was not declared in this scope
prog.cpp: In function ‘void renderRoom()’:
prog.cpp:250: error: ‘glPushMatrix’ was not declared in this scope
prog.cpp:252: error: ‘glTranslatef’ was not declared in this scope
prog.cpp:254: error: ‘GL_QUADS’ was not declared in this scope
prog.cpp:254: error: ‘glBegin’ was not declared in this scope
prog.cpp:257: error: ‘glColor3f’ was not declared in this scope
prog.cpp:259: error: ‘glVertex3f’ was not declared in this scope
prog.cpp:296: error: ‘glEnd’ was not declared in this scope
prog.cpp:298: error: ‘glPopMatrix’ was not declared in this scope
prog.cpp: In function ‘void renderMouse()’:
prog.cpp:304: error: ‘glPushMatrix’ was not declared in this scope
prog.cpp:306: error: ‘gracz1’ was not declared in this scope
prog.cpp:306: error: ‘gracz2’ was not declared in this scope
prog.cpp:308: error: ‘mangle’ was not declared in this scope
prog.cpp:308: error: ‘glRotatef’ was not declared in this scope
prog.cpp:309: error: ‘mmovex’ was not declared in this scope
prog.cpp:309: error: ‘mmovey’ was not declared in this scope
prog.cpp:309: error: ‘glTranslatef’ was not declared in this scope
prog.cpp:316: error: ‘GL_POLYGON’ was not declared in this scope
prog.cpp:316: error: ‘glBegin’ was not declared in this scope
prog.cpp:317: error: ‘glColor3f’ was not declared in this scope
prog.cpp:319: error: ‘mousepoz’ was not declared in this scope
prog.cpp:319: error: ‘glVertex3f’ was not declared in this scope
prog.cpp:324: error: ‘glEnd’ was not declared in this scope
prog.cpp:326: error: ‘glPopMatrix’ was not declared in this scope
prog.cpp: In function ‘void renderCat()’:
prog.cpp:331: error: ‘glPushMatrix’ was not declared in this scope
prog.cpp:333: error: ‘gracz1’ was not declared in this scope
prog.cpp:333: error: ‘gracz2’ was not declared in this scope
prog.cpp:336: error: ‘cangle’ was not declared in this scope
prog.cpp:336: error: ‘glRotatef’ was not declared in this scope
prog.cpp:337: error: ‘cmovex’ was not declared in this scope
prog.cpp:337: error: ‘cmovey’ was not declared in this scope
prog.cpp:337: error: ‘glTranslatef’ was not declared in this scope
prog.cpp:344: error: ‘GL_POLYGON’ was not declared in this scope
prog.cpp:344: error: ‘glBegin’ was not declared in this scope
prog.cpp:345: error: ‘glColor3f’ was not declared in this scope
prog.cpp:347: error: ‘catpoz’ was not declared in this scope
prog.cpp:347: error: ‘glVertex3f’ was not declared in this scope
prog.cpp:353: error: ‘glEnd’ was not declared in this scope
prog.cpp:356: error: ‘glPopMatrix’ was not declared in this scope
prog.cpp: In function ‘void renderObstacle()’:
prog.cpp:364: error: ‘GL_POLYGON’ was not declared in this scope
prog.cpp:364: error: ‘glBegin’ was not declared in this scope
prog.cpp:365: error: ‘glColor3f’ was not declared in this scope
prog.cpp:367: error: ‘glVertex3f’ was not declared in this scope
prog.cpp:372: error: ‘glEnd’ was not declared in this scope
prog.cpp: In function ‘void Display()’:
prog.cpp:384: error: ‘glPushMatrix’ was not declared in this scope
prog.cpp:385: error: ‘glTranslatef’ was not declared in this scope
prog.cpp:386: error: ‘glScalef’ was not declared in this scope
prog.cpp:388: error: ‘glPopMatrix’ was not declared in this scope
prog.cpp:415: error: ‘glFlush’ was not declared in this scope
prog.cpp:417: error: ‘glutSwapBuffers’ was not declared in this scope
stdout
Standard output is empty