Skip to content

Commit

Permalink
Steps to compile the sample
Browse files Browse the repository at this point in the history
  • Loading branch information
mathysyon committed Jun 24, 2021
1 parent 618a0c2 commit 2c8fd60
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions ReadMe.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,19 +10,21 @@ The sample requires a WebGL 2.0 capable browser supporting WebAssembly 1.0 (Wasm
Installation and configuration:
1. Install Emscripten SDK and activate minimal configuration (Python, Java and CLang) following *emsdk* documentation. Activate also MinGW when building sample on Windows host.
2. Build (using *emsdk*) or download FreeType static library.
~~~~~
> https://stackoverflow.com/questions/61049517/build-latest-freetype-with-emscripten
~~~~~
3. Configure CMake for building Open CASCADE Technology (OCCT) static libraries (BUILD_LIBRARY_TYPE="Static").
For this, activate *emsdk* command prompt, configure CMake for building OCCT using cross-compilation toolchain, disable *BUILD_MODULE_Draw*.
4. Perform building and installation steps.
~~~~~
> ${EMSDK}/fastcomp/emscripten/cmake/Modules/Platform/Emscripten.cmake
~~~~~
5. Configure CMake for building this WebGL sample using *emsdk* with paths to OCCT and FreeType. Perform building and installation steps.
6. Copy data/occ/Ball.brep from OCCT into "samples" folder within WebGL sample installation path.
7. Navigate to installation folder and start web server from it; Python coming with *emsdk* can be used for this purpose:
6. Navigate to installation folder and start web server from it; Python coming with *emsdk* can be used for this purpose:
~~~~~
> python -m SimpleHTTPServer 8080
> python -m http.server
~~~~~
8. Open compatible browser and enter path taking into account your web server settings:
~~~~~
> http://localhost:8080/occt-webgl-sample.html
> http://localhost:8000/occt-webgl-sample.html
~~~~~

0 comments on commit 2c8fd60

Please sign in to comment.