Run the DirectX Sample
This section walks you through how to set up and run the DirectX Sample on a local environment. Seeing how it works will help you understand how we integrate the SDK with this application and what you need to do with your own project.
Overview
The Cube Sample displays 3 cubes named Athos, Porthos, and Aramis. The cubes rotate and move in different fixed directions. When a cube reaches an edge, it moves to the opposite side of the world to continue its movement without interruption. The player controls one cube at a time using these controls:
- The arrow and W A S D keys change the trajectory of the selected cube.
Modifying the direction also affects the rotation of the object.
The 1, 2, and 3 keys select different cubes.
The numeric keypad keys change the selected cube’s color.
The 0 key resets the orientation of the selected cube.
The P key resets the position of the selected cube.
The Backspace key stops the cube from moving.
Before You Begin
Download and install the latest Genvid MILE SDK.
Install the Genvid Toolbox scripts.
Install the Genvid supervisor services.
Run the DirectX Application
Clean and load the project configuration.
genvid-sdk setup # Make sure the local cluster is created. genvid-sdk clean-config # Clean old config in case of existing cluster. genvid-sdk load-config-sdk # Configure the basic services for the SDK.
Go to the
/samples/cube/web
directory.Generate and load the cube web sample to be able to view the streaming session.
py web.py build py web.py load
Go to the
/samples/cube/directx
directory.Copy the Genvid files used to build the project.
py directx.py prepare
Build the project and the website.
py directx.py build
Load the DirectX configuration.
py directx.py load
Launch the Cluster UI.
genvid-sdk monitor
Click the Jobs tab.
Click START ALL.
This starts the following jobs:
services
directx application
web
You can also start the services individually.
The links become active after the job status changes to
running
.Click CUBE SAMPLE in the Links section to launch the website.
When finished, click STOP ALL to stop all the services.