随笔分类 -  Opengl

摘要:1:简单实体构建(可运行代码VS) // 提示:在合适的地方修改或添加代码 #include <GL/glut.h> #include<stdio.h> #include<iostream> using namespace std; // 评测代码所用头文件-结束 // 请在此添加你的代码 /*** 阅读全文
posted @ 2022-11-28 20:21 lxp_blog 阅读(68) 评论(0) 推荐(0) 编辑
摘要:##glLoadIdentity() 转换为没有进行矩阵变换的状态。即对角线为1的单位矩阵。 OpenGL函数思考-glLoadIdentity ##glPushMatrix()和glPopMatrix() glPushMatrix();对之前的矩阵变换做一次备份,入栈。 变换1; push(); 阅读全文
posted @ 2022-10-21 21:48 lxp_blog 阅读(23) 评论(0) 推荐(0) 编辑
摘要:中点画线 #include <GL/glut.h> #include<math.h> #include<iostream> using namespace std; void Midpoint(float x0, float y0, float x1, float y1) { int flag = 阅读全文
posted @ 2022-09-19 17:52 lxp_blog 阅读(150) 评论(0) 推荐(0) 编辑
摘要:基础代码 #include <GL/GLUT.h> #include<time.h> // 初始化参数 void init() { glClearColor(0.1, 0.1, 0.4, 0.0);//设置背景颜色 glShadeModel(GL_SMOOTH); } void DrawMyObje 阅读全文
posted @ 2022-08-29 22:11 lxp_blog 阅读(31) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示
主题色彩