当前位置:网站首页>【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缓存;
边栏推荐
- Wechat campus bathroom reservation applet graduation design finished product (1) development outline
- [understanding of opportunity -53]: Yang Mou stands up and plots to defend himself
- The cooperation between starfish OS and metabell is just the beginning
- 小程序毕设作品之微信校园维修报修小程序毕业设计成品(4)开题报告
- [hcip] routing strategy, strategic routing
- POC模拟攻击利器 —— Nuclei入门(一)
- 基于stm32的恒功率无线充电
- Manual installation of Dlib Library
- 重要安排-DX12引擎开发课程后续直播将在B站进行
- How is insert locked in MySQL? (glory Collection Edition)
猜你喜欢

"Risking your life to upload" proe/creo product structure design - seam and buckle

MySQL's way to solve deadlock - lock analysis of common SQL statements

Ceresdao: new endorsement of ventures Dao

Canonical Address

Xiaomi website homepage big module - small module + navigation (floating case)

MySQL explain (glory Collection Edition)

Wechat campus maintenance and repair applet graduation design finished product of applet completion work (4) opening report

Leetcode hot topic Hot 100 - > 2. Add two numbers

Unity 保存图片到相册以及权限管理
![[机缘参悟-53]:阳谋立身,阴谋防身](/img/93/2f61993770d93d9adc80a9fa89e71c.jpg)
[机缘参悟-53]:阳谋立身,阴谋防身
随机推荐
Interviewer: what is the factory method mode?
Wechat campus bathroom reservation applet graduation design finished product (2) applet function
1313_pyserial的安装以及文档的生成
Mysql Explain 详解(荣耀典藏版)
Plato Farm在Elephant Swap上铸造的ePLATO是什么?
MySQL 中的 INSERT 是怎么加锁的?(荣耀典藏版)
[Star Project] small hat aircraft War (V)
Leetcode hot topic Hot 100 - > 1. Sum of two numbers
JS event loop synchronous task, asynchronous task (micro task, macro task) problem analysis
[hcip] routing strategy, strategic routing
"Risking your life to upload" proe/creo product structure design - seam and buckle
Flask1.1.4 werkzeug1.0.1 source code analysis: Blueprint
【HCIP】BGP 特性
程序里随处可见的interface,真的有用吗?真的用对了吗?
使用BigDecimal类型应该避免哪些问题?(荣耀典藏版)
上课笔记(5)(1)——#593. 二分查找(binary)
[in depth study of 4g/5g/6g topic -42]: urllc-14 - in depth interpretation of 3GPP urllc related protocols, specifications and technical principles -8-low delay technology-2-slot based scheduling and
[hcip] BGP Foundation
Leetcode hot topic Hot 100 - > 2. Add two numbers
Use try-with-resources or close this