# opengl_template **Repository Path**: CatBSD/opengl_template ## Basic Information - **Project Name**: opengl_template - **Description**: No description available - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2024-07-28 - **Last Updated**: 2024-07-28 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # opengl_template > openGL入门环境 ## 1.搭建openGL开发环境 ### 1.1 下载GLFW和glad ```html https://www.glfw.org/download.html https://glad.dav1d.de ``` ### 1.2 编译GLFW ```shell # 在/GLFW根目录下操作 mkdir build cd build cmake ../ -G # 查看自己需要编译的Makefiles类型 cmake ../ -G "MinGW Makefiles" # 有些环境下找不到make,就需要手动指定了 cmake ../ -G "MinGW Makefiles" -D CMAKE_MAKE_PROGRAM=C:\Users\你的用户名\scoop\apps\make\4.4.1\bin\make.exe make # 在build/src目录下找到一个libglfw3.a文件 ``` ### 1.3 搭建项目目录结构 1.将GLFW和glad文件夹下的include里的所有文件夹复制到自己目录的include里面 2.glad的src目录下的glad.c文件复制到项目目录的根目录下 3.将libglfw3.a文件复制到项目目录的lib下