Thread: Terminating a GLUT program?

  1. #1
    Registered User
    Join Date
    May 2006
    Posts
    169

    Terminating a GLUT program?

    Hello there

    I am messing around with OpenGL in a hopeful attempt to learn a thing or two.

    I downloaded a couple of very basic GLUT examples and they run just fine... until I decide to quit and click the close button on the top right - this will not terminate the process completely, but rather not disappear from the task manager until I terminate it manually.
    Moreover ALT+F4 will do completely nothing when the program is in focus.

    So I was wondering, are these features not included in the GLUT lib that you have to add in yourself?

    Thanks.

  2. #2
    the Great ElastoManiac's Avatar
    Join Date
    Nov 2005
    Location
    Republika Srpska - Balkan
    Posts
    377
    They are added, just that examples weren't coded right. If you are looking for a good library that can initialize OpenGL, support keyboard input, joystick input, mouse, sound, and it's multiplatform use SDL. ( Simple Directmedia Layer )
    I use it, and it's a lot faster than GLUT!
    lu lu lu I've got some apples lu lu lu You've got some too lu lu lu Let's make some applesauce Take off our clothes and lu lu lu

  3. #3
    Registered User
    Join Date
    May 2006
    Posts
    169
    Are you saying SDL does this terminating for me?
    Do I just have to create a window using SDL's functions and thats it?

  4. #4
    User
    Join Date
    Jan 2006
    Location
    Canada
    Posts
    499
    Yes, but you don't really need SDL for a simple graphics demo. SDL has its on headaches, and so it's better just to stick with GLUT. As for ending an application, try something similar to this: (assuming you have a keyboarding routine)
    PHP Code:
    if (key[ESCAPE]) {
         
    // time to quit
         
    exit(0);


  5. #5
    Registered User
    Join Date
    May 2006
    Posts
    169
    Ok, thank you both very much.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Using variables in system()
    By Afro in forum C Programming
    Replies: 8
    Last Post: 07-03-2007, 12:27 PM
  2. BOOKKEEPING PROGRAM, need help!
    By yabud in forum C Programming
    Replies: 3
    Last Post: 11-16-2006, 11:17 PM
  3. Can someome help me with a program please?
    By WinterInChicago in forum C++ Programming
    Replies: 3
    Last Post: 09-21-2006, 10:58 PM
  4. My program, anyhelp
    By @licomb in forum C Programming
    Replies: 14
    Last Post: 08-14-2001, 10:04 PM