layout | title | permalink |
---|---|---|
page |
Hello World |
/SettingTheScene/HelloWorld |
To download the tutorial exercises, clone the vsgTutorial repository. It contains both the book contents and the exercises:
cd ${PROJECT_DIR}
git clone https://github.com/vsg-dev/vsgTutorial.git
To build the hello world exercise change into the exercise directory, and use the following CMake script to build a standalone application:
{% include_relative 01_hello_world/CMakeLists.txt %}
To build the application change into source directory, run CMake then make:
cd vsgTutorial/1_SettingTheScene/01_hello_world
cmake .
make
The hello world exercise is just a single main() function that has three sections to it:
- create the scene graph
- create and setup the viewer to render the scene graph
- execute the frame loop which does the handling of GUI events and rendering.
{% include_relative 01_hello_world/hello_world.cpp %}
To run the application:
./helloworld
Prev: Building VulkanSceneGraph Software | Next: Next Chapter : Foundations