mirror of
https://github.com/g-truc/glm.git
synced 2024-11-26 18:24:35 +00:00
Fixed ticket #116, missing bit mask
This commit is contained in:
parent
3a32e3d7c3
commit
2732d4bae5
@ -356,10 +356,10 @@ template <>
|
||||
GLM_FUNC_QUALIFIER detail::tvec4<float> f32_bgra_cast<uint32>(uint32 color)
|
||||
{
|
||||
detail::tvec4<float> result;
|
||||
result.x = static_cast<float>(color >> 16) / static_cast<float>(255);
|
||||
result.y = static_cast<float>(color >> 8) / static_cast<float>(255);
|
||||
result.z = static_cast<float>(color >> 0) / static_cast<float>(255);
|
||||
result.w = static_cast<float>(color >> 24) / static_cast<float>(255);
|
||||
result.x = static_cast<float>((color >> 16) & 0xFF) / static_cast<float>(255);
|
||||
result.y = static_cast<float>((color >> 8) & 0xFF) / static_cast<float>(255);
|
||||
result.z = static_cast<float>((color >> 0) & 0xFF) / static_cast<float>(255);
|
||||
result.w = static_cast<float>((color >> 24) & 0xFF) / static_cast<float>(255);
|
||||
return result;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user