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

glfw window not showing when not creating OpenGL context #260

Open
karroffel opened this issue Apr 18, 2017 · 0 comments
Open

glfw window not showing when not creating OpenGL context #260

karroffel opened this issue Apr 18, 2017 · 0 comments

Comments

@karroffel
Copy link

When trying to create a glfw windows without using a client API (aka not creating an OpenGL context) then the window doesn't display.

#include <stdio.h>

#include <GLFW/glfw3.h>

int main()
{
        if (glfwInit() != GLFW_TRUE) {
                fprintf(stderr, "Couldn't initialize glfw\n");
                return 1;
        }

        glfwWindowHint(GLFW_RESIZABLE, GLFW_TRUE);

        // if you comment out this line then it works just fine.
        glfwWindowHint(GLFW_CLIENT_API, GLFW_NO_API);

        GLFWwindow *window = glfwCreateWindow(1280, 720, "sway test", NULL, NULL);

        while (!glfwWindowShouldClose(window)) {
                glfwPollEvents();
        }

        glfwTerminate();

        return 0;
}

(compile with clang/gcc filename.c -lglfw)

Neither the wayland or the x11 build of glfw work.

Works on:

  • weston
  • plasma wayland
  • GNOME wayland

Doesn't work on:

  • sway
  • orbment

Both sway and orbment use wlc, so the problem might lie here somewhere.

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

No branches or pull requests

1 participant