std140

Members of type bool, int, uint, float, and double are respectively
extracted from a buffer object by reading a single
                          uint, int, uint, float, or   double value at the specified offset.
 
Vectors with N elements with basic data types of bool, int, uint, float,
or double are extracted as N values in consecutive memory locations beginning
at the specified offset, with components stored in order with the first
(X) component at the lowest offset. The GL data type used for component
extraction is derived according to the rules for scalar members above.  
 
If the member is a scalar consuming N basic machine units, the base alignment is N.
 
If the member is a two- or four-component vector with components consuming
N basic machine units, the base alignment is 2N or 4N, respectively.
 
If the member is a three-component vector with components consuming N
basic machine units, the base alignment is 4N.
 
If the member is an array of scalars or vectors, the base alignment and array
stride are set to match the base alignment of a single array element, according
to rules (1), (2), and (3), and rounded up to the base alignment of a vec4. The
array may have padding at the end; the base offset of the member following
the array is rounded up to the next multiple of the base alignment.
 
If the member is a structure, the base alignment of the structure is N, where
N is the largest base alignment value of any of its members,
and rounded  up to the base alignment of a vec4. The individual members of this substructure
are then assigned offsets by applying this set of rules recursively,
where the base offset of the first member of the sub-structure is equal to the
aligned offset of the structure. The structure may have padding at the end;
the base offset of the member following the sub-structure is rounded up to
the next multiple of the base alignment of the structure.
 
If the member is an array of S structures, the S elements of the array are laid
out in order, according to rule (9).
 
A structure and each structure member have
a base offset and a base alignment,
from which
an aligned offset is computed by
rounding the base offset up to a multiple of the base alignment.
 从第16个字节开始,到第27个字节,为translation的存储。(闭区间)
所以接下来的rotation的base offset 为27+1 -> 28。
rotation的base alignment为16,所以28近似为16的倍数,得出32。
base alignment 表示单个元素的字节对齐。
base offset 表示本成员对象可使用的内存初始位置。
aligned offset 表示本成员实际使用的内存初始位置。

 

 

 

转载于:https://www.cnblogs.com/Searchor/p/9002692.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
无法定位程序输入点_std_type_info_destroy_list于动态链接库vcruntime140.dll通常是因为系统缺少或损坏了vcruntime140.dll文件所导致的。vcruntime140.dll是微软Visual C++ Redistributable包中的一部分,它是用于支持C++编写的程序所必需的库文件。 要解决这个问题,你可以尝试以下几种方法。首先,你可以尝试重新安装或修复Microsoft Visual C++ Redistributable软件包,该软件包包含了vcruntime140.dll文件。你可以从Microsoft官方网站下载最新版本的Visual C++ Redistributable并安装它,或者在控制面板的程序和功能中找到已安装的Visual C++ Redistributable并进行修复。 如果重新安装或修复Visual C++ Redistributable没有解决问题,你可以尝试从其他可靠的来源下载vcruntime140.dll文件并将其替换到系统的相应目录中。请确保下载的文件是与你的操作系统版本兼容的,并将它放置到C:\Windows\System32(32位操作系统)或C:\Windows\SysWOW64(64位操作系统)目录下。 另外,你还可以运行系统文件检查工具(sfc /scannow)来扫描和修复系统文件中的错误。打开命令提示符窗口,并输入sfc /scannow命令,然后按下Enter键。系统将自动扫描和修复损坏的系统文件。 最后,如果以上方法都没有解决问题,你可以考虑联系技术支持人员或寻求专业的计算机维修服务。他们可以帮助你进一步诊断和解决这个问题。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值