#include "stdafx.h"
#include<GL/freeglut.h>
#include<GLFW/glfw3.h>
// 绘图棱锥
void display()
{
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
// 三维图形由三维空间中的三角形拼接而成
glBegin(GL_TRIANGLES);
// 指定棱锥的四个顶点
GLfloat vertex[4][3] = {
{
0, 0, 0.5},
{
0.2, 0.2, 0},
{-0.3, 0,
OpenGL(三)三维图形绘制
最新推荐文章于 2024-05-23 16:00:03 发布