rename to projects (DOES NOT COMPILE)
This commit is contained in:
12
projects/core/src/framebuffer/gryphn_framebuffer.c
Normal file
12
projects/core/src/framebuffer/gryphn_framebuffer.c
Normal file
@@ -0,0 +1,12 @@
|
||||
#include "gryphn_framebuffer.h"
|
||||
#include "gryphn_platform_functions.h"
|
||||
|
||||
gnReturnCode gnCreateFramebuffer(gnFramebuffer* framebuffer, gnOutputDeviceHandle device, gnFramebufferInfo framebufferInfo) {
|
||||
*framebuffer = malloc(sizeof(struct gnFramebuffer_t));
|
||||
(*framebuffer)->device = device;
|
||||
return device->deviceFunctions->_gnCreateFramebuffer(*framebuffer, device, framebufferInfo);
|
||||
}
|
||||
|
||||
void gnDestroyFramebuffer(gnFramebuffer framebuffer) {
|
||||
framebuffer->device->deviceFunctions->_gnDestroyFramebuffer(framebuffer);
|
||||
}
|
21
projects/core/src/framebuffer/gryphn_framebuffer.h
Normal file
21
projects/core/src/framebuffer/gryphn_framebuffer.h
Normal file
@@ -0,0 +1,21 @@
|
||||
#pragma once
|
||||
#include "utils/math/gryphn_vec2.h"
|
||||
#include "utils/gryphn_error_code.h"
|
||||
#include "gryphn_handles.h"
|
||||
|
||||
typedef struct gnFramebufferInfo_t {
|
||||
gnRenderPassDescriptorHandle renderPassDescriptor;
|
||||
uint32_t attachmentCount;
|
||||
gnTextureHandle* attachments;
|
||||
gnUInt2 size;
|
||||
} gnFramebufferInfo;
|
||||
|
||||
#ifdef GN_REVEAL_IMPL
|
||||
struct gnFramebuffer_t {
|
||||
struct gnPlatformFramebuffer_t* framebuffer;
|
||||
gnOutputDeviceHandle device;
|
||||
};
|
||||
#endif
|
||||
|
||||
gnReturnCode gnCreateFramebuffer(gnFramebuffer* framebuffer, gnOutputDeviceHandle device, gnFramebufferInfo framebufferInfo);
|
||||
void gnDestroyFramebuffer(gnFramebuffer framebuffer);
|
Reference in New Issue
Block a user