Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // play the game
- int main(int argc, char* argv[])
- {
- // on error, print errors to console
- glfwSetErrorCallback(error_callback);
- // initialize glfw. if it fails, exit the program.
- if(!glfwInit())
- {
- return -1;
- }
- // create a 640x480 window titled "Space Invaders"
- GLFWwindow* window = glfwCreateWindow(640, 480, "Space Invaders", NULL, NULL);
- // window doesn't render => close the program
- if(!window)
- {
- glfwTerminate();
- return -1;
- }
- // bind OpenGL calls to this window (allows us to draw on this window)
- glfwMakeContextCurrent(window);
- //...
Advertisement
Add Comment
Please, Sign In to add comment