Request new API

I see in SDL_Renderer struct, there is renderer->window. I need API to
get window from renderer, maybe with :

xtern DECLSPEC SDL_Window* SDLCALL GetRenderWindow(SDL_Renderer * renderer)

Thanks in advance

I’m not sure what you’re doing, but I sort of have my suspicion that you
could just track the SDL_Window* on your own. I can’t think of too many
instances where you’d only have a reference to a renderer without a window.

However, if there is a good use outside of your own apps needs, it may not
be bad, and I by no means speak for anyone in the community except myself.

-AlexOn Sun, Sep 2, 2012 at 2:30 PM, wahono sri wrote:

I see in SDL_Renderer struct, there is renderer->window. I need API to
get window from renderer, maybe with :

xtern DECLSPEC SDL_Window* SDLCALL GetRenderWindow(SDL_Renderer * renderer)

Thanks in advance


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

I’m not sure what you’re doing, but I sort of have my suspicion that you
could just track the SDL_Window* on your own. I can’t think of too many
instances where you’d only have a reference to a renderer without a window.

I use SDL 2 from FreePascal, and to translate struct of SDL_Renderer
is too difficult. I’m in porting a GUI (www.msegui.org) to platform
which SDL supported. I try with this and it’s works.

render.h

/**

  • Get window from a renderer
    */
    extern DECLSPEC SDL_Window * SDLCALL GetRenderWindow(SDL_Renderer * renderer);

render.c

SDL_Window *
GetRenderWindow(SDL_Renderer * renderer)
{
return (SDL_Window *)renderer->window;
}

Thanks

Other question, I see in
http://sdl.beuc.net/sdl.wiki/SDL-1.3/SDL_RenderWritePixels, but from
current repository I don’t found function SDL_RenderWritePixels. What
is replacement of SDL_RenderWritePixels?

Thanks