Created
June 28, 2013 12:00
-
-
Save waywardmonkeys/5884187 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module: calvino-glfw3-test-suite | |
synopsis: Test suite for the calvino-glfw3 library. | |
define suite calvino-glfw3-test-suite () | |
test basics; | |
end suite; | |
define test basics () | |
glfwInit(); | |
glfwWindowHint($GLFW-VISIBLE, 1); | |
glfwWindowHint($GLFW-DECORATED, 1); | |
// let window = glfwCreateWindow(1024, 768, "Test!", null-pointer(<GLFWMonitor*>), null-pointer(<GLFWMonitor*>)); | |
let window = glfwCreateWindow(1024, 768, "Test!", glfwGetPrimaryMonitor(), null-pointer(<GLFWMonitor*>)); | |
check-false("Window not null", null-pointer?(window)); | |
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(); | |
end; | |
glfwTerminate(); | |
end test; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment