AppLevel
AppLevel application is designed for rendering Unigine-based projects without any graphics hardware. It emulates DirectX 11 render capabilities entirely on CPU and supports all Unigine features used on DirectX 10.1 (by default) or DirectX 11.0 levels. AppLevel provides reasonable performance and can be used for feature testing, debugging, verifying bugs, etc.
Building and Launching AppLevel
By default AppLevel application uses a high-performance WARP software rasterizer and supports DirectX 10.1 feature level. To build and launch AppLevel simply follow these steps:
- Go to the <UnigineSDK>/source/app/AppLevel folder.
- Run build_x86.bat or build_x86d.bat to build 86-bit version of AppLevel (debug or release one, respectively).
- Rename the resulting main.exe into AppLevel_x86.exe (or AppLevel_x86d.exe). Copy it into <UnigineSDK>/bin folder.
- Modify any of the launchers from <UnigineSDK>/demos folder. Replace main_* with AppLevel_* to run AppLevel binary. All other required start-up options can be left unchanged.
set PATH=../bin;../lib;%PATH% AppLevel_x86 -data_path ../ -engine_config ../data/demos/sanctuary/unigine.cfg -system_script sanctuary/unigine.cpp -video_mode -1 -video_width 1024 -video_height 768 -video_multisample 0 -video_fullscreen 0
No matter what rendering API is specified in the launcher, DirectX 11 API with DirectX 10.1 feature level will always be used.
Enabling DirectX 11.0 Feature Level
To enable DirectX 11.0 feature level including tessellation and Shader Model 5.0, the default WARP software rasterizer should be replaced with a Reference rasterizer. If compared to WARP, it is significantly slower. Follow these steps to enable these features:
- Go to the <UnigineSDK>/source/app/common folder.
- Edit D3D11AppLevel.cpp in any text or code editor. You need to comment the first line (at line 152) and uncomment the second one to use Reference rasterizer instead of WARP.
// Comment this line: // warp device with feature level 10.1 // D3D_DRIVER_TYPE type = D3D_DRIVER_TYPE_WARP; // Uncomment this line: // reference device with feature level 11.0 D3D_DRIVER_TYPE type = D3D_DRIVER_TYPE_REFERENCE;
- Perform all the steps described above for building and launching AppLevel.
After that, AppLevel application will use DirectX 11 API and DirectX 11.0 feature level.