Skip to content

GNU/Linux support #6

Open
Open
@Panzerschrek

Description

@Panzerschrek

I tried to compile the project for GNU/Linux, but it doesn't work. Windows-specific stuff is hardcoded.
How hard it would be to support it?

Activity

Raikiri

Raikiri commented on Feb 9, 2024

@Raikiri
Owner

I never tried to build it on linux, but I never deliberately relied on anything windows-specific. Can you give me examples of stuff that does not build on linux?

Panzerschrek

Panzerschrek commented on Feb 9, 2024

@Panzerschrek
Author

https://github.com/Raikiri/LegitEngine/blob/master/src/LegitVulkan/LegitVulkan.h#L2
#define VK_USE_PLATFORM_WIN32_KHR This is obviously windows-specific.

https://github.com/Raikiri/LegitEngine/blob/master/src/LegitVulkan/Surface.h#L5
HWND/HINSTANCE is also Windows-specific stuff.

Maybe i am using the library wrong way and i should just include some other headers instead, which have no Windows-specific stuff dependencies.

Raikiri

Raikiri commented on Feb 9, 2024

@Raikiri
Owner

The WindowDesc is the only part of my code contains the platform-specific window handle that glfw returns and CreateWin32Surface is the only function that uses it. VK_USE_PLATFORM_WIN32_KHR just tells vulkan.hpp that I want the createWin32Surface function, and it should just be replaced with the unix version that should just have a different name.

I don't have the need to run it on unix, but I tried to keep platform specific code as isolated as I could, and the swapchain creation is the only place that I remember where I could not abstract it away.

PS since I never tested it on unix, quite possible that something will break in runtime

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

      Participants

      @Raikiri@Panzerschrek

      Issue actions

        GNU/Linux support · Issue #6 · Raikiri/LegitEngine