So far my engine always used 32-bit float3 to store position in a vertex. To integrate with a middleware package, my engine needs to support half position 16-bit float4. Some parts of my engine need to read the vertex data on the CPU side (say to compute a bounding box). Does someone have a clean solution for this besides if/else states like:
if(half format)
{
cast to half*
}
else
{
cast to float*
}