[Gambas-user] how to exiting gracefully from an SDL/OpenGL program

Benoît Minisini gambas at ...1...
Sun Feb 10 16:51:33 CET 2013


Le 10/02/2013 10:57, Laurent Carlier a écrit :
> Le dimanche 10 février 2013 02:26:32 Kevin Fishburne a écrit :
>> I've read the comments about not using Quit when closing a non-console
>> application, including the suggestion that the main form be closed in
>> order to terminate execution.
>>
>> How do you close an SDL/OpenGL program? The main procedure has no Close
>> method and there are no forms (no Qt/GTK). It seems like the video RAM
>> isn't being freed when I close using Quit, requiring me to periodically
>> reboot my system (not even closing GAMBAS frees the VRAM).
>>
>> Thanks.
>
> Just use the Close() method from the Window class.
> ++
>

Actually there is a "quit hook" that you could implement in the SDL 
component, that is called when the QUIT instruction is executed.

You could use that hook to close all open windows.

-- 
Benoît Minisini




More information about the User mailing list