当前位置:网站首页>【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缓存;
边栏推荐
- Learn this trick and never be afraid to let the code collapse by mistake
- 0动态规划中等 LeetCode873. 最长的斐波那契子序列的长度
- cn+dt
- 【HCIP】BGP 特性
- 小程序毕设作品之微信校园维修报修小程序毕业设计成品(4)开题报告
- Sqlserver problem solving: replication components are not installed on this server. Please run SQL Server Setup again and select the option to install replication components
- Important arrangements - the follow-up live broadcast of dx12 engine development course will be held at station B
- The virtual host website cannot access the self-test method
- mysql: error while loading shared libraries: libtinfo.so. 5 solutions
- [hcip] BGP Foundation
猜你喜欢

小程序毕设作品之微信校园浴室预约小程序毕业设计成品(3)后台功能

Maskedauutoencoders visual learner cvpr2022

关于Sqli-labs单引号不报错的问题

Lock mechanism in MySQL database InnoDB storage engine (glory Collection Edition)

Leetcode hot topic Hot 100 - > 1. Sum of two numbers

When iPhone copies photos to the computer, the device connection often fails and the transmission is interrupted. Here's the way

一文读懂Plato Farm的ePLATO,以及其高溢价缘由

小程序毕设作品之微信校园浴室预约小程序毕业设计成品(1)开发概要
![[hcip] routing strategy, strategic routing](/img/3d/9389fb441cdd3591595ed2918d928b.png)
[hcip] routing strategy, strategic routing

学会这招再也不怕手误让代码崩掉
随机推荐
MySQL create stored procedure ------ [hy000][1418] this function has none of deterministic, no SQL
APP如何上架App Store?
分层图解决的一些最短路问题
组原必备知识点
Read Plato & nbsp; Eplato of farm and the reasons for its high premium
From prediction to decision-making, Chapter 9 Yunji datacanvas launched the ylearn causal learning open source project
[Yugong series] July 2022 go teaching course 019 - for circular structure
1313_pyserial的安装以及文档的生成
MySQL锁系列之锁算法详解(荣耀典藏版)
[Yugong series] use of tabby integrated terminal in July 2022
Today in history: the father of database passed away; Apple buys cups code; IBM chip Alliance
Wechat campus bathroom reservation applet graduation design finished product (3) background function
Leetcode judge whether palindrome number
Digital empowerment and innovation in the future: hese eredi appears at the 5th Digital China Construction Summit
LeetCode 热题 HOT 100 -> 1.两数之和
软工必备知识点
retainface使用报错:ModuleNotFoundError: No module named 'rcnn.cython.bbox'
How is insert locked in MySQL? (glory Collection Edition)
使用BigDecimal类型应该避免哪些问题?(荣耀典藏版)
regular expression