summaryrefslogtreecommitdiffstats
path: root/src/glfw2-test.c
blob: b7c473e7d17b219674b97d87cbc02ce002fc60af (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
/*
 * This file is part of MXE.
 * See index.html for further information.
 */

#include <stdlib.h>
#include <GL/glfw.h>

int main(void)
{
    /* Initialise GLFW */
    if( !glfwInit() )
    {
        return EXIT_FAILURE;
    }

    /* Open a window and create its OpenGL context */
    if( !glfwOpenWindow( 640, 480, 0,0,0,0, 0,0, GLFW_WINDOW ) )
    {
        glfwTerminate();
        return EXIT_FAILURE;
    }

    /* Close OpenGL window and terminate GLFW*/
    glfwTerminate();

    return EXIT_SUCCESS;
}