500k draw Rectangle

Hi.
I’m DrawRect to mono.

but 5000 drawRect is very slow …( 10 less FPS…)

how can 500k rectangle(just simple Rectangle…need) …

Using 3D ?

Thank you…

Umm… what? You will have to elaborate little bit. You want to draw 500k rectangles? What is relation between them? Should they move separately? What are the limitation, what is purpose of this.

Drawing that many you don’t want to use SpriteBatch. Use vertex buffers directly.

If this is for particles. 500k should be handled relativy easily with “gpu particles”

Thank you . Mr KonajuGames…

Is that Static Vertex Buffer ~? or Dynamic Vertex Buffer?

and…Vertex buffer Mean is 3D ???

Thank you for your advice…

Thank you . Mr Alkher

Your say mean gpu particles is 3D?

2D sprite can gpu particles ?

Thank you for your advice…

Thank you Mr. Ravendarke.

Yes!! just rectangle(no move,but sometime little move…)

This think GridView Control. So i’m pictureBox use draw Drawrect but very very slow…

This is I want . and very fast need…

2D Sprite is impossible…(slow)…

for(int i = 0; i < 30000, i++)
{
DrawSprite(…);
}

this is not good…

how about think vertex buffer( vertex buffer is 3D ? )

Thank you .your advice…

There are several considerably better ways how to draw a grid (no matter aspect ratio), for instance texture.

Thank you. Mr Ravendarke.

Your advice is good.

Instance texture is 3D?(Vertex) or 2D(x,y simple draw) style?

Thank you for your advice…- :smiley:

2D is in fact 3D with an orthographic view.

Make your grid on texture, it will be faster…

Oh…Mr Alkher…

Thank you. very much…

Can i ask…for you…?

==================================================
“…Grid on texture…”

Mean is vertex source code create? (add vertext(0,0,0),…)
or Image made(jpg.png…) draw?

==================================================

Thank you very much for your advice…!~ :wink:

You draw your grid with Gimp or Photoshop.Then use this texture with monogame.