- 博客(18)
- 问答 (1)
- 收藏
- 关注
原创 OpenGL: Colorful Line(CR)
PART ONE codes.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
745
原创 OpenGL: Wireframe Rectangle(CR)
PART ONE codes.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
502
原创 OpenGL: Wireframe Triangle(CR)
PART ONE codes.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
528
原创 OpenGL: Points to Lines(CR)
PART ONE codes.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
433
原创 OpenGL: Slope-ALGO(1)
PART ONE codes.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
511
原创 OpenGL: Points to Lines(DR)
PART ONE GL_LINES GL_LINE_STRIP GL_LINE_LOOP codes.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
423
原创 OpenGL: Points(CR)
PART ONE codes.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
394
原创 OpenGL: Point(CR)
PART ONE code.cpp #include <stdio.h> #include <GL/glew.h> #include <GL/freeglut.h> #define width 222 #define height 207 struct 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
430
原创 OpenGL: Point(DR)
PART ONE codes.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
391
原创 OpenGL•IMG: 10^4*10^4
PART ONE codes.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 5000 GLubyte red
2022-04-29 17:37:53
229
原创 OpenGL•FBO: 5461*5461
PART ONE codes.cpp #include <stdio.h> #include <GL/glew.h> #include <GL/freeglut.h> #define width 5461 #define height 5461 GLuint FBO; GLuint RBO; void initFBO() { glGenFramebuffers(1, &FBO); glBindFramebuffer(GL_FRAMEBUFFER,
2022-04-29 10:20:27
466
原创 OpenGL•FBO: Imaging(1)
PART ONE glRasterPos2f(-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
843
原创 OpenGL•FBO: glReadBuffer&glDrawBuffer
PART ONE codes.cpp #include <stdio.h> #include <GL/glew.h> #include <GL/freeglut.h> #define width 222 #define height 207 GLubyte image[height][width][4]; void initImage() { for (int h = 0; h < height; h++) { for (int w = 0; w
2022-04-28 23:14:53
866
原创 OpenGL•PBO: glReadPixels&glDrawPixels
PART ONE codes.cpp #include <stdio.h> #include <GL/glew.h> #include <GL/freeglut.h> #define width 222 #define height 207 GLuint PBO; void initPBO() { glGenBuffers(1, &PBO); glBindBuffer(GL_PIXEL_PACK_BUFFER, PBO); glBufferD.
2022-04-28 15:32:55
863
原创 OpenGL•PBO: glGenBuffers&glBindBuffer
PART ONE codes.cpp #include <stdio.h> #include <GL/glew.h> #include <GL/freeglut.h> #define width 222 #define height 207 GLubyte image[height][width][4]; void initImage() { for (int h = 0; h < height; h++) { for (int w = 0; w
2022-04-28 14:51:07
641
原创 OpenGL: Triangle(DR)
PART ONE Step1: 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
1526
空空如也
多视点(Multiple Viewpoint Rendering)渲染算法实现
2021-11-22
TA创建的收藏夹 TA关注的收藏夹
TA关注的人
RSS订阅