metal render passes (they dont do crap)

This commit is contained in:
Greg Wells
2025-05-28 21:47:26 -04:00
parent c58275353a
commit cf2da1e9ea
2 changed files with 20 additions and 0 deletions

View File

@@ -0,0 +1,7 @@
#pragma once
#include "core/renderpass/gryphn_render_pass_descriptor.h"
#import <Metal/MTLRenderPass.h>
typedef struct gnPlatformRenderPassDescriptor_t {
MTLRenderPassDescriptor* passDescriptor;
} gnPlatformRenderPassDescriptor;

View File

@@ -0,0 +1,13 @@
#include "metal_render_pass.h"
gnReturnCode gnCreateRenderPassDescriptorFn(struct gnRenderPassDescriptor_t* renderPass, struct gnOutputDevice_t* device, struct gnRenderPassDescriptorInfo_t info) {
renderPass->renderPassDescriptor = malloc(sizeof(gnPlatformRenderPassDescriptor));
renderPass->renderPassDescriptor->passDescriptor = [[MTLRenderPassDescriptor alloc] init];
return GN_SUCCESS;
}
void gnDestroyRenderPassDescriptorFn(struct gnRenderPassDescriptor_t* renderPass) {
[renderPass->renderPassDescriptor->passDescriptor release];
free(renderPass->renderPassDescriptor);
}