diff options
author | omniscient <17525998+omnisci3nce@users.noreply.github.com> | 2024-06-09 01:43:02 +1000 |
---|---|---|
committer | omniscient <17525998+omnisci3nce@users.noreply.github.com> | 2024-06-09 01:43:02 +1000 |
commit | 859ea7e23d2bbbc4b32b43727ae50aebe399e720 (patch) | |
tree | 868b5d938cec7846637cf403cde3723829822305 /src/renderer/backends/opengl/opengl_helpers.h | |
parent | 19a5fae08d7f1f85cb5448a5f2b19f0f9d342a0e (diff) |
metal is back, baby
Diffstat (limited to 'src/renderer/backends/opengl/opengl_helpers.h')
-rw-r--r-- | src/renderer/backends/opengl/opengl_helpers.h | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/renderer/backends/opengl/opengl_helpers.h b/src/renderer/backends/opengl/opengl_helpers.h index 2f6bef3..44d40cb 100644 --- a/src/renderer/backends/opengl/opengl_helpers.h +++ b/src/renderer/backends/opengl/opengl_helpers.h @@ -1,36 +1,36 @@ #pragma once -#include "ral_types.h" #include <glad/glad.h> #include <glfw3.h> +#include "ral_types.h" typedef struct opengl_vertex_attr { u32 count; GLenum data_type; -} opengl_vertex_attr ; +} opengl_vertex_attr; opengl_vertex_attr format_from_vertex_attr(vertex_attrib_type attr) { switch (attr) { case ATTR_F32: - return (opengl_vertex_attr){.count = 1, .data_type = GL_FLOAT }; + return (opengl_vertex_attr){ .count = 1, .data_type = GL_FLOAT }; case ATTR_U32: - return (opengl_vertex_attr){.count = 1, .data_type = GL_UNSIGNED_INT }; + return (opengl_vertex_attr){ .count = 1, .data_type = GL_UNSIGNED_INT }; case ATTR_I32: - return (opengl_vertex_attr){.count = 1, .data_type = GL_INT }; + return (opengl_vertex_attr){ .count = 1, .data_type = GL_INT }; case ATTR_F32x2: - return (opengl_vertex_attr){.count = 2, .data_type = GL_FLOAT }; + return (opengl_vertex_attr){ .count = 2, .data_type = GL_FLOAT }; case ATTR_U32x2: // return VK_FORMAT_R32G32_UINT; case ATTR_I32x2: // return VK_FORMAT_R32G32_UINT; case ATTR_F32x3: - return (opengl_vertex_attr){.count = 3, .data_type = GL_FLOAT }; + return (opengl_vertex_attr){ .count = 3, .data_type = GL_FLOAT }; case ATTR_U32x3: // return VK_FORMAT_R32G32B32_UINT; case ATTR_I32x3: // return VK_FORMAT_R32G32B32_SINT; case ATTR_F32x4: - return (opengl_vertex_attr){.count = 4, .data_type = GL_FLOAT }; + return (opengl_vertex_attr){ .count = 4, .data_type = GL_FLOAT }; case ATTR_U32x4: // return VK_FORMAT_R32G32B32A32_UINT; case ATTR_I32x4: - // return VK_FORMAT_R32G32B32A32_SINT; + return (opengl_vertex_attr){ .count = 4, .data_type = GL_INT }; } }
\ No newline at end of file |