自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

ZMT的专栏

学习成长轨迹分享

  • 博客(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 444

原创 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 235

原创 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 253

原创 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 195

原创 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 297

原创 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 227

原创 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 133

原创 OpenGL: Points(DR)

PART ONE

2022-04-30 10:29:25 101

原创 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 168

原创 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 138

原创 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 94

原创 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 205

原创 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 528

原创 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 495

原创 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 521

原创 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 360

原创 OpenGL: glDrawPixels&GLubyte

利用OpenGL在像素级别直接控制数据。

2022-04-28 13:50:00 493

原创 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 1229

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除