Created
September 9, 2019 21:44
-
-
Save jherico/d3711383db7895b116e5d11f51a62835 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
case Accessor::Type::eSCALAR: | |
switch (componentType) { | |
case Accessor::ComponentType::eBYTE: | |
return normalized ? vk::Format::eR8Snorm : vk::Format::eR8Sint; | |
case Accessor::ComponentType::eUNSIGNED_BYTE: | |
return normalized ? vk::Format::eR8Unorm : vk::Format::eR8Uint; | |
case Accessor::ComponentType::eSHORT: | |
return normalized ? vk::Format::eR16Snorm : vk::Format::eR16Sint; | |
case Accessor::ComponentType::eUNSIGNED_SHORT: | |
return normalized ? vk::Format::eR16Unorm : vk::Format::eR16Uint; | |
case Accessor::ComponentType::eFLOAT: | |
return vk::Format::eR32Sfloat; | |
case Accessor::ComponentType::eUNSIGNED_INT: | |
default: | |
throw std::runtime_error("Invalid accessor for vertex data"); | |
} | |
case Accessor::Type::eVEC2: | |
... |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment