Omen-of-Aecio / vxdraw

Simple and Fast 2D rendering library for Rust, based on gfx-hal
31 stars 2 forks source link

Performance comparison with other libraries #4

Open prokopst opened 4 years ago

prokopst commented 4 years ago

It would be great if you could compare vxdraw with other existing libraries in some realistic scenario. Other libraries are for example mentioned in the reddit thread: https://www.reddit.com/r/rust/comments/d2bgtu/announcement_vxdraw_2d_vulkan_rendering_library/ezu7nfv/

I believe that would get proper attention.

kstrafe commented 4 years ago

@prokopst Do you know of any ggez benchmarks? I find it rather hard to benchmark with criterion due to the builtin event loop. As for skia, pathfinder, and cairo, are they applicable? I've looked a bit into those - and I might be wrong - but they seem to render to an image which is quite different from what vxdraw does.

kstrafe commented 4 years ago

Preliminary tests: (225000 sprites) Radeon Vega 56 ggez: 32 ms/frame (vsync, opengl based, no way to turn off it seems) vxdraw: ~11 ms/frame

prokopst commented 4 years ago

@BourgondAries

Do you know of any ggez benchmarks? I find it rather hard to benchmark with criterion due to the builtin event loop.

I don't. I think that efficiency and performance aren't ggez main focus...

As for skia, pathfinder, and cairo, are they applicable? I've looked a bit into those - and I might be wrong - but they seem to render to an image which is quite different from what vxdraw does.

AFAIK they are mainly focused on vector graphics (but I'm no expert, I just usually loose interest when I read "vector graphics"). I guess the redditor wasn't aware of the difference. Anyway I think that your "competitors" are things like ggez, SDL2 and SFML.

ggez: 32 ms/frame (vsync, opengl based, no way to turn off it seems)

According to this ticket it should be able possible via configuration:

https://github.com/ggez/ggez/issues/73

From the docs:

By default a ggez game will search its resource paths for a /conf.toml file and load values from it when the Context is created. This file must be complete (ie you cannot just fill in some fields and have the rest be default) and provides a nice way to specify settings that can be tweaked such as window resolution, multisampling options, etc. If no file is found, it will create a Conf object from the settings passed to the ContextBuilder.