Menu

no monitors found

Using GLFW
Zilarrezko
2015-03-18
2015-03-18
  • Zilarrezko

    Zilarrezko - 2015-03-18

    Hopefully this is the right forum to post this.

    So I have a basic setup here. Not sure if I'm suppose to specify which monitor I'm creating a window or something? Though I don't even get to creating a window. Here's my code so far...

    #include <iostream>
    
    #include "glfw3.h"
    
    void
    error_callback(int error, const char* description)
    {
       puts(description);
    }
    
    int
    main()
    {
       glfwSetErrorCallback(error_callback);
    
       if(!glfwInit())
       {
          std::cout << "ERROR: GLFW failed to Initialize" << std::endl;
          //TODO: Logging
          return -1;
       }
    
       char *WindowTitle = "Hello World";
       GLFWwindow* Window = glfwCreateWindow(960, 540, WindowTitle, NULL, NULL);
    
       if(!Window)
       {
          glfwTerminate();
          //TODO: Logging
          return -1;
       }
    
       //TODO: Running loop
    
       //NOTE: Yay
       std::cout << "Window Created successfully" << std::endl;
       glfwTerminate();
    
       system("pause");
    
       return 0;
    }
    

    However, glfwInit returns false, prints out ERROR: GLFW failed to initialize (because I told it to when failing of course) and set it to exit with int -1 per the basic setup guide diddly.

    I have two monitors, one isn't 1920x1080 but I'm not sure exactly what the problem is. I'm using an AMD graphics card and AMD processor.

     
  • elmindreda

    elmindreda - 2015-03-18

    Does the error callback print anything?

     
    • Zilarrezko

      Zilarrezko - 2015-03-18

      I believe that's the thing printing out "no monitors found". Because I don't have anything else that would print that.

      (Just tested it, when I delete the callback it doesn't say the no monitors found)

       
  • elmindreda

    elmindreda - 2015-03-18

    What version of what OS are you running? Is it running in a VM?

     
    • Zilarrezko

      Zilarrezko - 2015-03-18

      Negative, Windows 8.1. And no it isn't pirated.

       
  • elmindreda

    elmindreda - 2015-03-18

    Wouldn't matter if it was.

    Please file an issue.

     
    • Zilarrezko

      Zilarrezko - 2015-03-18

      alrighty, just had to be sure. Thanks.