/*
NI'MAH NAAFI'ATUL ULFAH
5302410027
ROMBEL 01
*/
#include <GL/glut.h>
void renderScene();
int main(int argc, char* argv[])
{
glutInit(&argc, argv);
glutCreateWindow("Tiangles 5302410027");
glutDisplayFunc(renderScene);
glutMainLoop();
return 0;
}
void renderScene()
{
glClear(GL_COLOR_BUFFER_BIT);
glBegin(GL_TRIANGLES);
glColor3f(0.0f, 1.0f, 1.0f);
glVertex2f(0.0f, -0.0f);
glColor3f(0.0f, 1.0f, 1.0f);
glVertex2f(-0.75f, 0.0f);
glColor3f(1.0f, 1.0f, 0.0f);
glVertex2f(-0.25f, 0.5f);
glColor3f(1.0f, 1.0f, 0.0f);
glVertex2f(0.0f, -0.25f);
glColor3f(0.0f, 0.0f, 1.0f);
glVertex2f(0.75f, -0.75f);
glVertex2f(0.25f, 0.25f);
glEnd();
glFlush();
}
Tidak ada komentar:
Posting Komentar