suijingfeng / vkOpenArena

Old games never die, they just fade away...
http://openarena.ws
60 stars 6 forks source link

SDL2 still use libx11 on linux platform, no xcb and wayland support for vulkan backend? #14

Open suijingfeng opened 5 years ago

suijingfeng commented 5 years ago

SDL should only be used to create window and be put on the client side not the renderer side.

suijingfeng commented 5 years ago

can not keep to use SDL2, have to remove it.

suijingfeng commented 4 years ago

libx11 is the the top of libxcb, but fedora 30 using wayland by default, the mouse and keyboard is difficult coding for me ...

Morlackx commented 4 years ago

If this can help you could take a look within UE4 source code under Engine/Source/Runtime/VulkanRHI/Private/Linux/ path. UE4 still use SDL+vulkan support on x11 and wayland.

suijingfeng commented 4 years ago

It seem that xlib/x11 can be shipped on the top of wayland and SDL2 using libxcb-xlib. the master branch in this repo can compile and run under fedora 30, but this do not get a good feeling when play OA as the sdl2 branch does.

I will use SDL2 as less as possible, as using a middle-level lib learn nothing, I would like use low level library such as Xlib/XCB as much as possible, which help me learn more knowledge and get a basic understanding how linux and xserver works.

SDL2 is lack of document, I learn nothing about Linux window system when using SDL2, I hate it.

  1. I will add directx12 renderer on windows platform what need a native window handle;
  2. original quake3 doesn't use SDL2;
  3. Vulkan provide platform abstract interface(WSI), creating a window is trivial, the hard part is how to handle mouse and keyboard event.

    Thank you @Morlackx, above is my idea and I will take time to reading its code,