From 9a43b15fb78238532834f7e3ecbe5c16e59fc40b Mon Sep 17 00:00:00 2001 From: Greg Wells Date: Thu, 29 May 2025 11:59:22 -0400 Subject: [PATCH] create info and create function --- src/core/framebuffer/gryphn_framebuffer.c | 9 +++++++++ src/core/framebuffer/gryphn_framebuffer.h | 15 ++++++++++++++- 2 files changed, 23 insertions(+), 1 deletion(-) create mode 100644 src/core/framebuffer/gryphn_framebuffer.c diff --git a/src/core/framebuffer/gryphn_framebuffer.c b/src/core/framebuffer/gryphn_framebuffer.c new file mode 100644 index 0000000..27ddec4 --- /dev/null +++ b/src/core/framebuffer/gryphn_framebuffer.c @@ -0,0 +1,9 @@ +#include "gryphn_framebuffer.h" + +gnReturnCode gnCreateFramebuffer(struct gnFramebuffer_t* framebuffer, struct gnOutputDevice_t* device, struct gnFramebufferInfo_t framebufferInfo) { + framebuffer->device = device; +} + +void gnDestroyFramebuffer(struct gnFramebuffer_t *framebuffer) { + +} diff --git a/src/core/framebuffer/gryphn_framebuffer.h b/src/core/framebuffer/gryphn_framebuffer.h index 031e0cd..7271c3c 100644 --- a/src/core/framebuffer/gryphn_framebuffer.h +++ b/src/core/framebuffer/gryphn_framebuffer.h @@ -1,5 +1,18 @@ #pragma once +#include "core/renderpass/gryphn_render_pass_descriptor.h" +#include "core/textures/gryphn_texture.h" + +typedef struct gnFramebufferInfo_t { + struct gnRenderPassDescriptor_t* renderPassDescriptor; + uint32_t attachmentCount; + struct gnTexture_t* attachments; + gnUInt2 size; +} gnFramebufferInfo; typedef struct gnFramebuffer_t { - + struct gnPlatformFramebuffer_t* framebuffer; + struct gnOutputDevice_t* device; } gnFramebuffer; + +gnReturnCode gnCreateFramebuffer(struct gnFramebuffer_t* framebuffer, struct gnOutputDevice_t* device, struct gnFramebufferInfo_t framebufferInfo); +void gnDestroyFramebuffer(struct gnFramebuffer_t* framebuffer);