take a bulldozer to some code
This commit is contained in:
@@ -1,9 +0,0 @@
|
||||
#pragma once
|
||||
#include <gryphn/gryphn_utils.h>
|
||||
|
||||
struct gnAppInfo {
|
||||
gnString ApplicationName;
|
||||
gnString EngineName;
|
||||
gnVersion ApplicationVersion;
|
||||
gnVersion EngineVersion;
|
||||
};
|
15
src/core/instance/gryphn_instance.c
Normal file
15
src/core/instance/gryphn_instance.c
Normal file
@@ -0,0 +1,15 @@
|
||||
#include "gryphn_instance.h"
|
||||
#include "init/gryphn_init.h"
|
||||
#include <core/gryphn_platform_functions.h>
|
||||
|
||||
gnReturnCode gnCreateInstance(gnInstance* instance, struct gnInstanceInfo_t info) {
|
||||
if (!gnIsAPISupported(info.renderingAPI)) return GN_UNSUPPORTED_RENDERING_API;
|
||||
instance->dynamicLib = gnLoadRenderingDLL(info.renderingAPI);
|
||||
if (instance->dynamicLib == NULL) return GN_UNABLE_TO_LOAD_DYNAMIC_LIBARRY;
|
||||
gnLoadFunctions(instance->dynamicLib, instance->functions);
|
||||
|
||||
return instance->functions->_gnCreateInstance(instance, info);
|
||||
}
|
||||
void gnDestroyInstance(gnInstance* instance) {
|
||||
instance->functions->_gnDestroyInstance(instance);
|
||||
}
|
@@ -1,9 +0,0 @@
|
||||
#include "gryphn_instance.h"
|
||||
|
||||
void gnInstanceSetDebugger(gnInstance& instance, gnDebugger& debugger) {
|
||||
instance.debugger = &debugger;
|
||||
}
|
||||
|
||||
void gnInstanceSetAppInfo(gnInstance& instance, const gnAppInfo info) {
|
||||
instance.AppInfo = info;
|
||||
}
|
@@ -1,47 +1,51 @@
|
||||
#pragma once
|
||||
#include <gryphn/gryphn_utils.h>
|
||||
#include "application_information/gryphn_app_info.h"
|
||||
#include "core/debugger/gryphn_debugger.h"
|
||||
#include <core/output_device/gryphn_output_device.h>
|
||||
#include <platform/gryphn_platform_include.h>
|
||||
#include "core/gryphn_rendering_api.h"
|
||||
|
||||
struct gnPlatformInstanceData;
|
||||
struct gnPlatformInstance;
|
||||
struct gnFunctions_t;
|
||||
struct gnDynamicLibrary_t;
|
||||
|
||||
struct gnInstance {
|
||||
ACCESS_LEVEL:
|
||||
bool valid = false;
|
||||
gnPlatformInstanceData* instance = nullptr;
|
||||
gnAppInfo AppInfo;
|
||||
gnDebugger* debugger;
|
||||
public:
|
||||
gnInstance() {}
|
||||
};
|
||||
typedef struct gnInstanceInfo_t {
|
||||
gnString applicationName;
|
||||
gnVersion applicationVersion;
|
||||
|
||||
void gnInstanceSetAppInfo(gnInstance& instance, const gnAppInfo info);
|
||||
void gnInstanceSetDebugger(gnInstance& instance, gnDebugger& debugger);
|
||||
gnString engineName;
|
||||
gnVersion engineVersion;
|
||||
|
||||
inline gnReturnCode (*gnCreateInstance)(gnInstance* instance);
|
||||
inline void (*gnDestroyInstance)(gnInstance& instance);
|
||||
// inline gnReturnCode (*gnInstanceSetWindow)(gnInstance& instance, GLFWwindow* window);
|
||||
gnRenderingAPI renderingAPI;
|
||||
} gnInstanceInfo;
|
||||
|
||||
#ifdef GN_PLATFORM_LINUX
|
||||
#ifdef GN_WINDOW_X11
|
||||
inline gnReturnCode (*gnCreateX11WindowSurface)(gnInstance& instance, Display* display, Window* window);
|
||||
#endif
|
||||
#ifdef GN_WINDOW_WAYLAND
|
||||
inline gnReturnCode (*gnCreateWaylandWindowSurface)(gnInstance& instance, wl_display* display, wl_surface* surface);
|
||||
#endif
|
||||
#endif
|
||||
typedef struct gnInstance_t {
|
||||
struct gnPlatformInstance* instance;
|
||||
gnBool valid;
|
||||
|
||||
struct gnFunctions_t* functions;
|
||||
struct gnDynamicLibrary_t* dynamicLib;
|
||||
} gnInstance;
|
||||
|
||||
gnReturnCode gnCreateInstance(gnInstance* instance, struct gnInstanceInfo_t info);
|
||||
void gnDestroyInstance(gnInstance* instance);
|
||||
|
||||
// // inline gnReturnCode (*gnInstanceSetWindow)(gnInstance& instance, GLFWwindow* window);
|
||||
|
||||
// #ifdef GN_PLATFORM_LINUX
|
||||
// #ifdef GN_WINDOW_X11
|
||||
// inline gnReturnCode (*gnCreateX11WindowSurface)(gnInstance& instance, Display* display, Window* window);
|
||||
// #endif
|
||||
// #ifdef GN_WINDOW_WAYLAND
|
||||
// inline gnReturnCode (*gnCreateWaylandWindowSurface)(gnInstance& instance, wl_display* display, wl_surface* surface);
|
||||
// #endif
|
||||
// #endif
|
||||
|
||||
|
||||
#ifdef GN_PLATFORM_WIN32
|
||||
inline gnReturnCode (*gnCreateWindowsWindowSurface)(gnInstance& instance, HWND* window, HINSTANCE* instance);
|
||||
#endif
|
||||
// #ifdef GN_PLATFORM_WIN32
|
||||
// inline gnReturnCode (*gnCreateWindowsWindowSurface)(gnInstance& instance, HWND* window, HINSTANCE* instance);
|
||||
// #endif
|
||||
|
||||
#ifdef GN_PLATFORM_MACOS
|
||||
inline gnReturnCode (*gnCreateMacOSWindowSurface)(gnInstance& instance, NS::Window* window, NS::View* view);
|
||||
#endif
|
||||
// #ifdef GN_PLATFORM_MACOS
|
||||
// typedef void* NSWindow;
|
||||
// typedef void* NSView;
|
||||
|
||||
|
||||
// TODO: if instance creation fails add in a query to why the instance creation failed
|
||||
// Lowkey thats a lot of work tho and I dont really want to do alllllll that
|
||||
// inline gnReturnCode (*gnCreateMacOSWindowSurface)(gnInstance& instance, NSWindow window, NSView view);
|
||||
// #endif
|
||||
|
14
src/core/instance/init/gryphn_dynamic_library.h
Normal file
14
src/core/instance/init/gryphn_dynamic_library.h
Normal file
@@ -0,0 +1,14 @@
|
||||
#pragma once
|
||||
#include "utils/strings/gryphn_string.h"
|
||||
#include "utils/gryphn_bool.h"
|
||||
|
||||
typedef struct gnDynamicLibrary_t {
|
||||
void* dllPtr;
|
||||
gnBool isValid;
|
||||
} gnDynamicLibrary;
|
||||
|
||||
struct gnDynamicLibrary_t* gnLoadDynamicLibrary(const gnString path);
|
||||
void gnUnloadDynamicLibrary(struct gnDynamicLibrary_t* dll);
|
||||
void* gnLoadFunctionPtr(struct gnDynamicLibrary_t* dll, const char* name);
|
||||
|
||||
#define gnLoadDLLFunction(dll, function, name) function = (typeof(function))gnLoadFunctionPtr(dll, name)
|
168
src/core/instance/init/gryphn_init.c
Normal file
168
src/core/instance/init/gryphn_init.c
Normal file
@@ -0,0 +1,168 @@
|
||||
// #undef GN_UTILS_CPP
|
||||
#include "gryphn_init.h"
|
||||
#include <platform/gryphn_platform_include.h>
|
||||
#include "gryphn_dynamic_library.h"
|
||||
// #include <dlfcn.h>
|
||||
|
||||
gnBool gnIsAPISupported(gnRenderingAPI api) {
|
||||
int renderingAPICount = 0;
|
||||
gnRenderingAPI* supportedRenderingAPIS = gnGetSupportedRenderingAPIs(&renderingAPICount);
|
||||
for (int i = 0; i < renderingAPICount; i++) if (supportedRenderingAPIS[i] == api) return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
struct gnDynamicLibrary_t* gnLoadRenderingDLL(gnRenderingAPI renderingAPI) {
|
||||
gnString libName = gnCreateEmptyString();
|
||||
|
||||
switch (renderingAPI) {
|
||||
case GN_RENDERINGAPI_NONE: return NULL;
|
||||
case GN_RENDERINGAPI_SOFTWARE: return NULL;
|
||||
case GN_RENDERINGAPI_OPENGL: return NULL;
|
||||
case GN_RENDERINGAPI_VULKAN: {
|
||||
if (!gnIsAPISupported(GN_RENDERINGAPI_VULKAN)) return NULL;
|
||||
libName = gnCreateString("GryphnVulkanImpl");
|
||||
break;
|
||||
}
|
||||
case GN_RENDERINGAPI_DIRECTX11: return NULL;
|
||||
case GN_RENDERINGAPI_DIRECTX12: return NULL;
|
||||
case GN_RENDERINGAPI_METAL: {
|
||||
if (!gnIsAPISupported(GN_RENDERINGAPI_METAL)) return NULL;
|
||||
libName = gnCreateString("GryphnMetalImpl");
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return gnLoadDynamicLibrary(gnCombineStrings(gnCreateString("gryphn/rendering_apis/"), libName));
|
||||
}
|
||||
|
||||
void gnLoadFunctions(struct gnDynamicLibrary_t* lib, struct gnFunctions_t* functions) {
|
||||
gnLoadDLLFunction(lib, functions->_gnCreateInstance, "gnCreateInstanceFn");
|
||||
gnLoadDLLFunction(lib, functions->_gnDestroyInstance, "gnDestroyInstanceFn");
|
||||
}
|
||||
|
||||
// gnReturnCode gnInit(gnRenderingAPI RenderingAPI) {
|
||||
|
||||
// gnRenderingAPILIB = gnLoadDLL(gnCombineStrings(gnCreateString("gryphn/rendering_apis/"), libName));
|
||||
// if (!gnRenderingAPILIB.isValid) { return GN_UNABLE_TO_LOAD_DLL; }
|
||||
|
||||
// // gnLoadDLLFunction(gnRenderingAPILIB, gnCreateInstance, "gnCreateInstanceFn");
|
||||
// // gnLoadDLLFunction(gnRenderingAPILIB, gnDestroyInstance, "gnDestroyInstanceFn");
|
||||
// // gnLoadDLLFunction(gnRenderingAPILIB, gnGetPlatformLayerName, "gnGetPlatformLayerNameFn");
|
||||
|
||||
// // LOAD THE SET WINDOW FUNCTIONS
|
||||
// // #ifdef GN_PLATFORM_LINUX
|
||||
// // #ifdef GN_WINDOW_X11
|
||||
// // gnLoadDLLFunction(gnRenderingAPILIB, gnCreateX11WindowSurface, "gnCreateX11WindowSurfaceFn");
|
||||
// // #endif
|
||||
// // #ifdef GN_WINDOW_WAYLAND
|
||||
// // gnLoadDLLFunction(gnRenderingAPILIB, gnCreateWaylandWindowSurface, "gnCreateWaylandWindowSurfaceFn");
|
||||
// // #endif
|
||||
// // #endif
|
||||
|
||||
|
||||
// // #ifdef GN_PLATFORM_WIN32
|
||||
// // gnLoadDLLFunction(gnRenderingAPILIB, gnCreateWindowsWindowSurface, "gnCreateWindowsWindowSurfaceFn");
|
||||
// // #endif
|
||||
|
||||
// // #ifdef GN_PLATFORM_MACOS
|
||||
// // gnLoadDLLFunction(gnRenderingAPILIB, gnCreateMacOSWindowSurface, "gnCreateMacOSWindowSurfaceFn");
|
||||
// // #endif
|
||||
// // This is stupid
|
||||
|
||||
// // gnLoadDLLFunction(gnRenderingAPILIB, gnCreateDebugger, "gnCreateDebuggerFn");
|
||||
// // gnLoadDLLFunction(gnRenderingAPILIB, gnDestroyDebugger, "gnDestroyDebuggerFn");
|
||||
// // gnLoadDLLFunction(gnRenderingAPILIB, gnGetPhysicalOutputDevices, "gnGetPhysicalOutputDevicesFn");
|
||||
// // gnLoadDLLFunction(gnRenderingAPILIB, gnDeviceSupportsAPI, "gnDeviceSupportsAPIFn");
|
||||
// // gnLoadDLLFunction(gnRenderingAPILIB, gnRegisterOutputDevice, "gnRegisterOutputDeviceFn");
|
||||
// // gnLoadDLLFunction(gnRenderingAPILIB, gnWaitForDevice, "gnWaitForDeviceFn");
|
||||
// // gnLoadDLLFunction(gnRenderingAPILIB, gnDestroyOutputDevice, "gnDestroyOutputDeviceFn");
|
||||
// // gnLoadDLLFunction(gnRenderingAPILIB, gnGetDevicePresentationDetails, "gnGetDevicePresentationDetailsFn");
|
||||
// // gnLoadDLLFunction(gnRenderingAPILIB, gnPresentationQueueGetNextImageAsync, "gnPresentationQueueGetNextImageAsyncFn");
|
||||
// // gnLoadDLLFunction(gnRenderingAPILIB, gnPresentationQueueGetState, "gnPresentationQueueGetStateFn");
|
||||
// // gnLoadDLLFunction(gnRenderingAPILIB, gnCreatePresentationQueue, "gnCreatePresentationQueueFn");
|
||||
// // gnLoadDLLFunction(gnRenderingAPILIB, gnDestroyPresentationQueue, "gnDestroyPresentationQueueFn");
|
||||
// // gnLoadDLLFunction(gnRenderingAPILIB, gnVertexDescriptionSetBindingDescription, "gnVertexDescriptionSetBindingDescriptionFn");
|
||||
// // gnLoadDLLFunction(gnRenderingAPILIB, gnVertexDescriptionSetPropertiesCount, "gnVertexDescriptionSetPropertiesCountFn");
|
||||
// // gnLoadDLLFunction(gnRenderingAPILIB, gnVertexDescriptionSetProperty, "gnVertexDescriptionSetPropertyFn");
|
||||
// // gnLoadDLLFunction(gnRenderingAPILIB, gnCreateBuffer, "gnCreateBufferFn");
|
||||
// // gnLoadDLLFunction(gnRenderingAPILIB, gnBufferData, "gnBufferDataFn");
|
||||
// // gnLoadDLLFunction(gnRenderingAPILIB, gnBufferMapData, "gnBufferMapDataFn");
|
||||
// // gnLoadDLLFunction(gnRenderingAPILIB, gnDestroyBuffer, "gnDestroyBufferFn");
|
||||
// // gnLoadDLLFunction(gnRenderingAPILIB, gnBufferSubData, "gnBufferSubDataFn");
|
||||
// // gnLoadDLLFunction(gnRenderingAPILIB, gnBufferClearData, "gnBufferClearDataFn");
|
||||
// // gnLoadDLLFunction(gnRenderingAPILIB, gnTextureData, "gnTextureDataFn");
|
||||
// // gnLoadDLLFunction(gnRenderingAPILIB, gnTextureCubeMapData, "gnTextureCubeMapDataFn");
|
||||
// // gnLoadDLLFunction(gnRenderingAPILIB, gnCreateTexture, "gnCreateTextureFn");
|
||||
// // gnLoadDLLFunction(gnRenderingAPILIB, gnDestroyTexture, "gnDestroyTextureFn");
|
||||
// // gnLoadDLLFunction(gnRenderingAPILIB, gnCreateUniformLayout, "gnCreateUniformLayoutFn");
|
||||
// // gnLoadDLLFunction(gnRenderingAPILIB, gnDestroyUniformLayout, "gnDestroyUniformLayoutFn");
|
||||
// // gnLoadDLLFunction(gnRenderingAPILIB, gnCreateRenderPass, "gnCreateRenderPassFn");
|
||||
// // gnLoadDLLFunction(gnRenderingAPILIB, gnDestroyRenderPass, "gnDestroyRenderPassFn");
|
||||
// // gnLoadDLLFunction(gnRenderingAPILIB, gnCreateFence, "gnCreateFenceFn");
|
||||
// // gnLoadDLLFunction(gnRenderingAPILIB, gnWaitForFence, "gnWaitForFenceFn");
|
||||
// // gnLoadDLLFunction(gnRenderingAPILIB, gnResetFence, "gnResetFenceFn");
|
||||
// // gnLoadDLLFunction(gnRenderingAPILIB, gnDestroyFence, "gnDestroyFenceFn");
|
||||
// // gnLoadDLLFunction(gnRenderingAPILIB, gnCreateCommandBuffer, "gnCreateCommandBufferFn");
|
||||
// // gnLoadDLLFunction(gnRenderingAPILIB, _gnCreateCommandBuffers, "_gnCreateCommandBuffersFn");
|
||||
// // gnLoadDLLFunction(gnRenderingAPILIB, gnCommandBufferReset, "gnCommandBufferResetFn");
|
||||
// // gnLoadDLLFunction(gnRenderingAPILIB, gnDestroyCommandBuffer, "gnDestroyCommandBufferFn");
|
||||
// // gnLoadDLLFunction(gnRenderingAPILIB, gnBuildShaderModule, "gnBuildShaderModuleFn");
|
||||
// // gnLoadDLLFunction(gnRenderingAPILIB, gnDestroyShaderModule, "gnDestroyShaderModuleFn");
|
||||
// // gnLoadDLLFunction(gnRenderingAPILIB, gnBuildShader, "gnBuildShaderFn");
|
||||
// // gnLoadDLLFunction(gnRenderingAPILIB, gnCreateUniform, "gnCreateUniformFn");
|
||||
// // gnLoadDLLFunction(gnRenderingAPILIB, gnDestroyUniform, "gnDestroyUniformFn");
|
||||
// // gnLoadDLLFunction(gnRenderingAPILIB, gnUpdateSamplerUniform, "gnUpdateSamplerUniformFn");
|
||||
// // gnLoadDLLFunction(gnRenderingAPILIB, gnUpdateBufferUniform, "gnUpdateBufferUniformFn");
|
||||
// // gnLoadDLLFunction(gnRenderingAPILIB, gnAPISupports, "gnAPISupportsFn");
|
||||
// // gnLoadDLLFunction(gnRenderingAPILIB, gnGraphicsPipelineSetPrimative, "gnGraphicsPipelineSetPrimativeFn");
|
||||
// // gnLoadDLLFunction(gnRenderingAPILIB, gnGraphicsPipelineEnableDynamicStates, "gnGraphicsPipelineEnableDynamicStatesFn");
|
||||
// // gnLoadDLLFunction(gnRenderingAPILIB, gnGraphicsPipelineEnableDynamicState, "gnGraphicsPipelineEnableDynamicStateFn");
|
||||
// // gnLoadDLLFunction(gnRenderingAPILIB, _gnGraphicsPipelineSetViewport, "_gnGraphicsPipelineSetViewportFn");
|
||||
// // gnLoadDLLFunction(gnRenderingAPILIB, gnGraphicsPipelineSetCrop, "gnGraphicsPipelineSetCropFn");
|
||||
// // gnLoadDLLFunction(gnRenderingAPILIB, gnGraphicsPipelineSetDepthClamp, "gnGraphicsPipelineSetDepthClampFn");
|
||||
// // gnLoadDLLFunction(gnRenderingAPILIB, gnGraphicsPipelineSetFillMode, "gnGraphicsPipelineSetFillModeFn");
|
||||
// // gnLoadDLLFunction(gnRenderingAPILIB, gnGraphicsPipelineSetLineWidth, "gnGraphicsPipelineSetLineWidthFn");
|
||||
// // gnLoadDLLFunction(gnRenderingAPILIB, gnGraphicsPipelineSetCullMode, "gnGraphicsPipelineSetCullModeFn");
|
||||
// // gnLoadDLLFunction(gnRenderingAPILIB, gnGraphicsPipelineSetMultisampling, "gnGraphicsPipelineSetMultisamplingFn");
|
||||
// // gnLoadDLLFunction(gnRenderingAPILIB, gnGraphicsPipelineEnableDepthTest, "gnGraphicsPipelineEnableDepthTestFn");
|
||||
// // gnLoadDLLFunction(gnRenderingAPILIB, gnGraphicsPipelineSetColorBlend, "gnGraphicsPipelineSetColorBlendFn");
|
||||
// // gnLoadDLLFunction(gnRenderingAPILIB, gnGraphicsPipelineSetVertexDescription, "gnGraphicsPipelineSetVertexDescriptionFn");
|
||||
// // gnLoadDLLFunction(gnRenderingAPILIB, gnGraphicsPipelineBindShader, "gnGraphicsPipelineBindShaderFn");
|
||||
// // gnLoadDLLFunction(gnRenderingAPILIB, gnGraphicsPipelineSetRenderPass, "gnGraphicsPipelineSetRenderPassFn");
|
||||
// // gnLoadDLLFunction(gnRenderingAPILIB, gnGraphicsPipelineAddUniformLayout, "gnGraphicsPipelineAddUniformLayoutFn");
|
||||
// // gnLoadDLLFunction(gnRenderingAPILIB, gnGraphicsPipelineAddPushConstant, "gnGraphicsPipelineAddPushConstantFn");
|
||||
// // gnLoadDLLFunction(gnRenderingAPILIB, gnCreateGraphicsPipeline, "gnCreateGraphicsPipelineFn");
|
||||
// // gnLoadDLLFunction(gnRenderingAPILIB, gnDestroyGraphicsPipeline, "gnDestroyGraphicsPipelineFn");
|
||||
// // gnLoadDLLFunction(gnRenderingAPILIB, gnCreateFramebuffer, "gnCreateFramebufferFn");
|
||||
// // gnLoadDLLFunction(gnRenderingAPILIB, gnDestroyFramebuffer, "gnDestroyFramebufferFn");
|
||||
// // gnLoadDLLFunction(gnRenderingAPILIB, gnCreateFramebufferAttachment, "gnCreateFramebufferAttachmentFn");
|
||||
// // gnLoadDLLFunction(gnRenderingAPILIB, gnCreateSyncSemaphore, "gnCreateSyncSemaphoreFn");
|
||||
// // gnLoadDLLFunction(gnRenderingAPILIB, gnDestroySyncSemaphore, "gnDestroySyncSemaphoreFn");
|
||||
// // gnLoadDLLFunction(gnRenderingAPILIB, gnCommandBufferStart, "gnCommandBufferStartFn");
|
||||
// // gnLoadDLLFunction(gnRenderingAPILIB, gnCommandBufferEnd, "gnCommandBufferEndFn");
|
||||
// // gnLoadDLLFunction(gnRenderingAPILIB, gnCommandBeginRenderPass, "gnCommandBeginRenderPassFn");
|
||||
// // gnLoadDLLFunction(gnRenderingAPILIB, gnCommandSetGraphicsPipeline, "gnCommandSetGraphicsPipelineFn");
|
||||
// // gnLoadDLLFunction(gnRenderingAPILIB, gnCommandBindSamplerUniform, "gnCommandBindSamplerUniformFn");
|
||||
// // gnLoadDLLFunction(gnRenderingAPILIB, gnCommandBindBuffer, "gnCommandBindBufferFn");
|
||||
// // gnLoadDLLFunction(gnRenderingAPILIB, gnCommandBindBufferUniform, "gnCommandBindBufferUniformFn");
|
||||
// // gnLoadDLLFunction(gnRenderingAPILIB, gnCommandPushConstant, "gnCommandPushConstantFn");
|
||||
// // gnLoadDLLFunction(gnRenderingAPILIB, gnCommandDrawIndexed, "gnCommandDrawIndexedFn");
|
||||
// // gnLoadDLLFunction(gnRenderingAPILIB, gnCommandSetViewport, "gnCommandSetViewportFn");
|
||||
// // gnLoadDLLFunction(gnRenderingAPILIB, gnCommandSetScissor, "gnCommandSetScissorFn");
|
||||
// // gnLoadDLLFunction(gnRenderingAPILIB, _gnCommandDraw, "gnCommandDrawFn");
|
||||
// // gnLoadDLLFunction(gnRenderingAPILIB, gnCommandEndRenderPass, "gnCommandEndRenderPassFn");
|
||||
// // gnLoadDLLFunction(gnRenderingAPILIB, gnCommandSubmitGetValidPresentationQueue, "gnCommandSubmitGetValidPresentationQueueFn");
|
||||
// // gnLoadDLLFunction(gnRenderingAPILIB, gnCommandSubmit, "gnCommandSubmitFn");
|
||||
// // gnLoadDLLFunction(gnRenderingAPILIB, gnCommandPresentGetValidPresentationQueue, "gnCommandPresentGetValidPresentationQueueFn");
|
||||
// // gnLoadDLLFunction(gnRenderingAPILIB, gnCommandPresent, "gnCommandPresentFn");
|
||||
|
||||
// return GN_SUCCESS;
|
||||
// }
|
||||
|
||||
// void* gnLoadFunction(gnString name) {
|
||||
// return gnLoadFunctionPtr(gnRenderingAPILIB, name);
|
||||
// }
|
||||
|
||||
// void gnDestroy() {
|
||||
// gnUnloadDLL(&gnRenderingAPILIB);
|
||||
// }
|
15
src/core/instance/init/gryphn_init.h
Normal file
15
src/core/instance/init/gryphn_init.h
Normal file
@@ -0,0 +1,15 @@
|
||||
#pragma once
|
||||
#include <gryphn/gryphn_utils.h>
|
||||
#include <core/gryphn_rendering_api.h>
|
||||
#include "core/gryphn_platform_functions.h"
|
||||
// #include "utils/gryphn_error_code.h"
|
||||
|
||||
gnBool gnIsAPISupported(gnRenderingAPI RenderingAPI);
|
||||
struct gnDynamicLibrary_t* gnLoadRenderingDLL(gnRenderingAPI RenderingAPI);
|
||||
void gnLoadFunctions(struct gnDynamicLibrary_t* lib, struct gnFunctions_t* functions);
|
||||
|
||||
// #ifdef GN_REVEAL_IMPL
|
||||
// gnErrorCode gnInit(gnRenderingAPI RenderingAPI);
|
||||
// void gnDestroy();
|
||||
// void* gnLoadFunction(gnString name);
|
||||
// #endif
|
Reference in New Issue
Block a user