Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

With modern gpu pipeline and cost of cache misses compared to CPU cycle being what they are - it's almost certainly faster to redraw a few thousand sprites no matter what than to check what changed and redraw only a subset of them.

Energy efficiency is a separate matter.



Is there another way? I've only done WebGL, so not familiar with Vulkan/Metal/DirectX/etc. - but in my experience you're clearing the screen and re-drawing everything every tick no matter what. If only for applying post-processing effects.

Updating buffers is of course a totally separate thing, and on that side I don't think anyone updates everything every tick, usually there's some sort of scene graph that knows about dirty transforms and their children, so only those get updated..


That's not true at all


Iterate over 1000 objects doing ifs and draw let's say 50 of them vs dump them in VBO and call glDrawArrays every frame drawing all 1000 of them?

I'm willing to bet :)

The difference in time spent by GPU between drawing 1000 and 50 sprites is almost 0.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: