Source Code :
#include <stdlib.h> //Load library
#include <glut.h> //Load library glut
void drawPoligon (void)
{
glClear(GL_COLOR_BUFFER_BIT);
glBegin(GL_LINE_LOOP);
glVertex2d (0,0);
glVertex2d (100,100);
glVertex2d (100,0);
glVertex2d (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,240);
glutCreateWindow("Pemrograman Grafis GLUT");
gluOrtho2D(-320.,320.,-240.,240.);
glutDisplayFunc(drawPoligon);
glutMainLoop();
}
Screenshoot :
BalasHapusLinux Ubuntu
in this article I will show the steps easy it is to install Ubuntu Linux desktop
read more http://student.blog.dinus.ac.id/dewanggapradeta/2015/04/19/cara-menginstal-linux-ubuntu/