Window resize problem SDL 2

After window resized, I got error when SDL_RenderPresent. The error message is :
Window surface is invalid, please call SDL_GetWindowSurface

But I didn’t create a SDL_Surface to this window, how to fi it?

Thanks

Or the process of updating surface and texture would be done
internally after window resized? And it’s ideally. :slight_smile:

Thanks

I try call SDL_GetWindowSurface without store the result and it’s OK.

SDL_GetWindowSurface(window);

But I got other problem, I got message “Invalid texture”.

Please tell me what should I do after window resized?

You can’t use the Renderer and the Window Surface, according to the
wikihttp://wiki.libsdl.org/moin.cgi/SDL_GetWindowSurface?highlight=(\bCategoryVideo\b)|(CategoryEnum)|(CategoryStruct)|(SGFunctions)
(in
the remarks section).

Does your code to setup the window look similar to the code from the
SDL_RendererPresent
wiki pagehttp://wiki.libsdl.org/moin.cgi/SDL_RenderPresent?highlight=(\bCategoryRender\b)|(CategoryEnum)|(CategoryStruct)|(SGFunctions)
?On Wed, Sep 5, 2012 at 5:10 AM, wahono sri wrote:

I try call SDL_GetWindowSurface without store the result and it’s OK.

SDL_GetWindowSurface(window);

But I got other problem, I got message “Invalid texture”.

Please tell me what should I do after window resized?


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

You can’t use the Renderer and the Window Surface, according to the wiki (in
the remarks section).

Does your code to setup the window look similar to the code from the
SDL_RendererPresent wiki page?

I use SDL_WINDOW_SHOWN+SDL_WINDOW_RESIZABLE. My plan to use SDL is not
for create game, but for GUI app.

Thanks

Can you report a bug to bugzilla, along with a simple code example that
shows the problem?
http://bugzilla.libsdl.org/

Thanks!On Wed, Sep 5, 2012 at 1:26 AM, wahono sri wrote:

After window resized, I got error when SDL_RenderPresent. The error
message is :
Window surface is invalid, please call SDL_GetWindowSurface

But I didn’t create a SDL_Surface to this window, how to fi it?

Thanks


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