Package: freeglut3
Version: 2.4.0-6
Severity: normal

   glutDestroyWindow() does not really destroy the window. Instead, it
puts the window in a list of windows that will be destroyed later. This
is annoying for software that opens a GL window from time to time that
needs to be closed without the program exiting. Attached is a small
program that exposes the behaviour.

   A workaround can be to use glutHideWindow() before calling
glutDestroyWindow(), but that is not optimal since it does not free
the resources.

-- System Information:
Debian Release: lenny/sid
  APT prefers unstable
  APT policy: (500, 'unstable'), (500, 'stable'), (1, 'experimental')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.23.8 (SMP w/2 CPU cores; PREEMPT)
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash

Versions of packages freeglut3 depends on:
ii  libc6                         2.7-4      GNU C Library: Shared libraries
ii  libgl1-mesa-glx [libgl1]      7.0.2-2    A free implementation of the OpenG
ii  libglu1-mesa [libglu1]        7.0.2-2    The OpenGL utility library (GLU)
ii  libx11-6                      2:1.0.3-7  X11 client-side library
ii  libxext6                      1:1.0.3-2  X11 miscellaneous extension librar

freeglut3 recommends no packages.

-- no debconf information
/* gcc glutdestroywindow.c -o glutdestroywindow -lglut */

#include <unistd.h>
#include <GL/glut.h>

int main(int argc, char **argv)
{
    int win;

    glutInitWindowSize(400, 40);
    glutInitDisplayMode(GLUT_RGB | GLUT_DOUBLE | GLUT_DEPTH);
    glutInit(&argc, argv);

    win = glutCreateWindow("Hello world");
    glutMainLoopEvent();
    sleep(5);

    glutSetWindowTitle("I should be dead by now");
    glutDestroyWindow(win);
    sleep(5);

    return 0;
}

Reply via email to