Skip to content

Commit acfbd6e

Browse files
committed
committing requested changes in stages.
1 parent 1f17074 commit acfbd6e

File tree

7 files changed

+482
-244
lines changed

7 files changed

+482
-244
lines changed

en/Building_a_Simple_Engine/GUI/01_introduction.adoc

Lines changed: 17 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,42 +1,36 @@
1-
::pp: {plus}{plus}
1+
:pp: {plus}{plus}
22

33
= GUI: Introduction
4-
:doctype: book
5-
:sectnums:
6-
:sectnumlevels: 4
7-
:toc: left
8-
:icons: font
9-
:source-highlighter: highlightjs
10-
:source-language: c++
114

125
== Introduction
136

147
Welcome to the "GUI" chapter of our "Building a Simple Engine" series! After implementing a camera system in the previous chapter, we'll now focus on adding a graphical user interface (GUI) to our Vulkan application. A well-designed GUI is essential for creating interactive applications that allow users to control settings, display information, and interact with the 3D scene.
158

169
In this chapter, we'll integrate a popular immediate-mode GUI library called Dear ImGui with our Vulkan engine. Dear ImGui is widely used in the game and graphics industry due to its simplicity, performance, and flexibility. It allows developers to quickly create debug interfaces, tools, and in-game menus without the complexity of traditional retained-mode GUI systems.
1710

18-
In this chapter, we'll focus on:
11+
This chapter will guide you through integrating a professional GUI system into your Vulkan engine. We'll start by setting up Dear ImGui with Vulkan, establishing the foundation for all GUI functionality. The integration requires careful management of Vulkan resources—we'll create dedicated buffers, textures, and pipelines that work alongside your existing rendering systems without interference.
1912

20-
* Setting up Dear ImGui with Vulkan
21-
* Creating and managing Vulkan resources for GUI rendering (buffers, textures, pipeline)
22-
* Handling user input for both 3D navigation and GUI interaction
23-
* Understanding key GUI integration concepts rather than exhaustive widget examples
24-
* Integrating the GUI rendering with our Vulkan rendering pipeline
25-
* Implementing object picking for 3D scene interaction
13+
User input handling becomes more complex when you need to support both 3D scene navigation and GUI interaction. We'll implement a system that can distinguish between input intended for the 3D world and input meant for interface elements, ensuring smooth interaction with both.
14+
15+
Rather than overwhelming you with exhaustive widget examples, we'll focus on the key integration concepts that enable GUI functionality. Understanding these principles will let you implement any interface elements your project needs.
16+
17+
The rendering integration presents interesting challenges—your GUI needs to render on top of your 3D scene without disrupting the existing pipeline. We'll solve this by carefully managing render passes and ensuring proper depth testing and blending.
18+
19+
Finally, we'll implement object picking, which bridges the gap between your GUI and 3D scene. This feature allows users to click on 3D objects and see their properties in the interface, creating a cohesive development environment.
2620

2721
By the end of this chapter, you'll have a functional GUI system that you can use to control your camera, adjust rendering settings, and interact with your 3D scene. This will serve as a foundation for more advanced features in later chapters, such as material editors, scene hierarchies, and debugging tools.
2822

2923
== Prerequisites
3024

31-
Before starting this chapter, you should have completed:
25+
This chapter builds directly on the Camera & Transformations chapter, as we'll extend the camera system we developed there to work seamlessly with GUI interaction. The camera controls need to be aware of when the user is interacting with interface elements versus navigating the 3D scene.
26+
27+
You'll also need a solid understanding of several core Vulkan concepts. The rendering pipeline and command buffer knowledge is crucial because GUI rendering requires careful coordination with your existing 3D rendering—we'll be recording GUI draw calls into the same command buffers while managing different pipeline states.
28+
29+
Buffer and image creation skills are essential since Dear ImGui requires dedicated vertex and index buffers for its geometry, plus texture resources for fonts and any custom UI textures. Understanding descriptor sets and layouts becomes important as we'll need to create descriptors specifically for GUI rendering that don't interfere with your 3D scene descriptors.
30+
31+
Pipeline creation knowledge ties everything together, as we'll build a specialized graphics pipeline for GUI rendering with different vertex input, shaders, and render state than your 3D pipeline.
3232

33-
* The Camera & Transformations chapter, as we'll build upon the camera system we developed there
34-
* Solid understanding of Vulkan concepts, particularly:
35-
** Rendering pipeline and command buffers
36-
** Buffer and image creation
37-
** Descriptor sets and layouts
38-
** Pipeline creation
39-
* Basic understanding of input handling concepts
33+
A basic understanding of input handling concepts will help you follow along as we implement the dual-mode input system that can distinguish between 3D navigation and GUI interaction.
4034

4135
Let's begin by exploring how to implement a professional GUI system with Dear ImGui and Vulkan.
4236

0 commit comments

Comments
 (0)