diff options
| author | gdkchan <gab.dark.100@gmail.com> | 2018-08-03 13:54:34 -0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-08-03 13:54:34 -0300 |
| commit | fa70629fabbab5074640f55cb70f9d7d82cf91cb (patch) | |
| tree | 66a5befd2ad5cb734fc88770ca42c072752a8c3b /Ryujinx.Graphics/Gal/OpenGL | |
| parent | c68bca5396f8a5e08cd8234ea0c7a8a2174eba91 (diff) | |
Fix for integer vertex attributes and iset bf flag (#323)
Diffstat (limited to 'Ryujinx.Graphics/Gal/OpenGL')
| -rw-r--r-- | Ryujinx.Graphics/Gal/OpenGL/OGLRasterizer.cs | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/Ryujinx.Graphics/Gal/OpenGL/OGLRasterizer.cs b/Ryujinx.Graphics/Gal/OpenGL/OGLRasterizer.cs index f2e5859e..c5166b51 100644 --- a/Ryujinx.Graphics/Gal/OpenGL/OGLRasterizer.cs +++ b/Ryujinx.Graphics/Gal/OpenGL/OGLRasterizer.cs @@ -278,7 +278,19 @@ namespace Ryujinx.Graphics.Gal.OpenGL int Size = AttribElements[Attrib.Size]; int Offset = Attrib.Offset; - GL.VertexAttribPointer(Attrib.Index, Size, Type, Normalize, Stride, Offset); + if (Attrib.Type == GalVertexAttribType.Sint || + Attrib.Type == GalVertexAttribType.Uint) + { + IntPtr Pointer = new IntPtr(Offset); + + VertexAttribIntegerType IType = (VertexAttribIntegerType)Type; + + GL.VertexAttribIPointer(Attrib.Index, Size, IType, Stride, Pointer); + } + else + { + GL.VertexAttribPointer(Attrib.Index, Size, Type, Normalize, Stride, Offset); + } } } |
