You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: en/Building_a_Simple_Engine/Mobile_Development/01_introduction.adoc
+9-18Lines changed: 9 additions & 18 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,13 +1,6 @@
1
-
::pp: {plus}{plus}
1
+
:pp: {plus}{plus}
2
2
3
3
= Mobile Development: Introduction
4
-
:doctype: book
5
-
:sectnums:
6
-
:sectnumlevels: 4
7
-
:toc: left
8
-
:icons: font
9
-
:source-highlighter: highlightjs
10
-
:source-language: c++
11
4
12
5
== Introduction to Mobile Development
13
6
@@ -17,23 +10,21 @@ Mobile development presents unique challenges and opportunities for Vulkan appli
17
10
18
11
=== What We'll Cover
19
12
20
-
In this chapter, we'll explore:
13
+
This chapter will guide you through the complex landscape of mobile Vulkan development, where desktop assumptions often don't apply. We'll start by examining the platform-specific requirements of Android and iOS, which present unique challenges in setup, lifecycle management, and input handling. Mobile applications face constraints that desktop applications rarely encounter—sudden interruptions, battery concerns, and varying hardware capabilities all require careful consideration in your engine design.
21
14
22
-
* *Platform Considerations for Android and iOS*: We'll discuss the specific requirements and constraints of developing Vulkan applications for Android and iOS, including platform-specific setup, lifecycle management, and input handling.
15
+
Performance optimization takes on critical importance in mobile environments where every watt of power consumption and every millisecond of frame time affects user experience. We'll explore essential techniques like power-of-two texture usage and efficient texture formats, along with mobile-specific optimizations that can mean the difference between smooth performance and user frustration.
23
16
24
-
* *Performance Optimizations for Mobile*: We'll explore techniques for optimizing your engine for mobile hardware, focusing on power-of-two textures, efficient texture formats, and other mobile-specific optimizations.
17
+
Understanding the fundamental architectural differences between mobile and desktop GPUs becomes essential for effective optimization. We'll compare Tile-Based Rendering (TBR) and Immediate Mode Rendering (IMR) approaches, helping you understand why techniques that work well on desktop might perform poorly on mobile, and how to design rendering strategies that leverage mobile GPU strengths.
25
18
26
-
* *Rendering Approaches*: We'll compare Tile-Based Rendering (TBR) and Immediate Mode Rendering (IMR), understanding their implications for mobile GPU architectures.
27
-
28
-
* *Vulkan Extensions for Mobile*: We'll explore extensions like VK_KHR_dynamic_rendering_local_read, VK_KHR_dynamic_rendering, and VK_EXT_shader_tile_image that can significantly improve performance on mobile devices.
19
+
Finally, we'll explore the Vulkan extensions specifically designed for mobile platforms. Extensions like VK_KHR_dynamic_rendering_local_read, VK_KHR_dynamic_rendering, and VK_EXT_shader_tile_image unlock performance opportunities that can dramatically improve your application's efficiency on mobile hardware, transforming acceptable performance into exceptional user experiences.
29
20
30
21
=== Prerequisites
31
22
32
-
Before diving into this chapter, you should be familiar with:
23
+
This chapter represents the culmination of everything we've built throughout the previous chapters, as mobile development requires deep integration with all engine systems. You'll need solid mastery of Vulkan fundamentals and the engine architecture we've developed, since mobile optimization often requires fine-tuning at every level—from resource management and rendering pipelines to memory allocation and synchronization.
24
+
25
+
Modern C++ expertise becomes particularly valuable in mobile development, where performance constraints demand efficient code and careful resource management. C++17 and C++20 features like constexpr, structured bindings, and concepts help create mobile-optimized code that performs well under strict power and thermal limitations.
33
26
34
-
* The basics of Vulkan and our engine architecture from previous chapters
35
-
* Modern C++ concepts, particularly those introduced in C++17 and C++20
36
-
* Basic understanding of mobile development concepts
27
+
Understanding basic mobile development concepts will provide crucial context for the platform-specific decisions we'll make. Mobile applications operate under constraints that desktop applications rarely face—app lifecycle events, varying screen densities, touch input paradigms, and the need to preserve battery life all influence how we design and implement our Vulkan engine for mobile platforms.
37
28
38
29
Let's begin by exploring the platform considerations for Android and iOS.
Copy file name to clipboardExpand all lines: en/Building_a_Simple_Engine/Mobile_Development/03_performance_optimizations.adoc
+12-8Lines changed: 12 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,20 +1,24 @@
1
-
::pp: {plus}{plus}
1
+
:pp: {plus}{plus}
2
2
3
3
= Mobile Development: Performance Optimizations
4
-
:doctype: book
5
-
:sectnums:
6
-
:sectnumlevels: 4
7
-
:toc: left
8
-
:icons: font
9
-
:source-highlighter: highlightjs
10
-
:source-language: c++
11
4
12
5
== Performance Optimizations for Mobile
13
6
14
7
Mobile devices have significantly different hardware constraints compared to desktop systems. In this section, we'll explore key performance optimizations that are essential for achieving good performance on mobile platforms.
15
8
16
9
=== Texture Optimizations
17
10
11
+
To keep the workflow concrete and digestible, think of texture optimization in three steps:
12
+
13
+
1) Step 1: Ensure power‑of‑two (POT) dimensions (resize if needed)
14
+
2) Step 2: Pick a hardware‑compressed format supported by the device (ASTC → ETC2 → BC → fallback)
15
+
3) Step 3: Upload/update the Vulkan image and clean up staging resources
16
+
17
+
[NOTE]
18
+
====
19
+
We focus on mobile‑specific decisions here. For general Vulkan image creation, staging uploads, and descriptor setup, refer back to earlier chapters in the engine series—link:../Engine_Architecture/04_resource_management.adoc[Resource Management], link:../Engine_Architecture/05_rendering_pipeline.adoc[Rendering Pipeline]—or the Vulkan Guide (https://docs.vulkan.org/guide/latest/).
20
+
====
21
+
18
22
Textures are often the largest consumers of memory in a graphics application. Optimizing them is crucial for mobile performance.
This prepares your device to use dynamic rendering and gives access to the commands needed to begin/end a rendering scope without a traditional render pass.
47
+
48
+
===== Describe attachments for this rendering scope
47
49
48
-
// Begin rendering
50
+
We define the color and depth attachments and package them into a VkRenderingInfoKHR. Think of this as an inline, one-off description of what would normally be baked into render pass/framebuffer objects.
Copy file name to clipboardExpand all lines: en/Building_a_Simple_Engine/Mobile_Development/index.adoc
+2-8Lines changed: 2 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,13 +1,7 @@
1
-
::pp: {plus}{plus}
1
+
:pp: {plus}{plus}
2
2
3
3
= Mobile Development
4
-
:doctype: book
5
-
:sectnums:
6
-
:sectnumlevels: 4
7
-
:toc: left
8
-
:icons: font
9
-
:source-highlighter: highlightjs
10
-
:source-language: c++
4
+
11
5
12
6
This chapter covers the essential aspects of adapting your Vulkan engine for mobile platforms, focusing on Android and iOS development, performance optimizations, rendering approaches, and mobile-specific Vulkan extensions.
0 commit comments