Turn instance into a handle
This commit is contained in:
@@ -20,37 +20,37 @@
|
||||
#include "core/present/gryphn_present.h"
|
||||
|
||||
typedef struct gnFunctions_t {
|
||||
gnReturnCode (*_gnCreateInstance)(gnInstance* instance, struct gnInstanceInfo_t info);
|
||||
void (*_gnDestroyInstance)(gnInstance* instance);
|
||||
gnReturnCode (*_gnCreateInstance)(gnInstanceHandle instance, struct gnInstanceInfo_t info);
|
||||
void (*_gnDestroyInstance)(gnInstanceHandle instance);
|
||||
|
||||
gnReturnCode (*_gnCreateDebugger)(gnDebugger* debugger, gnInstance* instance, const struct gnDebuggerInfo_t info);
|
||||
gnReturnCode (*_gnCreateDebugger)(gnDebugger* debugger, gnInstanceHandle instance, const struct gnDebuggerInfo_t info);
|
||||
void (*_gnDestroyDebugger)(gnDebugger* debugger);
|
||||
|
||||
gnPhysicalDevice* (*_gnGetPhysicalDevices)(gnInstance* instance, uint32_t* count);
|
||||
gnPhysicalDevice* (*_gnGetPhysicalDevices)(gnInstanceHandle instance, uint32_t* count);
|
||||
gnBool (*_gnQueueCanPresentToSurface)(const struct gnPhysicalDevice_t device, uint32_t queueIndex, const struct gnWindowSurface_t windowSurface);
|
||||
|
||||
|
||||
gnReturnCode (*_gnCreateOutputDevoce)(gnOutputDevice* device, gnInstance* instance, struct gnOutputDeviceInfo_t deviceInfo);
|
||||
gnReturnCode (*_gnCreateOutputDevoce)(gnOutputDevice* device, gnInstanceHandle instance, struct gnOutputDeviceInfo_t deviceInfo);
|
||||
void (*_gnDestroyOutputDevice)(gnOutputDevice* device);
|
||||
|
||||
|
||||
|
||||
#ifdef GN_PLATFORM_LINUX
|
||||
#ifdef GN_WINDOW_X11
|
||||
gnReturnCode (*_gnCreateX11WindowSurface)(struct gnWindowSurface_t* windowSurface, gnInstance* instance, struct gnX11WindowSurfaceInfo_t createInfo);
|
||||
gnReturnCode (*_gnCreateX11WindowSurface)(struct gnWindowSurface_t* windowSurface, gnInstanceHandle instance, struct gnX11WindowSurfaceInfo_t createInfo);
|
||||
#endif
|
||||
#ifdef GN_WINDOW_WAYLAND
|
||||
gnReturnCode (*_gnCreateWaylandWindowSurface)(struct gnWindowSurface_t* windowSurface, gnInstance* instance, struct gnWaylandWindowSurfaceInfo_t createInfo);
|
||||
gnReturnCode (*_gnCreateWaylandWindowSurface)(struct gnWindowSurface_t* windowSurface, gnInstanceHandle instance, struct gnWaylandWindowSurfaceInfo_t createInfo);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef GN_PLATFORM_WIN32
|
||||
gnReturnCode (*_gnCreateWin32WindowSurface)(struct gnWindowSurface_t* windowSurface, gnInstance* instance, struct gnWin32WindowSurfaceInfo_t createInfo);
|
||||
gnReturnCode (*_gnCreateWin32WindowSurface)(struct gnWindowSurface_t* windowSurface, gnInstanceHandle instance, struct gnWin32WindowSurfaceInfo_t createInfo);
|
||||
#endif
|
||||
|
||||
#ifdef GN_PLATFORM_MACOS
|
||||
gnReturnCode (*_gnCreateMacOSWindowSurface)(struct gnWindowSurface_t* windowSurface, gnInstance* instance, struct gnMacOSWindowSurfaceInfo_t createInfo);
|
||||
gnReturnCode (*_gnCreateMacOSWindowSurface)(struct gnWindowSurface_t* windowSurface, gnInstanceHandle instance, struct gnMacOSWindowSurfaceInfo_t createInfo);
|
||||
#endif
|
||||
|
||||
void (*_gnDestroyWindowSurface)(struct gnWindowSurface_t* windowSurface);
|
||||
|
Reference in New Issue
Block a user