Build and Run Sample Applications
This page gives an overview and explanations on how to build and execute sample applications for different host or target systems.
Host Environment
Build Application WarpingSample1 for Windows Host
The source code of the warping sample application WarpSample1 is stored in directory apps/WarpSample.
Depending on your needs, run the batch file run_cmake_<device-platform>_<MSVC-version>_build.bat in a windows console window to make CMake generate the project files and build environment for the WarpSample application into directory build/WarpSample1/<device-platform>Win32.
For starting the build environment, open the project file WarpSample1.sln. Building the project will – if necessary – create the required Candera libraries, link in the Warping Library and for a successful build create the executable WarpSample_x86_Win32_<device-platform>_Simulation_MSVC.exe into the directory bin/WarpSample/<device-platform>Win32/Debug.
Run Application WarpingSample on Windows Host
-
Before you continue, please make sure that the computer satisfies the hardware requirements (e.g. concerning graphics card) and software requirements (e.g. needed graphic driver version) of CGI Studio/Candera Framework.
For starting the WarpingSample1 application, open a MS Windows command shell window and change to the directory of the executable (bin/WarpSample/<device-platform>Win32/Debug). Start the WarpingSample application by calling WarpSample_x86_Win32_<device-platform>_Simulation_MSVC.exe from the command line. Another option to start the WarpingSample application is to start a debugging session directly from the MSVS2010/MSVS2013 environment.
The last lines show the key bindings for handling the WarpingSample1 test software:
- X, Z or ESCAPE: Exit application: These keys have to be used to terminate the test software.
- 0-9: Change the displayed content: The number keys are used to switch between different test scenes. Key 0 activates a scene implemented with Candera 2D rendering a predefined text, keys 1 and 2 activate scenes implemented in Candera 3D displaying fixed bitmaps. Keys 3 to 9 are reserved for future use.
- W: Toggle warping: This key switches warping on/off.
- T: Set next param set: Pressing this key will cycle the screen through 4 different used warping parameter sets.
- SET-NR 1: Input parameter set without rotation and distortion.
- SET-NR 2: Input parameter set with rotation and without distortion.
- SET-NR 3: Input parameter set without rotation and with distortion.
- SET-NR 4: Same parameter set as SET-NR 1, this is the base parameter set for the delta adjusting.
- D: Set next delta warp set: Pressing the D key will cycle the screen through all different delta adjusting modes in combination with each possible direction. This possibility is only enabled when the parameter set SET-NR 4 is active.
- H: Print this help: The H key prints the overview of selectable keys on the command line.
Example Scenes
The following figures show example scenes with applied parameter sets:
Scene #1 with Parameter Set 1
Scene #2 with Parameter Set 2
Further, the following screenshots show the effect of warping in comparison to the original image for the 3 scenes already used in the examples above when warping parameter set SET-NR 3 is applied:
- Scene #0
warped original - Scene #1
warped original - Scene #2
warped original