#include <iostream>
#include"glut.h"
void display()
{
glClearColor(1, 1, 0.9, 0.3);
glClear(GL_COLOR_BUFFER_BIT);
glPolygonMode(GL_FRONT_AND_BACK, GL_FILL);
glBegin(GL_POLYGON);
glColor3ub(0, 191, 255);
glVertex2f(10, 40);
glVertex2f(15, 65);
glVertex2f(30, 50);
glEnd();
glBegin(GL_POLYGON);
glColor3ub(250, 20, 147);
glVertex2f(15, 65);
glVertex2f(38, 67);
glVertex2f(30, 50);
glEnd();
glBegin(GL_POLYGON);
glColor3ub(250, 20, 147);
glVertex2f(10, 40);
glVertex2f(30, 30);
glVertex2f(30, 50);
glEnd();
glBegin(GL_POLYGON);
glColor3ub(255, 182, 193);
glVertex2f(30, 50);
glVertex2f(50, 60);
glVertex2f(38, 67);
glEnd();
glBegin(GL_POLYGON);
glColor3ub(219, 112, 147);
glVertex2f(30, 50);
glVertex2f(50, 60);
glVertex2f(50, 35);
glEnd();
glBegin(GL_POLYGON);
glColor3ub(218, 112, 214);
glVertex2f(30, 50);
glVertex2f(30, 30);
glVertex2f(50, 35);
glEnd();
glBegin(GL_POLYGON);
glColor3ub(255, 105, 180);
g
计算机图形学Opengl——爱心痣
于 2022-03-08 11:36:49 首次发布