Reworked the VBO
This commit is contained in:
parent
3bc90dd83b
commit
ee732240f7
11 changed files with 174 additions and 253 deletions
|
|
@ -144,7 +144,7 @@ namespace SM.OGL.Shaders
|
|||
if (mesh.Indices != null)
|
||||
GL.DrawElementsInstanced(mesh.PrimitiveType, 0, DrawElementsType.UnsignedInt, mesh.Indices, amount);
|
||||
else
|
||||
GL.DrawArraysInstanced(mesh.PrimitiveType, 0, mesh.Vertex.Count / mesh.Vertex.PointerSize, amount);
|
||||
GL.DrawArraysInstanced(mesh.PrimitiveType, 0, mesh.Vertex.Count, amount);
|
||||
}
|
||||
/// <summary>
|
||||
/// Draws the mesh while forcing a primitive type instead of using the mesh type.
|
||||
|
|
@ -157,7 +157,7 @@ namespace SM.OGL.Shaders
|
|||
if (mesh.Indices != null)
|
||||
GL.DrawElementsInstanced(modelType, 0, DrawElementsType.UnsignedInt, mesh.Indices, amount);
|
||||
else
|
||||
GL.DrawArraysInstanced(modelType, 0, mesh.Vertex.Count / mesh.Vertex.PointerSize, amount);
|
||||
GL.DrawArraysInstanced(modelType, 0, mesh.Vertex.Count, amount);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue