summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar bunnei2018-04-07 04:54:52 -0400
committerGravatar bunnei2018-04-13 23:48:24 -0400
commit8aa21a03b30d5d1b2c29e10fd05d2f893e6bd014 (patch)
tree7280bd0cae02873b06ddef460da838a4fa9ee23b
parentgl_shader_gen: Add hashable setup/config structs. (diff)
downloadyuzu-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.h10
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
13using GLvec2 = std::array<GLfloat, 2>;
14using GLvec3 = std::array<GLfloat, 3>;
15using GLvec4 = std::array<GLfloat, 4>;
16
17using GLuvec2 = std::array<GLuint, 2>;
18using GLuvec3 = std::array<GLuint, 3>;
19using GLuvec4 = std::array<GLuint, 4>;
20
13namespace MaxwellToGL { 21namespace MaxwellToGL {
14 22
15using Maxwell = Tegra::Engines::Maxwell3D::Regs; 23using Maxwell = Tegra::Engines::Maxwell3D::Regs;
@@ -39,6 +47,8 @@ inline GLenum VertexType(Maxwell::VertexAttribute attrib) {
39 47
40inline GLenum PrimitiveTopology(Maxwell::PrimitiveTopology topology) { 48inline 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 }