Skip to content

Commit 7ab3618

Browse files
committed
Didn't have my morning coffee... wrong README.adoc.
1 parent 2a7b1eb commit 7ab3618

File tree

2 files changed

+88
-88
lines changed

2 files changed

+88
-88
lines changed

attachments/android/README.adoc

Lines changed: 52 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1,51 +1,67 @@
1-
= Android Project for Vulkan Game Engine Tutorial
1+
= Android Project for Vulkan Tutorial
22

3-
This Android project allows you to run the Game Engine's example code in Android. It demonstrates how to manage a non-trivial project across Desktop and mobile environments from the same code base.
3+
This Android project allows you to run different chapters of the Vulkan Tutorial on Android devices.
44

5-
== Project Overview
5+
== Selecting a Chapter
66

7-
The Vulkan Game Engine Tutorial is a comprehensive learning project that showcases modern graphics programming using the Vulkan API.
8-
This Android port enables running the same engine code on mobile devices, demonstrating cross-platform development practices.
7+
By default, the project builds and runs the `34_android` chapter. You can select a different chapter by setting the `chapter` property in your Gradle build.
98

10-
== Prerequisites
9+
=== Available Chapters
1110

12-
* Android Studio 4.2 or higher
13-
* Android NDK r21 or higher
14-
* CMake 3.10+
15-
* Vulkan SDK
16-
* Android device with Vulkan support (Android 7.0+)
11+
* `34_android`: The Android chapter that uses tinyobjloader to load OBJ models
12+
* `35_gltf_ktx`: The glTF and KTX chapter that uses tinygltf to load glTF models and KTX to load KTX2 textures
1713

18-
== Building and Running
14+
=== How to Select a Chapter
1915

20-
1. Open the project in Android Studio
21-
2. Sync Gradle files
22-
3. Build the project
23-
4. Run on your Android device or emulator
16+
==== From the Command Line
2417

25-
== Project Structure
18+
[source,bash]
19+
----
20+
./gradlew assembleDebug -Pchapter=35_gltf_ktx
21+
----
2622

27-
* `app/` - Android-specific code and resources
28-
* `src/` - Shared C++ engine code
29-
* `assets/` - Shared game assets and shaders (automatically copied by Gradle)
30-
** `models/` - GLTF/GLB model files
31-
** `shaders/` - Compiled SPIR-V shader files
32-
** `textures/` - Texture assets
33-
* `CMake/` - Build configuration files
23+
==== From Android Studio
3424

35-
== Asset Management
25+
1. Edit the `gradle.properties` file in the project root directory
26+
2. Add the following line:
27+
+
28+
[source]
29+
----
30+
chapter=35_gltf_ktx
31+
----
32+
3. Sync the project and build
3633

37-
The project uses Gradle to automatically handle asset deployment.
38-
Place your assets in the following source locations:
34+
== Adding New Chapters
3935

40-
* Source assets location: `<project_root>/assets/`
41-
* Gradle will automatically copy assets to: `app/src/main/assets/`
42-
* Asset changes will be synchronized during build
36+
To add support for a new chapter:
4337

44-
== Key Components
38+
1. Add the chapter name to the `SUPPORTED_CHAPTERS` list in `app/src/main/cpp/CMakeLists.txt`
39+
2. Add any chapter-specific libraries and compile definitions in the same file
40+
3. Make sure the chapter's source file exists in the `attachments` directory
4541

46-
* GLTF model loading support
47-
* Cross-platform rendering pipeline
48-
* JSON configuration using nlohmann_json
49-
* Unified asset management system with Gradle automation
42+
For example, to add support for a hypothetical `36_new_feature` chapter:
5043

51-
The project demonstrates professional-grade techniques for maintaining a single codebase that targets both desktop and mobile platforms while leveraging modern C++20 features and Vulkan's cross-platform capabilities.
44+
[source,cmake]
45+
----
46+
# Define the list of supported chapters
47+
set(SUPPORTED_CHAPTERS
48+
"34_android"
49+
"35_gltf_ktx"
50+
"36_new_feature"
51+
)
52+
53+
# Add chapter-specific libraries and definitions
54+
if(CHAPTER STREQUAL "34_android")
55+
# ...
56+
elseif(CHAPTER STREQUAL "35_gltf_ktx")
57+
# ...
58+
elseif(CHAPTER STREQUAL "36_new_feature")
59+
target_link_libraries(vulkan_tutorial_android
60+
# Add any required libraries here
61+
)
62+
63+
target_compile_definitions(vulkan_tutorial_android PRIVATE
64+
# Add any required compile definitions here
65+
)
66+
endif()
67+
----
Lines changed: 36 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -1,67 +1,51 @@
1-
= Android Project for Vulkan Tutorial
1+
= Android Project for Vulkan Game Engine Tutorial
22

3-
This Android project allows you to run different chapters of the Vulkan Tutorial on Android devices.
3+
This Android project allows you to run the Game Engine's example code in Android. It demonstrates how to manage a non-trivial project across Desktop and mobile environments from the same code base.
44

5-
== Selecting a Chapter
5+
== Project Overview
66

7-
By default, the project builds and runs the `34_android` chapter. You can select a different chapter by setting the `chapter` property in your Gradle build.
7+
The Vulkan Game Engine Tutorial is a comprehensive learning project that showcases modern graphics programming using the Vulkan API.
8+
This Android port enables running the same engine code on mobile devices, demonstrating cross-platform development practices.
89

9-
=== Available Chapters
10+
== Prerequisites
1011

11-
* `34_android`: The Android chapter that uses tinyobjloader to load OBJ models
12-
* `35_gltf_ktx`: The glTF and KTX chapter that uses tinygltf to load glTF models and KTX to load KTX2 textures
12+
* Android Studio 4.2 or higher
13+
* Android NDK r21 or higher
14+
* CMake 3.10+
15+
* Vulkan SDK
16+
* Android device with Vulkan support (Android 7.0+)
1317

14-
=== How to Select a Chapter
18+
== Building and Running
1519

16-
==== From the Command Line
20+
1. Open the project in Android Studio
21+
2. Sync Gradle files
22+
3. Build the project
23+
4. Run on your Android device or emulator
1724

18-
[source,bash]
19-
----
20-
./gradlew assembleDebug -Pchapter=35_gltf_ktx
21-
----
25+
== Project Structure
2226

23-
==== From Android Studio
27+
* `app/` - Android-specific code and resources
28+
* `src/` - Shared C++ engine code
29+
* `assets/` - Shared game assets and shaders (automatically copied by Gradle)
30+
** `models/` - GLTF/GLB model files
31+
** `shaders/` - Compiled SPIR-V shader files
32+
** `textures/` - Texture assets
33+
* `CMake/` - Build configuration files
2434

25-
1. Edit the `gradle.properties` file in the project root directory
26-
2. Add the following line:
27-
+
28-
[source]
29-
----
30-
chapter=35_gltf_ktx
31-
----
32-
3. Sync the project and build
35+
== Asset Management
3336

34-
== Adding New Chapters
37+
The project uses Gradle to automatically handle asset deployment.
38+
Place your assets in the following source locations:
3539

36-
To add support for a new chapter:
40+
* Source assets location: `<project_root>/assets/`
41+
* Gradle will automatically copy assets to: `app/src/main/assets/`
42+
* Asset changes will be synchronized during build
3743

38-
1. Add the chapter name to the `SUPPORTED_CHAPTERS` list in `app/src/main/cpp/CMakeLists.txt`
39-
2. Add any chapter-specific libraries and compile definitions in the same file
40-
3. Make sure the chapter's source file exists in the `attachments` directory
44+
== Key Components
4145

42-
For example, to add support for a hypothetical `36_new_feature` chapter:
46+
* GLTF model loading support
47+
* Cross-platform rendering pipeline
48+
* JSON configuration using nlohmann_json
49+
* Unified asset management system with Gradle automation
4350

44-
[source,cmake]
45-
----
46-
# Define the list of supported chapters
47-
set(SUPPORTED_CHAPTERS
48-
"34_android"
49-
"35_gltf_ktx"
50-
"36_new_feature"
51-
)
52-
53-
# Add chapter-specific libraries and definitions
54-
if(CHAPTER STREQUAL "34_android")
55-
# ...
56-
elseif(CHAPTER STREQUAL "35_gltf_ktx")
57-
# ...
58-
elseif(CHAPTER STREQUAL "36_new_feature")
59-
target_link_libraries(vulkan_tutorial_android
60-
# Add any required libraries here
61-
)
62-
63-
target_compile_definitions(vulkan_tutorial_android PRIVATE
64-
# Add any required compile definitions here
65-
)
66-
endif()
67-
----
51+
The project demonstrates professional-grade techniques for maintaining a single codebase that targets both desktop and mobile platforms while leveraging modern C++20 features and Vulkan's cross-platform capabilities.

0 commit comments

Comments
 (0)