Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <GL/glew.h>
- #include <GL/glext.h>
- #define GL_GLEXT_PROTOTYPES
- #include <GLFW/glfw3.h>
- GLuint vbo;
- int main() {
- GLFWwindow* window;
- glfwInit();
- window = glfwCreateWindow(1280, 720, "Hello OpenGL!", NULL, NULL);
- glfwMakeContextCurrent(window);
- while (!glfwWindowShouldClose(window)) {
- //OpenGL here
- glClear(GL_COLOR_BUFFER_BIT);
- glGenVertexArrays(1, &vbo);
- glBindBuffer(GL_ARRAY_BUFFER, vbo);
- //end OpenGL
- glfwSwapBuffers(window);
- glfwPollEvents();
- }
- glfwTerminate();
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement