Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <GLFW/glfw3.h>
- int main(void)
- {
- if (!glfwInit())
- return -1;
- GLFWwindow *window = glfwCreateWindow(800, 600, "OpenGL Resolution Test", NULL, NULL);
- if (!window)
- {
- glfwTerminate();
- return -1;
- }
- glfwMakeContextCurrent(window);
- while (!glfwWindowShouldClose(window))
- {
- glClearColor(0.5f, 0.69f, 1.0f, 1.0f);
- glClear(GL_COLOR_BUFFER_BIT);
- glfwPollEvents();
- glfwSwapBuffers(window);
- }
- glfwDestroyWindow(window);
- glfwTerminate();
- return 0;
- }
- Compiled with:
- g++ main.cpp -o test `pkg-config --static --libs glfw3`
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement