diff options
Diffstat (limited to 'src/ral')
-rw-r--r-- | src/ral/backends/opengl/backend_opengl.c | 3 | ||||
-rw-r--r-- | src/ral/ral_common.c | 12 | ||||
-rw-r--r-- | src/ral/ral_impl.h | 10 |
3 files changed, 14 insertions, 11 deletions
diff --git a/src/ral/backends/opengl/backend_opengl.c b/src/ral/backends/opengl/backend_opengl.c index 6c1a301..7862a81 100644 --- a/src/ral/backends/opengl/backend_opengl.c +++ b/src/ral/backends/opengl/backend_opengl.c @@ -57,7 +57,8 @@ bool GPU_Backend_Init(const char* window_name, struct GLFWwindow* window, } // All of these are no-ops in OpenGL -void GPU_Backend_Shutdown() { /* TODO */ } +void GPU_Backend_Shutdown() { /* TODO */ +} bool GPU_Device_Create(GPU_Device* out_device) { return true; } void GPU_Device_Destroy(GPU_Device* device) {} bool GPU_Swapchain_Create(GPU_Swapchain* out_swapchain) { return true; } diff --git a/src/ral/ral_common.c b/src/ral/ral_common.c index 53e35f0..d921ac4 100644 --- a/src/ral/ral_common.c +++ b/src/ral/ral_common.c @@ -61,10 +61,10 @@ size_t VertexAttribSize(VertexAttribType attr) { } size_t VertexDesc_CalcStride(VertexDescription* desc) { - size_t stride = 0; - for (int i = 0; i < desc->attributes_count; i++) { - size_t size =VertexAttribSize(desc->attributes[i]); - stride += size; - } - return stride; + size_t stride = 0; + for (int i = 0; i < desc->attributes_count; i++) { + size_t size = VertexAttribSize(desc->attributes[i]); + stride += size; + } + return stride; } diff --git a/src/ral/ral_impl.h b/src/ral/ral_impl.h index f5a16d2..8f96bc3 100644 --- a/src/ral/ral_impl.h +++ b/src/ral/ral_impl.h @@ -81,10 +81,12 @@ PUB void GPU_EncodeCopyBufToBuf(); // PUB void GPU_EncodeCopyBufToTex(GPU_CmdEncoder* encoder, BufferHandle src, TextureHandle dst, // u32 x_offset, u32 y_offset, u32 width, u32 height, const void* data); -/** @brief Convenience method for writing data directly into a texture. Staging memory is handled internally. */ -PUB void GPU_WriteTextureRegion(GPU_CmdEncoder* encoder, TextureHandle dst, - u32 x_offset, u32 y_offset, u32 width, u32 height, const void* data); -PUB void GPU_WriteBuffer(GPU_CmdEncoder* encoder, BufferHandle buf, u64 offset, u64 size, const void* data); +/** @brief Convenience method for writing data directly into a texture. Staging memory is handled + * internally. */ +PUB void GPU_WriteTextureRegion(GPU_CmdEncoder* encoder, TextureHandle dst, u32 x_offset, + u32 y_offset, u32 width, u32 height, const void* data); +PUB void GPU_WriteBuffer(GPU_CmdEncoder* encoder, BufferHandle buf, u64 offset, u64 size, + const void* data); PUB void GPU_EncodeDraw(GPU_CmdEncoder* encoder, u64 count); PUB void GPU_EncodeDrawIndexed(GPU_CmdEncoder* encoder, u64 index_count); |