why Xcode can not run this code please ?

Member
Posts: 178
Joined: 2008.09
Post: #1
#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!

my iphone website: http://www.elsalvadorguia.com
intel Imac 20", iphone 8GB (2G)
Quote this message in a reply
Luminary
Posts: 5,143
Joined: 2002.04
Post: #2
Because everything about it is wrong.

OneSadCookie: Xcode/GLUT Tutorial
Quote this message in a reply
Member
Posts: 178
Joined: 2008.09
Post: #3
thanks and sorry.
i will read all the tutorial.
answer fast thanks again

my iphone website: http://www.elsalvadorguia.com
intel Imac 20", iphone 8GB (2G)
Quote this message in a reply
Post Reply