From: Maurizio Colucci To: Jacques Garrigue Subject: Re: What's wrong with this code? [GlGtk.area] Date: Sat, 14 Aug 2004 17:16:20 +0200 Cc: lablgtk at kaba.or.jp References: <200408141519.27667.seguso.forever at tin.it> <20040814.232850.78724946.garrigue at kurims.kyoto-u.ac.jp> In-Reply-To: <20040814.232850.78724946.garrigue at kurims.kyoto-u.ac.jp> MIME-Version: 1.0 Content-Disposition: inline Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <200408141716.21116.seguso.forever at tin.it> On Saturday 14 August 2004 16:28, Jacques Garrigue wrote: > From: Maurizio Colucci > > > I am trying to write a hello-world program with lablgtk2 and GlGtk.area, > > but something is going wrong. The following program should display a > > GtkGlArea with a triangle inside: > > [...] > > > But this only displays an empty window. The gl area is not visible. > > Strange enough, this works perfectly on my FreeBSD-5.2.1/XFree86-4.3. > > The output is: > > > > debian:/dat/pub/src/by-mau/adventure/src/ocaml# ./test.exe > > GlGtk-WARNING **: could not make current > > GlGtk-WARNING **: could not make current > > GlGtk-WARNING **: could not make current > > Delete event occurred > > destroy > > Looks like you have a problem with OpenGL. > > > Does the program work on your machine? > > (I am using debian sid with the nvidia driver) Thank you Jacques. This is good new because, at worst, I'll try to remove the driver. But then I'd have no accelerated 3d :-( > The nvidia driver may be the problem. > Try disabling DRI as a first check. In /etc/X11/XF86Config-4 I had already commented out the line Load "dri" because the nvidia driver require it. Is that what you mean? ----- Some additional info: I tried running the C sample program simple.c from GtkGlArea. It works, but the standard output complains that dri is _absent_: VENDOR : SGI VERSION : 1.2 EXTENSIONS : GLX_EXT_visual_info GLX_EXT_visual_rating GLX_EXT_import_context Xlib: extension "XFree86-DRI" missing on display ":0.0". Segmentation fault Furthermore, the program segfaults on exit, as you can see. Also, some opengl games are misbehaving. Some (neverball) crash on startup, some work but crash on fullscreeen mode (neverputt). ------- Here is the output of glxinfo: debian:/dat/pub/src/by-mau/adventure/src/ocaml# glxinfo name of display: :0.0 display: :0 screen: 0 direct rendering: Yes server glx vendor string: NVIDIA Corporation server glx version string: 1.3 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 client glx vendor string: NVIDIA Corporation client glx version string: 1.3 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 GLX extensions: GLX_EXT_visual_info, GLX_EXT_visual_rating, GLX_SGIX_fbconfig, GLX_SGIX_pbuffer, GLX_SGI_video_sync, GLX_SGI_swap_control, GLX_ARB_get_proc_address OpenGL vendor string: NVIDIA Corporation OpenGL renderer string: RIVA TNT2/AGP/SSE/3DNOW! OpenGL version string: 1.5.1 NVIDIA 61.11 OpenGL extensions: GL_ARB_imaging, GL_ARB_multitexture, GL_ARB_point_parameters, GL_ARB_texture_env_add, GL_ARB_texture_mirrored_repeat, GL_ARB_transpose_matrix, GL_ARB_vertex_buffer_object, GL_ARB_window_pos, GL_EXT_texture_env_add, GL_EXT_abgr, GL_EXT_bgra, GL_EXT_compiled_vertex_array, GL_EXT_draw_range_elements, GL_EXT_fog_coord, GL_EXT_multi_draw_arrays, GL_EXT_packed_pixels, GL_EXT_pixel_buffer_object, GL_EXT_point_parameters, GL_EXT_rescale_normal, GL_EXT_secondary_color, GL_EXT_separate_specular_color, GL_EXT_stencil_wrap, GL_EXT_texture_edge_clamp, GL_EXT_texture_env_combine, GL_EXT_texture_lod_bias, GL_EXT_texture_object, GL_EXT_vertex_array, GL_IBM_rasterpos_clip, GL_IBM_texture_mirrored_repeat, GL_KTX_buffer_region, GL_NV_blend_square, GL_NV_fog_distance, GL_NV_packed_depth_stencil, GL_NV_texgen_reflection, GL_NV_texture_env_combine4, GL_SGIS_multitexture, GL_SUN_slice_accum glu version: 1.3 glu extensions: GLU_EXT_nurbs_tessellator, GLU_EXT_object_space_tess visual x bf lv rg d st colorbuffer ax dp st accumbuffer ms cav id dep cl sp sz l ci b ro r g b a bf th cl r g b a ns b eat ---------------------------------------------------------------------- 0x21 24 tc 0 32 0 r y . 8 8 8 0 0 24 8 16 16 16 16 0 0 None 0x22 24 dc 0 32 0 r y . 8 8 8 0 0 24 8 16 16 16 16 0 0 None 0x23 24 tc 0 32 0 r y . 8 8 8 8 0 24 8 16 16 16 16 0 0 None 0x24 24 tc 0 32 0 r . . 8 8 8 0 0 24 8 16 16 16 16 0 0 None 0x25 24 tc 0 32 0 r . . 8 8 8 8 0 24 8 16 16 16 16 0 0 None 0x26 24 tc 0 32 0 r y . 8 8 8 0 0 0 0 16 16 16 16 0 0 None 0x27 24 tc 0 32 0 r y . 8 8 8 8 0 0 0 16 16 16 16 0 0 None 0x28 24 tc 0 32 0 r . . 8 8 8 0 0 0 0 16 16 16 16 0 0 None 0x29 24 tc 0 32 0 r . . 8 8 8 8 0 0 0 16 16 16 16 0 0 None 0x2a 24 dc 0 32 0 r y . 8 8 8 8 0 24 8 16 16 16 16 0 0 None 0x2b 24 dc 0 32 0 r . . 8 8 8 0 0 24 8 16 16 16 16 0 0 None 0x2c 24 dc 0 32 0 r . . 8 8 8 8 0 24 8 16 16 16 16 0 0 None 0x2d 24 dc 0 32 0 r y . 8 8 8 0 0 0 0 16 16 16 16 0 0 None 0x2e 24 dc 0 32 0 r y . 8 8 8 8 0 0 0 16 16 16 16 0 0 None 0x2f 24 dc 0 32 0 r . . 8 8 8 0 0 0 0 16 16 16 16 0 0 None 0x30 24 dc 0 32 0 r . . 8 8 8 8 0 0 0 16 16 16 16 0 0 None ---- The nvidia driver is installed correctly. (I installed the kernel headers of the right kernel, 2.4.18-bf2.4, and the right gcc used to compile the kernel.) The card is nvidia TNT2 ultra. ------- Any idea what I should try next? Thanks again :-) Mau