博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
glValidateProgram只用于调试
阅读量:6309 次
发布时间:2019-06-22

本文共 1082 字,大约阅读时间需要 3 分钟。

glValidateProgram应该只用于调试,用于release版本中会影响性能。以下是详细描述:

 

Before doing so, however, we might want to check whether the program validates. That is, there are certain aspects of execution that a successful link cannot guarantee. For example, perhaps the application never binds valid texture units to samplers. This behavior will not be known at link time, but instead will become apparent at draw time. To check that your program will execute with the current state, you can call glValidateProgram:

void glValidateProgram(GLuint program)

program handle to the program object to validate

 

The result of the validation can be checked using GL_VALIDATE_STATUS described earlier. The info log will also be updated.

Note: You really want to use glValidateProgram only for debugging purposes. It is a slow operation and certainly not something you want to check before every render. In fact, you can get away with never using it if your application is successfully rendering. We want to make you aware that this function does exist, though.

转载于:https://www.cnblogs.com/time-is-life/p/7595475.html

你可能感兴趣的文章
Mybatis generator
查看>>
linux特殊符号大全
查看>>
模拟博客园系统
查看>>
标准文档流
查看>>
[转] 产品知识分享:外部链接分享到微信的逻辑
查看>>
报表并发访问量大的配置
查看>>
多项式常用操作归纳
查看>>
函数的介绍与方法
查看>>
从一张表查出数据并结合自己的数据插入到新表中
查看>>
新概念英语第三册21-40课(转)
查看>>
常见事件总结
查看>>
火狐浏览器设置跨域(转)
查看>>
Mzc和体委的争夺战
查看>>
Gradle安装
查看>>
四十个多线程问题
查看>>
三层架构
查看>>
Mysql分布式事务
查看>>
handler,message,looper学习笔记
查看>>
Windows 下 Nginx + PHP5 的安装与配置
查看>>
maven笔记
查看>>