Re: [GtkGLExt] memory leak



2004/04/06 (火) 01:45 に Francesco Sepic さんは書きました:
> Hi, i have tried the examples in the gtkglext package, specifically
> "pixmap" and "pixmap-mixed" because i need the ability to render in a
> pixmap in my OpenGL program.
> I have noticed that if you keep resizing the window, the memory usage of
> X increase rapidly until it crash. Maybe the problem is because the
> OpenGL resources associated with the pixmaps are not destroyed, but it's
> only a guess. Any clue?

At least, there is no memory leak with pixmap example on my linux box.
GLXPixmap resource is correctly destroyed if associated GdkPixmap is
destroyed. Try --gdk-gl-debug=all debug option.

This is the debug message on my linux box.

[naofumi titan examples]$ ./pixmap --gdk-gl-debug=all
 
OpenGL extension version - 1.3
GdkGLExt-Message:  - gdk_gl_config_new_for_screen ()
GdkGLExt-Message:  -- gdk_gl_config_new_common ()
GdkGLExt-Message:  -- Server GLX_VENDOR     : NVIDIA Corporation
GdkGLExt-Message:  -- Server GLX_VERSION    : 1.3
GdkGLExt-Message:  -- Server GLX_EXTENSIONS : GLX_EXT_visual_info
GLX_EXT_visual_rating GLX_SGIX_fbconfig GLX_SGIX_pbuffer
GLX_SGI_video_sync GLX_SGI_swap_control
GdkGLExt-Message:  -- Client GLX_VENDOR     : NVIDIA Corporation
GdkGLExt-Message:  -- Client GLX_VERSION    : 1.3
GdkGLExt-Message:  -- Client GLX_EXTENSIONS : GLX_ARB_get_proc_address
GLX_ARB_multisample GLX_EXT_visual_info GLX_EXT_visual_rating
GLX_EXT_import_context GLX_SGI_video_sync GLX_NV_swap_group
GLX_SGIX_fbconfig GLX_SGIX_pbuffer GLX_SGI_swap_control
GLX_NV_float_buffer
GdkGLExt-Message:  ** glXChooseVisual ()
GdkGLExt-Message:  -- glXChooseVisual: screen number = 0
GdkGLExt-Message:  -- glXChooseVisual: visual id = 0x24
GdkGLExt-Message:  -- gdk_gl_config_class_init ()
GdkGLExt-Message:  -- gdk_gl_config_impl_x11_class_init ()
GdkGLExt-Message:  -- gdk_gl_config_setup_colormap ()
GdkGLExt-Message:  -- gdk_gl_config_get_std_rgb_colormap ()
GdkGLExt-Message:  -- Try to find a standard RGB colormap
GdkGLExt-Message:  -- Colormap: standard RGB
GdkGLExt-Message:  -- Colormap: visual id = 0x24
 
OpenGL visual configurations :
 
gdk_gl_config_is_rgba (glconfig) = TRUE
gdk_gl_config_is_double_buffered (glconfig) = FALSE
gdk_gl_config_is_stereo (glconfig) = FALSE
gdk_gl_config_has_alpha (glconfig) = FALSE
gdk_gl_config_has_depth_buffer (glconfig) = TRUE
gdk_gl_config_has_stencil_buffer (glconfig) = TRUE
gdk_gl_config_has_accum_buffer (glconfig) = TRUE
 
GDK_GL_USE_GL = TRUE
GDK_GL_BUFFER_SIZE = 32
GDK_GL_LEVEL = 0
GDK_GL_RGBA = TRUE
GDK_GL_DOUBLEBUFFER = FALSE
GDK_GL_STEREO = FALSE
GDK_GL_AUX_BUFFERS = 0
GDK_GL_RED_SIZE = 8
GDK_GL_GREEN_SIZE = 8
GDK_GL_BLUE_SIZE = 8
GDK_GL_ALPHA_SIZE = 0
GDK_GL_DEPTH_SIZE = 24
GDK_GL_STENCIL_SIZE = 8
GDK_GL_ACCUM_RED_SIZE = 16
GDK_GL_ACCUM_GREEN_SIZE = 16
GDK_GL_ACCUM_BLUE_SIZE = 16
GDK_GL_ACCUM_ALPHA_SIZE = 16
 
GdkGLExt-Message:  - gdk_pixmap_set_gl_capability ()
GdkGLExt-Message:  - gdk_gl_pixmap_new ()
GdkGLExt-Message:  - GLX_MESA_pixmap_colormap - not supported
GdkGLExt-Message:  - gdk_gl_get_GLX_MESA_pixmap_colormap () - not
supported
GdkGLExt-Message:  ** glXCreateGLXPixmap ()
GdkGLExt-Message:  -- gdk_gl_pixmap_class_init ()
GdkGLExt-Message:  -- gdk_gl_pixmap_impl_x11_class_init ()
GdkGLExt-Message:  -- gdk_gl_pixmap_impl_x11_gl_drawable_interface_init
()
GdkGLExt-Message:  -- _gdk_x11_gl_context_new ()
GdkGLExt-Message:  ** glXCreateContext ()
GdkGLExt-Message:  -- Context: screen number = 0
GdkGLExt-Message:  -- Context: visual id = 0x24
GdkGLExt-Message:  -- gdk_gl_context_new_common ()
GdkGLExt-Message:  -- gdk_gl_context_class_init ()
GdkGLExt-Message:  -- gdk_gl_context_impl_x11_class_init ()
GdkGLExt-Message:  -- gdk_gl_context_insert ()
GdkGLExt-Message:  -- Create GL context hash table.
The OpenGL rendering context is created
GdkGLExt-Message:  -- Pixmap: screen number = 0
GdkGLExt-Message:  -- Pixmap: visual id = 0x24
GdkGLExt-Message:  ** glXMakeCurrent ()
GdkGLExt-Message:  -- _gdk_gl_context_set_gl_drawable ()
GdkGLExt-Message:  -- GL_VENDOR     : NVIDIA Corporation
GdkGLExt-Message:  -- GL_RENDERER   : GeForce2 GTS/AGP
GdkGLExt-Message:  -- GL_VERSION    : 1.4.1 NVIDIA 53.28
GdkGLExt-Message:  -- GL_EXTENSIONS : GL_EXT_multi_draw_arrays
GL_EXT_fog_coord GL_ARB_window_pos GL_EXT_secondary_color
GL_EXT_paletted_texture GL_ARB_multitexture GL_ARB_imaging
GL_EXT_vertex_array GL_EXT_blend_color GL_EXT_blend_minmax
GL_EXT_draw_range_elements GL_EXT_texture_object GL_ARB_point_parameters
GdkGLExt-Message:  -- gdk_gl_pixmap_impl_x11_finalize ()
GdkGLExt-Message:  -- _gdk_gl_pixmap_destroy ()
GdkGLExt-Message:  ** glXMakeCurrent ()
GdkGLExt-Message:  ** glXDestroyGLXPixmap ()
GdkGLExt-Message:  -- gdk_gl_pixmap_finalize ()
GdkGLExt-Message:  - gdk_pixmap_set_gl_capability ()
GdkGLExt-Message:  - gdk_gl_pixmap_new ()
GdkGLExt-Message:  - gdk_gl_get_GLX_MESA_pixmap_colormap () - not
supported
GdkGLExt-Message:  ** glXCreateGLXPixmap ()
GdkGLExt-Message:  -- Pixmap: screen number = 0
GdkGLExt-Message:  -- Pixmap: visual id = 0x24
GdkGLExt-Message:  ** glXMakeCurrent ()
GdkGLExt-Message:  -- _gdk_gl_context_set_gl_drawable ()
GdkGLExt-Message:  -- gdk_gl_pixmap_impl_x11_finalize ()
GdkGLExt-Message:  -- _gdk_gl_pixmap_destroy ()
GdkGLExt-Message:  ** glXMakeCurrent ()
GdkGLExt-Message:  ** glXDestroyGLXPixmap ()
GdkGLExt-Message:  -- gdk_gl_pixmap_finalize ()
GdkGLExt-Message:  - gdk_pixmap_set_gl_capability ()
GdkGLExt-Message:  - gdk_gl_pixmap_new ()
GdkGLExt-Message:  - gdk_gl_get_GLX_MESA_pixmap_colormap () - not
supported
GdkGLExt-Message:  ** glXCreateGLXPixmap ()
GdkGLExt-Message:  -- Pixmap: screen number = 0
GdkGLExt-Message:  -- Pixmap: visual id = 0x24
GdkGLExt-Message:  ** glXMakeCurrent ()
GdkGLExt-Message:  -- _gdk_gl_context_set_gl_drawable ()
GdkGLExt-Message:  -- gdk_gl_context_impl_x11_finalize ()
GdkGLExt-Message:  -- _gdk_gl_context_destroy ()
GdkGLExt-Message:  -- gdk_gl_context_remove ()
GdkGLExt-Message:  -- Destroy GL context hash table.
GdkGLExt-Message:  ** glXMakeCurrent ()
GdkGLExt-Message:  ** glXDestroyContext ()
GdkGLExt-Message:  -- gdk_gl_context_finalize ()
[naofumi titan examples]$


Regards,
--Naofumi





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]