get OpenGL to work
This commit is contained in:
8
projects/apis/opengl/loader/opengl_extensions.c
Normal file
8
projects/apis/opengl/loader/opengl_extensions.c
Normal 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;
|
||||
}
|
@@ -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
|
||||
|
@@ -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);
|
||||
|
Reference in New Issue
Block a user