Coder Social home page Coder Social logo

GLFW Wayland Support about glfw HOT 8 CLOSED

SaifOwleN avatar SaifOwleN commented on September 21, 2024
GLFW Wayland Support

from glfw.

Comments (8)

dougbinks avatar dougbinks commented on September 21, 2024 1

What version of GLFW have you got? According to vcpkg it should be 3.4 which is the latest.

GLFW_USE_WAYLAND is now deprecated:
https://github.com/glfw/glfw/blob/master/CMakeLists.txt#L30-L33

from glfw.

dougbinks avatar dougbinks commented on September 21, 2024

Are you certain that Wayland is supported?

a window appears but it uses x11 and pitch black.

If you want another colour try setting glClearColor and then use glClear prior to drawing and swapping buffers..

from glfw.

SaifOwleN avatar SaifOwleN commented on September 21, 2024

That's my question.
Why is it not supported. The wayland support function returns false.

from glfw.

dougbinks avatar dougbinks commented on September 21, 2024

Sorry, I meant are you certain that Wayland is supported by your system?

from glfw.

dougbinks avatar dougbinks commented on September 21, 2024

Hi,

It looks like your GLFW library was compiled without Wayland support. The _GLFW_WAYLAND option needs to be defined at compile time.

I also just noticed you are calling the init hint prior to calling init. This should be called prior to the init as follows:

  if (glfwPlatformSupported(GLFW_PLATFORM_WAYLAND)) {
    glfwInitHint(GLFW_PLATFORM, GLFW_PLATFORM_WAYLAND);
  } else {
    fmt::println("No Wayland Support");
  }
  if (!glfwInit())
    return -1;

from glfw.

SaifOwleN avatar SaifOwleN commented on September 21, 2024

Sorry, I meant are you certain that Wayland is supported by your system?

Yes, am sure its supported i already use a Wayland wm.

Also i use vcpkg for the library management and here is the cmake command
cmake -DGLFW_USE_WAYLAND=ON ..

and for the hints i fixed it but it still doesn't work

from glfw.

SaifOwleN avatar SaifOwleN commented on September 21, 2024

Thank you it worked

from glfw.

dougbinks avatar dougbinks commented on September 21, 2024

Excellent, then I shall mark this as closed.

from glfw.

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.