Skip to content

Commit

Permalink
Merge branch 'main' into build-workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
luc committed Jan 22, 2024
2 parents 5f79e06 + 61d15b6 commit 46b193c
Show file tree
Hide file tree
Showing 91 changed files with 5,487 additions and 3,350 deletions.
20 changes: 20 additions & 0 deletions .github/workflows/build-arm64-macos.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: Build macOS-arm64

on:
workflow_dispatch:
push:
branches:
- main

jobs:
build:
runs-on: macos-13

steps:
- uses: actions/checkout@v3

- name: Configure CMake
run: cmake -B ${{ github.workspace }}/build -DCMAKE_BUILD_TYPE=Debug -DSL_DOWNLOAD_DATA=OFF -DCMAKE_OSX_ARCHITECTURES=arm64

- name: Build
run: cmake --build ${{ github.workspace }}/build -j $(sysctl -n hw.ncpu)
26 changes: 0 additions & 26 deletions .github/workflows/build-dep-assimp.yml

This file was deleted.

33 changes: 0 additions & 33 deletions .github/workflows/build-dep-glfw.yml

This file was deleted.

54 changes: 0 additions & 54 deletions .github/workflows/build-dep-opencv.yml

This file was deleted.

73 changes: 0 additions & 73 deletions .github/workflows/build-dep-openssl.yml

This file was deleted.

1 change: 0 additions & 1 deletion .github/workflows/build-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ on:
push:
branches:
- main
- develop

jobs:
build:
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/build-wasm-emscripten.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ jobs:

- name: Install Emscripten
uses: mymindstorm/setup-emsdk@v11
with:
version: 3.1.46

- name: Configure CMake
run: emcmake cmake -B ${{ github.workspace }}/build -DSL_BUILD_WAI=OFF -DSL_BUILD_WITH_OPENSSL=OFF -DSL_DOWNLOAD_DATA=OFF
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build-x86_64-macos.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Build macOS
name: Build macOS-x86

on:
workflow_dispatch:
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/deploy-wasm-emscripten.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ jobs:

- name: Install Emscripten
uses: mymindstorm/setup-emsdk@v11
with:
version: 3.1.46

- name: Configure CMake
run: emcmake cmake -B ${{ github.workspace }}/build -DSL_BUILD_WAI=OFF -DSL_BUILD_WITH_OPENSSL=OFF -DSL_DOWNLOAD_DATA=OFF -DCMAKE_BUILD_TYPE=Release
Expand Down
4 changes: 3 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

cmake_minimum_required(VERSION 3.15 FATAL_ERROR)

set(CMAKE_CXX_STANDARD 14)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)

if (APPLE)
Expand Down Expand Up @@ -49,6 +49,7 @@ option(SL_BUILD_WAI "Specifies if the WAI library should be built" ON)
option(SL_BUILD_APPS "Specifies if sample apps should be built" ON)
option(SL_BUILD_EXERCISES "Specifies if exercise apps should be built" ON)
option(SL_BUILD_VULKAN_APPS "Specifies if vulkan apps should be built" OFF)
option(SL_BUILD_WEBGPU_DEMO "Specifies if WebGPU demo should be built" ON)
option(SL_BUILD_WITH_OPTIX "Specifies if Optix renderer should be built" OFF)
option(SL_BUILD_WITH_KTX "Specifies if Kronos Texture library (ktx) should be used" ON)
option(SL_BUILD_WITH_OPENSSL "Specifies if OpenSSL should be used" ON)
Expand All @@ -71,6 +72,7 @@ message(STATUS "SL_BUILD_WAI: ${SL_BUILD_WAI}")
message(STATUS "SL_BUILD_APPS: ${SL_BUILD_APPS}")
message(STATUS "SL_BUILD_EXERCISES: ${SL_BUILD_EXERCISES}")
message(STATUS "SL_BUILD_VULKAN_APPS: ${SL_BUILD_VULKAN_APPS}")
message(STATUS "SL_BUILD_WEBGPU_DEMO: ${SL_BUILD_WEBGPU_DEMO}")
message(STATUS "SL_BUILD_WITH_OPTIX: ${SL_BUILD_WITH_OPTIX}")
message(STATUS "SL_BUILD_WITH_KTX: ${SL_BUILD_WITH_KTX}")
message(STATUS "SL_BUILD_WITH_OPENSSL: ${SL_BUILD_WITH_OPENSSL}")
Expand Down
10 changes: 6 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
# Welcome to the SLProject4

[![Build Windows](https://github.com/cpvrlab/SLProject4/actions/workflows/build-x86_64-windows.yml/badge.svg)](https://github.com/cpvrlab/SLProject4/actions/workflows/build-x86_64-windows.yml)
[![Build macOS](https://github.com/cpvrlab/SLProject4/actions/workflows/build-x86_64-macos.yml/badge.svg)](https://github.com/cpvrlab/SLProject4/actions/workflows/build-x86_64-macos.yml)
[![Build macOS-x86](https://github.com/cpvrlab/SLProject4/actions/workflows/build-x86_64-macos.yml/badge.svg)](https://github.com/cpvrlab/SLProject4/actions/workflows/build-x86_64-macos.yml)
[![Build macOS-arm64](https://github.com/cpvrlab/SLProject4/actions/workflows/build-arm64-macos.yml/badge.svg)](https://github.com/cpvrlab/SLProject4/actions/workflows/build-arm64-macos.yml)
[![Build Emscripten](https://github.com/cpvrlab/SLProject4/actions/workflows/build-wasm-emscripten.yml/badge.svg)](https://github.com/cpvrlab/SLProject4/actions/workflows/build-wasm-emscripten.yml)
[![Build Online Docs](https://github.com/cpvrlab/SLProject4/actions/workflows/build-docs.yml/badge.svg)](https://github.com/cpvrlab/SLProject4/actions/workflows/build-docs.yml)

SL stands for Scene Library. It is developed at the Berne University of Applied Sciences (BFH) in Switzerland and is used for student projects in the cpvrLab. The various applications show what you can learn in three semesters about 3D computer graphics in real time rendering and ray tracing. The framework is built in C++ and OpenGL ES and can be built for Windows, Linux, macOS (Intel & arm64), Android, Apple iOS and for WebAssembly enabled browsers. The framework can render alternatively with Ray Tracing and Path Tracing which provides in addition high quality transparencies, reflections and soft shadows. For a complete feature list see the [SLProject4 wiki](https://github.com/cpvrlab/SLProject4/wiki).
SL stands for Scene Library. It is developed at the Berne University of Applied Sciences (BFH) in Switzerland and is used for student projects in the cpvrLab. The various applications show what you can learn in three semesters about 3D computer graphics in real-time rendering and ray tracing. The framework is built in C++ and OpenGL ES and can be built for Windows, Linux, macOS (Intel & arm64), Android, Apple iOS, and WebAssembly-enabled browsers. The framework can render alternatively with Ray Tracing and Path Tracing, which provides high-quality transparencies, reflections, and soft shadows. For a complete feature list see the [SLProject4 wiki](https://github.com/cpvrlab/SLProject4/wiki).

## How to get the SLProject4

The SLProject4 is hosted at GitHub as a GIT repository.
The SLProject4 is hosted on GitHub as a GIT repository.
[GIT](http://git-scm.com/) is a distributed versioning control system.

To clone SLProject4, use the following command:
Expand All @@ -18,7 +20,7 @@ cd <Path to where you want the SLProject4 folder>
git clone https://github.com/cpvrlab/SLProject4.git
```

For people with an aversion to the command line, a GIT GUI tool, such as the [GitHub Desktop Client](https://desktop.github.com), can be used. To get the latest additions to SLProject4, please checkout the develop branch:
For people with an aversion to the command line, a GIT GUI tool, such as the [GitHub Desktop Client](https://desktop.github.com), can be used. To get the latest additions to SLProject4, please check the develop branch:

```
git checkout develop
Expand Down
6 changes: 5 additions & 1 deletion apps/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,8 @@ else()
add_subdirectory(app_demo_imgui)
add_subdirectory(app_demo_node)
add_subdirectory(app_demo_slproject)
endif()

if (SL_BUILD_WEBGPU_DEMO AND NOT ("${SYSTEM_NAME_UPPER}" MATCHES "EMSCRIPTEN"))
add_subdirectory(app_demo_webgpu)
endif ()
endif()
5 changes: 3 additions & 2 deletions apps/app_demo_slproject/android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,11 @@ apply plugin: 'com.android.application'

android {
signingConfigs {
// Please create your own release key with Build > Generate Signed Bundle or APK
release {
keyAlias 'cpvrlab'
keyAlias 'slproject-release-key'
keyPassword '?' // Change to your key password
storeFile file('../cpvrlab-release-key')
storeFile file('../slproject-release-key')
storePassword '?' // Change to your store password
}
}
Expand Down
Binary file removed apps/app_demo_slproject/android/cpvrlab-release-key
Binary file not shown.
Binary file not shown.
4 changes: 3 additions & 1 deletion apps/app_demo_slproject/emscripten/AppDemoMainEmscripten.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -330,7 +330,7 @@ EM_BOOL emOnKeyPressed(int eventType,
(SLSceneID)(AppDemo::sceneID - 1));
SL_LOG("Loading SceneID: %d", AppDemo::sceneID);
}
else if (key == K_right && sv && AppDemo::sceneID < SID_Maximal - 1)
else if (key == K_right && sv && AppDemo::sceneID < SID_MaxNoBenchmarks - 1)
{
appDemoLoadScene(AppDemo::assetManager,
AppDemo::scene,
Expand Down Expand Up @@ -552,6 +552,7 @@ int main(void)
emscripten_set_beforeunload_callback(nullptr, emOnUnload);

// HACK: Fixes to make this able to run in an <iframe>
// clang-format off
MAIN_THREAD_EM_ASM({
const canvas = document.querySelector("#canvas");

Expand All @@ -570,6 +571,7 @@ int main(void)
canvas.addEventListener("touchend", event => event.preventDefault());
canvas.addEventListener("touchmove", event => event.preventDefault());
});
// clang-format on

AppDemo::calibIniPath = "data/calibrations/";

Expand Down
Loading

0 comments on commit 46b193c

Please sign in to comment.