SDOC is a mobile-optimized version of the Open Source project https://github.com/rawrunprotected/rasterizer The related optimizations include
- Same frame skipping
- Interleave rendering
- Fast block traversal
- Mix use of triangle and quad rendering
- Checkerboard memory optimization
- Mesh rectangle simplification during baking
- Memory compression during baking
- Potential visibility for occluder occludee object
- Install CMake 3.0 or higher.
- Install Visual Studio 2017 or higher.
- Open your source folder in Explorer and enter the
Source/app/FuzzyCulling/
. RunGenerateProjectFiles.bat
to create project files for SOC. The Visual Studio project file will be generated inbuild
folder. - Unzip app\FuzzyCulling\GOLDEN_DATA\all.7z file
- Set the
SDOCReplay
as StartUp Project in Visual Studio, - Visual studio opens Source\app\FuzzyCulling\build\SDOC-Lib.sln
- Set SDOCReplay project as start up project to test, compile and run
- For debug testing, set SDOC_DevelopMode to 1, set it as 0 when generating dynamic library libSDOC.quic.dll
Build the shared library
- Android Studio open the
Source
folder to load the project - Sync Project with Gradle Files, then setup the key for building the releasing application.
- Build->Generate Signed Bundle/APK, select release as the Build Variants.
- Unzip the APK for libSDOC.quic.so, the libSDOC.quic.so could be integrated with game engines.
Android demo to verify libSDOC.quic.so
- Put built android libSDOC.quic.so in Demo\Android\SDOCDemo\app\src\main\jnilibs
- Android Studio open Demo\Android\SDOCDemo and build the ready to run apk.
- Install CMake 3.0 or higher.
- Install the latest version of Xcode.
- Open the Terminal at the source folder and enter
Source/app/FuzzyCulling
, execute the following command to generate Xcode project tobuild
folder.chmod 755 GenerateProjectFiles_Mac.command GenerateProjectFiles_Mac.command
- Enter the
build
folder and load the project into Xcode by double-clicking on theSDOC-Lib.xcodeproj
. Select the ALL_BUILD as the target and then build the project. - To change the build configuration to Release, Edit Scheme in Main Menu->Product->Scheme, set the Run Executable to SDOCReplay and other
- Compile and execute. The libSDOC.quic.dylib is shared library could be integrated with game engines.
Build the static library
- Sync the submodule to get ios-cmake.
git submodule init
git submodule update
You might need to call "git submodule add https://github.com/leetal/ios-cmake.git" in the directory of Source\app\submodules if submodule init/update fail - Open the Terminal at the source folder and enter
Source/app/FuzzyCulling
, execute the following command to generate Xcode project tobuild
folder.chmod 755 GenerateProjectFiles_ios.command GenerateProjectFiles_ios.command
- Enter the
build
folder and load the project into Xcode by double-clicking on theSDOC-Lib.xcodeproj
. Select the ALL_BUILD as the target and then build the project. - To change the build configuration to Release, Edit Scheme in Main Menu->Product->Scheme.
iOS demo to verify
- Connect iphone
- iOS: open
Demo\iOS\iQOC.xcodeproj
to build iQOC (QOC is the previous name of SDOC) - "Fail to load the file" message would show for the init run
- Cmd+shift+2 to summon iphone device UI
- from iphone device UI, select iQOC and click "App Container Action" and choose "Download Container"
- Right click the "Download Container" and choose "Show Package Contents"
- Copy files from Source\app\FuzzyCulling\GOLDEN_DATA\all to container's AppData/Documents
- From iphone device UI, click "App Container Action" and choose "Replace Container"
- Restart iQOC on the iphone
Snapdragon™ Occlusion Culling (SDOC) is licensed under the BSD 3-clause “New” or “Revised” License. Check out the LICENSE for more details.