start checking all instance functions

This commit is contained in:
Greg Wells
2025-06-27 21:22:05 -04:00
parent f98dc5fead
commit 502634770e
10 changed files with 205 additions and 16 deletions

View File

@@ -1,11 +1,47 @@
#include "function_loader.h"
#include "instance_functions.h"
gnInstanceFunctions loadFunctionLoaderInstanceFunctions(gnInstanceFunctions* callbacks) {
return *callbacks;
gnInstanceFunctions loadFunctionLoaderInstanceFunctions() {
return (gnInstanceFunctions){
._gnCreateInstance = checkCreateInstance,
._gnDestroyInstance = checkDestroyInstance,
._gnGetPhysicalDevices = checkGetPhysicalDevices,
._gnQueueCanPresentToSurface = checkQueueCanPresentToSurface,
._gnCreateOutputDevice = checkCreateOutputDevice,
._gnDestroyOutputDevice = checkDestroyOutputDevice,
#ifdef GN_PLATFORM_LINUX
#ifdef GN_WINDOW_X11
._gnCreateX11WindowSurface = checkCreateX11WindowSurface,
#endif
#ifdef GN_WINDOW_WAYLAND
._gnCreateWaylandWindowSurface,
#endif
#endif
#ifdef GN_PLATFORM_WIN32
._gnCreateWin32WindowSurface,
#endif
#ifdef GN_PLATFORM_MACOS
._gnCreateMacOSWindowSurface = checkCreateSurfaceMacOS,
#endif
._gnDestroyWindowSurface = checkDestroyWindowSurface,
._gnGetSurfaceDetails = checkGetSurfaceDetails
};
}
gnDeviceFunctions loadFunctionLoaderDeviceFunctions(gnDeviceFunctions* callbacks) {
return *callbacks;
gnDeviceFunctions loadFunctionLoaderDeviceFunctions() {
return (gnDeviceFunctions){
NULL
};
}
gnCommandFunctions loadFunctionLoaderCommandFunctions(gnCommandFunctions* callbacks) {
return *callbacks;
gnCommandFunctions loadFunctionLoaderCommandFunctions() {
return (gnCommandFunctions){
NULL
};
}