Fix for integer vertex attributes and iset bf flag (#323)

This commit is contained in:
gdkchan
2018-08-03 13:54:34 -03:00
committed by GitHub
parent c68bca5396
commit fa70629fab
2 changed files with 19 additions and 6 deletions

View File

@ -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);
}
}
}