// 1. Download glew from glew.sourceforge.net
// 2. Download glfw from glfw.org/download.html
// 3a. Copy glfw-3.1.bin.WIN32 and glew-1.11.0 libraries to your project directory
// 3b. You can copy glfw-3.1-bin libraries to your project directory add the src files and compile
// 4. Configure project property for the include and lib files
// 6. Build and run
#include <GL/glew.h>
#include <GLFW/glfw3.h>
#include <stdio.h>
int main()
{
if (!glfwInit()) {
fprintf(stderr, "ERROR: could not start GLFW3\n");
return 1;
}
GLFWwindow* window = glfwCreateWindow(640, 480, "OpenGL - Window Title", NULL, NULL);
if (!window) {
fprintf(stderr, "ERROR: could not open window with GLFW3\n");
glfwTerminate();
return 1;
}
glfwMakeContextCurrent(window);
GLenum err = glewInit();
if (err != GLEW_OK) {
fprintf(stderr, "Error: %s\n", glewGetErrorString(err));
}
glClearColor(0.6f, 0.6f, 0.8f, 1.0f);
while (!glfwWindowShouldClose(window)) {
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
glfwPollEvents();
glfwSwapBuffers(window);
}
glfwTerminate();
return 0;
}
/*
run:
*/