MCPcopy Create free account
hub / github.com/DavidColson/Polybox / GetUserDataSize

Function GetUserDataSize

source/userdata.cpp:120–130  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

118// ***********************************************************************
119
120i64 GetUserDataSize(UserData* pUserData) {
121 i32 typeSize = 0;
122 switch (pUserData->type) {
123 case Type::Float32: typeSize = sizeof(f32); break;
124 case Type::Int32: typeSize = sizeof(i32); break;
125 case Type::Int16: typeSize = sizeof(i16); break;
126 case Type::Uint8: typeSize = sizeof(u8); break;
127 }
128
129 return pUserData->width * pUserData->height * typeSize;
130}
131
132// ***********************************************************************
133

Callers 2

ImportGltfFunction · 0.85
ParseCborValueFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected