Skip to content
View sgi-demos's full-sized avatar
♾️
♾️

Block or report sgi-demos

Block user

Prevent this user from interacting with your repositories and sending you notifications. Learn more about blocking users.

You must be logged in to block users.

Maximum 250 characters. Please don’t include any personal information such as legal names or email addresses. Markdown is supported. This note will only be visible to you.
Report abuse

Contact GitHub support about this user’s behavior. Learn more about reporting abuse.

Report abuse
sgi-demos/README.md

SGI demos from long ago, running in your browser today.

Old problems require modern solutions.

This is the original SGI demo source code, compiled for the web using Emscripten and SDL2. Rendering is done using an IRIS GL-to-GLES2 rasterizer with a reference software rasterizer also available from the Alice 4 project. Event handling is done by SDL2, with events translated into GL's event system. Each demo is a separate web page, with its own Javascript + WASM compiled by Emscripten from the original C/C++ source. Native Linux, Mac, and Windows builds are also available. Minimal modifications have been made to the original source, in order to run in the browser and to build with compilers 30+ years later. For more implementation details, see the architecture doc.

Working demos

Somewhat working demos

  • Flight 1988 (the 1988–89 colormap-mode original; cockpit glitches, planes too slow in web version, night mode 'shimmers', no network play)
  • Flight 1994 (Version 3.4, the definitive IRIX flight — RGB, lighting, 8 planes, full-width 3D horizon and instrument panel; no texture/fog/sound/network yet)
  • Newave (no mesh editing, no popup menus, only wireframe)
  • Arena (no network play)
  • Gview (Barcelona) (reconstructed from the IRIX 3 binary: fly-through and turntable modes work; no materials, movie loops, or binary model cache)
  • Electropaint 1988 (earliest version, Panel Library v7, from the 1988 Usenet posting; plain sliders)
  • Electropaint 1989 (Panel Library 9.6; IRIS GL, driven by Tristram's authentic default script; keyboard toggles)
  • Electropaint 1994 (OpenGL, decompiled) (the real OpenGL IRIX screensaver, decompiled; smooth HLS colour + the famous default script; IRIS-faithful by default — restored 4-fold mirrors + 30° camera — M toggles the shipped 1994 look)
  • Electropaint 1994 (OpenGL, reversed) (the OpenGL version with ep.c refactored to readable names — byte-identical output)

Firmly WIP demos

  • Cedit
  • Sunflower, gltest, colortest

Build instructions

Mac

  1. Install Homebrew if you don't have it, then get SDL2 and Emscripten:
brew install SDL2
brew install emscripten
  1. Build:
git clone https://github.com/sgi-demos/sgi-demos.git
cd sgi-demos
make

Windows

  1. Install Winget if you don't have it.

  2. Install MSYS2 from cmd.exe, in order to get the clang compiler:

winget install MSYS2.MSYS2
setx PATH "%PATH%C:\msys64\clang64\bin"
  1. Install clang toolchain, SDL2, and bison (for buttonfly menu parsing) in MSYS2 CLANG64 shell:
pacman -Syu
pacman -S base-devel mingw-w64-clang-x86_64-toolchain
pacman -S mingw-w64-clang-x86_64-SDL2
pacman -S bison
  1. Clone emscripten from Github. Cloning seems to work best with MSYS2 rather than using pacman. Follow the default install directions, not the Windows directions!

  2. Add this line to the ~/.bashrc file in MSYS2 CLANG64 shell:

source /path/to/emsdk/emsdk_env.sh
  1. Build:
git clone https://github.com/sgi-demos/sgi-demos.git
cd sgi-demos
make

To do

  • Add more demos, all the demos.
    • Barcelona, Cedit, any other IRIS GL demos I can find
    • Then OpenGL, GLUT, Inventor, Performer demos in no particular order
  • Fix logged issues
  • Provide context for each demo:
    • Name, author, year (as text in lower corner), code link
    • Brief description/history/context for each demo - can obtain some descriptions from .Info slide files
    • Link to demo man pages
  • Add popup/overlay help to show key/mouse input to try
  • Provide virtual mouse and keyboard for touch devices:
    • Only display virtual keys and mouse functions used by the demo; use demo's qdevice() calls to determine this
    • Displayed as transparent virtual mouse and key pictures overlaid on demo
    • On always for touch devices
    • On/off for mouse/keyboard devices, as hints

Credits

Pinned Loading

  1. sgi-demos sgi-demos Public

    SGI demos from long ago, running in your browser today.

    C 89 8

  2. sgi-performer sgi-performer Public

    SGI Performer source and binaries archive

    C 2