Advertisement
Guest User

Untitled

a guest
Jul 17th, 2013
134
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.58 KB | None | 0 0
  1. #include <GL/glew.h>
  2. #include <GL/glext.h>
  3. #define GL_GLEXT_PROTOTYPES
  4. #include <GLFW/glfw3.h>
  5.  
  6. GLuint vbo;
  7.  
  8. int main() {
  9.  
  10. GLFWwindow* window;
  11. glfwInit();
  12. window = glfwCreateWindow(1280, 720, "Hello OpenGL!", NULL, NULL);
  13. glfwMakeContextCurrent(window);
  14.  
  15.  
  16. while (!glfwWindowShouldClose(window)) {
  17.  
  18. //OpenGL here
  19.  
  20. glClear(GL_COLOR_BUFFER_BIT);
  21.  
  22. glGenVertexArrays(1, &vbo);
  23. glBindBuffer(GL_ARRAY_BUFFER, vbo);
  24.  
  25.  
  26. //end OpenGL
  27.  
  28. glfwSwapBuffers(window);
  29.  
  30. glfwPollEvents();
  31.  
  32. }
  33.  
  34. glfwTerminate();
  35. return 0;
  36.  
  37. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement