rename to projects (DOES NOT COMPILE)
This commit is contained in:
@@ -0,0 +1,12 @@
|
||||
#pragma once
|
||||
#include "core/command/command_buffer/gryphn_command_buffer.h"
|
||||
#include "core/pipelines/graphics_pipeline/gryphn_graphics_pipeline.h"
|
||||
#import <Metal/MTLCommandBuffer.h>
|
||||
#import <Metal/MTLCommandEncoder.h>
|
||||
|
||||
typedef struct gnPlatformCommandBuffer_t {
|
||||
id<MTLCommandBuffer> commandBuffer;
|
||||
id<MTLCommandEncoder> encoder;
|
||||
struct gnGraphicsPipeline_t* boundGraphcisPipeline;
|
||||
gnBufferHandle indexBuffer;
|
||||
} gnPlatformCommandBuffer;
|
||||
@@ -0,0 +1,24 @@
|
||||
#include "metal_command_buffer.h"
|
||||
#include "core/commands/command_pool/metal_command_pool.h"
|
||||
#import <Metal/Metal.h>
|
||||
|
||||
gnReturnCode gnCommandPoolAllocateCommandBuffersFn(gnCommandBufferHandle* commandBuffers, uint32_t count, struct gnCommandPool_t* pool) {
|
||||
for (int i = 0; i < count; i++) {
|
||||
commandBuffers[i]->commandBuffer = malloc(sizeof(gnPlatformCommandBuffer));
|
||||
}
|
||||
|
||||
return GN_SUCCESS;
|
||||
}
|
||||
void gnResetCommandBufferFn(struct gnCommandBuffer_t *commandBuffer) {
|
||||
// do nothing
|
||||
}
|
||||
gnReturnCode gnBeginCommandBufferFn(struct gnCommandBuffer_t* commandBuffer) {
|
||||
commandBuffer->commandBuffer->boundGraphcisPipeline = NULL;
|
||||
commandBuffer->commandBuffer->commandBuffer = [commandBuffer->commandPool->commandPool->commandQueue commandBuffer];
|
||||
return GN_SUCCESS;
|
||||
}
|
||||
|
||||
gnReturnCode gnEndCommandBufferFn(struct gnCommandBuffer_t* commandBuffer) {
|
||||
// [commandBuffer->commandBuffer->commandBuffer commit];
|
||||
return GN_SUCCESS;
|
||||
}
|
||||
Reference in New Issue
Block a user