Skip to content

Commit a60178c

Browse files
committed
Update CMake command in docs, try to fix ITT CMake warning
1 parent 2f11166 commit a60178c

File tree

16 files changed

+76
-93
lines changed

16 files changed

+76
-93
lines changed

Apps/01-HelloTriangle/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,5 +30,5 @@ target_link_libraries(${TARGET}
3030

3131
set_target_properties(${TARGET}
3232
PROPERTIES
33-
FOLDER Apps/Tutorials
33+
FOLDER Apps
3434
)

Apps/01-HelloTriangle/README.md

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -232,12 +232,13 @@ is powered by the included Methane CMake modules:
232232
include(MethaneApplications)
233233
include(MethaneShaders)
234234
235-
add_methane_application(MethaneHelloTriangle
236-
"HelloTriangleApp.cpp"
237-
"${RESOURCES_DIR}"
238-
"Apps"
239-
"Methane Hello Triangle"
240-
"Tutorial demonstrating colored triangle rendering with Methane Kit."
235+
add_methane_application(
236+
TARGET ${TARGET}
237+
NAME "Methane Hello Triangle"
238+
DESCRIPTION "Tutorial demonstrating colored triangle rendering with Methane Kit."
239+
INSTALL_DIR "Apps"
240+
SOURCES
241+
HelloTriangleApp.cpp
241242
)
242243
243244
add_methane_shaders_source(

Apps/02-HelloCube/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ foreach(VARIANT ${SIMPLE_VARIANT} ${UNIFORMS_VARIANT})
4242

4343
set_target_properties(${TARGET}
4444
PROPERTIES
45-
FOLDER Apps/Tutorials
45+
FOLDER Apps
4646
)
4747

4848
endforeach()

Apps/02-HelloCube/README.md

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,9 @@
77
This tutorial demonstrates colored cube rendering implemented in just 220 lines of code using Methane Kit:
88
- [HelloCubeApp.cpp](HelloCubeApp.cpp)
99
- [Shaders/HelloCube.hlsl](Shaders/HelloCube.hlsl)
10+
- [Shaders/HelloCubeUniforms.h](Shaders/HelloCubeUniforms.h)
1011

11-
Tutorial demonstrates the following Methane Kit features and techniques:
12+
Tutorial demonstrates the following Methane Kit features and techniques additionally to demonstrated in [Hello Triangle](../01-HelloTriangle):
1213
- **Simple version** (when macros `UNIFORMS_BUFFER_ENABLED` is not defined):
1314
- Create vertex and index buffers on GPU and filling them with data from CPU.
1415
- Generate cube mesh vertices and indices data with custom vertex layout.
@@ -615,15 +616,13 @@ coordinates on the GPU in vertex shader, which is much more efficient.
615616
CMake build configuration [CMakeLists.txt](CMakeLists.txt) of the application is powered by the included Methane CMake modules.
616617
617618
```cmake
618-
add_methane_application(MethaneHelloCube
619-
HelloCubeApp.cpp
620-
"${RESOURCES_DIR}"
621-
"Apps"
622-
"Methane Hello Cube"
623-
"Tutorial demonstrating colored rotating cube rendering with Methane Kit."
624-
"${METHANE_COPYRIGHT}"
625-
"${METHANE_VERSION_SHORT}"
626-
"${METHANE_VERSION_BUILD}"
619+
add_methane_application(
620+
TARGET MethaneHelloCube
621+
NAME "Methane Hello Cube"
622+
DESCRIPTION "Tutorial demonstrating colored rotating cube rendering with Methane Kit."
623+
INSTALL_DIR "Apps"
624+
SOURCES
625+
HelloCubeApp.cpp
627626
)
628627
629628
add_methane_shaders_source(

Apps/03-TexturedCube/CMakeLists.txt

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,6 @@ include(MethaneApplications)
44
include(MethaneShaders)
55
include(MethaneResources)
66

7-
set(TEXTURES_DIR ${RESOURCES_DIR}/Textures)
8-
set(TEXTURES ${TEXTURES_DIR}/MethaneBubbles.jpg)
9-
107
add_methane_application(
118
TARGET ${TARGET}
129
NAME "Methane Textured Cube"
@@ -18,6 +15,8 @@ add_methane_application(
1815
Shaders/TexturedCubeUniforms.h
1916
)
2017

18+
set(TEXTURES_DIR ${RESOURCES_DIR}/Textures)
19+
set(TEXTURES ${TEXTURES_DIR}/MethaneBubbles.jpg)
2120
add_methane_embedded_textures(${TARGET} "${TEXTURES_DIR}" "${TEXTURES}")
2221

2322
add_methane_shaders_source(
@@ -38,5 +37,5 @@ target_link_libraries(${TARGET}
3837

3938
set_target_properties(${TARGET}
4039
PROPERTIES
41-
FOLDER Apps/Tutorials
40+
FOLDER Apps
4241
)

Apps/03-TexturedCube/README.md

Lines changed: 9 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -552,26 +552,19 @@ include(MethaneApplications)
552552
include(MethaneShaders)
553553
include(MethaneResources)
554554
555-
set(SOURCES
556-
TexturedCubeApp.h
557-
TexturedCubeApp.cpp
558-
Shaders/TexturedCubeUniforms.h
555+
add_methane_application(
556+
TARGET MethaneTexturedCube
557+
NAME "Methane Textured Cube"
558+
DESCRIPTION "Tutorial demonstrating textured rotating cube rendering with Methane Kit."
559+
INSTALL_DIR "Apps"
560+
SOURCES
561+
TexturedCubeApp.h
562+
TexturedCubeApp.cpp
563+
Shaders/TexturedCubeUniforms.h
559564
)
560565
561566
set(TEXTURES_DIR ${RESOURCES_DIR}/Textures)
562567
set(TEXTURES ${TEXTURES_DIR}/MethaneBubbles.jpg)
563-
564-
add_methane_application(MethaneTexturedCube
565-
"${SOURCES}"
566-
"${RESOURCES_DIR}"
567-
"Apps"
568-
"Methane Textured Cube"
569-
"Tutorial demonstrating textured rotating cube rendering with Methane Kit."s
570-
"${METHANE_COPYRIGHT}"
571-
"${METHANE_VERSION_SHORT}"
572-
"${METHANE_VERSION_BUILD}"
573-
)
574-
575568
add_methane_embedded_textures(MethaneTexturedCube "${TEXTURES_DIR}" "${TEXTURES}")
576569
577570
add_methane_shaders_source(

Apps/04-ShadowCube/CMakeLists.txt

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,6 @@ include(MethaneApplications)
44
include(MethaneShaders)
55
include(MethaneResources)
66

7-
set(TEXTURES_DIR ${RESOURCES_DIR}/Textures)
8-
set(TEXTURES
9-
${TEXTURES_DIR}/MethaneBubbles.jpg
10-
${TEXTURES_DIR}/MarbleWhite.jpg
11-
)
12-
137
add_methane_application(
148
TARGET ${TARGET}
159
NAME "Methane Shadow Cube"
@@ -21,6 +15,11 @@ add_methane_application(
2115
Shaders/ShadowCubeUniforms.h
2216
)
2317

18+
set(TEXTURES_DIR ${RESOURCES_DIR}/Textures)
19+
set(TEXTURES
20+
${TEXTURES_DIR}/MethaneBubbles.jpg
21+
${TEXTURES_DIR}/MarbleWhite.jpg
22+
)
2423
add_methane_embedded_textures(${TARGET} "${TEXTURES_DIR}" "${TEXTURES}")
2524

2625
add_methane_shaders_source(
@@ -42,5 +41,5 @@ target_link_libraries(${TARGET}
4241

4342
set_target_properties(${TARGET}
4443
PROPERTIES
45-
FOLDER Apps/Tutorials
44+
FOLDER Apps
4645
)

Apps/04-ShadowCube/README.md

Lines changed: 10 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ This tutorial demonstrates rendering shadow of the textured cube on the floor pl
1010
- [Shaders/ShadowCubeUniforms.h](Shaders/ShadowCubeUniforms.h)
1111
- [Shaders/ShadowCube.hlsl](Shaders/ShadowCube.hlsl)
1212

13-
Tutorial demonstrates using of the following Methane Kit features additionally to features demonstrated in [TexturedCube](../02-TexturedCube) tutorial:
13+
Tutorial demonstrates using of the following Methane Kit features additionally to features demonstrated in [TexturedCube](../03-TexturedCube) tutorial:
1414
- Render with multiple render passes;
1515
- Use texture as render target attachment in one pass and as an input program binding in another pass;
1616
- Compile and loading shaders code with macro-definitions to render state programs;
@@ -744,29 +744,22 @@ include(MethaneApplications)
744744
include(MethaneShaders)
745745
include(MethaneResources)
746746
747-
set(SOURCES
748-
ShadowCubeApp.h
749-
ShadowCubeApp.cpp
747+
add_methane_application(
748+
TARGET ${TARGET}
749+
NAME "Methane Shadow Cube"
750+
DESCRIPTION "Tutorial demonstrating shadow and final render passes done with Methane Kit."
751+
INSTALL_DIR "Apps"
752+
SOURCES
753+
ShadowCubeApp.h
754+
ShadowCubeApp.cpp
755+
Shaders/ShadowCubeUniforms.h
750756
)
751757
752-
set(SHADERS_HLSL ${CMAKE_CURRENT_SOURCE_DIR}/Shaders/ShadowCube.hlsl)
753758
set(TEXTURES_DIR ${RESOURCES_DIR}/Textures)
754759
set(TEXTURES
755760
${TEXTURES_DIR}/MethaneBubbles.jpg
756761
${TEXTURES_DIR}/MarbleWhite.jpg
757762
)
758-
759-
add_methane_application(MethaneShadowCube
760-
"${SOURCES}"
761-
"${RESOURCES_DIR}"
762-
"Apps"
763-
"Methane Shadow Cube"
764-
"Tutorial of the shadow pass rendering with Methane Kit."
765-
"${METHANE_COPYRIGHT}"
766-
"${METHANE_VERSION_SHORT}"
767-
"${METHANE_VERSION_BUILD}"
768-
)
769-
770763
add_methane_embedded_textures(MethaneShadowCube "${TEXTURES_DIR}" "${TEXTURES}")
771764
772765
add_methane_shaders_source(

Apps/05-Typography/CMakeLists.txt

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,6 @@
11
include(MethaneApplications)
22

33
set(TARGET MethaneTypography)
4-
set(FONTS
5-
${RESOURCES_DIR}/Fonts/Roboto/Roboto-Regular.ttf
6-
${RESOURCES_DIR}/Fonts/Playball/Playball-Regular.ttf
7-
${RESOURCES_DIR}/Fonts/SawarabiMincho/SawarabiMincho-Regular.ttf
8-
)
94

105
add_methane_application(
116
TARGET ${TARGET}
@@ -19,6 +14,11 @@ add_methane_application(
1914
TypographyAppController.cpp
2015
)
2116

17+
set(FONTS
18+
${RESOURCES_DIR}/Fonts/Roboto/Roboto-Regular.ttf
19+
${RESOURCES_DIR}/Fonts/Playball/Playball-Regular.ttf
20+
${RESOURCES_DIR}/Fonts/SawarabiMincho/SawarabiMincho-Regular.ttf
21+
)
2222
add_methane_embedded_fonts(${TARGET} "${RESOURCES_DIR}" "${FONTS}")
2323

2424
target_link_libraries(${TARGET}
@@ -28,5 +28,5 @@ target_link_libraries(${TARGET}
2828

2929
set_target_properties(${TARGET}
3030
PROPERTIES
31-
FOLDER Apps/Tutorials
31+
FOLDER Apps
3232
)

Apps/05-Typography/README.md

Lines changed: 11 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -356,29 +356,23 @@ bool TypographyApp::Render()
356356
```cmake
357357
include(MethaneApplications)
358358
359-
set(SOURCES
360-
TypographyApp.h
361-
TypographyApp.cpp
362-
TypographyAppController.h
363-
TypographyAppController.cpp
359+
add_methane_application(
360+
TARGET MethaneTypography
361+
NAME "Methane Typography"
362+
DESCRIPTION "Tutorial demonstrating dynamic text rendering and font atlases management with Methane Kit."
363+
INSTALL_DIR "Apps"
364+
SOURCES
365+
TypographyApp.h
366+
TypographyApp.cpp
367+
TypographyAppController.h
368+
TypographyAppController.cpp
364369
)
370+
365371
set(FONTS
366372
${RESOURCES_DIR}/Fonts/Roboto/Roboto-Regular.ttf
367373
${RESOURCES_DIR}/Fonts/Playball/Playball-Regular.ttf
368374
${RESOURCES_DIR}/Fonts/SawarabiMincho/SawarabiMincho-Regular.ttf
369375
)
370-
371-
add_methane_application(MethaneTypography
372-
"${SOURCES}"
373-
"${RESOURCES_DIR}"
374-
"Apps"
375-
"Methane Typography"
376-
"Dynamic text rendering and fonts management tutorial with Methane Kit."
377-
"${METHANE_COPYRIGHT}"
378-
"${METHANE_VERSION_SHORT}"
379-
"${METHANE_VERSION_BUILD}"
380-
)
381-
382376
add_methane_embedded_fonts(MethaneTypography "${RESOURCES_DIR}" "${FONTS}")
383377
384378
target_link_libraries(MethaneTypography

0 commit comments

Comments
 (0)