/*Pamungkas
Bayu Aji 12018050*/
/* Praktikum
01
* Pengenalan OpenGL
*/
#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); // Menghapus layar
glBegin(GL_POLYGON);
glVertex2f(0.0, 0.1);
glVertex2f(0.1, 0.0);
glVertex2f(0.0, -0.1);
glVertex2f(-0.1, 0.0);
glEnd();
* Pengenalan OpenGL
*/
#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); // Menghapus layar
glBegin(GL_POLYGON);
glVertex2f(0.0, 0.1);
glVertex2f(0.1, 0.0);
glVertex2f(0.0, -0.1);
glVertex2f(-0.1, 0.0);
glEnd();
glBegin(GL_POLYGON);
glVertex2f(0.2, 0.1);
glVertex2f(0.3, -0.0);
glVertex2f(0.2, -0.1);
glVertex2f(0.1, 0.0);
glEnd();
glVertex2f(0.2, 0.1);
glVertex2f(0.3, -0.0);
glVertex2f(0.2, -0.1);
glVertex2f(0.1, 0.0);
glEnd();
glBegin(GL_POLYGON);
glVertex2f(-0.2, 0.1);
glVertex2f(-0.1, 0.0);
glVertex2f(-0.2, -0.1);
glVertex2f(-0.3, 0.0);
glEnd();
glVertex2f(-0.2, 0.1);
glVertex2f(-0.1, 0.0);
glVertex2f(-0.2, -0.1);
glVertex2f(-0.3, 0.0);
glEnd();
glFlush();
}
int main(int argc, char** argv)
{
printf("Pamungkas Bayu Aji ");
}
int main(int argc, char** argv)
{
printf("Pamungkas Bayu Aji ");
printf("12018050
");
glutCreateWindow("Praktikum01");
glutDisplayFunc(mydisplay);
glutMainLoop();
}
glutCreateWindow("Praktikum01");
glutDisplayFunc(mydisplay);
glutMainLoop();
}
0 comments:
Posting Komentar