Results 1 to 19 of 19

Thread: DiceWar on Linux

  1. #1
    Lesser Knight
    Join Date
    Aug 2008
    Location
    Folsom, California USA
    Posts
    37

    Default DiceWar on Linux

    Is DiceWar working on Linux?

    I was trying to build it to see if my CL_RenderWindowProvider changes messed anything up. First, I found that it didn't compile. I had to make a few changes to the lib3ds_help modules to make it build. Those changes are attached for review. For reference, I'm on Ubuntu 8.04 with lib3ds 1.2.0

    After I got it built, I tried running it. The server ran with no apparent problems, but the client failed on startup:

    Code:
    $ ./dicewar_client
    Unhandled exception: FrameBuffer is not FRAMEBUFFER_COMPLETE
    after attaching color buffer: Error code: 0
    ...which appears to emanate from opengl_frame_buffer_provider.cpp

    I thought it might be my changes, but after rolling back to r1822 and reinstalling the rebuilt libs, I got the same results. So, unfortunately, I still don't know if my changes broke any non-trivial applications.

    --- Kevin
    Attached Files Attached Files

  2. #2
    Lesser Knight
    Join Date
    Aug 2008
    Location
    Folsom, California USA
    Posts
    37

    Default

    I also tried it on OpenSuse 11 using both r1822 and r1824. The build was still broken, but differently. This time, the lib3ds errors did not appear; the version on this system is 1.3.0. However, several modules appeared to be missing some standard headers. I had to #include <algorithm> in the client precomp.h, and both <algorithm> and <cstdlib> in the server's.

    Once built, however, the same framebuffer exception came up for the client.

    --- Kevin

  3. #3
    ClanLib Developer
    Join Date
    Sep 2006
    Location
    Bergen, Norway
    Posts
    588

    Default

    Lib3ds 1.3.0 was made a prerequisite in DW a little while back, not sure why, though.

    I also get the same exception regarding framebuffer on Windows now, so it is not a Linux specific problem. I'm using an ATI HD 4870 card with latest (8.9) drivers.
    Attached Images Attached Images  

  4. #4
    ClanLib Developer
    Join Date
    May 2007
    Posts
    1,824

    Default

    Quote Originally Posted by kbluck View Post
    . I had to make a few changes to the lib3ds_help modules to make it build. Those changes are attached for review. For reference, I'm on Ubuntu 8.04 with lib3ds 1.2.0
    Lib3ds 1.2.0 has got 64 bit issues.

    Updating to Lib3ds 1.3.0 fixes this.

    Lib3ds 2.0 rc-1 was released on September 9th, so i guess quite soon we will be using that instead.

    Quote Originally Posted by sphair View Post
    Lib3ds 1.3.0 was made a prerequisite in DW a little while back, not sure why, though.
    .
    That is a very good question

    One last thing ... Dicewar on my ubuntu does not even get past the logon screen! ... i better find out why ...

    ... Fixed: The X11 message queue used select() on sockets with a NULL timeout, making it block. (fixed in svn)

    And Dicewar works on my NVidia card without any problems
    Last edited by rombust; 09-25-2008 at 07:37 AM.

  5. #5
    Lesser Knight
    Join Date
    Aug 2008
    Location
    Folsom, California USA
    Posts
    37

    Default

    For reference:

    Ubuntu 8.04:
    card: nVidia Corporation NV25GL AGP [Quadro4 700 XGL] (rev a3)
    driver: 96.43.05

    OpenSuse 11:
    card: Intel 82865G integrated AGP
    driver: XOrg intel 7.3

  6. #6
    ClanLib Developer
    Join Date
    May 2007
    Posts
    1,824

    Default

    So the framebuffer bug occurs on an nvidia card as well ?

    This is good news, hopefully that means it's a clanlib bug, not a problem with the ATI drivers.

    But what causes the problem?

    And why does it work on my ubuntu?

    I should try it on suse, and see if it also works there (on a machine with the same specification)

    "Unhandled exception: FrameBuffer is not FRAMEBUFFER_COMPLETE" ... it looks like the framebuffer was not finished doing some calculations ... maybe worth trying adding a "::sleep(100)" just before it.

  7. #7
    Lesser Knight
    Join Date
    Aug 2008
    Location
    Folsom, California USA
    Posts
    37

    Default

    What NVidia/OpenGL are you using on Ubuntu?

    I seem to be using:

    nvidia-glx 1:96.43.05+2.6.24.13-19.45 (hardy-updates)
    libgl1-mesa-glx 7.0.3~rc2-1ubuntu3 (hardy)
    libgl1-mesa-dri 7.0.3~rc2-1ubuntu3 (hardy)
    libglu1-mesa 7.0.3~rc2-1ubuntu3 (hardy)

    Maybe I should try nvidia-glx-new which is 169.12+2.6.24.13-19.45

    Hopefully it won't completely screw up my display. Crossing my fingers...

    --- Kevin

  8. #8
    Lesser Knight
    Join Date
    Aug 2008
    Location
    Folsom, California USA
    Posts
    37

    Default

    As I feared, nvidia-glx-new failed to detect my hardware and left me on low-res "generic" VGA.

    Just for fun, I ran Dicewar and got:

    Code:
    $ ./dicewar_client
    Xlib:  extension "GLX" missing on display ":0.0".
    Xlib:  extension "GLX" missing on display ":0.0".
    Requested visual not supported by your OpenGL implementation. Falling back on singlebuffered Visual!
    Unhandled exception: glxChooseVisual failed
    ...which I presume is to be expected under the circumstances.

    --- Kevin

  9. #9
    ClanLib Developer
    Join Date
    May 2007
    Posts
    1,824

    Default

    I am using the latest linux nvidia driver found at: http://www.nvidia.com/Download/index.aspx?lang=en-us

    mark@mark:~$ sh ./N*.run --version
    Verifying archive integrity... OK
    Uncompressing NVIDIA Accelerated Graphics Driver for Linux-x86_64 173.08............................................ .................................................. .................................................

    nvidia-installer: version 1.0.7 (buildmeister@builder62) Wed Apr 2 08:22:22
    PST 2008

  10. #10
    ClanLib Developer
    Join Date
    May 2007
    Posts
    1,824

    Default

    I have tried downgrading my linux driver ... which did not work ... so i tried updrading it back to normal ... which did not work !

    It is possible that the nvidia packages on ubuntu is conflicting with the official driver.

    hopefully on monday when i'm back at work, i can fix my pc!

  11. #11
    Lesser Knight
    Join Date
    Aug 2008
    Location
    Folsom, California USA
    Posts
    37

    Default

    I checked the NVidia download site you mentioned. For my Quadro XGL700 card, they list the latest as 96.43.07. I am currently running 96.43.05, which being only a couple of minor point releases away I doubt will have any stunning differences in function or performance. They just fixed a TV-out problem and some kernel-compatibility issues. FWIW, it appears that the upcoming Ubuntu 8.10 (Ibex) does package 96.43.07.

    Just to be clear, I am using an NVidia-supplied "restricted" driver, not any sort of generic "free" driver. However, because of my particular card, apparently it is a "legacy" driver. If I was using a GeForce 8600, for example, it appears that the driver version would be 173.14.12, which is clearly a "new" driver.

    I ran across this FAQ:

    On what NVIDIA hardware is the EXT_framebuffer_object OpenGL extension supported?
    EXT_framebuffer_object is supported on GeForce FX, Quadro FX, and newer GPUs.
    ... which implies to me that my card simply doesn't support the extension.

    http://fr.download.nvidia.com/XFree8...hapter-04.html

    --- Kevin

  12. #12
    Lesser Knight
    Join Date
    Aug 2008
    Location
    Folsom, California USA
    Posts
    37

    Default

    Yep, this verifies that this Quadro XGL card just doesn't support the extension:

    Code:
    $ glxinfo
    name of display: :0.0
    display: :0  screen: 0
    direct rendering: Yes
    server glx vendor string: NVIDIA Corporation
    server glx version string: 1.4
    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, 
        GLX_EXT_texture_from_pixmap, GLX_ARB_multisample, GLX_NV_swap_group
    client glx vendor string: NVIDIA Corporation
    client glx version string: 1.4
    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_NV_video_out, GLX_SGIX_fbconfig, GLX_SGIX_pbuffer, 
        GLX_SGI_swap_control, GLX_NV_float_buffer, GLX_ARB_fbconfig_float, 
        GLX_EXT_fbconfig_packed_float, GLX_EXT_texture_from_pixmap
    GLX version: 1.3
    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_EXT_texture_from_pixmap, GLX_ARB_multisample, GLX_NV_swap_group, 
        GLX_ARB_get_proc_address
    OpenGL vendor string: NVIDIA Corporation
    OpenGL renderer string: Quadro4 700 XGL/AGP/SSE2
    OpenGL version string: 1.5.8 NVIDIA 96.43.05
    OpenGL extensions:
        GL_ARB_depth_texture, GL_ARB_imaging, GL_ARB_multisample, 
        GL_ARB_multitexture, GL_ARB_occlusion_query, GL_ARB_pixel_buffer_object, 
        GL_ARB_point_parameters, GL_ARB_point_sprite, GL_ARB_shadow, 
        GL_ARB_shader_objects, GL_ARB_shading_language_100, 
        GL_ARB_texture_border_clamp, GL_ARB_texture_compression, 
        GL_ARB_texture_cube_map, GL_ARB_texture_env_add, 
        GL_ARB_texture_env_combine, GL_ARB_texture_env_dot3, 
        GL_ARB_texture_mirrored_repeat, GL_ARB_texture_rectangle, 
        GL_ARB_transpose_matrix, GL_ARB_vertex_buffer_object, 
        GL_ARB_vertex_program, GL_ARB_vertex_shader, GL_ARB_window_pos, 
        GL_S3_s3tc, GL_EXT_texture_env_add, GL_EXT_abgr, GL_EXT_bgra, 
        GL_EXT_blend_color, GL_EXT_blend_minmax, GL_EXT_blend_subtract, 
        GL_EXT_compiled_vertex_array, GL_EXT_Cg_shader, 
        GL_EXT_draw_range_elements, GL_EXT_fog_coord, 
        GL_EXT_gpu_program_parameters, GL_EXT_multi_draw_arrays, 
        GL_EXT_packed_pixels, GL_EXT_paletted_texture, GL_EXT_pixel_buffer_object, 
        GL_EXT_point_parameters, GL_EXT_rescale_normal, GL_EXT_secondary_color, 
        GL_EXT_separate_specular_color, GL_EXT_shadow_funcs, 
        GL_EXT_shared_texture_palette, GL_EXT_stencil_wrap, GL_EXT_texture3D, 
        GL_EXT_texture_compression_s3tc, GL_EXT_texture_cube_map, 
        GL_EXT_texture_edge_clamp, GL_EXT_texture_env_combine, 
        GL_EXT_texture_env_dot3, GL_EXT_texture_filter_anisotropic, 
        GL_EXT_texture_lod, GL_EXT_texture_lod_bias, GL_EXT_texture_object, 
        GL_EXT_timer_query, GL_EXT_vertex_array, GL_HP_occlusion_test, 
        GL_IBM_rasterpos_clip, GL_IBM_texture_mirrored_repeat, 
        GL_KTX_buffer_region, GL_NV_blend_square, GL_NV_copy_depth_to_color, 
        GL_NV_depth_clamp, GL_NV_fence, GL_NV_fog_distance, 
        GL_NV_light_max_exponent, GL_NV_multisample_filter_hint, 
        GL_NV_occlusion_query, GL_NV_packed_depth_stencil, GL_NV_pixel_data_range, 
        GL_NV_point_sprite, GL_NV_register_combiners, GL_NV_register_combiners2, 
        GL_NV_texgen_reflection, GL_NV_texture_compression_vtc, 
        GL_NV_texture_env_combine4, GL_NV_texture_rectangle, GL_NV_texture_shader, 
        GL_NV_texture_shader2, GL_NV_texture_shader3, GL_NV_vertex_array_range, 
        GL_NV_vertex_array_range2, GL_NV_vertex_program, GL_NV_vertex_program1_1, 
        GL_SGIS_generate_mipmap, GL_SGIS_multitexture, GL_SGIS_texture_lod, 
        GL_SGIX_depth_texture, GL_SGIX_shadow, GL_SUN_slice_accum
    --- Kevin

  13. #13
    Lesser Knight
    Join Date
    Aug 2008
    Location
    Folsom, California USA
    Posts
    37

    Default

    Same story for my Intel 865G chip:

    Code:
    $ glxinfo
    name of display: :0.0
    display: :0  screen: 0
    direct rendering: Yes
    server glx vendor string: SGI
    server glx version string: 1.2
    server glx extensions:
        GLX_ARB_multisample, GLX_EXT_import_context, GLX_EXT_texture_from_pixmap, 
        GLX_EXT_visual_info, GLX_EXT_visual_rating, GLX_MESA_copy_sub_buffer, 
        GLX_OML_swap_method, GLX_SGI_make_current_read, GLX_SGI_swap_control, 
        GLX_SGIS_multisample, GLX_SGIX_fbconfig, GLX_SGIX_visual_select_group
    client glx vendor string: SGI
    client glx version string: 1.4
    client glx extensions:
        GLX_ARB_get_proc_address, GLX_ARB_multisample, GLX_EXT_import_context, 
        GLX_EXT_visual_info, GLX_EXT_visual_rating, GLX_MESA_allocate_memory, 
        GLX_MESA_copy_sub_buffer, GLX_MESA_swap_control, 
        GLX_MESA_swap_frame_usage, GLX_OML_swap_method, GLX_OML_sync_control, 
        GLX_SGI_make_current_read, GLX_SGI_swap_control, GLX_SGI_video_sync, 
        GLX_SGIS_multisample, GLX_SGIX_fbconfig, GLX_SGIX_pbuffer, 
        GLX_SGIX_visual_select_group, GLX_EXT_texture_from_pixmap
    GLX extensions:
        GLX_ARB_get_proc_address, GLX_ARB_multisample, GLX_EXT_import_context, 
        GLX_EXT_visual_info, GLX_EXT_visual_rating, GLX_MESA_allocate_memory, 
        GLX_MESA_copy_sub_buffer, GLX_MESA_swap_control, 
        GLX_MESA_swap_frame_usage, GLX_OML_swap_method, GLX_SGI_make_current_read, 
        GLX_SGI_swap_control, GLX_SGI_video_sync, GLX_SGIS_multisample, 
        GLX_SGIX_fbconfig, GLX_SGIX_visual_select_group
    OpenGL vendor string: Tungsten Graphics, Inc
    OpenGL renderer string: Mesa DRI Intel(R) 865G 20061017 x86/MMX/SSE2
    OpenGL version string: 1.3 Mesa 7.0.3
    OpenGL extensions:
        GL_ARB_imaging, GL_ARB_multisample, GL_ARB_multitexture, 
        GL_ARB_point_parameters, GL_ARB_texture_border_clamp, 
        GL_ARB_texture_compression, GL_ARB_texture_cube_map, 
        GL_ARB_texture_env_add, GL_ARB_texture_env_combine, 
        GL_ARB_texture_env_crossbar, GL_ARB_texture_env_dot3, 
        GL_ARB_texture_mirrored_repeat, GL_ARB_texture_rectangle, 
        GL_ARB_transpose_matrix, GL_ARB_vertex_buffer_object, 
        GL_ARB_vertex_program, GL_ARB_window_pos, GL_EXT_abgr, GL_EXT_bgra, 
        GL_EXT_blend_color, GL_EXT_blend_equation_separate, 
        GL_EXT_blend_func_separate, GL_EXT_blend_minmax, GL_EXT_blend_subtract, 
        GL_EXT_clip_volume_hint, GL_EXT_cull_vertex, GL_EXT_compiled_vertex_array, 
        GL_EXT_convolution, GL_EXT_copy_texture, GL_EXT_draw_range_elements, 
        GL_EXT_fog_coord, GL_EXT_histogram, GL_EXT_multi_draw_arrays, 
        GL_EXT_packed_pixels, GL_EXT_point_parameters, GL_EXT_polygon_offset, 
        GL_EXT_rescale_normal, GL_EXT_secondary_color, 
        GL_EXT_separate_specular_color, GL_EXT_stencil_wrap, GL_EXT_subtexture, 
        GL_EXT_texture, GL_EXT_texture3D, GL_EXT_texture_edge_clamp, 
        GL_EXT_texture_env_add, GL_EXT_texture_env_combine, 
        GL_EXT_texture_env_dot3, GL_EXT_texture_filter_anisotropic, 
        GL_EXT_texture_lod_bias, GL_EXT_texture_object, GL_EXT_texture_rectangle, 
        GL_EXT_vertex_array, GL_3DFX_texture_compression_FXT1, 
        GL_APPLE_client_storage, GL_APPLE_packed_pixels, 
        GL_ATI_blend_equation_separate, GL_IBM_rasterpos_clip, 
        GL_IBM_texture_mirrored_repeat, GL_INGR_blend_func_separate, 
        GL_MESA_pack_invert, GL_MESA_ycbcr_texture, GL_MESA_window_pos, 
        GL_NV_blend_square, GL_NV_light_max_exponent, GL_NV_texture_rectangle, 
        GL_NV_texgen_reflection, GL_NV_vertex_program, GL_NV_vertex_program1_1, 
        GL_OES_read_format, GL_SGI_color_matrix, GL_SGI_color_table, 
        GL_SGIS_generate_mipmap, GL_SGIS_texture_border_clamp, 
        GL_SGIS_texture_edge_clamp, GL_SGIS_texture_lod, GL_SUN_multi_draw_arrays
    glu version: 1.3
    glu extensions:
        GLU_EXT_nurbs_tessellator, GLU_EXT_object_space_tess
    So, clearly I'm not going to be of much assistance in figuring this out. Sorry.

    --- Kevin

  14. #14
    ClanLib Developer
    Join Date
    Sep 2006
    Location
    Denmark
    Posts
    554

    Default

    The frame buffer extension is part of OpenGL 3.0, so it is only a matter of time before any vendor serious about OpenGL support will have it fixed. Although the extension is not new, until now it hasn't been an official extension and that I suspect is one of the reasons ATI haven't cared too much about the bugs in their implementation of it.

    As for Intel and really old Nvidia and ATI cards, I'm not sure how well supported those will be, but I would personally prefer if ClanLib required either OpenGL 2.0 support with FB extensions, or full 3.0 support. At the current moment I do not believe Intel even has an OpenGL 2.0 driver, which renders their chips somewhat useless except for the Direct3D targets.

    The 'frame buffer incomplete' bug in DW is probably caused by the color buffer and the depth buffers not matching in size, or perhaps we use a bad depth size for some cards.

  15. #15
    Lesser Knight
    Join Date
    Aug 2008
    Location
    Folsom, California USA
    Posts
    37

    Default

    Quote Originally Posted by Magnus Norddahl View Post
    As for Intel and really old Nvidia and ATI cards, I'm not sure how well supported those will be, but I would personally prefer if ClanLib required either OpenGL 2.0 support with FB extensions, or full 3.0 support. At the current moment I do not believe Intel even has an OpenGL 2.0 driver, which renders their chips somewhat useless except for the Direct3D targets.
    I don't know. Ogre does OK requiring minimum OpenGL 1.2.1. I admit I'm not a big 3d gamer, but I'm still a pretty serious computer guy, yet none of the 4 computers at my home would meet that requirement. I see ClanLib's main market being "casual" games not aimed at high-end targets; I think you'll be leaving behind a lot of those game's potential markets by setting such a high bar for OpenGL support.

    --- Kevin

  16. #16
    ClanLib Developer
    Join Date
    May 2007
    Posts
    1,824

    Default

    Using the framebuffer is still optional. Developers of games do not have to use it.

    I am not sure why Dicewar does use it (i have never looked at the internals of Dicewar)

    It may be useful to have a system to determine which elements of ClanLib are available.
    For example, CL_FrameBufferObject::IsAvailable()
    Last edited by rombust; 09-30-2008 at 07:58 AM.

  17. #17
    ClanLib Developer
    Join Date
    Sep 2006
    Location
    Denmark
    Posts
    554

    Default

    I'm never really used Ogre, so I do not know what exactly is supported in Ogre with just 1.2.1, but it can't be particular advanced (or Ogre could be much much faster at rendering).

    The key features of various OpenGL versions:

    • 1.2.1 - Multitexturing
    • 1.3 - Misc (now legacy) fixed pipeline functionality
    • 1.4 - Mostly more fixed pipeline function features
    • 1.5 - Shaders introduced, vertex attributes introduced, GPU buffer objects introduced
    • 2.0 - Non-power-of-two textures, point sprites, shaders completely standardized
    • 2.1 - Minor improvements (non-square matrices, pixel buffers on the GPU, sRGB textures)
    • 3.0 - Frame buffers standardized, transform feedbacks introduced, blitting introduced, fixed pipeline marked deprecated


    The problem here is that until 3.0 the clanDisplay API is not completely available in OpenGL, and to target pre 2.0 it begins to require a completely new render path. Not that I mind if someone would volunteer to maintain such an alternative render path, but its just not my personal goal with ClanLib's OpenGL support.

    We cannot just stay with the old render path, because its slower and not supported by any vendor that choses to support OpenGL 3.0 only with a forward compatible context. The catch about forward compatible contexts is that they do not support anything from the fixed function pipeline.

  18. #18
    ClanLib Developer
    Join Date
    Sep 2006
    Location
    Denmark
    Posts
    554

    Default

    I forgot to mention that there are several reasons why DiceWar wants to use the frame buffers:

    • It allows it to render to texture (technically the older pbuffer extension also allowed this, but it was far more messy)
    • It allows us to use floating point color buffers, which allows us to use HDR images and generate bloom effects based on that
    • We can do multisampling just on the GameView texture, instead of having to enable it for the full window

  19. #19
    ClanLib Developer
    Join Date
    May 2007
    Posts
    1,824

    Default

    Fixed - We just need to test it on an ATI card!

    There was a very tiny bug in CL_FrameBufferObject

    - clGenRenderbuffers(2, handles);
    + clGenFramebuffers(2, handles);

Similar Threads

  1. DiceWar
    By sphair in forum Official ClanLib SDK Forums
    Replies: 6
    Last Post: 03-12-2009, 11:18 PM
  2. Linux fonts [0.9]
    By kbluck in forum Official ClanLib SDK Forums
    Replies: 10
    Last Post: 09-25-2008, 11:48 AM
  3. Using GTK for ClanLib 0.9 Linux
    By rombust in forum Official ClanLib SDK Forums
    Replies: 3
    Last Post: 09-23-2008, 04:03 PM
  4. FQ and Linux
    By jjohn in forum Funeral Quest
    Replies: 0
    Last Post: 09-04-2004, 12:23 AM
  5. Linux port
    By in forum Dink Smallwood HD
    Replies: 2
    Last Post: 09-12-2002, 05:03 AM

Bookmarks

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •