File: README.md

package info (click to toggle)
openscenegraph 3.6.5%2Bdfsg1-9
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 40,100 kB
  • sloc: cpp: 392,065; ansic: 21,495; java: 1,020; yacc: 548; makefile: 430; objc: 406; xml: 155; lex: 151; javascript: 34
file content (43 lines) | stat: -rw-r--r-- 1,123 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
How to build osgemscripten example
==================================

### 1. Install Emscripten

  Download and install [Emscripten portable SDK](http://kripken.github.io/emscripten-site/docs/getting_started/downloads.html)

### 2. Create build directory

  Run the following commands:

  `mkdir /path/to/build/dir`

  `cd /path/to/build/dir`

### 3. Configure example

  Run the following command:

  `cmake -DCMAKE_TOOLCHAIN_FILE=/path/to/emsdk-portable/emscripten/<version>/cmake/Modules/Platform/Emscripten.cmake /path/to/OpenSceneGraph/examples/osgemscripten`

  This also configures OpenSceneGraph as a dependency

### 3. Build example

  Run the following command:

  `make`

  This also builds OpenSceneGraph under `/path/to/OpenSceneGraph/build/Emscripten`
  if it has not yet been built.

### 4. Launch example

  Firefox only: locate and open `osgemscripten.html` file.

  All browsers:
  * go to the directory with `osgemscripten.html`
  * run `python -m SimpleHTTPServer 8080` from there
  * open `http://localhost:8080/osgemscripten.html` in any browser

  You should now see red cube in your web browser.