当前位置:网站首页>OpenGL shader learning notes: varying variables
OpenGL shader learning notes: varying variables
2022-07-27 07:41:00 【Wangwangfugui】

varying Variables can be in Vertex Shader and Fragment Shader Transfer data between
Application calls in the rendering pipeline openglAPI, Send vertex data to Vertex Shader,Vertex Shader After processing, output data to Fragment Shader, Such as in the figure above Vertex Shader->Fragment Shader In the process of varying Variables are responsible for transferring data from Vertex Shader Carry to Fragment Shader.
const char* vs = "uniform vec4 _color;\
varying vec4 outColor;\
void main()\
{\
outColor = _color;\
gl_Position = ftransform();\
}";
const char* ps = " varying vec4 outColor;\
void main()\
{\
gl_FragColor = outColor;\
}";
//vs adopt outColor Variables output data ,ps adopt outColor Variables accept vs data
createProgram(vs, ps);
_color = glGetUniformLocation(_program,"_color");边栏推荐
- C语言实现猜数字小游戏项目实战(基于srand函数、rand函数,Switch语句、while循环、if条件判据等)
- A small cotton padded jacket with air leakage
- Using docker in MAC to build Oracle database server
- Plato farm is expected to further expand its ecosystem through elephant swap
- 记录一个自己挖的坑~
- JS regular expression implementation adds a comma to every three digits
- Error when connecting to MySQL: public key retrieval is not allowed [solution]
- Gossip: Recently, many friends talk about going abroad
- Analysis of query results using both left join on and where in MySQL
- flink中维表Join几种常见方式总结
猜你喜欢

The integrated real-time HTAP database stonedb, how to replace MySQL and achieve nearly 100 times the improvement of analysis performance

Prior Attention Enhanced Convolutional Neural Network Based Automatic Segmentation of Organs at Risk

An open source OA office automation system

ADC噪声全面分析 -01- ADC噪声的类型以及ADC特性

记录一个自己挖的坑~

Record a pit dug by yourself~

基于Arduino的温度、湿度测量显示装置

Applet payment management - new payment docking process

【小程序】uniapp发行微信小程序上传失败Error: Error: {'errCode':-10008,'errMsg':'invalid ip...
为啥国内大厂都把云计算当成香饽饽,这个万亿市场你真的了解吗
随机推荐
The error of QT connecting SQLite database and its modification
What are the main threads of Youxuan database?
什么是真正的HTAP?(一)背景篇
What is the real HTAP? (2) Challenge article
Am I delayed by the code... Unfortunately, I became a programmer
单片机多级菜单
[stonedb class] introductory lesson 1: popular science of database knowledge
单元测试系统化讲解之Mockito
shell awk相关练习
Clickhouse notes 1 | introduction, features | installation and use based on centos7 system | common data types | mergetree table engine | SQL operation
次轮Okaleido Tiger即将登录Binance NFT,引发社区热议
Drconv pytorch is changed to the same size of output and input
drawImage方法第一次调用不显示图片的解决方式
The difference between critical section (the code that accesses critical resources in each thread) and mutex (mutex between processes, shared memory, virtual address)
一体化实时HTAP数据库StoneDB,如何替换MySQL并实现近百倍分析性能的提升
C winfrom common function integration-2
【QT】capture. Obj:-1: error: lnk2019: unresolved external symbols__ imp_ Htons (solution)
[golang learning notes 2.1] sorting and searching in arrays in golang
Grayog log server single node deployment
Multi condition query of when