Skip to content

Commit e14cec1

Browse files
committed
Fix formatting
1 parent dc0662a commit e14cec1

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

en/14_Android.adoc

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,7 @@ Every Android application requires a manifest file that declares important infor
112112
----
113113

114114
Key points:
115+
115116
* We specify a minimum SDK version of 24 (Android 7.0), which is required for Vulkan support.
116117
* We declare that our app uses Vulkan with specific version requirements.
117118
* We set up our main activity (VulkanActivity) as the entry point for our application.
@@ -147,6 +148,7 @@ public class VulkanActivity extends GameActivity {
147148
----
148149

149150
Key points:
151+
150152
* We extend GameActivity from the Android Game SDK, which provides a more optimized bridge between Java and native code.
151153
* GameActivity offers better performance for games and graphics-intensive applications compared to NativeActivity.
152154
* We load our native library ("vulkan_tutorial_android") which contains our Vulkan implementation.
@@ -252,6 +254,7 @@ dependencies {
252254
----
253255

254256
Key points:
257+
255258
* We specify the minimum SDK version as 24 (Android 7.0) for Vulkan support.
256259
* We configure CMake to build our native code.
257260
* We include the game-activity dependency for better performance.
@@ -382,9 +385,10 @@ target_link_libraries(vulkan_tutorial_android
382385
----
383386

384387
Key points:
388+
385389
* We find the Vulkan package and include the game-activity library instead of native_app_glue.
386390
* We set up shader compilation tools and define a function to compile shaders.
387-
* We set the C++ standard to C++20 and create a Vulkan C++ module.
391+
* We set the C{pp} standard to C{pp}20 and create a Vulkan C{pp} module.
388392
* We set up shader compilation for the 34_android chapter, copying shader source files from the main project.
389393
* We add the main native library, which uses the 34_android.cpp file from the main project and a bridge file to connect with GameActivity.
390394
* We link against the necessary libraries, including game-activity.
@@ -442,6 +446,7 @@ extern "C" {
442446
----
443447

444448
This bridge code:
449+
445450
1. Creates an android_app structure compatible with our Vulkan code
446451
2. Sets up the necessary connections between GameActivity and our code
447452
3. Calls the android_main function in our 34_android.cpp file
@@ -669,6 +674,7 @@ int main() {
669674
Our cross-platform approach leverages the compiler's built-in platform detection capabilities. Since the `__ANDROID__` macro is automatically defined by the compiler when building for Android, we don't need to explicitly define platform macros in our build system.
670675

671676
This approach has several advantages:
677+
672678
1. *Simplicity*: We don't need to maintain platform-specific compile definitions in our CMake files.
673679
2. *Reliability*: We rely on standard compiler behavior rather than custom definitions.
674680
3. *Maintainability*: Less build system configuration means fewer potential points of failure.

0 commit comments

Comments
 (0)