mirror of
https://github.com/g-truc/glm.git
synced 2024-11-26 10:14:35 +00:00
Added test
This commit is contained in:
parent
32fc69ee11
commit
b51f4e8981
@ -80,7 +80,13 @@ int test_packSnorm2x16()
|
||||
int test_packUnorm4x8()
|
||||
{
|
||||
int Error = 0;
|
||||
|
||||
|
||||
glm::uint32 Packed = glm::packUnorm4x8(glm::vec4(1.0f, 0.5f, 0.0f, 1.0f));
|
||||
glm::u8vec4 Vec(255, 128, 0, 255);
|
||||
glm::uint32 & Ref = *reinterpret_cast<glm::uint32*>(&Vec[0]);
|
||||
|
||||
Error += Packed == Ref ? 0 : 1;
|
||||
|
||||
std::vector<glm::vec4> A;
|
||||
A.push_back(glm::vec4(1.0f, 0.7f, 0.3f, 0.0f));
|
||||
A.push_back(glm::vec4(0.5f, 0.1f, 0.2f, 0.3f));
|
||||
|
Loading…
Reference in New Issue
Block a user