当前位置:网站首页>openGL_03使用不同的VAO与VBO,以及不同的shader
openGL_03使用不同的VAO与VBO,以及不同的shader
2022-06-09 04:15:00 【Hxm5211314】

同时创建VAO与VBO,每个VBO创建好之后绑定VAO
绘制时使用不同的顶点数组

需要注意的就是,在创建顶点缓冲区VBO时,需要及时绑定VAO,这样才能用上对应的顶点

新增一个片元着色器

const char* fragmentShader2Source =
"#version 330 core \n"
"out vec4 FragColor; \n" //out vec4 FragColor; 片段着色器的输出变量,表示的是最终的输出颜色
"void main(){ \n"
" FragColor = vec4(1.0f, 1.0f, 0.0f, 1.0f);} \0";//设置每个像素点的颜色为橘黄色
新增一个着色器程序

不同的三角形使用不同的着色器
边栏推荐
- 测试网站搭建+渗透+审计之第三篇Swagger接口渗透测试
- P5321 [BJOI2019]送别(LCT)
- Test website construction + penetration + audit Part 1 start the website with idea
- 音频功率放大电路(使用过的语音方案电路记录)
- 模板:常系数齐次线性递推(线性代数、多项式)
- Common port record
- P5354 [Ynoi2017] 由乃的 OJ(树剖、位运算)
- golang---並發runtime包
- Status mode simulates elevator operation
- From just entering the testing industry to doubling my salary: talk about my advanced testing experience, which is worth learning from
猜你喜欢

OpenInfra基金会发起“定向基金”计划,推行成功开源治理经验

Winform UI界面设计例程——自定义控件progressBar
![[software tools] [tutorials] a useful tool for exporting CSDN blog articles to word](/img/40/556cd8c4868a93d4cc06a4a945475d.png)
[software tools] [tutorials] a useful tool for exporting CSDN blog articles to word

How to write a blueprint for the data center

rigidbody2d 围绕某固定点point进行旋转rotate

(3) Data binding instructions

Harbor容器安装以及相关特性部署与使用(SSL证书+AD域)

golang ---image--热力图与照片的重叠

Attention OCR Chinese version mas ter code running logic

举例说明tf中LSTMCell的cell、num_unit是什么意思
随机推荐
(5) Bidirectional data binding
1264_ Analysis of FreeRTOS task initialization and stack initialization processing
Large factory outsourcing or self research company? How to choose a job for a tester?
How to write a blueprint for the data center
Golang--- redis operation
知识点滴- BC和BCE的区别
Merkle Patricia trie principle
Dart: Foundation
Template: constant coefficient homogeneous linear recurrence (linear algebra, polynomial)
基于PyQt5完成的PDF拆分
声学工程师应知道的150个声学基础知识(全篇)
Golang --- comparison operation of various types of variables
Rigidbody2d rotate around a fixed point rotate
Page components of wechat applet development
WinForm UI interface design routine - Custom Control ProgressBar
Functions and differences of call apply bind
PHP e签宝电子签名Saas API 对接流程
PDQ环境变量
Golang-- concurrent runtime package
lua 字符串