Created
September 9, 2019 21:43
-
-
Save jherico/fc53179448cd54514d304f5be5db9ab4 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