mirror of
https://github.com/g-truc/glm.git
synced 2025-04-07 06:25:00 +00:00
Added packing tests
This commit is contained in:
parent
149a6c4258
commit
7fdf3c34df
1 changed files with 12 additions and 0 deletions
|
@ -152,6 +152,18 @@ int test_U3x10_1x2()
|
|||
Error += glm::all(glm::equal(v0, v1)) ? 0 : 1;
|
||||
}
|
||||
|
||||
glm::u8vec4 const v0(0xff, 0x77, 0x0, 0x33);
|
||||
glm::uint32 const p0 = *(glm::uint32*)(&v0[0]);
|
||||
glm::uint32 const r0 = 0x330077ff;
|
||||
|
||||
Error += p0 == r0 ? 0 : 1;
|
||||
|
||||
glm::uvec4 const v1(0xff, 0x77, 0x0, 0x33);
|
||||
glm::uint32 const p1 = glm::packU3x10_1x2(v1);
|
||||
glm::uint32 const r1 = 0xc001dcff;
|
||||
|
||||
Error += p1 == r1 ? 0 : 1;
|
||||
|
||||
return Error;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue