Should I use direct render or render to big texture? |
Naith
|
I actually measured this a few days ago.
I created a window with the size of 1024x768 and fill the window with 32x32 sized tiles. This means that the window will be filled with 768 tiles. When I render the tiles in the "usual" way, by looping through my list of tiles and render each tile with SDL_RenderCopy, I get an average FPS of 700. When I render all the tiles to a render target-texture, by looping through my list of tiles, render them to a target texture and then render the actual target texture, I get an average FPS of 500. My conclusion to this is that it's faster, in my case, to render the tiles with alternative 1 above, but I guess it all depends on how optimized the program is, the size of the actual window and such. |
|||||||||||
|
Should I use direct render or render to big texture? |
Daniel Holth
Guest
|
You would typically prefer the indirect technique not for speed, but to perform some additional operations on the texture e.g. compositing it on top of another scene.
On Thu, Jun 11, 2015 at 8:41 AM Naith wrote:
|
|||||||||||||
|
Should I use direct render or render to big texture? |
Jonny D
|
If you're just using SDL_Renderer, then don't concern yourself about performance and focus more on what functionality you need. If performance becomes a problem, then consider alternative rendering APIs (e.g. direct OpenGL or SDL_gpu) since there are transparent optimizations that SDL_Renderer does not yet implement.
Jonny D On Thu, Jun 11, 2015 at 11:00 AM, Daniel Holth wrote:
|
|||||||||||||||
|