OpenGL
tingzhushaohua
学习
展开
-
OpenGL解析法绘制旋转曲面--青花瓷
相关背景 代码展示Test.cpp#include "freeglut.h"#include "GlutWin.h"#include <math.h>#include <iostream>#pragma comment(lib,"freeglut.lib")#define PI 3.1415926using namespace std;void myDisplay(void){原创 2017-04-14 11:31:57 · 2284 阅读 · 0 评论 -
OpenGL---二维光线追踪
转载自 http://blog.csdn.net/u012319493/article/details/57079584 代码、原理:计算机图形学(OpenGL)第三版 第4章 我在其中加上了注释流程需要用户从文件中读取多边形数据1、由用户画出第一条射线,需调用函数raytrace2d_mouse,raytrace2d_motion。2、函数raytrace2d_keyboard中,转载 2017-03-27 11:12:08 · 1134 阅读 · 0 评论 -
OpenGL之C++实现读取txt文件并显示
封装导致了效率变低?读取32M的文件需要10秒左右,使用c语言会快很多。代码有些繁琐。绘制dragonShow.cpp#include "freeglut.h"#include "ReadTxtFIle.h"#include "Point3f.h"#include "GlutWin.h"#pragma comment(lib,"freeglut.lib")vector<Point3f> poi原创 2017-04-14 12:01:12 · 6209 阅读 · 15 评论 -
ubuntu 16.04下编译GLFW
如果报错 “The RandR library and headers were not found”则需要在terminal里执行“sudo apt-get install libxrandr-dev”如果报错 “The XInput library and headers were not found”则需要在terminal里执行“sudo apt-get install libxi-de...原创 2019-07-15 21:30:13 · 1006 阅读 · 0 评论