[SDL] Improve SDL2 graphics API

Jonathan Dearborn grimfang4 at gmail.com
Sun Sep 11 12:57:34 PDT 2016

On which platform does windowed mode make SDL_gpu sluggish for you?

I removed BlitBatch because it was too limited and in some cases required a
lot of hidden computation.  Both of these made it hard to maintain.  When
you needed to do anything other than simple blitting, it would require
another specific version of that function in the API.  It makes sense for
things like BlitScale et al. because SDL_gpu does automatic batching anyhow.

In the SDL_gpu repository, there is a blit-batch-test with code that
reimplements BlitBatch on top of TriangleBatch in case that helps:

I agree that SDL2 should incorporate this functionality.  There has been a
patch for it that is nearly complete:

The functionality that does exist in SDL2's renderer is most useful for
porting old games to new platforms instead of creating new, modern games.

Jonny D

On Sun, Sep 11, 2016 at 2:30 PM, sgrsgsrg <thephanoo at gmail.com> wrote:

> I know there is this library but it has some problems. The rendering is
> very sluggish in windowed mode, i don't know why but i dont have this
> problem with the SFML renderer (it's not the CPU since its usage is approx
> 0.5%). Disabling the Vsync completely block the app, getting about 0.5 FPS
> and max cpu usage. My nvidia drivers are up to date.
> Also, someone removed the BlitBatch function from SDL_gpu, forcing the
> users to get headaches with TriangleBatch... i don't understand this
> decision. Since you already have 50 functions doing nearly the same thing
> with 1-2 different parameters, why delete the one that make life easier...
> Batch rendering (shown to the used or automated inside RenderCopy) should
> be simply included into SDL2. Using third party stuff for core functions
> like that sucks... The audio API had unlimited power with its direct access
> to the sound buffer, I'd like to have the same applied to the graphics api [image:
> Smile]
> _______________________________________________
> SDL mailing list
> SDL at lists.libsdl.org
> http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.libsdl.org/pipermail/sdl-libsdl.org/attachments/20160911/95387a0a/attachment.htm>

More information about the SDL mailing list