vulkan framebuffers

This commit is contained in:
Greg Wells
2025-05-29 12:26:02 -04:00
parent 9a43b15fb7
commit 5158bef0dd
6 changed files with 54 additions and 3 deletions

View File

@@ -1,9 +1,11 @@
#include "gryphn_framebuffer.h"
#include "core/gryphn_platform_functions.h"
gnReturnCode gnCreateFramebuffer(struct gnFramebuffer_t* framebuffer, struct gnOutputDevice_t* device, struct gnFramebufferInfo_t framebufferInfo) {
framebuffer->device = device;
return device->deviceFunctions->_gnCreateFramebuffer(framebuffer, device, framebufferInfo);
}
void gnDestroyFramebuffer(struct gnFramebuffer_t *framebuffer) {
framebuffer->device->deviceFunctions->_gnDestroyFramebuffer(framebuffer);
}

View File

@@ -8,8 +8,9 @@
#include "window_surface/gryphn_surface.h"
#include "window_surface/gryphn_surface_create_functions.h"
#include "shader_module/gryphn_shader_module.h"
#include "pipelines/graphics_pipeline/gryphn_graphics_pipeline.h"
#include "renderpass/gryphn_render_pass_descriptor.h"
#include "pipelines/graphics_pipeline/gryphn_graphics_pipeline.h"
#include "framebuffer/gryphn_framebuffer.h"
typedef struct gnFunctions_t {
gnReturnCode (*_gnCreateInstance)(gnInstance* instance, struct gnInstanceInfo_t info);
@@ -62,4 +63,7 @@ typedef struct gnDeviceFunctions_t {
gnReturnCode (*_gnCreateGraphicsPipeline)(struct gnGraphicsPipeline_t* pipeline, struct gnOutputDevice_t* device, struct gnGraphicsPipelineInfo_t pipelineInfo);
void (*_gnDestroyGraphicsPipeline)(struct gnGraphicsPipeline_t* pipeline);
gnReturnCode (*_gnCreateFramebuffer)(struct gnFramebuffer_t* framebuffer, struct gnOutputDevice_t* device, struct gnFramebufferInfo_t framebufferInfo);
void (*_gnDestroyFramebuffer)(struct gnFramebuffer_t* framebuffer);
} gnDeviceFunctions;

View File

@@ -77,4 +77,6 @@ void gnLoadDeviceFunctions(struct gnDynamicLibrary_t* lib, struct gnDeviceFuncti
gnLoadDLLFunction(lib, functions->_gnDestroyRenderPassDescriptor, "gnDestroyRenderPassDescriptorFn");
gnLoadDLLFunction(lib, functions->_gnCreateGraphicsPipeline, "gnCreateGraphicsPipelineFn");
gnLoadDLLFunction(lib, functions->_gnDestroyGraphicsPipeline, "gnDestroyGraphicsPipelineFn");
gnLoadDLLFunction(lib, functions->_gnCreateFramebuffer, "gnCreateFramebufferFn");
gnLoadDLLFunction(lib, functions->_gnDestroyFramebuffer, "gnDestroyFramebufferFn");
}