- 博客(18)
- 问答 (1)
- 收藏
- 关注
原创 OpenGL: Colorful Line(CR)
PART ONEcodes.cpp#include <stdio.h>#include <GL/glew.h>#include <GL/freeglut.h>#include <iostream>using namespace std;#define width 222#define height 207#define num 2 //计数器struct Vector3f { GLfloat x; GLfloat y;
2022-05-01 10:12:16
518
原创 OpenGL: Wireframe Rectangle(CR)
PART ONEcodes.cpp#include <stdio.h>#include <GL/glew.h>#include <GL/freeglut.h>#include <iostream>using namespace std;#define width 222#define height 207#define point_num 4 //顶点计数器#define triangle_num 2 //三角形计数器.
2022-04-30 21:07:56
305
原创 OpenGL: Wireframe Triangle(CR)
PART ONEcodes.cpp#include <stdio.h>#include <GL/glew.h>#include <GL/freeglut.h>#include <iostream>using namespace std;#define width 222#define height 207#define num 3 //顶点计数器struct Vector3f { GLfloat x; GLfloat
2022-04-30 17:59:36
326
原创 OpenGL: Points to Lines(CR)
PART ONEcodes.cpp#include <stdio.h>#include <GL/glew.h>#include <GL/freeglut.h>#include <iostream>using namespace std;#define width 222#define height 207#define num 3 //顶点计数器struct Vector3f { GLfloat x; GLfloat
2022-04-30 17:18:15
256
原创 OpenGL: Slope-ALGO(1)
PART ONEcodes.cpp#include <stdio.h>#include <GL/glew.h>#include <GL/freeglut.h>#include <iostream>using namespace std;#define width 222#define height 207#define num 2 //计数器struct Vector3f { GLfloat x; GLfloat y;
2022-04-30 16:43:00
348
原创 OpenGL: Points to Lines(DR)
PART ONEGL_LINESGL_LINE_STRIPGL_LINE_LOOPcodes.cpp#include <stdio.h>#include <GL/glew.h>#include <GL/freeglut.h>int width = 222;int height = 207;struct Vector3f { GLfloat x; GLfloat y; GLfloat z;};..
2022-04-30 13:45:48
302
原创 OpenGL: Points(CR)
PART ONEcodes.cpp#include <stdio.h>#include <GL/glew.h>#include <GL/freeglut.h>#define width 222#define height 207#define num 2 //计数器struct Vector3f { GLfloat x; GLfloat y; GLfloat z;};struct Color { int r; int g;
2022-04-30 12:50:26
194
原创 OpenGL: Point(CR)
PART ONEcode.cpp#include <stdio.h>#include <GL/glew.h>#include <GL/freeglut.h>#define width 222#define height 207struct Color { int r; int g; int b; int a;}color{255,0,0,255};GLubyte point[height][width][4];void initPoint
2022-04-30 09:46:54
224
原创 OpenGL: Point(DR)
PART ONEcodes.cpp#include <stdio.h>#include <GL/glew.h>#include <GL/freeglut.h>int width = 222;int height = 207;struct Vector3f { float x; float y; float z;};GLuint VBO;void initVBO(){ Vector3f point = {
2022-04-30 08:55:06
192
原创 OpenGL•IMG: 10^4*10^4
PART ONEcodes.cpp#include <stdio.h>#include <iostream>#include <GL/glew.h>#include <GL/freeglut.h>using namespace std;#define hugeImageX 10000#define hugeImageY 10000#define width 5000#define height 5000GLubyte red
2022-04-29 17:37:53
142
原创 OpenGL•FBO: 5461*5461
PART ONEcodes.cpp#include <stdio.h>#include <GL/glew.h>#include <GL/freeglut.h>#define width 5461#define height 5461GLuint FBO;GLuint RBO;void initFBO(){ glGenFramebuffers(1, &FBO); glBindFramebuffer(GL_FRAMEBUFFER,
2022-04-29 10:20:27
273
原创 OpenGL•FBO: Imaging(1)
PART ONEglRasterPos2f(-1.0, -1.0) glRasterPos2f(0.0, 0.0)glRasterPos2f(-1.0, -1.0)codes.cpp#include <stdio.h>#include <GL/glew.h>#include <GL/freeglut.h>#define width 222#define height 207#define row 10#define co...
2022-04-29 08:15:08
616
原创 OpenGL•FBO: glReadBuffer&glDrawBuffer
PART ONEcodes.cpp#include <stdio.h>#include <GL/glew.h>#include <GL/freeglut.h>#define width 222#define height 207GLubyte image[height][width][4];void initImage(){ for (int h = 0; h < height; h++) { for (int w = 0; w
2022-04-28 23:14:53
649
原创 OpenGL•PBO: glReadPixels&glDrawPixels
PART ONEcodes.cpp#include <stdio.h>#include <GL/glew.h>#include <GL/freeglut.h>#define width 222#define height 207GLuint PBO;void initPBO(){ glGenBuffers(1, &PBO); glBindBuffer(GL_PIXEL_PACK_BUFFER, PBO); glBufferD.
2022-04-28 15:32:55
634
原创 OpenGL•PBO: glGenBuffers&glBindBuffer
PART ONEcodes.cpp#include <stdio.h>#include <GL/glew.h>#include <GL/freeglut.h>#define width 222#define height 207GLubyte image[height][width][4];void initImage(){ for (int h = 0; h < height; h++) { for (int w = 0; w
2022-04-28 14:51:07
437
原创 OpenGL: Triangle(DR)
PART ONEStep1: Runthe IDE “Microsoft Visual Studio”, then click the “创建新项目”to create a “控制台应用” program with the “name" you like. Makingsure that your IDE had already downloadedthe "使用C++的桌面开发" components bythe "Visual Studio installer".S...
2022-04-28 11:50:41
1292
空空如也
多视点(Multiple Viewpoint Rendering)渲染算法实现
2021-11-22
TA创建的收藏夹 TA关注的收藏夹
TA关注的人