From 1a1af3fda354f3e81cace3f3f64138bcea1995c6 Mon Sep 17 00:00:00 2001 From: bunnei Date: Fri, 13 Apr 2018 14:18:37 -0400 Subject: gl_rasterizer: Implement indexed vertex mode. --- src/video_core/renderer_opengl/maxwell_to_gl.h | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) (limited to 'src/video_core/renderer_opengl/maxwell_to_gl.h') diff --git a/src/video_core/renderer_opengl/maxwell_to_gl.h b/src/video_core/renderer_opengl/maxwell_to_gl.h index 7909dcfc3..68bb77b4d 100644 --- a/src/video_core/renderer_opengl/maxwell_to_gl.h +++ b/src/video_core/renderer_opengl/maxwell_to_gl.h @@ -45,6 +45,20 @@ inline GLenum VertexType(Maxwell::VertexAttribute attrib) { return {}; } +inline GLenum IndexFormat(Maxwell::IndexFormat index_format) { + switch (index_format) { + case Maxwell::IndexFormat::UnsignedByte: + return GL_UNSIGNED_BYTE; + case Maxwell::IndexFormat::UnsignedShort: + return GL_UNSIGNED_SHORT; + case Maxwell::IndexFormat::UnsignedInt: + return GL_UNSIGNED_INT; + } + LOG_CRITICAL(Render_OpenGL, "Unimplemented index_format=%d", index_format); + UNREACHABLE(); + return {}; +} + inline GLenum PrimitiveTopology(Maxwell::PrimitiveTopology topology) { switch (topology) { case Maxwell::PrimitiveTopology::Triangles: @@ -52,7 +66,7 @@ inline GLenum PrimitiveTopology(Maxwell::PrimitiveTopology topology) { case Maxwell::PrimitiveTopology::TriangleStrip: return GL_TRIANGLE_STRIP; } - LOG_CRITICAL(Render_OpenGL, "Unimplemented primitive topology=%d", topology); + LOG_CRITICAL(Render_OpenGL, "Unimplemented topology=%d", topology); UNREACHABLE(); return {}; } -- cgit v1.2.3