当前位置:网站首页>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");边栏推荐
- Turn off the auto start function of Oracle service in centos7
- Flink de duplication (I) summary of common de duplication schemes in Flink and Flink SQL
- js正则表达式实现每三位数字加一个逗号
- Analysis of query results using both left join on and where in MySQL
- C language programming | program compilation and preprocessing
- Okaleido生态核心权益OKA,尽在聚变Mining模式
- Flynk de duplication (2) solve the hot issues in the process of flynk and flynk SQL de duplication
- 正则 和 sed 练习
- Resttemplate connection pool configuration
- Prior Attention Enhanced Convolutional Neural Network Based Automatic Segmentation of Organs at Risk
猜你喜欢

Quickly update the information in a field in kettle

C language implementation of guessing numbers Games project practice (based on srand function, rand function, switch statement, while loop, if condition criterion, etc.)

Zabbix: map collected values to readable statements

连接MySQL时报错:Public Key Retrieval is not allowed 【解决方法】

Synchronized lock

Systematic explanation of unit testing: mockito

Temperature and humidity measurement and display device based on Arduino

Applet payment management - new payment docking process

Essay: college entrance examination

Chapter 6 Shell Logic and Arithmetic
随机推荐
ADC噪声全面分析 -01- ADC噪声的类型以及ADC特性
Perl: split the external command to be executed into multiple lines
帮忙发一份招聘,base全国,有兴趣的可以过来看看
Oracle cleans up the Database disk space of tables with referenced partitions
shell 函数和数组练习
一体化实时HTAP数据库StoneDB,如何替换MySQL并实现近百倍分析性能的提升
杂谈:最近好多朋友谈出国……
The DrawImage method calls the solution of not displaying pictures for the first time
Showdoc vulnerability learning - cnvd-2020-26585 (arbitrary file upload)
Simple rotation chart
Turn off the auto start function of Oracle service in centos7
电子量产项目框架--基本思想
Bash: create a function that returns a Boolean value
闭散列和开散列解决哈希冲突
Haikang H9 camera cannot be connected with xshell (SSH is not enabled)
ADC噪声全面分析 -02- ADC 噪声测量方法和相关参数
冰冰学习笔记:类与对象(中)
[wsl2] configure the USB camera connecting the USB device and using the host
Demonstrate the use of foreign keys with Oracle
Gossip: Recently, many friends talk about going abroad