summaryrefslogtreecommitdiffstats
path: root/src/glfw2-test.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/glfw2-test.c')
-rw-r--r--src/glfw2-test.c28
1 files changed, 28 insertions, 0 deletions
diff --git a/src/glfw2-test.c b/src/glfw2-test.c
new file mode 100644
index 0000000..b7c473e
--- /dev/null
+++ b/src/glfw2-test.c
@@ -0,0 +1,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;
+}