Joshhua5
01-02-2011, 01:47 AM
Hello, Been looking through some OpenGL tutorials and I've hit a problem with the most basic of things and i have No idea what the problem is...
the code is
#include <stdlib.h>
#include <gl/glut.h>
void renderScene()
{
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
glBegin(GL_TRIANGLES);
glVertex3f(-0.5,-0.5,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);
glutInitWindowPosition(100,100);
glutInitWindowSize(660,430);
glutInitDisplayMode(GLUT_RGB | GLUT_SINGLE | GLUT_DEPTH);
glutCreateWindow("Glut Window Test");
glutDisplayFunc(renderScene);
glutMainLoop();
}
and my Error is
http://img534.imageshack.us/img534/9140/capturezi.jpg
the code is
#include <stdlib.h>
#include <gl/glut.h>
void renderScene()
{
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
glBegin(GL_TRIANGLES);
glVertex3f(-0.5,-0.5,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);
glutInitWindowPosition(100,100);
glutInitWindowSize(660,430);
glutInitDisplayMode(GLUT_RGB | GLUT_SINGLE | GLUT_DEPTH);
glutCreateWindow("Glut Window Test");
glutDisplayFunc(renderScene);
glutMainLoop();
}
and my Error is
http://img534.imageshack.us/img534/9140/capturezi.jpg