iDevGames Forums
why Xcode can not run this code please ? - Printable Version

+- iDevGames Forums (http://www.idevgames.com/forums)
+-- Forum: Development Zone (/forum-3.html)
+--- Forum: Graphics & Audio Programming (/forum-9.html)
+--- Thread: why Xcode can not run this code please ? (/thread-2390.html)



why Xcode can not run this code please ? - imaumac - Sep 19, 2008 01:46 PM

#include <iostream>

main() {
InitializeAWindowPlease();
glClearColor (0.0, 0.0, 0.0, 0.0);
glClear (GL_COLOR_BUFFER_BIT);
glColor3f (1.0, 1.0, 1.0);
glOrtho(0.0, 1.0, 0.0, 1.0, -1.0, 1.0);
glBegin(GL_POLYGON);
glVertex3f (0.25, 0.25, 0.0);
glVertex3f (0.75, 0.25, 0.0);
glVertex3f (0.75, 0.75, 0.0);
glVertex3f (0.25, 0.75, 0.0);
glEnd();
glFlush();
UpdateTheWindowAndCheckForEvents();
}


Quote:-----------------------------------------
note: its a openGL code to make 2 squares. thanks!



why Xcode can not run this code please ? - OneSadCookie - Sep 19, 2008 01:51 PM

Because everything about it is wrong.

OneSadCookie: Xcode/GLUT Tutorial


why Xcode can not run this code please ? - imaumac - Sep 19, 2008 03:55 PM

thanks and sorry.
i will read all the tutorial.
answer fast thanks again