Skip to content

Commit

Permalink
Software renderer (#363)
Browse files Browse the repository at this point in the history
* BRender software rendering initial commit

* changes required for brender v1.3.2

* fixes missing selection rectangle in race summary screen

* fix track rendering, remove opengl bits

* adding BRender submodule

* enables mirror, bumps brender

* enable linux arm64 builds

* clang-format on all files

---------

Co-authored-by: Anonymous Maarten <[email protected]>
  • Loading branch information
dethrace-labs and madebr authored Jun 14, 2024
1 parent 3870bf8 commit 6222f69
Show file tree
Hide file tree
Showing 338 changed files with 1,624 additions and 62,918 deletions.
10 changes: 8 additions & 2 deletions .github/workflows/workflow.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: Workflow

on:
on:
push:
branches:
- 'main'
Expand All @@ -16,6 +16,7 @@ jobs:
matrix:
platform:
- { name: 'Linux', arch: 'x64', os: ubuntu-latest, werror: true }
- { name: 'Linux', arch: 'arm64', os: ubuntu-latest, werror: true, cmake-toolchain-file: 'cmake/toolchains/linux-aarch64.cmake', apt-packages: 'gcc-aarch64-linux-gnu g++-aarch64-linux-gnu', cross: true }
- { name: 'MacOS', arch: 'arm64-x64', os: macos-latest, werror: true, cmake-args: '-DCMAKE_OSX_ARCHITECTURES="x86_64;arm64"' }
- { name: 'Windows', arch: 'Win32', os: windows-latest }
- { name: 'Windows', arch: 'x64', os: windows-latest }
Expand All @@ -27,6 +28,8 @@ jobs:
name: 'CI ${{ matrix.platform.name }} ${{ matrix.platform.arch }}'
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- name: Set up Ninja
uses: aseprite/get-ninja@main
- uses: ilammy/[email protected]
Expand All @@ -37,12 +40,13 @@ jobs:
if: ${{ runner.os == 'Linux' }}
run: |
sudo apt-get update
sudo apt-get install -y libgl-dev
sudo apt-get install -y libgl-dev ${{ matrix.platform.apt-packages }}
- name: Set up SDL
uses: libsdl-org/setup-sdl@main
with:
cmake-arguments: ${{ matrix.platform.cmake-args }}
cmake-generator: Ninja
cmake-toolchain-file: ${{ matrix.platform.cmake-toolchain-file }}
version: 2-latest
add-to-environment: true

Expand All @@ -61,11 +65,13 @@ jobs:
-DDETHRACE_INSTALL=ON \
-DDETHRACE_PACKAGE_PLATFORM=${{ matrix.platform.name }} \
-DDETHRACE_PACKAGE_ARCH=${{ matrix.platform.arch }} \
-DCMAKE_TOOLCHAIN_FILE=${{ matrix.platform.cmake-toolchain-file }} \
${{ matrix.platform.cmake-args }}
- name: 'Build (CMake)'
run: |
cmake --build build
- name: 'Test (CTest)'
if: ${{ !matrix.platform.cross }}
run: |
ctest --test-dir build --verbose
- name: 'Package (CPack)'
Expand Down
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "lib/BRender-v1.3.2"]
path = lib/BRender-v1.3.2
url = https://github.com/dethrace-labs/BRender-v1.3.2
6 changes: 2 additions & 4 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,9 @@ if(NOT SDL2_FOUND)
find_package(SDL2 MODULE REQUIRED)
endif()


add_subdirectory(lib/BRender-v1.3.2)
add_subdirectory(lib/libsmacker)
add_subdirectory(lib/glad)
add_subdirectory(lib/miniaudio)

add_library(compile_with_werror INTERFACE)
Expand All @@ -74,12 +75,9 @@ if(DETHRACE_WERROR)
endif()
endif()



add_subdirectory(src/harness)
add_subdirectory(src/S3)
add_subdirectory(src/smackw32)
add_subdirectory(src/BRSRC13)
add_subdirectory(src/DETHRACE)

if(BUILD_TESTS)
Expand Down
4 changes: 4 additions & 0 deletions cmake/toolchains/linux-aarch64.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
set(CMAKE_SYSTEM_NAME "Linux")
set(CMAKE_SYSTEM_PROCESSOR "arm64")
set(CMAKE_C_COMPILER "aarch64-linux-gnu-gcc")
set(CMAKE_CXX_COMPILER "aarch64-linux-gnu-g++")
1 change: 1 addition & 0 deletions lib/BRender-v1.3.2
Submodule BRender-v1.3.2 added at 9b6c6d
7 changes: 0 additions & 7 deletions lib/glad/CMakeLists.txt

This file was deleted.

290 changes: 0 additions & 290 deletions lib/glad/include/KHR/khrplatform.h

This file was deleted.

Loading

0 comments on commit 6222f69

Please sign in to comment.