diff options
| author | 2018-04-07 04:54:52 -0400 | |
|---|---|---|
| committer | 2018-04-13 23:48:24 -0400 | |
| commit | 8aa21a03b30d5d1b2c29e10fd05d2f893e6bd014 (patch) | |
| tree | 7280bd0cae02873b06ddef460da838a4fa9ee23b | |
| parent | gl_shader_gen: Add hashable setup/config structs. (diff) | |
| download | yuzu-8aa21a03b30d5d1b2c29e10fd05d2f893e6bd014.tar.gz yuzu-8aa21a03b30d5d1b2c29e10fd05d2f893e6bd014.tar.xz yuzu-8aa21a03b30d5d1b2c29e10fd05d2f893e6bd014.zip | |
maxwell_to_gl: Add a few types, etc.
| -rw-r--r-- | src/video_core/renderer_opengl/maxwell_to_gl.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/video_core/renderer_opengl/maxwell_to_gl.h b/src/video_core/renderer_opengl/maxwell_to_gl.h index 48ee80125..7909dcfc3 100644 --- a/src/video_core/renderer_opengl/maxwell_to_gl.h +++ b/src/video_core/renderer_opengl/maxwell_to_gl.h | |||
| @@ -10,6 +10,14 @@ | |||
| 10 | #include "common/logging/log.h" | 10 | #include "common/logging/log.h" |
| 11 | #include "video_core/engines/maxwell_3d.h" | 11 | #include "video_core/engines/maxwell_3d.h" |
| 12 | 12 | ||
| 13 | using GLvec2 = std::array<GLfloat, 2>; | ||
| 14 | using GLvec3 = std::array<GLfloat, 3>; | ||
| 15 | using GLvec4 = std::array<GLfloat, 4>; | ||
| 16 | |||
| 17 | using GLuvec2 = std::array<GLuint, 2>; | ||
| 18 | using GLuvec3 = std::array<GLuint, 3>; | ||
| 19 | using GLuvec4 = std::array<GLuint, 4>; | ||
| 20 | |||
| 13 | namespace MaxwellToGL { | 21 | namespace MaxwellToGL { |
| 14 | 22 | ||
| 15 | using Maxwell = Tegra::Engines::Maxwell3D::Regs; | 23 | using Maxwell = Tegra::Engines::Maxwell3D::Regs; |
| @@ -39,6 +47,8 @@ inline GLenum VertexType(Maxwell::VertexAttribute attrib) { | |||
| 39 | 47 | ||
| 40 | inline GLenum PrimitiveTopology(Maxwell::PrimitiveTopology topology) { | 48 | inline GLenum PrimitiveTopology(Maxwell::PrimitiveTopology topology) { |
| 41 | switch (topology) { | 49 | switch (topology) { |
| 50 | case Maxwell::PrimitiveTopology::Triangles: | ||
| 51 | return GL_TRIANGLES; | ||
| 42 | case Maxwell::PrimitiveTopology::TriangleStrip: | 52 | case Maxwell::PrimitiveTopology::TriangleStrip: |
| 43 | return GL_TRIANGLE_STRIP; | 53 | return GL_TRIANGLE_STRIP; |
| 44 | } | 54 | } |