mirror of
https://git.h3cjp.net/H3cJP/yuzu.git
synced 2024-11-14 12:32:52 +00:00
maxwell_to_gl: Add a few types, etc.
This commit is contained in:
parent
10953495c1
commit
8aa21a03b3
|
@ -10,6 +10,14 @@
|
||||||
#include "common/logging/log.h"
|
#include "common/logging/log.h"
|
||||||
#include "video_core/engines/maxwell_3d.h"
|
#include "video_core/engines/maxwell_3d.h"
|
||||||
|
|
||||||
|
using GLvec2 = std::array<GLfloat, 2>;
|
||||||
|
using GLvec3 = std::array<GLfloat, 3>;
|
||||||
|
using GLvec4 = std::array<GLfloat, 4>;
|
||||||
|
|
||||||
|
using GLuvec2 = std::array<GLuint, 2>;
|
||||||
|
using GLuvec3 = std::array<GLuint, 3>;
|
||||||
|
using GLuvec4 = std::array<GLuint, 4>;
|
||||||
|
|
||||||
namespace MaxwellToGL {
|
namespace MaxwellToGL {
|
||||||
|
|
||||||
using Maxwell = Tegra::Engines::Maxwell3D::Regs;
|
using Maxwell = Tegra::Engines::Maxwell3D::Regs;
|
||||||
|
@ -39,6 +47,8 @@ inline GLenum VertexType(Maxwell::VertexAttribute attrib) {
|
||||||
|
|
||||||
inline GLenum PrimitiveTopology(Maxwell::PrimitiveTopology topology) {
|
inline GLenum PrimitiveTopology(Maxwell::PrimitiveTopology topology) {
|
||||||
switch (topology) {
|
switch (topology) {
|
||||||
|
case Maxwell::PrimitiveTopology::Triangles:
|
||||||
|
return GL_TRIANGLES;
|
||||||
case Maxwell::PrimitiveTopology::TriangleStrip:
|
case Maxwell::PrimitiveTopology::TriangleStrip:
|
||||||
return GL_TRIANGLE_STRIP;
|
return GL_TRIANGLE_STRIP;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue