Skip to content

A C/C++ and OpenGL Cross-Platform 3D Visualization and Animation Framework for Research and Education in Computer Graphics

License

Notifications You must be signed in to change notification settings

nSkade/CrossForge

This branch is 386 commits ahead of, 8 commits behind Tachikoma87/CrossForge:master.

Folders and files

NameName
Last commit message
Last commit date

Latest commit

b95dfb7 · Feb 8, 2025
Aug 4, 2024
May 21, 2024
Jul 7, 2024
Feb 8, 2025
May 21, 2024
Sep 30, 2024
Feb 6, 2025
May 26, 2024
Dec 16, 2024
Sep 30, 2022
Dec 1, 2024
Apr 1, 2024
Feb 9, 2023
Jun 10, 2022
Jun 16, 2024
Aug 4, 2024
Jun 18, 2024
Jul 7, 2024

Repository files navigation

CrossForge: Your research and education tool for cross-platform 3D-Apps

CrossForge Logo Banner

C++ CMake Windows Linux WebAssembly License: MIT GitHub release

CrossForge is a cross platform graphics framework for 3D applications on Windows, Linux, and WebAssembly. It is primarily designed for educational purposes and computer graphics research. Hence it focuses solely on OpenGL as graphics API (no DirectX or Vulkan), and features extensive tutorials for computer graphics novices. If you want to learn how 3D application work from the ground up, you are at the right place.

Why CrossForge?

There are a lot of very impressive open source graphics engines out there and most of them support various graphics APIs like Vulkan, DirectX and OpenGL. This is only possible if the underlying API is abstracted away and you are forced to use the interface of the respective engine. CrossForge solely uses OpenGL with a strong focus on compatibility with WebGL in order to be compatible with WebAssembly. Hence, the publication of your CrossForge projects on a website is a built-in feature and not just an option. This design allows you to use the available CrossForge modules, modify them, or completely replace them with you own OpenGL based implementation and GLSL Shaders. This flat design and reduced complexity makes the CrossForge framework perfect for education and research in computer graphics as well as for hobbyists.

Feature List

  • Supported systems: Windows, Linux, and WebAssembly
  • OpenGL only
  • Physically based shading (PBS) and material system
  • Deferred and forward rendering pipelines
  • Holistic self-configuring Shader system
  • Shadow mapping
  • Scene graph system
  • Skeletal and morph-target animations
  • Text rendering

See the examples to get a better impression of what CrossForge is capable of.

Building CrossForge

Basic Setup

The following steps have to be performed, no matter what OS you are running.

  1. If you haven't done already, install git https://git-scm.com/book/en/v2/Getting-Started-Installing-Git and clone this repository with

     > git clone https://github.com/Tachikoma87/CrossForge.git
    
  2. CrossForge relies on vcpkg as package manager on Windows and Linux https://github.com/microsoft/vcpkg. Follow the installation instructions for your system: https://github.com/microsoft/vcpkg#getting-started

Windows

The recommended tool for building CrossForge on Windows in Visual Studio. Download your preferred version from https://visualstudio.microsoft.com and make sure you select C++CMake Tools for Windows during installation. You can also add the CMake Tools using the Visual Studio Installer, if Visual Studio is already installed:

Visual Studio Install Instrutions

Now we need vcpkg to work with Visual Studio. Open a command prompt and type

> [path-to-vcpkg]\vcpkg integrate install

Start Visual Studio and select Open a local folder. Move to the directory where you executed the first git command and open the CrossForge folder. If the CMake configuration process does not start automatically right click on CMakeLists.txt and select configure cache. Wait for the configuration to complete, then select Build->Build All (F7) from the menu bar. After completion select CForgeSandbox.exe as starting item and select Debug->Start Debugging (F5) from the menu bar or click on the small green right facing arrow.

Visual Studio Open Folder

Linux

CrossForge uses vcpkg in manifest mode, which means that dependencies should be installed automatically. Run the following commands from the top directory to build the software:

> cmake -B out/build-lin -S . "-DCMAKE_TOOLCHAIN_FILE=[path-to-vcpkg]/scripts/buildsystems/vcpkg.cmake"
> cmake --build out/build-lin

And run the sandbox with

> cd out/build-lin
> ./CForgeSandbox

Emscripten

Install emscripten by following https://emscripten.org/docs/getting_started/downloads.html. Open a command console and change directory to CrossForge folder. From top directory run

> [path-to-emsdk]/emsdk activate latest
> emcmake cmake -DWEBP_USE_THREAD=OFF -B out/build-ems -Wno-dev  
> cmake --build out/build-ems

To test the created website you will need a local webserver. You can create one on WSL or Linux following this tutorial: https://ubuntu.com/tutorials/install-and-configure-apache#1-overview

Windows Subsystem for Linux (WSL)

  1. Prepare WSL and Visual Studio for a remote connection: https://learn.microsoft.com/en-us/cpp/linux/connect-to-your-remote-linux-computer?view=msvc-170

  2. By default WSL does not come with graphics. You can configure your WLS with graphics and audio using this guide: https://research.wmz.ninja/articles/2017/11/setting-up-wsl-with-graphics-and-audio.html.

  3. Then install and start xfce4 (or any other graphical desktop you like) in your WSL

     > sudo apt-get install xfce4
     > startxfce4
    
  4. Open Visual Studio and the CrossForge project.

  5. In the CMake Settings (Project->CMake Settings for ...) add the Linux-GCC-Debug and/or Linux-GCC-Release as target.

  6. Choose the WSL connection as Remote machine name.

  7. Switch to a Linux-GCC target and wait for the CMake configuration to finish

  8. Build the project (F7)

  9. Run the project (F5). The window will open in the xfce4 desktop.

How to cite:

@misc{CForge,
    title={CrossForge: A Cross-Platform 3D Visualization and Animation Framework for Research and Education in Computer Graphics},
    author={Tom Uhlmann},
    year = {2020},
    howpublished = {https://github.com/Tachikoma87/CrossForge},
}

Acknowledgment

This project was originally developed at Chemnitz University of Technology and funded by the Deutsche Forschungsgemeinschaft (DFG, German Research Foundation) – Project-ID 416228727 – CRC 1410.

Credits

About

A C/C++ and OpenGL Cross-Platform 3D Visualization and Animation Framework for Research and Education in Computer Graphics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C++ 95.7%
  • GLSL 3.2%
  • Other 1.1%