alias PFN_vkDebugReportCallbackEXT =
VkBool32 function(VkDebugReportFlagsEXT flags,
VkDebugReportObjectTypeEXT objectType,
uint64_t object, size_t location,
int32_t messageCode, const char* pLayerPrefix,
const char* pMessage, void* pUserData);
struct VkDebugReportCallbackCreateInfoEXT {
VkStructureType sType = VkStructureType.VK_STRUCTURE_TYPE_DEBUG_REPORT_CALLBACK_CREATE_INFO_EXT;
const(void)* pNext;
VkDebugReportFlagsEXT flags;
PFN_vkDebugReportCallbackEXT pfnCallback;
void* pUserData;
}
..Dはこの機能を純粋なnothrow @nogcとマークするのはなぜですか?
VkBool32 MyDebugReportCallback(
VkDebugReportFlagsEXT flags,
VkDebugReportObjectTypeEXT objectType,
uint64_t object,
size_t location,
int32_t messageCode,
const char* pLayerPrefix,
const char* pMessage,
void* pUserData)
{
return VK_FALSE;
}
auto debugcallbackCreateInfo = VkDebugReportCallbackCreateInfoEXT(
VkStructureType.VK_STRUCTURE_TYPE_DEBUG_REPORT_CALLBACK_CREATE_INFO_EXT,
null,
VkDebugReportFlagBitsEXT.VK_DEBUG_REPORT_ERROR_BIT_EXT,
&MyDebugReportCallback,
null
);
Error: cannot implicitly convert expression (& MyDebugReportCallback) of type uint function(uint flags, VkDebugReportObjectTypeEXT objectType, ulong object, ulong location, int messageCode, const(char*) pLayerPrefix, const(char*) pMessage, void* pUserData) to uint function(uint flags, VkDebugReportObjectTypeEXT objectType, ulong object, ulong location, int messageCode, const(char*) pLayerPrefix, const(char*) pMessage, void* pUserData) pure nothrow @nogc
PFN_vkDebugReportCallbackEXT
は純粋nothrowと@nogcである理由私は理解していませんか? writeln
にMyDebugReportCallback
から連絡したいだけです。
の内側にあるしかし、なぜ、それはありますか?私はそれがユーザーエラーだと思う...コールバックは*これらのものである必要はありません*と著者はちょうど正しい場所に定義を入れていない。 –
@ AdamD.Ruppeはい既に問題が発生しました.https://github.com/ParticlePeter/ErupteD/issues/2 –