vulkan swapchain support

This commit is contained in:
Greg Wells
2025-05-24 15:13:16 -04:00
parent 3fa37d0229
commit e955775ba0
13 changed files with 80 additions and 163 deletions

View File

@@ -13,12 +13,3 @@ gnReturnCode gnCreateDebugger(gnDebugger* debugger, gnInstance* instance, const
void gnDestroyDebugger(gnDebugger* debugger) {
debugger->instance->functions->_gnDestroyDebugger(debugger);
}
void gnDebuggerSetErrorMessage(gnDebugger* debugger, gnMessageData data) {
debugger->info.callback(
GN_MESSAGE_ERROR,
GN_DEBUG_MESSAGE_VALIDATION,
data,
debugger->info.userData
);
}

View File

@@ -53,4 +53,11 @@ typedef struct gnDebugger_t {
gnReturnCode gnCreateDebugger(gnDebugger* debugger, gnInstance* instance, const struct gnDebuggerInfo_t info);
void gnDestroyDebugger(gnDebugger* debugger);
void gnDebuggerSetErrorMessage(gnDebugger* debugger, gnMessageData data);
static void gnDebuggerSetErrorMessage(gnDebugger* debugger, gnMessageData data) {
debugger->info.callback(
GN_MESSAGE_ERROR,
GN_DEBUG_MESSAGE_VALIDATION,
data,
debugger->info.userData
);
}

View File

@@ -7,7 +7,7 @@ gnReturnCode gnCreateOutputDevice(gnOutputDevice* outputDevice, gnInstance* inst
outputDevice->deviceFunctions = malloc(sizeof(gnDeviceFunctions));
gnLoadDeviceFunctions(instance->dynamicLib, outputDevice->deviceFunctions);
outputDevice->instance = instance;
// outputDevice->physicalDevice = (gnPhysicalDevice*)(&deviceInfo.physicalDevice);
outputDevice->physicalDevice = deviceInfo.physicalDevice;
return instance->functions->_gnCreateOutputDevoce(outputDevice, instance, deviceInfo);
}
void gnDestroyOutputDevice(gnOutputDevice* device) {

View File

@@ -21,7 +21,7 @@ typedef struct gnOutputDevice_t {
struct gnPlatformOutputDevice_t* outputDevice;
struct gnDeviceFunctions_t* deviceFunctions;
gnInstance* instance;
// gnPhysicalDevice* physicalDevice;
gnPhysicalDevice physicalDevice;
} gnOutputDevice;
gnReturnCode gnCreateOutputDevice(gnOutputDevice* outputDevice, gnInstance* instance, struct gnOutputDeviceInfo_t deviceInfo);

View File

@@ -1,7 +1,7 @@
#pragma once
#include <gryphn/gryphn_utils.h>
#include "core/output_device/gryphn_output_device.h"
#include "gryphn_present_queue_state.h"
#include <core/window_surface/gryphn_surface.h>
// #include "core/sync_objects/gryphn_sync_semaphore.h"
// #include "core/textures/gryphn_texture.h"
// #include "gryphn_device_presentation_details.h"
@@ -9,6 +9,7 @@
typedef struct gnPresentationQueueInfo_t {
gnUInt ImageCount;
gnUInt2 ImageSize;
struct gnWindowSurface_t surface;
} gnPresentationQueueInfo;
struct gnPlatformPresentationQueue_t;