Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support wayland surface #160

Merged
merged 3 commits into from
Jan 14, 2022
Merged

Support wayland surface #160

merged 3 commits into from
Jan 14, 2022

Conversation

rajveermalviya
Copy link
Collaborator

Added support for creating surface from wayland handle

Also updated triangle example, but wayland support in GLFW is still experimental,
thus custom build of GLFW with wayland support enabled will be required.

Copy link
Member

@kvark kvark left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

noice!

@kvark kvark merged commit 636629d into gfx-rs:master Jan 14, 2022
@rajveermalviya rajveermalviya deleted the wayland-support branch January 15, 2022 17:23
@glyh
Copy link

glyh commented Jan 5, 2023

I just test it on my machine, but the triangle example are looking for X11GLFW on sway, resulting in a build failure:

$ make run-example-triangle
cargo build 
    Finished dev [unoptimized + debuginfo] target(s) in 0.17s
cd examples/triangle && mkdir -p build && cd build && cmake -DCMAKE_BUILD_TYPE=Debug -DCMAKE_EXPORT_COMPILE_COMMANDS=1 ..  && cmake --build .
-- The C compiler identification is GNU 12.2.0
-- The CXX compiler identification is GNU 12.2.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Configuring done
-- Generating done
-- Build files have been written to: /home/lyh/Documents/CS/Projects/wgpu-native/examples/triangle/build
make[1]: Entering directory '/home/lyh/Documents/CS/Projects/wgpu-native/examples/triangle/build'
make[2]: Entering directory '/home/lyh/Documents/CS/Projects/wgpu-native/examples/triangle/build'
make[3]: Entering directory '/home/lyh/Documents/CS/Projects/wgpu-native/examples/triangle/build'
make[3]: Leaving directory '/home/lyh/Documents/CS/Projects/wgpu-native/examples/triangle/build'
make[3]: Entering directory '/home/lyh/Documents/CS/Projects/wgpu-native/examples/triangle/build'
[ 33%] Building C object CMakeFiles/triangle.dir/main.c.o
[ 66%] Building C object CMakeFiles/triangle.dir/home/lyh/Documents/CS/Projects/wgpu-native/examples/framework.c.o
[100%] Linking C executable triangle
/usr/bin/ld: CMakeFiles/triangle.dir/main.c.o: in function `main':
/home/lyh/Documents/CS/Projects/wgpu-native/examples/triangle/main.c:107: undefined reference to `glfwGetX11Display'
/usr/bin/ld: /home/lyh/Documents/CS/Projects/wgpu-native/examples/triangle/main.c:108: undefined reference to `glfwGetX11Window'
collect2: error: ld returned 1 exit status
make[3]: *** [CMakeFiles/triangle.dir/build.make:115: triangle] Error 1
make[3]: Leaving directory '/home/lyh/Documents/CS/Projects/wgpu-native/examples/triangle/build'
make[2]: *** [CMakeFiles/Makefile2:83: CMakeFiles/triangle.dir/all] Error 2
make[2]: Leaving directory '/home/lyh/Documents/CS/Projects/wgpu-native/examples/triangle/build'
make[1]: *** [Makefile:91: all] Error 2
make[1]: Leaving directory '/home/lyh/Documents/CS/Projects/wgpu-native/examples/triangle/build'
make: *** [Makefile:111: example-triangle] Error 2

@glyh
Copy link

glyh commented Jan 5, 2023

Ok nvm, manually calling cmake -DUSE_WAYLAND=ON works for me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants