Ask Question

Name:
Title:
Your Question:

Answer Question

Name:
Your Answer:
User Submitted Source Code!


Description:
  ss.c
Language: C/C++
Code:
#include<GL/glut.h>
main(int argc,char** argv)
{
glutInit(&argc,argv);
glutInitWindowSize(700,500);
glutInitWindowPosition(200,200);
glutCreateWindow("2D");
glClearColor(0,0,0,0);
glClear(GL_COLOR_BUFFER_BIT);
glBegin(GL_TRIANGLES);
//glVertex2f(-0.5,-0.5);
glVertex2f(-0.5,1);
glVertex2f(0.5,0.75);
glVertex2f(-0.5,0.5);
glColor3f(1,0,0);
glRasterPos2f(0,0);
glEnd();
glFlush();
glutMainLoop();
}
          
          
Comments: