当前位置:网站首页>【OpenGL】GLES20.glClear
【OpenGL】GLES20.glClear
2022-07-28 01:26:00 【后端码匠】
【OpenGL】glClear
函数原型
void glClear(GLbitfield mask);
参数说明
GLbitfield:可以使用 | 运算符组合不同的缓冲标志位,表明需要清除的缓冲,例如glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT)表示要清除颜色缓冲以及深度缓冲,可以使用以下标志位
GL_COLOR_BUFFER_BIT: 当前可写的颜色缓冲
GL_DEPTH_BUFFER_BIT: 深度缓冲
GL_ACCUM_BUFFER_BIT: 累积缓冲
GL_STENCIL_BUFFER_BIT: 模板缓冲
函数说明
glClear()函数的作用是用当前缓冲区清除值,也就是glClearColor或者glClearDepth、glClearIndex、glClearStencil、glClearAccum等函数所指定的值来清除指定的缓冲区,也可以使用glDrawBuffer一次清除多个颜色缓存。比如:
glClearColor(0.0,0.0,0.0,0.0);
表示清除颜色设为黑色
glClear(GL_COLOR_BUFFER_BIT);
表示实际完成了把整个窗口清除为黑色的任务,glClear()的唯一参数表示需要被清除的缓冲区。
像素检验、裁剪检验、抖动和缓存的写屏蔽都会影响glClear的操作,其中,裁剪范围限制了清除的区域,而glClear命令还会忽略alpha函数、融合函数、逻辑操作、模板、纹理映射和z缓存;
边栏推荐
- [solution] solve the problem of SSH connection being inactive for a long time and being stuck and disconnected
- Lock mechanism in MySQL database InnoDB storage engine (glory Collection Edition)
- cn+dt
- When iPhone copies photos to the computer, the device connection often fails and the transmission is interrupted. Here's the way
- Special network technology virtual host PHP version setting
- Compile and use Qwt in qt|vs2017
- 小程序毕设作品之微信校园维修报修小程序毕业设计成品(4)开题报告
- Red hat official announced the new president and CEO! Paul Cormier, a key figure in transformation, is "retiring"
- Smart contract security -- selfdestroy attack
- MySQL create stored procedure ------ [hy000][1418] this function has none of deterministic, no SQL
猜你喜欢

Important arrangements - the follow-up live broadcast of dx12 engine development course will be held at station B

Ceresdao: new endorsement of ventures Dao
![[机缘参悟-53]:阳谋立身,阴谋防身](/img/93/2f61993770d93d9adc80a9fa89e71c.jpg)
[机缘参悟-53]:阳谋立身,阴谋防身

11 Django basics database operation

Chapter 3 business function development (batch export of market activities, Apache POI)

Canonical Address

「冒死上传」Proe/Creo产品结构设计-止口与扣位

Learn this trick and never be afraid to let the code collapse by mistake

怎么简单实现菜单拖拽排序的功能

MYSQL解决死锁之路 - 常见 SQL 语句的加锁分析
随机推荐
Understand the "next big trend" in the encryption industry - ventures Dao
2022.7.8 eth price analysis
C#引入WINAPI传递中文字符串参数字符集问题
Wechat campus bathroom reservation applet graduation design finished product (1) development outline
MySQL 中的 INSERT 是怎么加锁的?(荣耀典藏版)
[data processing] boxplot drawing
数字赋能 创新未来:海丝埃睿迪亮相第五届数字中国建设峰会
Canvas 从入门到劝朋友放弃(图解版)
what‘s the meaning of “rc“ in release name
windbg
程序里随处可见的interface,真的有用吗?真的用对了吗?
Lombok prompts variable log error when using JUnit test in idea
Interviewer: what is the factory method mode?
Hardware standard
Smart contract security -- selfdestroy attack
What problems should be avoided when using BigDecimal type? (glory Collection Edition)
重要安排-DX12引擎开发课程后续直播将在B站进行
【LeetCode】13. Linked List Cycle·环形链表
【HCIP】路由策略、策略路由
Important arrangements - the follow-up live broadcast of dx12 engine development course will be held at station B