def parse_allocation_callback(f):
# Allocation callback must be defined before the structs, but there are no good way to differenciate them
# from the function pointers. Hence why they are hardcoded here
f.write("""
# Allocation callback
FnAllocationFunction = FUNCTYPE(c_void_p, c_void_p, c_size_t, c_size_t, SystemAllocationScope)
FnReallocationFunction = FUNCTYPE(c_void_p, c_void_p, c_size_t, c_size_t, SystemAllocationScope)
FnFreeFunction = FUNCTYPE(None, c_void_p, c_void_p)
FnInternalAllocationNotification = FUNCTYPE(None, c_void_p, c_size_t, InternalAllocationType, SystemAllocationScope)
FnInternalFreeNotification = FUNCTYPE(None, c_void_p, c_size_t, InternalAllocationType, SystemAllocationScope)
FnDebugReportCallbackEXT = FUNCTYPE(Bool32, DebugReportFlagsEXT, DebugReportObjectTypeEXT, c_uint64, c_size_t, c_uint32, c_char_p, c_char_p, c_void_p)
"""[1::])
create_vulkan_wrapper.py 文件源码
python
阅读 26
收藏 0
点赞 0
评论 0
评论列表
文章目录