Skip to content

Latest commit

 

History

History
45 lines (33 loc) · 1.13 KB

HelloWorld.md

File metadata and controls

45 lines (33 loc) · 1.13 KB
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:

  1. create the scene graph
  2. create and setup the viewer to render the scene graph
  3. 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