Advertise here

Mari blajar Graphic Programming!!!

Posted by wanjModernist | 11:45 AM | , ,

Graphic Programming

#include
#include
#include

void init(void)
{
glClearColor(1.0,0.1,0.0,1.0);
glMatrixMode(GL_PROJECTION);
gluOrtho2D(0.0,300.0,0.2,50.0);
}

void DisplayDot(void)

{
glClear(GL_COLOR_BUFFER_BIT);
glColor3f(2.0,2.0,0.0);
glPointSize(40.0);
glBegin(GL_POINTS);
glVertex2f(155,25);
glEnd();

glFlush();

}

int main (int argc,char**argv)
{
glutInit(&argc,argv);
glutInitDisplayMode(GLUT_SINGLE|GLUT_RGB);
glutInitWindowPosition(800,100);
glutInitWindowSize(200,400);
glutCreateWindow(" Wanjohn Program ");
init();
glutDisplayFunc(DisplayDot);
glutMainLoop();
return 0;
}

Contact Modernity

Your Name :
Your Email :
Subject :
Message :
Image (case-sensitive):

Nuffnang