Skip to content
This repository was archived by the owner on Nov 27, 2025. It is now read-only.

Commit 94f9029

Browse files
committed
Merge github.com:Advanced-Effects/Rendering-Lab-App
2 parents 43a3dff + f8979db commit 94f9029

File tree

5 files changed

+66
-4
lines changed

5 files changed

+66
-4
lines changed

.github/workflows/build.yml

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
# This piece of code was made by ChatGPT because I don't care enough to learn this
2+
3+
name: Build project
4+
5+
on:
6+
push:
7+
branches: [main]
8+
pull_request:
9+
10+
jobs:
11+
build:
12+
runs-on: ubuntu-latest
13+
14+
steps:
15+
- name: 📥 Checkout repository
16+
uses: actions/checkout@v4
17+
with:
18+
submodules: recursive # Gets submodules
19+
20+
- name: Cache APT Packages
21+
uses: awalsh128/[email protected]
22+
with:
23+
packages: cmake ninja-build clang g++ mesa-utils libglu1-mesa-dev freeglut3-dev mesa-common-dev libglew-dev libglfw3-dev libglm-dev libfontconfig1-dev libfreetype-dev libjpeg-turbo8-dev libpng-dev libwebp-dev libharfbuzz-dev libicu-dev
24+
25+
- name: ⚙️ Set up dependencies
26+
run: |
27+
sudo apt-get update
28+
sudo apt-get install -y cmake ninja-build clang g++
29+
sudo apt-get install -y mesa-utils libglu1-mesa-dev freeglut3-dev mesa-common-dev
30+
sudo apt-get install -y libglew-dev libglfw3-dev libglm-dev
31+
sudo apt-get install -y libfontconfig1-dev libfreetype-dev libjpeg-turbo8-dev libpng-dev libwebp-dev
32+
sudo apt-get install -y libharfbuzz-dev libicu-dev
33+
34+
- name: Cache build directory
35+
uses: actions/cache@v4
36+
with:
37+
path: build/
38+
key: ${{ runner.os }}-build-${{ hashFiles('**/CMakeLists.txt', '**/*.cpp') }}
39+
restore-keys: |
40+
${{ runner.os }}-build-
41+
42+
- name: 🏗️ Configure and build
43+
run: |
44+
mkdir -p build
45+
cd build
46+
cmake ..
47+
cmake --build . -j$(nproc)
48+
49+
- name: 📦 Upload executable
50+
uses: actions/upload-artifact@v4
51+
with:
52+
name: RenderingLab
53+
path: |
54+
build/*
55+
if-no-files-found: error

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@
22

33
An application to test (in isolation) the rendering capabilities of Advanced Effects.
44

5-
# Roadmap
5+
## Roadmap
66

77
- [x] 🖥️ An OpenGL basic application.
88
- [x] 🎨 Integrated with Skia2D.
9-
- [ ] 🟥 That can draw objects
9+
- [x] 🟥 That can draw objects
1010
- [ ] 🕐 animate keyframes with interpolation
1111
- [ ] 💨 Apply Effects and Modes
1212

app/CMakeLists.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
message("-- Creating main executable with target name ${CMAKE_PROJECT_NAME}")
22
add_executable(${CMAKE_PROJECT_NAME} main.cpp)
33

4+
# Tell CMake to find .dlls in 'build/src' so it can find libskia.friction.so
5+
target_link_directories(${CMAKE_PROJECT_NAME} PRIVATE ${CMAKE_BINARY_DIR}/src)
6+
47
include(skia/FindSkiaSystem)
58

69
set(EXECUTABLE_LIBRARIES

src/CMakeLists.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,3 +28,6 @@ set(MODULE_LINK ${LIBRARY_DEPENDENCIES})
2828
set(MODULE_CUSTOM_DIRECTORIES ${CMAKE_BINARY_DIR}/src)
2929

3030
finish_module()
31+
32+
# tell target where to find .dlls
33+
target_link_directories(lib${CMAKE_PROJECT_NAME} PRIVATE ${CMAKE_BINARY_DIR}/src)

src/ISkiaGLWindow.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,9 @@
1111
sk_sp<SkSurface> ISkiaGLWindow::obtainSkiaSurfaceFromCurrentGLContext() {
1212
auto glContext = m_glWindow->glContext();
1313

14-
// You've already created your OpenGL context and bound it.
15-
sk_sp<const GrGLInterface> interface = nullptr;
14+
// Grabs the OpenGL context that is currently set as "current"
15+
// (we set it with `glfwMakeContextCurrent` in `main.cpp`)
16+
auto interface = GrGLMakeNativeInterface();
1617

1718
const GrContextOptions &grOptions = GrContextOptions();
1819
m_graphicsContext = GrContext::MakeGL(interface, grOptions);

0 commit comments

Comments
 (0)