get OpenGL to work

This commit is contained in:
Gregory Wells
2025-08-05 09:12:12 -04:00
parent 2fddf0e9d9
commit dd5f1485d9
13 changed files with 56 additions and 34 deletions

View File

@@ -0,0 +1,8 @@
#include "opengl_loader.h"
#include "gryphn_extensions.h"
gnBool openglIsExtensionSupported(gnExtension extension) {
if (extension == GN_EXT_SYNCHRONIZATION) return GN_FALSE;
if (extension == GN_EXT_QUEUES) return GN_FALSE;
return GN_FALSE;
}

View File

@@ -4,12 +4,18 @@
#include "device/opengl_physical_device.h"
#include "device/opengl_output_device.h"
gryphnInstanceFunctionLayers loadOpenGLAPILayer() {
return (gryphnInstanceFunctionLayers) {
.createInstance = openglCreateInstance,
.destroyInstance = openglDestroyInstance,
NULL
};
}
gnInstanceFunctions loadOpenGLInstanceFunctions() {
return (gnInstanceFunctions){
._gnCreateInstance = createOpenGLInstance,
._gnDestroyInstance = destroyOpenGLInstance,
._gnGetPhysicalDevices = getOpenGLDevice,
._gnQueueCanPresentToSurface = openGLQueueCanPresent,
._gnPhysicalDeviceCanPresentToSurface = openglCanDevicePresent,
._gnCreateOutputDevice = createOpenGLOutputDevice,
._gnDestroyOutputDevice = destroyOpenGLOutputDevice,
#ifdef GN_PLATFORM_LINUX

View File

@@ -2,7 +2,11 @@
#include "loader/src/gryphn_instance_functions.h"
#include "loader/src/gryphn_device_functions.h"
#include "loader/src/gryphn_command_functions.h"
#include "gryphn_extensions.h"
gnInstanceFunctions loadOpenGLInstanceFunctions();
gnDeviceFunctions loadOpenGLDeviceFunctions();
gnCommandFunctions loadOpenGLCommandFunctions();
gryphnInstanceFunctionLayers loadOpenGLAPILayer();
gnBool openglIsExtensionSupported(gnExtension extension);