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

本文共 1026 字,大约阅读时间需要 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.

转载地址:http://qylpa.baihongyu.com/

你可能感兴趣的文章
融了1000万,只为让它们好好吃饭!
查看>>
Debian 项目领导人职位已有三位侯选者
查看>>
阿里巴巴与三个知名车企达成合作,将为其“AI+车”解决方案
查看>>
django小项目:搭建简易火车车票预订系统
查看>>
仅研发就投入3300人 华为如何掘金物联网?
查看>>
表单调试工具推荐
查看>>
Kubernetes node的防火墙问题导致pod ip无法访问
查看>>
hdfs-site.xml配置
查看>>
为什么多线程读写 shared_ptr 要加锁?
查看>>
netware 6.5的故障解决
查看>>
linux 同步IO: sync、fsync与fdatasync
查看>>
笼络人才,再三“表白”,库克表示苹果更看重AR
查看>>
[原创]对于运行ASP.NET程序时,提示:无法启动程序“http://localhost:3532/Default.aspx”。的疑问...
查看>>
潮鞋的AR初体验,鬼冢虎和Anrealage合作新鞋
查看>>
4星|《错误的行为》:经济行为中大部分时候人们是不理性的
查看>>
java中包容易出现的错误及权限问题
查看>>
Hibernate5-查询与排序
查看>>
硬盘速度测试
查看>>
mouseout、mouseover和mouseleave、mouseenter区别
查看>>
一句话命令
查看>>