Announcement

Collapse
No announcement yet.

Mir Display Server Support Lands In SDL2

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Mir Display Server Support Lands In SDL2

    Phoronix: Mir Display Server Support Lands In SDL2

    SDL, the library commonly used by cross-platform games for abstracting large portions of their input and output handling, now has support for running on Canonical's Mir Display Server for Ubuntu Linux...

    http://www.phoronix.com/vr.php?view=MTU5MTE

  • #2
    They are not picking sides. Might be smart.

    Comment


    • #3
      Originally posted by xeekei View Post
      They are not picking sides. Might be smart.
      You can submit patches for Haiku if you maintain them. The entire goal of SDL is to abstract away as many different platforms differences as possible, so it's only a logical thing to do.

      Comment


      • #4
        Mir and Wayland support?
        Last edited by Attentäter; 02-03-2014, 07:09 PM.

        Comment


        • #5
          Mir and Wayland will be disabled in 2.0.2

          Temporarily default Wayland and Mir to disabled, for 2.0.2 release.

          We'll flip the default back to enabled right after 2.0.2 is finalized, and
          try to declare them stable and ready by 2.0.3.

          Those that have an interest in supporting them in 2.0.2 can manually enable
          them in the configure script with --enable-video-wayland and/or
          --enable-video-mir.

          Comment


          • #6
            SDL2 is used by the Steam Runtime and Steam games need to support everything as best as possible, so this makes a lot of sense.

            Comment


            • #7
              Nice!

              Comment


              • #8
                Originally posted by xeekei View Post
                They are not picking sides. Might be smart.
                Mir support is mostly copy and paste from the Wayland port.

                Comment


                • #9
                  Originally posted by Awesomeness View Post
                  Mir support is mostly copy and paste from the Wayland port.
                  Minus the licensing tidbit or giving credit where it's due, of course....

                  Comment


                  • #10
                    I don’t particularly care about Mir or Wayland at this point, but it’s nice to know that SDL2 will work everywhere!

                    Comment


                    • #11
                      Originally posted by Awesomeness View Post
                      Mir support is mostly copy and paste from the Wayland port.
                      If that's true, it's even better, as code duplication could be reduced.
                      This is good news, this means Linux as a gaming platform will not suffer because of the whole Mir situation

                      Comment


                      • #12
                        Originally posted by MartinN View Post
                        Minus the licensing tidbit or giving credit where it's due, of course....
                        Irrelevant for this topic at all. Neither the license changes nor will their be a lack of credit when code is copied/reused internally in SDL2. Trolling attempt failed.

                        IMHO, it is nice to see that, more platforms supported by SDL is a very good thing.

                        Comment


                        • #13
                          Wayland support in SDL2 is important for Sailfish.

                          Comment


                          • #14
                            Originally posted by Awesomeness View Post
                            Mir support is mostly copy and paste from the Wayland port.
                            Both of them are pretty much just a thin wrapper around the OpenGL layer, aren't they? So most of the code will be GL API calls, with just a little bit tying it to Mir or Wayland?

                            Comment


                            • #15
                              Originally posted by mrugiero View Post
                              If that's true, it's even better, as code duplication could be reduced.
                              This is good news, this means Linux as a gaming platform will not suffer because of the whole Mir situation
                              The fact right now is that code is duplicated.
                              Just compare https://hg.libsdl.org/SDL/file/52f86...L_waylanddyn.c against https://hg.libsdl.org/SDL/file/52f86...r/SDL_mirdyn.c
                              Occasionally here is a line of code missing, there was a line of code added and in the end the Mir back-end has 20 lines of code less in this file than the Wayland back-end but the rest is pretty much a search "WAYLAND" and replace with "MIR". Even the comments are the same:

                              Code:
                              #if DEBUG_DYNAMIC_WAYLAND
                                  if (fn != NULL)
                                      SDL_Log("WAYLAND: Found '%s' in %s (%p)\n", fnname, waylandlibs[i].libname, fn);
                                  else
                                      SDL_Log("WAYLAND: Symbol '%s' NOT FOUND!\n", fnname);
                              #endif
                              
                                  if (fn == NULL)
                                      *pHasModule = 0;  /* kill this module. */
                              
                                  return fn;
                              }
                              
                              #endif /* SDL_VIDEO_DRIVER_WAYLAND_DYNAMIC */
                              
                              /* Define all the function pointers and wrappers... */
                              #define SDL_WAYLAND_MODULE(modname) int SDL_WAYLAND_HAVE_##modname = 0;
                              #define SDL_WAYLAND_SYM(rc,fn,params) SDL_DYNWAYLANDFN_##fn WAYLAND_##fn = NULL;
                              #define SDL_WAYLAND_INTERFACE(iface) const struct wl_interface *WAYLAND_##iface = NULL;
                              #include "SDL_waylandsym.h"
                              #undef SDL_WAYLAND_MODULE
                              #undef SDL_WAYLAND_SYM
                              #undef SDL_WAYLAND_INTERFACE
                              Code:
                              #if DEBUG_DYNAMIC_MIR
                                  if (fn != NULL)
                                      SDL_Log("MIR: Found '%s' in %s (%p)\n", fnname, mirlibs[i].libname, fn);
                                  else
                                      SDL_Log("MIR: Symbol '%s' NOT FOUND!\n", fnname);
                              #endif
                              
                                  if (fn == NULL)
                                      *pHasModule = 0;  /* kill this module. */
                              
                                  return fn;
                              }
                              
                              #endif /* SDL_VIDEO_DRIVER_MIR_DYNAMIC */
                              
                              /* Define all the function pointers and wrappers... */
                              #define SDL_MIR_MODULE(modname) int SDL_MIR_HAVE_##modname = 0;
                              #define SDL_MIR_SYM(rc,fn,params) SDL_DYNMIRFN_##fn MIR_##fn = NULL;
                              #include "SDL_mirsym.h"
                              #undef SDL_MIR_MODULE
                              #undef SDL_MIR_SYM
                              Even the file names just had a search&replace done: https://hg.libsdl.org/SDL/file/52f86.../video/wayland https://hg.libsdl.org/SDL/file/52f86.../src/video/mir

                              Comment

                              Working...
                              X