Autore Topic: Come uscire nel modo più appropriato da un programma SDL/OpenGL  (Letto 603 volte)

Offline vuott

  • Moderatore globale
  • Senatore Gambero
  • *****
  • Post: 11.287
  • Ne mors quidem nos iunget
    • Mostra profilo
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
»
« Ultima modifica: 10 Febbraio 2013, 17:07:46 da vuott »
« Chiunque, non ricorrendo lo stato di necessità, nel proprio progetto Gambas fa uso delle istruzioni Shell o Exec, è punito con la sanzione pecuniaria da euro 20,00 a euro 60,00. »