Noob has problem

Hi,

can someone tell me whats wrong with this exampleprogram? does not compile with dev c++ 4.992. Shows just a simple line

#include <GL/glut.h>
#include <windows.h>
#include <stdlib.h>

void init(void){

glClearColor(1.0, 1.0, 1.0, 0.0);

glMatrixMode(GL_PROJECTION);
gluOrtho2D(0.0, 200.0, 0.0, 150.0);
}
void display(void){

glClear(GL_COLOR_BUFFER_BIT);

glColor3f(1.0, 0.0, 0.0);
glBegin(GL_LINES);
glVertex2i(180, 15);
glVertex2i(10, 145);
glEnd();
glFlush();
}

int main(int argc, char** argv)
{
glutInit(&argc, argv);
glutInitDisplayMode(GLUT_SINGLE | GLUT_RGB);
glutInitWindowPostition(50, 100);
glutInitWindowSize(400, 300);
glutCreateWindow(argv[0]);
init();
glutDisplayFunc(display);
glutMainLoop();
return 0;
}

Show compiler output.

Instead:


#include <windows.h>
#include <stdlib.h>
#include <GL/glut.h>

I’m not going to tell what is wrong with this ;p

O dear, i must be blind

That’s what I thought :wink: