Alright, i cant get OpenGL and GLUT working. I’m following the tutorials on http://www.lighthouse3d.com/opengl/glut/index.php?2 but when I compile I get errors.
Here’s the code:
#include <GL/glut.h>
void renderScene(void) {
glClear(GL_COLOR_BUFFER_BIT);
glBegin(GL_TRIANGLES);
glVertex3f(-0.5,-0.5,0.0);
glVertex3f(0.5,0.0,0.0);
glVertex3f(0.0,0.5,0.0);
glEnd();
glFlush();
}
void main(int argc, char **argv) {
glutInit(&argc, argv);
glutInitDisplayMode(GLUT_DEPTH | GLUT_SINGLE | GLUT_RGBA);
glutInitWindowPosition(100,100);
glutInitWindowSize(320,320);
glutCreateWindow("3D Tech- GLUT Tutorial");
glutDisplayFunc(renderScene);
glutMainLoop();
}
And here’s the errors:
`main' must return `int'
And I guess the error is referring to line 14. I’ve posted on lots of different forums but haven’t gotten any further. Any help is greatly appreciated thanks-