Skip to content

Commit 2ec7a8c

Browse files
committed
Change TargetName
1 parent 89c6fb8 commit 2ec7a8c

File tree

41 files changed

+118
-101
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+118
-101
lines changed

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ macro(SETUP_PROJECT MODE TARGET_NAME STR_TARGET_SOURCES STR_TARGET_LIBS)
1313
else()
1414
if(${MODE} STREQUAL "EXE")
1515
add_executable( ${TARGET_NAME} ${LIST_TARGET_SOURCES})
16-
set(INSTALL_DIR "bin/${FOLDER_NAME}")
16+
set(INSTALL_DIR "bin")
1717
install (TARGETS ${TARGET_NAME} DESTINATION ${INSTALL_DIR})
1818
elseif(${MODE} STREQUAL "LIB")
1919
add_library(${TARGET_NAME} ${LIST_TARGET_SOURCES})

README.md

Lines changed: 37 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44

55
>https://learnopengl-cn.github.io/
66
>
7-
>欢迎来到OpenGL的世界。这个工程只是我([Joey de Vries](http://joeydevries.com/))的一次小小的尝试,希望能够建立起一个完善的OpenGL教学平台。无论你学习OpenGL是为了学业,找工作,或仅仅是因为兴趣,这个网站都将能够教会你**现代**(Core-profile) OpenGL从基础,中级,到高级的知识。LearnOpenGL的目标是使用易于理解的形式,使用清晰的例子,展现现代OpenGL的所有知识点,并与此同时为你以后的学习提供有用的参考。
87
98
## 1.2 项目
109

@@ -19,46 +18,50 @@
1918
- 锻炼 CMake 搭工程能力
2019
- 编写好用的 Utility 部分的代码
2120

22-
## 1.3 工程结构
21+
## 1.3 笔记
22+
23+
详见 `notes`
24+
25+
## 1.4 工程结构
2326

2427
```
2528
/01_Introduction
26-
-01_CreateWindow
27-
-02_Triangle
28-
-03_Shader
29-
-04_Texture
30-
-05_Transform
31-
-06_Croodinate
32-
-07_Camera
29+
-01_01_CreateWindow
30+
-01_02_Triangle
31+
-01_03_Shader
32+
-01_04_Texture
33+
-01_05_Transform
34+
-01_06_Croodinate
35+
-01_07_Camera
3336
/02_Lighting
34-
-01_Color
35-
-02_BasicLighting
36-
-03_Material
37-
-04_LightingMap
38-
-05_LightCaster
39-
-06_MultiLight
37+
-02_01_Color
38+
-02_02_BasicLighting
39+
-02_03_Material
40+
-02_04_LightingMap
41+
-02_05_LightCaster
42+
-02_06_MultiLight
4043
/03_LoadModel
41-
-01_LoadModel
44+
-03_01_LoadModel
4245
/04_AdvanceOGL
43-
-01_DepthTest
44-
-02_StencilTest
45-
-03_Blend
46-
-04_FrameBuffer
47-
-05_CubeMap
48-
-06_UBO
49-
-07_GS
50-
-08_Instance
46+
-04_01_DepthTest
47+
-04_02_StencilTest
48+
-04_03_Blend
49+
-04_04_FrameBuffer
50+
-04_05_CubeMap
51+
-04_06_UBO
52+
-04_07_GS
53+
-04_08_Instance
5154
/05_AdvanceLighting
52-
-01_BlinnPhong
53-
-02_Gamma
54-
-03_ShadowMap
55-
-04_PointShadow
56-
-05_NormalMap
57-
-06_ParallaxMap
58-
-07_HDR
59-
-08_Bloom
60-
-09_DeferedShading
61-
-10_SSAO
55+
-05_01_BlinnPhong
56+
-05_02_Gamma
57+
-05_03_ShadowMap
58+
-05_04_PointShadow
59+
-05_05_NormalMap
60+
-05_06_ParallaxMap
61+
-05_07_HDR
62+
-05_08_Bloom
63+
-05_09_DeferedShading
64+
-05_10_SSAO
6265
/LIBs
6366
-glad
6467
/LOGL

run_all.bat

Lines changed: 32 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,64 +1,64 @@
1-
start ./bin/01_Introduction/01_Window.exe
1+
start ./bin/01_01_Window.exe
22
pause
3-
start ./bin/01_Introduction/02_Triangle.exe
3+
start ./bin/01_02_Triangle.exe
44
pause
5-
start ./bin/01_Introduction/03_Shader.exe
5+
start ./bin/01_03_Shader.exe
66
pause
7-
start ./bin/01_Introduction/04_Texture.exe
7+
start ./bin/01_04_Texture.exe
88
pause
9-
start ./bin/01_Introduction/05_Transform.exe
9+
start ./bin/01_05_Transform.exe
1010
pause
11-
start ./bin/01_Introduction/06_Coordinate.exe
11+
start ./bin/01_06_Coordinate.exe
1212
pause
13-
start ./bin/01_Introduction/07_Camera.exe
13+
start ./bin/01_07_Camera.exe
1414
pause
15-
start ./bin/02_Lighting/01_Color.exe
15+
start ./bin/02_01_Color.exe
1616
pause
17-
start ./bin/02_Lighting/02_BasicLighting.exe
17+
start ./bin/02_02_BasicLighting.exe
1818
pause
19-
start ./bin/02_Lighting/03_Material.exe
19+
start ./bin/02_03_Material.exe
2020
pause
21-
start ./bin/02_Lighting/04_LightingMap.exe
21+
start ./bin/02_04_LightingMap.exe
2222
pause
23-
start ./bin/02_Lighting/05_LightCaster.exe
23+
start ./bin/02_05_LightCaster.exe
2424
pause
25-
start ./bin/02_Lighting/06_MultiLight.exe
25+
start ./bin/02_06_MultiLight.exe
2626
pause
27-
start ./bin/03_LoadModel/01_LoadModel.exe
27+
start ./bin/03_01_LoadModel.exe
2828
pause
29-
start ./bin/04_AdvanceOGL/01_DepthTest.exe
29+
start ./bin/04_01_DepthTest.exe
3030
pause
31-
start ./bin/04_AdvanceOGL/02_StencilTest.exe
31+
start ./bin/04_02_StencilTest.exe
3232
pause
33-
start ./bin/04_AdvanceOGL/03_Blend.exe
33+
start ./bin/04_03_Blend.exe
3434
pause
35-
start ./bin/04_AdvanceOGL/04_FrameBuffer.exe
35+
start ./bin/04_04_FrameBuffer.exe
3636
pause
37-
start ./bin/04_AdvanceOGL/05_CubeMap.exe
37+
start ./bin/04_05_CubeMap.exe
3838
pause
39-
start ./bin/04_AdvanceOGL/06_UBO.exe
39+
start ./bin/04_06_UBO.exe
4040
pause
41-
start ./bin/04_AdvanceOGL/07_GS.exe
41+
start ./bin/04_07_GS.exe
4242
pause
43-
start ./bin/04_AdvanceOGL/08_Instance.exe
43+
start ./bin/04_08_Instance.exe
4444
pause
45-
start ./bin/05_AdvanceLighting/01_BlinnPhong.exe
45+
start ./bin/05_01_BlinnPhong.exe
4646
pause
47-
start ./bin/05_AdvanceLighting/02_Gamma.exe
47+
start ./bin/05_02_Gamma.exe
4848
pause
49-
start ./bin/05_AdvanceLighting/03_ShadowMap.exe
49+
start ./bin/05_03_ShadowMap.exe
5050
pause
51-
start ./bin/05_AdvanceLighting/04_PointShadow.exe
51+
start ./bin/05_04_PointShadow.exe
5252
pause
53-
start ./bin/05_AdvanceLighting/05_NormalMap.exe
53+
start ./bin/05_05_NormalMap.exe
5454
pause
55-
start ./bin/05_AdvanceLighting/06_ParallaxMap.exe
55+
start ./bin/05_06_ParallaxMap.exe
5656
pause
57-
start ./bin/05_AdvanceLighting/07_HDR.exe
57+
start ./bin/05_07_HDR.exe
5858
pause
59-
start ./bin/05_AdvanceLighting/08_Bloom.exe
59+
start ./bin/05_08_Bloom.exe
6060
pause
61-
start ./bin/05_AdvanceLighting/09_DeferedShading.exe
61+
start ./bin/05_09_DeferedShading.exe
6262
pause
63-
start ./bin/05_AdvanceLighting/10_SSAO.exe
63+
start ./bin/05_10_SSAO.exe
6464
pause

src/01_Introduction/01_Window/CMakeLists.txt

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,18 @@
11
#默认使用目录名作为项目名
22
GET_DIR_NAME(DIRNAME)
3-
set(TARGET_NAME ${DIRNAME})
3+
set(TARGET_NAME "${TARGET_PREFIX}${DIRNAME}")
44
#多个源文件用 [空格] 分隔
55
#如:set(STR_TARGET_SOURCES "main.cpp src_2.cpp")
6-
set(STR_TARGET_SOURCES "${DIRNAME}.cpp")
6+
file(GLOB ALL_SOURCES
7+
"${CMAKE_CURRENT_SOURCE_DIR}/*.cpp"
8+
"${CMAKE_CURRENT_SOURCE_DIR}/*.vs"
9+
"${CMAKE_CURRENT_SOURCE_DIR}/*.gs"
10+
"${CMAKE_CURRENT_SOURCE_DIR}/*.fs"
11+
)
12+
set(STR_TARGET_SOURCES "")
13+
foreach(SOURCE ${ALL_SOURCES})
14+
set(STR_TARGET_SOURCES "${STR_TARGET_SOURCES} ${SOURCE}")
15+
endforeach(SOURCE ${ALL_SOURCES})
716
#多个库文件用 [空格] 分隔,如果为空,就输入[一个空格]
817
#如:set(STR_TARGET_LIBS "lib1.lib lib2.lib")
918
set(STR_TARGET_LIBS "glfw3.lib glad Glfw Operation Config EventManager opengl32.lib")

src/01_Introduction/02_Triangle/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#默认使用目录名作为项目名
22
GET_DIR_NAME(DIRNAME)
3-
set(TARGET_NAME ${DIRNAME})
3+
set(TARGET_NAME "${TARGET_PREFIX}${DIRNAME}")
44
#多个源文件用 [空格] 分隔
55
#如:set(STR_TARGET_SOURCES "main.cpp src_2.cpp")
66
file(GLOB ALL_SOURCES

src/01_Introduction/03_Shader/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#默认使用目录名作为项目名
22
GET_DIR_NAME(DIRNAME)
3-
set(TARGET_NAME ${DIRNAME})
3+
set(TARGET_NAME "${TARGET_PREFIX}${DIRNAME}")
44
#多个源文件用 [空格] 分隔
55
#如:set(STR_TARGET_SOURCES "main.cpp src_2.cpp")
66
file(GLOB ALL_SOURCES

src/01_Introduction/04_Texture/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#默认使用目录名作为项目名
22
GET_DIR_NAME(DIRNAME)
3-
set(TARGET_NAME ${DIRNAME})
3+
set(TARGET_NAME "${TARGET_PREFIX}${DIRNAME}")
44
#多个源文件用 [空格] 分隔
55
#如:set(STR_TARGET_SOURCES "main.cpp src_2.cpp")
66
file(GLOB ALL_SOURCES

src/01_Introduction/05_Transform/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#默认使用目录名作为项目名
22
GET_DIR_NAME(DIRNAME)
3-
set(TARGET_NAME ${DIRNAME})
3+
set(TARGET_NAME "${TARGET_PREFIX}${DIRNAME}")
44
#多个源文件用 [空格] 分隔
55
#如:set(STR_TARGET_SOURCES "main.cpp src_2.cpp")
66
file(GLOB ALL_SOURCES

src/01_Introduction/06_Coordinate/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#默认使用目录名作为项目名
22
GET_DIR_NAME(DIRNAME)
3-
set(TARGET_NAME ${DIRNAME})
3+
set(TARGET_NAME "${TARGET_PREFIX}${DIRNAME}")
44
#多个源文件用 [空格] 分隔
55
#如:set(STR_TARGET_SOURCES "main.cpp src_2.cpp")
66
file(GLOB ALL_SOURCES

src/01_Introduction/07_Camera/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#默认使用目录名作为项目名
22
GET_DIR_NAME(DIRNAME)
3-
set(TARGET_NAME ${DIRNAME})
3+
set(TARGET_NAME "${TARGET_PREFIX}${DIRNAME}")
44
#多个源文件用 [空格] 分隔
55
#如:set(STR_TARGET_SOURCES "main.cpp src_2.cpp")
66
file(GLOB ALL_SOURCES

0 commit comments

Comments
 (0)