Giter VIP home page Giter VIP logo

Comments (9)

bkaradzic avatar bkaradzic commented on May 27, 2024

cc @belegdol

from bgfx.

belegdol avatar belegdol commented on May 27, 2024

Did you rebuild glfw with Wayland support enabled? AFAIK for glfw Wayland or X11 is a compile-time option and only one or the other can be built in at any given time.

from bgfx.

belegdol avatar belegdol commented on May 27, 2024

Also, on XWayland you should be creating an X11 window I believe. Wayland window is for native Wayland window only.

from bgfx.

HITOA avatar HITOA commented on May 27, 2024

Thanks for the fast answere :D!
Absolutely i have GLFW_BUILD_WAYLAND set on, otherwise it would not even compile.
I'm on Hyprland wich is a wayland window manager. XWayland is just here for compatibility with app that does not use wayland.

from bgfx.

belegdol avatar belegdol commented on May 27, 2024

Thanks for confirming. I will try to have a look tomorrow. I recall testing this on Nvidia myself and I recall that the examples were working as intended.

from bgfx.

belegdol avatar belegdol commented on May 27, 2024

Have you defined WL_EGL_PLATFORM when compiling your code? For some reason the X11 variant of the function is getting called.

from bgfx.

HITOA avatar HITOA commented on May 27, 2024

I didn't, so i tried, but it seems WL_EGL_PLATFORM isn't used ? i tried defining it with cmake but it tells me that it is not used. It doesn't change if i define it directly in my code either. same problem. if you can guide me if i did something wrong i would really apreciate it.

from bgfx.

belegdol avatar belegdol commented on May 27, 2024

Well if you are building bgfx from source you need to modify the makefile:

diff --git a/makefile b/makefile
index 06e6573e1..84af399e4 100644
--- a/makefile
+++ b/makefile
@@ -113,7 +113,7 @@ wasm-release: .build/projects/gmake-wasm ## Build - Emscripten Release
 wasm: wasm-debug wasm-release ## Build - Emscripten Debug and Release
 
 .build/projects/gmake-linux:
-       $(GENIE) --with-tools --with-combined-examples --with-shared-lib --gcc=linux-gcc gmake
+       $(GENIE) --with-tools --with-combined-examples --with-shared-lib --with-glfw --with-wayland --gcc=linux-gcc gmake
 linux-debug64: .build/projects/gmake-linux ## Build - Linux x64 Debug
        $(MAKE) -R -C .build/projects/gmake-linux config=debug64
 linux-release64: .build/projects/gmake-linux ## Build - Linux x64 Release

This ensures that the wayland-specific Vulkan code gets built:

bgfx/scripts/genie.lua

Lines 207 to 209 in 17f7730

if _OPTIONS["with-wayland"] then
defines { "WL_EGL_PLATFORM=1" }
end

With this and glfw rebuilt with -DGLFW_USE_WAYLAND=ON added I have vulkan on wayland working on Fedora 38 with 535.xx nvidia drivers:
Bildschirmfoto vom 2023-09-17 23-00-08

from bgfx.

HITOA avatar HITOA commented on May 27, 2024

It worked,
I shouldn't have posted this issue here, i use bgfx.cmake wich is just a cmake wrapper around bgfx, and i didn't thought it could come frome that, but it did. sorry for that :/.
Thanks for the help :)!

from bgfx.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.