parallel processing - OpenGL: draw particles at the same time -


i reading article "particles / instancing"

here quote:

clearly, need way draw particles @ same time.

there many ways this; here 3 of them :

(a) generate single vbo particles in them. easy, effective, works on platforms.

(b) use geometry shaders. not in scope of tutorial, because 50% of computers don’t support this.

(c) use instancing. not available on computers, vast majority of them.

yes, (a) implemented @ same time.

for (c), thought gldrawarraysinstanced equal loop of gldrawarrays. real same-time implementation?

for (b), think use vertex have same effect.

for instancing, gldrawarraysinstanced has same visual effect calling gldrawarrays multiple times, however, if driver has support true instancing (which desktop gpu drivers will, , many mobiles), perform better. savings, due less data transfer between cpu , gpu, , fewer gl api calls.

these days, geometry shaders on vast majority of desktop gpu drivers - article few years old. mobile adoption slower, not core feature of gles 3.0. generally, particles billboard quads (4 vertices), vertices can generated via geometry shader single point, , meta-data, instead of putting 4 vertices vbo. reduces size of data transfer cpu gpu.


Comments

Popular posts from this blog

PHP DOM loadHTML() method unusual warning -

python - How to create jsonb index using GIN on SQLAlchemy? -

c# - TransactionScope not rolling back although no complete() is called -