ModelVertexBuffer very high!

Now I have the same problem, big problem! Why the ModelVertexBuffer so high ? My game scene only has one model.

Is this something you see in the profiler?

The ModelVertexBuffer displays the number of bytes used when rendering models. I.e it’s the total size of the vertex buffer. The size of a single vertex is 32 bytes.

How many vertices does your model have?


Why the game run in mobile so slow ? performance very bad.

Can you tell us a bit more about your project? You mentioned a single model? I’m seeing 39 draw calls so you have some other things in your project as well. What does the profiler say? Where does the code spend most of its time?

1 Like

10183104 bytes / 32 bytes per vertex = 318222 vertices.

I’d say that it is quite high for a model.
We (currently) do all vertex transformations in software to not break batching. So processing that amount of vertices will take a lot of time.

If the ModelVertexBuffer means bytes, then it is correct. But My game runs slow.

This project is formal, perhaps 132 models in scene. 32 bytes means a 4d vector ? or a scalar ?

Ok, so there’s 115 models in that snapshot and you spend a lot of time in Graphics.SetVertexBufferData. See Mathias comment about vertex count per model.

Why your example code which is gooey run slow ? The per frame runs 50 ms.

Which example is that? The one bundled with Gooey? This is another thing than your original question though? Please create a new question instead.

I just want to know why the game runs slowly. So I contrast my project with gooey example, then found they are same, time consuming more than 50ms per frame.

What type of device do you run on?

desktop and android, their frame rate are same.

1 Like

And I guess with “desktop” you mean… windows?

I don’t see any good reason why it should be so slow for you. Perhaps it’s hardware related?
On my mac, it’s ~16ms, and on my Android it’s ~14ms.

If you compare the profiler screenshots you see that Gooey spends like 38ms just waiting for VSync, ie idling. In the model example you spend most of your time rendering. Quite different to be honest. Not sure why you spend so much time waiting for vsync though. Maybe @Johan_Beck-Noren knows?

No clue to be honest, as @britzl says the Gooey profiler sample you posted spends most of its time waiting for vsync. @rinkowei have you fiddled with the project settings, for example setting a lower update frequency?

What are the specs. for the windows desktop? What android device are you running on?