While studying Vulcan, I came across some code in the VulkanCookbook. in VulkanCookbook, the author writes code to import Vulkan functions and classes manually. Well, I slowly converted it to the LunarG SDK for Vulkan, and I ran into a problem in the less than 64-bit VkFence, which was typedef'd for VkFence_T *, which is good and everything except 32-bit is typedef'd like uint64_t , which causes a problem for VkDestroyer, which uses code similar to below
#include <iostream>
#include <stdint.h>
typedef uint64_t A;
typedef uint64_t B;
template<typename T>
class Handler
{
void DestroyObject( T parent );
};
template<>
inline void Handler<A>::DestroyObject(A object) {
std::cout << "destroy type A" << std::endl;
}
template<>
inline void Handler<B>::DestroyObject(B object) {
std::cout << "destroy type B!" << std::endl;
}
int main()
{}
Is there a good way to deal with this problem, or do I need to go and recycle all the sample code to delete the objects manually? I would like to compile up to 32 bits if possible.
, , , google . , _A _B, uint64_t, , -, , DestroyObject , .
: , .