Surely there must be an easier way?
when defined(windows):
type
PFN_xrConvertWin32PerformanceCounterToTimeKHR* = proc (
instance: XrInstance,
performanceCounter: ptr LARGE_INTEGER,
time: ptr XrTime
): XrResult {.stdcall.}
else:
type
PFN_xrConvertWin32PerformanceCounterToTimeKHR* = proc (
instance: XrInstance,
performanceCounter: ptr LARGE_INTEGER,
time: ptr XrTime
): XrResult {.cdecl.}
when defined(windows):
{.pragma pfnCall: stdcall.}
else:
{.pragma pfnCall: cdecl.}
proc youProcHere(args: string) {.pfnCall.}
Is the best solution, IMO.