summaryrefslogtreecommitdiffstats
path: root/Graphics/GraphicsEngineOpenGL
diff options
context:
space:
mode:
authorassiduous <assiduous@diligentgraphics.com>2020-02-05 17:44:34 +0000
committerassiduous <assiduous@diligentgraphics.com>2020-02-05 17:44:34 +0000
commit016ae0018fe4ca61cc251cf0cacee6757341707e (patch)
tree3d794ac0713b6fd3e66bcd1246281a3568c1ec61 /Graphics/GraphicsEngineOpenGL
parentSilenced OpenGL deprecation warnings on Mac (diff)
downloadDiligentCore-016ae0018fe4ca61cc251cf0cacee6757341707e.tar.gz
DiligentCore-016ae0018fe4ca61cc251cf0cacee6757341707e.zip
Added line strip topology
Diffstat (limited to 'Graphics/GraphicsEngineOpenGL')
-rw-r--r--Graphics/GraphicsEngineOpenGL/include/GLTypeConversions.hpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/Graphics/GraphicsEngineOpenGL/include/GLTypeConversions.hpp b/Graphics/GraphicsEngineOpenGL/include/GLTypeConversions.hpp
index 4f149399..0608dd39 100644
--- a/Graphics/GraphicsEngineOpenGL/include/GLTypeConversions.hpp
+++ b/Graphics/GraphicsEngineOpenGL/include/GLTypeConversions.hpp
@@ -37,7 +37,8 @@ static const GLenum PrimTopologyToGLTopologyMap[] =
GL_TRIANGLES, //PRIMITIVE_TOPOLOGY_TRIANGLE_LIST
GL_TRIANGLE_STRIP, //PRIMITIVE_TOPOLOGY_TRIANGLE_STRIP,
GL_POINTS, //PRIMITIVE_TOPOLOGY_POINT_LIST
- GL_LINES //PRIMITIVE_TOPOLOGY_LINE_LIST
+ GL_LINES, //PRIMITIVE_TOPOLOGY_LINE_LIST
+ GL_LINE_STRIP //PRIMITIVE_TOPOLOGY_LINE_STRIP
};
// clang-format on
@@ -54,6 +55,7 @@ inline GLenum PrimitiveTopologyToGLTopology(PRIMITIVE_TOPOLOGY PrimTopology)
case PRIMITIVE_TOPOLOGY_TRIANGLE_STRIP: VERIFY_EXPR(GLTopology == GL_TRIANGLE_STRIP); break;
case PRIMITIVE_TOPOLOGY_POINT_LIST: VERIFY_EXPR(GLTopology == GL_POINTS); break;
case PRIMITIVE_TOPOLOGY_LINE_LIST: VERIFY_EXPR(GLTopology == GL_LINES); break;
+ case PRIMITIVE_TOPOLOGY_LINE_STRIP: VERIFY_EXPR(GLTopology == GL_LINE_STRIP); break;
default: UNEXPECTED("Unexpected primitive topology");
// clang-format on
}