Add helper function to quickly get real from right place and cast

This commit is contained in:
baldurk
2016-02-07 18:40:01 +01:00
parent ba2473f27a
commit 3a85a5f75b
+6
View File
@@ -403,6 +403,12 @@ VkResourceRecord *GetRecord(RealType obj)
return GetWrapped(obj)->record;
}
template<typename RealType>
RealType ToHandle(WrappedVkRes *ptr)
{
return UnwrapHelper<RealType>::ToHandle( ((typename UnwrapHelper<RealType>::Outer *)ptr)->real );
}
enum VkResourceType
{
eResUnknown = 0,