Is it possible for a vertex attribute to be an array in GLSL-ES 2.0?

僤鯓⒐⒋嵵緔 提交于 2019-11-30 19:31:42

The GLSL ES 2.0 specification states that attributes cannot be declared as arrays.

In desktop GL, you can have attribute arrays. When the attribute is assigned an attribute index (either with glBindAttribLocation or automatically by the shader being linked), it will get consecutive attributes, starting with the one you requested if you used glBindAttribLocation. So if foo was given the location 5, foo[0] would be 5, foo[1] would be 6, and foo[2] would be 7.

If there is some ES 2.0 extension to allow attribute arrays, it would likely work like this.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!