Proposal: set the default render automatically

So in the long discussion in the thread “Proposal: Drop Software
Render” there is this nice contribution idea that i think should
deserve more attention.

What is the point of having to select the rendered manually every time
after you create a window? After all you always want the ‘best’ render
available on the platform; most of the times you don’t even know which
ones are available.
The only use i see, in my limited experience, is to change render only
when you’re doing performance test or evaluation.

So my proposal would be to remove the need for SDL_CreateRender
manually selecting the render, but rather have SDL_CreateWindow select
the default one; for advanced usage the API would still be there and
the ‘old’ (current) behaviour could be achieved by passing a flag

In other words:

  • by default SDL_CreateWindow also instantiates the render (equivalent
    to SDL_CreateRender(window, -1, 0)
  • when SDL_WINDOW_NORENDERER flag is set at SDL_CreateWindow the
    render would not be created like current implementation and would
    require a specific SDL_CreateRender call.

What do you think about this proposal?
bye
Vittorio> On Fri, Jan 21, 2011 at 10:34 AM, Sam Lantinga wrote:

I’m curious, would people rather see the rendering API go away?

Does it increase the complexity of the API without bringing enough
functionality to be useful?

I think it’s usable in it’s broad form.

A flag along the lines of SDL_WINDOWFLAG_USERENDERER at least, which creates a default rendering backend.
If the programmer wants a specific one or has any specific desires about the rendering backend, he should have to use SDL_CreateRenderer.------------------------
EM3 Nathaniel Fries, U.S. Navy

http://natefries.net/

If you use rendering functions without creating a renderer, it will
automatically create a default renderer for you.

See ya!On Thu, Jan 27, 2011 at 6:37 PM, Vittorio G. <vitto.giova at yahoo.it> wrote:

So in the long discussion in the thread “Proposal: Drop Software
Render” there is this nice contribution idea that i think should
deserve more attention.

What is the point of having to select the rendered manually every time
after you create a window? After all you always want the ‘best’ render
available on the platform; most of the times you don’t even know which
ones are available.
The only use i see, in my limited experience, is to change render only
when you’re doing performance test or evaluation.

So my proposal would be to remove the need for SDL_CreateRender
manually selecting the render, but rather have SDL_CreateWindow select
the default one; for advanced usage the API would still be there and
the ‘old’ (current) behaviour could be achieved by passing a flag

In other words:

  • by default SDL_CreateWindow also instantiates the render (equivalent
    to SDL_CreateRender(window, -1, 0)
  • when SDL_WINDOW_NORENDERER flag is set at SDL_CreateWindow the
    render would not be created like current implementation and would
    require a specific SDL_CreateRender call.

What do you think about this proposal?
bye
Vittorio

On Fri, Jan 21, 2011 at 10:34 AM, Sam Lantinga <@slouken> wrote:

I’m curious, would people rather see the rendering API go away?

Does it increase the complexity of the API without bringing enough
functionality to be useful?


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org


-Sam Lantinga, Founder and President, Galaxy Gameworks LLC