简体   繁体   English

Qt5 + OS X Mavericks中的glVertexAttribDivisor

[英]glVertexAttribDivisor in Qt5 + OS X Mavericks

When using instancing in OpenGL under OS X Mavericks and Qt5 see this post for my code I cannot compile when using the function glVertexAttribDivisor the error being 在OS X Mavericks和Qt5下在OpenGL中使用实例化时,请参见此代码,我在使用功能glVertexAttribDivisor时无法编译,错误是

erreur : use of undeclared identifier 'glVertexAttribDivisor'; erreur:使用未声明的标识符'glVertexAttribDivisor'; did you mean 'glVertexAttribDivisorARB'? 您是说'glVertexAttribDivisorARB'吗?

I went and used the ARB function but don't know what's the difference between the function with the suffix and the one without it. 我去过并使用了ARB函数,但不知道带后缀的函数与不带后缀的函数有什么区别。 Can anyone explain me? 谁能解释我?

Also, is there a way or something I am missing in order to be able to use the correct function (meaning the one without the ARB suffix)? 另外,为了能够使用正确的功能(意味着没有ARB后缀的功能),我是否有办法或缺少的东西?

As it is well explained here ARB stands for OpenGL Architecture review board .So the ARB suffix means that the vendor specific extension has been promoted to the core specification,which means,it would be implemented by all the vendors as part of the core functionality.The next step is getting into the core where ARB suffix is finally removed.So for you it doesn't really matter.You should use ARB version which is the same as glVertexAttribDivisor.Apple usually lags with its GL drivers implementation behind the latest standard.If I am not mistaken glVertexAttribDivisor is core since GL 3.3 and it is strange that they still have only ARB variant with GL 4.1 being the latest version supported. 正如这里很好解释的那样 ARB代表OpenGL体系结构审查委员会 。因此ARB后缀表示已将供应商特定的扩展升级为核心规格,这意味着它将作为所有核心功能的一部分由所有供应商实施。下一步是进入最后删除ARB后缀的核心,因此对您来说并不重要,您应该使用与glVertexAttribDivisor相同的ARB版本.Apple通常在GL驱动程序实现方面落后于最新标准。如果我没有记错的话,GLVertexAttribDivisor是GL 3.3以来的核心,奇怪的是它们仍然只有ARB变体,而GL 4.1是受支持的最新版本。

Btw,if you use latest GLEW it does have both ARB and glVertexAttribDivisor core.I personally use it to write modern OpenGL functionality on Mac Maverick. 顺便说一句,如果您使用最新的GLEW,它确实具有ARB和glVertexAttribDivisor核心。我个人使用它在Mac Maverick上编写现代OpenGL功能。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM