Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //...
- // set the buffer clear color to red (rgba code)
- glClearColor(1.0, 0.0, 0.0, 1.0);
- // persist the window until user closes it
- while (!glfwWindowShouldClose(window))
- {
- // 'buffer' means an image which can be displayed on the screen
- // OpenGL has a 'front buffer' which is displayed on the screen and a 'back buffer'
- // which is used for drawing.
- // every tick, clear the front buffer and swap in the back buffer
- glClear(GL_COLOR_BUFFER_BIT);
- glfwSwapBuffers(window);
- // process pending events (for example, clicking the close button)
- glfwPollEvents();
- }
- //...
Advertisement
Add Comment
Please, Sign In to add comment