mirror of
https://github.com/Ellpeck/MLEM.git
synced 2024-11-22 20:58:34 +01:00
don't draw empty vertex buffers
This commit is contained in:
parent
6f04b30591
commit
08bd443c36
1 changed files with 2 additions and 0 deletions
|
@ -149,6 +149,8 @@ namespace MLEM.Misc {
|
|||
var totalIndex = 0;
|
||||
foreach (var buffer in this.vertexBuffers) {
|
||||
var tris = Math.Min(this.vertices.Count - totalIndex, buffer.VertexCount) / 4 * 2;
|
||||
if (tris <= 0)
|
||||
break;
|
||||
this.graphicsDevice.SetVertexBuffer(buffer);
|
||||
if (effect != null) {
|
||||
foreach (var pass in effect.CurrentTechnique.Passes) {
|
||||
|
|
Loading…
Reference in a new issue