diff options
Diffstat (limited to 'src/ral/backends/opengl/opengl_helpers.h')
-rw-r--r-- | src/ral/backends/opengl/opengl_helpers.h | 13 |
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 |