How to pass a particular callback in a function argument

I'm looking into passing this:

1
2
// core.h
VkDeleter<VkDebugReportCallbackEXT>m_callback{m_instance, VkDebug::DestroyDebugReportCallbackEXT};


as the second argument of the following function of another class:

1
2
// vkdebug.h
void SetupCallback(VkInstance instance, VkDebugReportCallbackEXT callback);


No problem passing instance, but I'm getting a compiler error for the callback (2nd) argument:

1
2
3
// core.cpp
// VkDebug m_vkDebug;
m_vkDebug->SetupCallback(m_instance, &m_callback);

note: no known conversion for argument 2 from 'VkDebugReportCallbackEXT_T**' to 'VkDebugReportCallbackEXT {aka VkDebugReportCallbackEXT_T*}'


Reading the error msg, I assume I'm not declaring the second argument type correctly. I'm not sure how to correctly pass m_callback into the second argument of SetupCallback.

Hope this makes sense.

Oh and sorry for using the word 'help'. Should have read the title warning beforehand. I changed it.
Last edited on
Topic archived. No new replies allowed.