hi all,i hav been trying to draw a polygon without any succes please help the code is given below:
#include<stdio.h>
#include<GL/glut.H>
#include<conio.h>
void dis(void)
{
glClearColor(1.0,1.0,1.0,0.0);
glClear(GL_COLOR_BUFFER_BIT|GL_DEPTH_BUFFER_BIT);
glDisable(GL_DEPTH_TEST);
glBegin(GL_POLYGON);
glVertex2f(3.0,3.0);
glVertex2f(9.0,9.0);
glVertex2f(6.0,5.0);
glEnd();
glFlush();
}
void main(int argc,char**argv)
{
glutInit(&argc,argv);
printf(“hi”);
glutInitDisplayMode(GLUT_SINGLE|GLUT_RGB);
glutInitWindowSize(500,500);
glutInitWindowPosition(0,0);
glutCreateWindow(“hi”);
glutDisplayFunc(dis);
glutMainLoop();
}