From fa70629fabbab5074640f55cb70f9d7d82cf91cb Mon Sep 17 00:00:00 2001 From: gdkchan Date: Fri, 3 Aug 2018 13:54:34 -0300 Subject: Fix for integer vertex attributes and iset bf flag (#323) --- Ryujinx.Graphics/Gal/OpenGL/OGLRasterizer.cs | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'Ryujinx.Graphics/Gal/OpenGL/OGLRasterizer.cs') 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); + } } } -- cgit v1.2.3