daily pastebin goal
57%
SHARE
TWEET

Untitled

a guest Jan 20th, 2019 67 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include <epoxy/gl.h>
  2. #include <GLFW/glfw3.h>
  3. #include <stdlib.h>
  4.  
  5. int main(int argc, char* argv[]) {
  6.     if(!glfwInit()) {
  7.         return EXIT_FAILURE;
  8.     }
  9.  
  10.     // Enable OpenGL3.3 Core
  11.     glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 3);
  12.     glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 3);
  13.     glfwWindowHint(GLFW_OPENGL_FORWARD_COMPAT, GL_TRUE);
  14.     glfwWindowHint(GLFW_OPENGL_PROFILE, GLFW_OPENGL_CORE_PROFILE);
  15.  
  16.     GLFWwindow* win = glfwCreateWindow(1280, 720, "test", NULL, NULL);
  17.     if(!win) {
  18.         return EXIT_FAILURE;
  19.     }
  20.  
  21.     while(!glfwWindowShouldClose(win)) {
  22.         glfwMakeContextCurrent(win);
  23.         glfwSwapBuffers(win);
  24.         glfwPollEvents();
  25.     }
  26.  
  27.     glfwTerminate();
  28.  
  29.     return EXIT_SUCCESS;
  30. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top