65536 65535 65534

来源:互联网 发布:淘宝商城平台 编辑:程序博客网 时间:2024/06/17 15:49

65536 65535 65534

通常在导入模型的时候会遇到65534的限制,比如Unity里的“Meshes may not have more than 65534 vertices or triangles at the moment”提示。开起来像是2的16次方,但为什么不是65536?65536和65535会有什么问题?为什么不是2的32次方?显卡底层做了什么?于是抽时间研究了一番。如图:


这里写图片描述
[http://www.geeks3d.com/20140704/gpu-buffers-introduction-to-opengl-3-1-uniform-buffers-objects/?utm_source=feedburner&utm_medium=feed&utm_campaign=Feed%3A+TheGeeksOf3d+%28The+Geeks+Of+3D%29]
这里意思是渲染底层API做了限制,而且不同平台底层限制还不一样。那为什么限制的大小是无符号int的大小但实际上却是提示超过65534?之后查了一下原因


这里写图片描述
[https://stackoverflow.com/questions/13790947/why-in-c-the-output-of-integer-variable-of-value-65536-is-0-and-65536-gives]


原创粉丝点击