#include #include #define X 16 #define Y 16 #define GRID_SIZE X*Y #define STR_EXPAND(tok) #tok #define STR(tok) STR_EXPAND(tok) int main() { if (!glfwInit()) return -1; glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 4); glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 3); glfwWindowHint(GLFW_RESIZABLE, GLFW_FALSE); GLFWwindow *w = glfwCreateWindow(800, 800, "game of life", NULL, NULL); if (!w) return -2; glfwMakeContextCurrent(w); if (glewInit() != GLEW_OK) return -3; glfwShowWindow(w); glViewport(0, 0, 800, 800); while (!glfwWindowShouldClose(w)) { glfwPollEvents(); glClear(GL_COLOR_BUFFER_BIT); glfwSwapBuffers(w); } glfwTerminate(); return 0; }