mirror of
https://github.com/GreemDev/Ryujinx.git
synced 2024-12-23 06:55:48 +00:00
Fix vertex buffer handle null check (#1638)
This commit is contained in:
parent
812e32f775
commit
c9841dab38
1 changed files with 3 additions and 3 deletions
|
@ -37,7 +37,7 @@ namespace Ryujinx.Graphics.OpenGL
|
||||||
{
|
{
|
||||||
VertexBufferDescriptor vb = vertexBuffers[index];
|
VertexBufferDescriptor vb = vertexBuffers[index];
|
||||||
|
|
||||||
if (vb.Buffer.Handle != null)
|
if (vb.Buffer.Handle != BufferHandle.Null)
|
||||||
{
|
{
|
||||||
GL.BindVertexBuffer(bindingIndex, vb.Buffer.Handle.ToInt32(), (IntPtr)vb.Buffer.Offset, vb.Stride);
|
GL.BindVertexBuffer(bindingIndex, vb.Buffer.Handle.ToInt32(), (IntPtr)vb.Buffer.Offset, vb.Stride);
|
||||||
|
|
||||||
|
@ -78,7 +78,7 @@ namespace Ryujinx.Graphics.OpenGL
|
||||||
{
|
{
|
||||||
GL.EnableVertexAttribArray(index);
|
GL.EnableVertexAttribArray(index);
|
||||||
}
|
}
|
||||||
|
|
||||||
int offset = attrib.Offset;
|
int offset = attrib.Offset;
|
||||||
int size = fmtInfo.Components;
|
int size = fmtInfo.Components;
|
||||||
|
|
||||||
|
@ -129,7 +129,7 @@ namespace Ryujinx.Graphics.OpenGL
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (_vertexBuffers[attrib.BufferIndex].Buffer.Handle == null)
|
if (_vertexBuffers[attrib.BufferIndex].Buffer.Handle == BufferHandle.Null)
|
||||||
{
|
{
|
||||||
GL.DisableVertexAttribArray(attribIndex);
|
GL.DisableVertexAttribArray(attribIndex);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue