#include
<windows.h>
#include
<stdio.h>
#include
<stdlib.h>
#include
<string.h>
#include
<stdarg.h>
#include
<glut.h>
void
mydisplay(){
glClear
(GL_COLOR_BUFFER_BIT);
glBegin
(GL_POLYGON);
glVertex2f(0,
0);
glVertex2f(0.5,
0.5);
glVertex2f(0,
1);
glVertex2f(-0.5,
0.5);
glVertex2f(0,
0);
glVertex2f(0.5,
-0.5);
glVertex2f(0,
-1);
glVertex2f(-0.5,
-0.5);
glVertex2f(0,
0);
glEnd();
glFlush();
}
int
main (int argc, char**
argv)
{
printf ("contoh sederhana kotak");
glutCreateWindow("Praktikum 1");
glutDisplayFunc
(mydisplay);
glutMainLoop();}
0 Komentar