Gambas-it

Gambas3 => Domande tecniche => Topic aperto da: vuott - 10 Febbraio 2013, 12:45:23

Titolo: Come uscire nel modo più appropriato da un programma SDL/OpenGL
Inserito da: vuott - 10 Febbraio 2013, 12:45:23
Riporto questo argomento posto nella M.L.I.:

« 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.

--
Kevin Fishburne
»


« Just use the Close() method from the Window class.

Laurent Carlier
»


« 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
»