[SDL] Kill Window without SDL_Quit()

Bob Pendleton bob at pendleton.com
Wed Feb 20 20:35:08 PST 2008


On 2/20/08, Micah Brening <micah.brening at gmail.com> wrote:
>
> Hello Everyone,
>
> I have a quick question (hopefully quick)
>
> I'd explain what I'm trying to do, but that wouldn't be quick.  The basic
> idea
> is that I'm using FLTK with SDL.  FLTK is the original window, it spawns
> an SDL
> window.
>
> I need/want to keep SDL initialized for the length of the program
> execution.  So
> I need a way to kill the SDL window and yet keep SDL Initialized.
>
> The only reason I have for this is that I've stored pointers to the
> SDL_ListModes result, and if SDL quits, those pointers are no longer
> valid.


 How many nanoseconds are you saving by doing that? Is the CPU time saved by
this worth anyone enough to make this problem worth the timeneeded to solve
it?

Seriously, just get the pointer again when you restart SDL. Or, if that just
isn't possible then waste a few bytes of memory and store the whole table,
or just the parts you need, and keep the copy around for as long as you need
it.

So the request:
> Kill SDL window without killing SDL. Is it possible?  How is it done?
>
> If it isn't possible... It'll be my request for SDL1.3/2.0


Why? To save a handful of nanoseconds or a handful of bytes? Anyway,
1.3supports multiple windows so the problem would be very different.


Bob Pendleton

_______________________________________________
> 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/20080220/636b99db/attachment.html 


More information about the SDL mailing list