当前位置:网站首页>Part 1: building OpenGL environment
Part 1: building OpenGL environment
2022-06-24 07:57:00 【Code Knight】
Catalog
(1) download GLFW Source package
(1) download CMake Compiler tools
(4) Select the local vs Version Click finish:
(5) Click again on the configure
(1) stay build You can see in the folder GLFW.sln file :
(2) Use vs2019 open GLFW.sln file , Click generate solution
(1) Can be in src\Debug There is... In the folder glfw3.lib file
(2) Create a new folder ( Random names ) Then create two subfolders Includes and Libs
(4) take GLFW File put in Includes Folder
(5) take glfw3.lib File put in Libs Folder
(6) open vs Create a VC++ Empty item
(8) Include directory add :D:\OpenGL_Link\Includes; Library Directory add :D:\OpenGL_Link\Libs;
3、 download glad Compressed package
One 、GLFW
1、 What is? GLFW

2、 structure GLFW
(1) download GLFW Source package

(2) decompression
Two 、CMake
1、 What is? CMake

2、 install
(1) download CMake Compiler tools

(2) install CMake
Check add environment variable

(3) open GUI Interface
Set the first two paths and click configure:

(4) Select the local vs Version Click finish:
(5) Click again on the configure

(6) Next click generate:

3、 compile
(1) stay build You can see in the folder GLFW.sln file :
(2) Use vs2019 open GLFW.sln file , Click generate solution
4、 link
(1) Can be in src\Debug There is... In the folder glfw3.lib file

(2) Create a new folder ( Random names ) Then create two subfolders Includes and Libs

(3) find GLFW Folder

(4) take GLFW File put in Includes Folder

(5) take glfw3.lib File put in Libs Folder

(6) open vs Create a VC++ Empty item

(7) Modify properties

(8) Include directory add :D:\OpenGL_Link\Includes; Library Directory add :D:\OpenGL_Link\Libs;

(9) Input options in the linker , add to glfw3.lib and opengl32.lib(glfw3.lib That's the front. Libs In a folder ,opengl32.lib stay windows The following is the installation VS I brought it with me ): Click OK after configuration .

3、 ... and 、GLAD
1、 What is? GLAD

2、 Online configuration
Online configuration , And then click GENERATE, The following page pops up , download glad.zip:

3、 download glad Compressed package

4、 decompression
5、 Project configuration
find glad Medium glad and KHR Folder

Put it in GLFW In the same directory

And then copy it src\glad.c file
Add to the project you just created
Four 、 Output window
1、 Create a new one main.cpp
2、 Enter the code :
#include <glad/glad.h>
#include <GLFW/glfw3.h>
#include <iostream>
int main() {
std::cout << "hello world!" << std::endl;
return 0;
}3、 Compile operation :

--END--
边栏推荐
猜你喜欢

从 jsonpath 和 xpath 到 SPL

Free ICP domain name filing interface

ImportError: cannot import name ‘process_ pdf‘ from ‘pdfminer. Pdfinterp 'error completely resolved

Configure your own free Internet domain name with ngrok

SCM stm32f103rb, BLDC DC motor controller design, schematic diagram, source code and circuit scheme

语料库数据处理个案实例(读取多个文本文件、读取一个文件夹下面指定的多个文件、解码错误、读取多个子文件夹文本、多个文件批量改名)

希尔伯特-黄变换

Hilbert Huang Transform

用Ngrok 配置属于自己的免费外网域名

Basics of reptile B1 - scrapy (learning notes of station B)
随机推荐
ImportError: cannot import name ‘process_pdf‘ from ‘pdfminer.pdfinterp‘错误完全解决
4-operation list (loop structure)
js实现查看一个数组对象中是否包含另一个数组对象中的值
Q & A on cloud development cloudbase hot issues of "Huage youyue phase I"
3-列表简介
火线,零线,地线,你知道这三根线的作用是什么吗?
POM configuration provided and test
Part 2: drawing a window
希尔伯特-黄变换
Backup and restore SQL Server Databases locally
报错“Computation failed in `stat_summary_hex()`”
语料库数据处理个案实例(句子检索相关个案)
第 1 篇:搭建OpenGL环境
. No main manifest attribute in jar
New features of PHP: bytecode cache and built-in server
《canvas》之第2章 直线图形
GPU is not used when the code is running
Chrono usage notes
Leetcode 174 Dungeon games (June 23, 2022)
Cold thinking on the hot track: multiplier effect is the fundamental requirement of East West calculation







