From 0c2f902238010903388b7d9a3af00979340eff2c Mon Sep 17 00:00:00 2001 From: omniscient <17525998+omnisci3nce@users.noreply.github.com> Date: Tue, 13 Aug 2024 13:18:24 +1000 Subject: add debug draw bbox and add topology to draw calls --- src/ral/backends/opengl/opengl_helpers.h | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'src/ral/backends/opengl/opengl_helpers.h') diff --git a/src/ral/backends/opengl/opengl_helpers.h b/src/ral/backends/opengl/opengl_helpers.h index 8a78de5..b73eaea 100644 --- a/src/ral/backends/opengl/opengl_helpers.h +++ b/src/ral/backends/opengl/opengl_helpers.h @@ -138,4 +138,17 @@ static GLenum opengl_tex_type(GPU_TextureType tex_type) { } } +static GLenum opengl_prim_topology(PrimitiveTopology t) { + switch (t) { + case CEL_POINT: return GL_POINT; + case CEL_LINE: return GL_LINES; + case CEL_LINE_STRIP: return GL_LINE_STRIP; + case CEL_TRI: return GL_TRIANGLES; + case CEL_TRI_STRIP: return GL_TRIANGLE_STRIP; + case PRIMITIVE_TOPOLOGY_COUNT: + WARN("Invalid PrimitiveTopology value"); + break; + } +} + #endif -- cgit v1.2.3-70-g09d2