Open suijingfeng opened 5 years ago
can not keep to use SDL2, have to remove it.
libx11 is the the top of libxcb, but fedora 30 using wayland by default, the mouse and keyboard is difficult coding for me ...
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.
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.
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,
SDL should only be used to create window and be put on the client side not the renderer side.