command buffer basic lifecycle
This commit is contained in:
@@ -3,6 +3,24 @@
|
|||||||
|
|
||||||
gnCommandFunctions loadOpenGLCommandFunctions() {
|
gnCommandFunctions loadOpenGLCommandFunctions() {
|
||||||
return (gnCommandFunctions) {
|
return (gnCommandFunctions) {
|
||||||
._gnCommandPoolAllocateCommandBuffers = openglCommandPoolAllocateCommandBuffers
|
._gnCommandPoolAllocateCommandBuffers = openglCommandPoolAllocateCommandBuffers,
|
||||||
|
|
||||||
|
._gnBeginCommandBuffer = openglBeginCommandBuffer,
|
||||||
|
._gnResetCommandBuffer = openglResetCommandBuffer,
|
||||||
|
._gnEndCommandBuffer = openglEndCommandBuffer,
|
||||||
|
._gnDestroyCommandBuffer = openglDestroyCommandBuffer,
|
||||||
|
|
||||||
|
._gnCommandBeginRenderPass = NULL,
|
||||||
|
._gnCommandEndRenderPass = NULL,
|
||||||
|
|
||||||
|
._gnCommandBindGraphicsPipeline = NULL,
|
||||||
|
._gnCommandSetViewport = NULL,
|
||||||
|
._gnCommandSetScissor = NULL,
|
||||||
|
._gnCommandBindUniform = NULL,
|
||||||
|
._gnCommandPushConstant = NULL,
|
||||||
|
|
||||||
|
._gnCommandBindBuffer = NULL,
|
||||||
|
._gnCommandDraw = NULL,
|
||||||
|
._gnCommandDrawIndexed = NULL,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@@ -20,3 +20,17 @@ gnReturnCode openglCommandPoolAllocateCommandBuffers(gnCommandBufferHandle* comm
|
|||||||
|
|
||||||
return GN_SUCCESS;
|
return GN_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void openglResetCommandBuffer(gnCommandBuffer commandBuffer) {
|
||||||
|
// commandBuffer->commandBuffer->
|
||||||
|
// nothing, for now command buffers are implictly reset on begin
|
||||||
|
}
|
||||||
|
gnReturnCode openglBeginCommandBuffer(gnCommandBuffer commandBuffer) {
|
||||||
|
return GN_SUCCESS;
|
||||||
|
}
|
||||||
|
gnReturnCode openglEndCommandBuffer(gnCommandBuffer commandBuffer) {
|
||||||
|
return GN_SUCCESS;
|
||||||
|
}
|
||||||
|
void openglDestroyCommandBuffer(gnCommandBuffer commandBuffer) {
|
||||||
|
commandBuffer->commandPool->commandPool->canBeReallocated[commandBuffer->commandBuffer->index] = GN_TRUE;
|
||||||
|
}
|
||||||
|
@@ -5,3 +5,8 @@ typedef struct gnPlatformCommandBuffer_t {
|
|||||||
int index;
|
int index;
|
||||||
} gnPlatformCommandBuffer;
|
} gnPlatformCommandBuffer;
|
||||||
gnReturnCode openglCommandPoolAllocateCommandBuffers(gnCommandBufferHandle* commandBuffers, uint32_t count, gnCommandPoolHandle pool);
|
gnReturnCode openglCommandPoolAllocateCommandBuffers(gnCommandBufferHandle* commandBuffers, uint32_t count, gnCommandPoolHandle pool);
|
||||||
|
|
||||||
|
void openglResetCommandBuffer(gnCommandBuffer commandBuffer);
|
||||||
|
gnReturnCode openglBeginCommandBuffer(gnCommandBuffer commandBuffer);
|
||||||
|
gnReturnCode openglEndCommandBuffer(gnCommandBuffer commandBuffer);
|
||||||
|
void openglDestroyCommandBuffer(gnCommandBuffer commandBuffer);
|
||||||
|
Reference in New Issue
Block a user