/* Praktikum 01
* Pengenalan OpenGL
*/
#include <windows.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
Petunjuk Praktikum
Grafika Komputer - 4
#include <stdarg.h>
#include <glut.h>
void mydisplay()
{
glClear(GL_COLOR_BUFFER_BIT); // Menghapus layar
glBegin(GL_POLYGON);
glVertex2f(-0.5, -0.5);
glVertex2f(-0.5, 0.5);
glVertex2f(0.5, 0.5);
glVertex2f(0.5, -0.5);
glEnd();
glFlush();
}
int main(int argc, char** argv)
{
printf("Contoh Sederhana Kotak ");
glutCreateWindow("Praktikum01");
glutDisplayFunc(mydisplay);
glutMainLoop();
}
* Pengenalan OpenGL
*/
#include <windows.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
Petunjuk Praktikum
Grafika Komputer - 4
#include <stdarg.h>
#include <glut.h>
void mydisplay()
{
glClear(GL_COLOR_BUFFER_BIT); // Menghapus layar
glBegin(GL_POLYGON);
glVertex2f(-0.5, -0.5);
glVertex2f(-0.5, 0.5);
glVertex2f(0.5, 0.5);
glVertex2f(0.5, -0.5);
glEnd();
glFlush();
}
int main(int argc, char** argv)
{
printf("Contoh Sederhana Kotak ");
glutCreateWindow("Praktikum01");
glutDisplayFunc(mydisplay);
glutMainLoop();
}
No comments:
Post a Comment