Quantcast
Viewing all articles
Browse latest Browse all 40524

Best way to draw an array of objects

hello,

I made an app which is drawing a bunch of circles moving according to the mouse position.

This is working fine but for now i am only dealing with a hundred of circles. I tried to push it and i quickly faced the limit as number of circle grows.

I think the limit is the big for loop and position calculations of the circles.

I was wondering how i could make this app deal with a lot more circles.
What is the best way ?

Also, shader or VBO could be useful to compute circles center positions, but how would i draw the circles ? maybe compute positions in the shader then back to the app and draw the cirlces at these positions ?

thank you for your help

using VBO ? shaders ? or any other technique ?


Viewing all articles
Browse latest Browse all 40524

Trending Articles