I wrote this code in C++:
#include <windows.h>
#include <GL/glut.h>
void drawPoint() {
glBegin(GL_POLYGON);
glVertex3f(20, 20, 0);
glVertex3f(80, 20, 0);
glVertex3f(80, 80, 0);
glVertex3f(20, 80, 0);
glEnd();
}
int main(){
drawPoint();
}
The compiler should run the program, by showing a window with a black square.
But when I run, it doesn't execute anything. I use Eclipse, but I don't think the latter is the problem because I executed an example program this morning and it worked well. Can you help me? :)