제일 먼저 필요한 것은 OpenGL context 생성과 창 생성
Building GLFW
https://www.glfw.org/download.html
CMake를 사용해서 프로젝트 관리
// Windows
// define the function’s prototype
typedef void (*GL_GENBUFFERS) (GLsizei, GLuint*);
// find the function and assign it to a function pointer
GL_GENBUFFERS glGenBuffers =
(GL_GENBUFFERS)wglGetProcAddress("glGenBuffers");
// function can now be called as normal
unsigned int buffer;
glGenBuffers(1, &buffer); 위 코드를 보면 복잡하고 다루기 힘들다. GLAD를 사용하면 편하다.GLAD는 복잡하고 힘든 일을 다루는 오픈 소스 라이브러리, 다른 일반적인 오픈 소스 라이브러리와 조금은 다른 환경설정을 가진다. GLAD에 OpenGL 버전에 맞는 기능들을 불러오고 정의하고 싶은 것들을 GLAD 웹 서비스에서 확인해서 사용
위 사이트를 들어가서 체크
#include <glad/glad.h>
설정 코드 참고