vulkan framebuffers
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
@@ -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;
|
||||
|
@@ -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");
|
||||
}
|
||||
|
@@ -24,7 +24,8 @@ typedef enum gnReturnCode_t {
|
||||
GN_FAILED_TO_CREATE_RENDER_PASS,
|
||||
GN_FAILED_TO_CREATE_GRAPHICS_PIPELINE,
|
||||
GN_UNSUPPORTED_SHADER_MODULE,
|
||||
GN_UNKNOWN_SUBPASS
|
||||
GN_UNKNOWN_SUBPASS,
|
||||
GN_FAILED_TO_CREATE_FRAMEBUFFER
|
||||
} gnReturnCode;
|
||||
|
||||
typedef gnReturnCode gnErrorCode;
|
||||
@@ -54,5 +55,6 @@ static const char* gnErrorCodeToCString(enum gnReturnCode_t returnCode) {
|
||||
case GN_FAILED_TO_CREATE_GRAPHICS_PIPELINE: return "GN_FAILED_TO_CREATE_GRAPHICS_PIPELINE";
|
||||
case GN_UNSUPPORTED_SHADER_MODULE: return "GN_UNSUPPORTED_SHADER_MODULE";
|
||||
case GN_UNKNOWN_SUBPASS: return "GN_UNKNOWN_SUBPASS";
|
||||
case GN_FAILED_TO_CREATE_FRAMEBUFFER: return "GN_FAILED_TO_CREATE_FRAMEBUFFER";
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user