summaryrefslogtreecommitdiff
path: root/src/ral/backends/opengl/opengl_helpers.h
diff options
context:
space:
mode:
authoromniscient <17525998+omnisci3nce@users.noreply.github.com>2024-08-13 13:18:24 +1000
committeromniscient <17525998+omnisci3nce@users.noreply.github.com>2024-08-13 13:18:24 +1000
commit0c2f902238010903388b7d9a3af00979340eff2c (patch)
treeb718d72d8761769ec4aefbfd74cbb2d695f89741 /src/ral/backends/opengl/opengl_helpers.h
parent43d915b2ceb3f5e439c09c772e9ebc7542c1a2bb (diff)
add debug draw bbox and add topology to draw calls
Diffstat (limited to 'src/ral/backends/opengl/opengl_helpers.h')
-rw-r--r--src/ral/backends/opengl/opengl_helpers.h13
1 files changed, 13 insertions, 0 deletions
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