01 2021 档案

xcode:读取txt文件
摘要:编译之后的文件目录 程序中使用: auto shader = new Shader("./shader_res/shader.vs", "./shader_res/shader.fs"); 阅读全文

posted @ 2021-01-11 15:42 ZhYQ_note 阅读(447) 评论(0) 推荐(0) 编辑

mac opengl 画一个三角形
摘要:1、mac下opengl开发环境搭建 2、学习https://learnopengl-cn.github.io/01%20Getting%20started/04%20Hello%20Triangle/ 课程opengl的基本概念, 坐标,VAO,VBO, shader等和一些常用的API 3、参考 阅读全文

posted @ 2021-01-11 10:31 ZhYQ_note 阅读(110) 评论(0) 推荐(0) 编辑

glVertexAttribPointer
摘要:解析顶点数据 例如: 1 2 glVertexAttribPointer(0, 3, GL_FLOAT, GL_FALSE, 3 * sizeof(float), (void*)0); glEnableVertexAttribArray(0); glVertexAttribPointer函数的参数非 阅读全文

posted @ 2021-01-08 17:43 ZhYQ_note 阅读(246) 评论(0) 推荐(0) 编辑

glEnableVertexAttribArray 使用
摘要:const char *vertexShaderSource = "#version 330 core\n" "layout (location = 1) in vec3 aPos;\n" "void main()\n" "{\n" " gl_Position = vec4(aPos.x, aPos 阅读全文

posted @ 2021-01-08 17:02 ZhYQ_note 阅读(1084) 评论(0) 推荐(0) 编辑

macOS下基于GLFW+GLAD的OpenGL环境配置
摘要:1、安装glfw brew install glfw 2、生成glad,并下载下来 glad的配置与大多数的开源库有些不同glad使用 在线服务,https://glad.dav1d.de/,告诉glad需要定义的OpenGL版本,会根据这个版本加载所有的相关的函数 3、xcode创建Command 阅读全文

posted @ 2021-01-07 20:11 ZhYQ_note 阅读(464) 评论(0) 推荐(0) 编辑

导航

< 2025年3月 >
23 24 25 26 27 28 1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31 1 2 3 4 5
点击右上角即可分享
微信分享提示