SFML community forums

Help => Graphics => Topic started by: artelius on March 02, 2016, 02:57:46 am

Title: RenderTexture.create() is slow
Post by: artelius on March 02, 2016, 02:57:46 am
Hi,


RenderTexture.create() takes about 40ms on my machine, even for small textures (e.g. 16x16). Since I am creating a lot of these it is taking several seconds.

I'm just wondering if this is normal, or if it's once again an Intel HD Graphics problem.

I have tried this on SFML 2.1 and 2.3.2. Running Ubuntu 14.04.


Thanks!
Title: Re: RenderTexture.create() is slow
Post by: eXpl0it3r on March 02, 2016, 08:25:09 am
It is not recommended to create a lot of render textures! Rather try to reuse a handful of render textures and create them at the start up.

Depends where exactly the time is wasted, but chances are high that it's wasted in your graphics driver.
Title: Re: RenderTexture.create() is slow
Post by: artelius on March 04, 2016, 09:48:38 pm
Thanks eXpl0it3r!

There are plenty of ways to achieve what I'm after; I'm just trying to do something conceptually simple because I'm planning to create a teaching tool based on SFML.

All I'm really trying to do is prepare a lot of textures for later use, using texture-to-texture copying, which I figure should be faster than CPU-based rendering.
Title: AW: RenderTexture.create() is slow
Post by: eXpl0it3r on March 04, 2016, 10:29:52 pm
What do you understand under "texture-to-texture copying"?