crazy flashing window OpenGL GLFW
12:01 28 Dec 2014

My hello world window looked like this: http://s1303.photobucket.com/user/eskimo___/media/screenshot_124_zps890ae561.jpg.html

any ideas where I've gone wrong? Im using osx yosemite with the latest GLFW

my project folder is comprised of 3 files which were made as part of the process using the terminal:

  1. main.cpp(C++ source code)
  2. Makefile(txt)
  3. test(Unix Executable File)

i've set up the glfw3 library on my mac using homebrew.

Main.cpp:

include 

int main(void)
{
    GLFWwindow* window;

    /* Initialize the library */
    if (!glfwInit())
        return -1;

    /* Create a windowed mode window and its OpenGL context */
    window = glfwCreateWindow(640, 480, "Hello World", NULL, NULL);
    if (!window)
    {
        glfwTerminate();
        return -1;
    }

    /* Make the window's context current */
    glfwMakeContextCurrent(window);

    /* Loop until the user closes the window */
    while (!glfwWindowShouldClose(window))
    {
        /* Render here */

        /* Swap front and back buffers */
        glfwSwapBuffers(window);

        /* Poll for and process events */
        glfwPollEvents();
    }

    glfwTerminate();
    return 0;
}
c++ macos opengl glfw