Skip to content

An application to test AE's rendering engine in isolation. Uses OpenGL and Skia.

Notifications You must be signed in to change notification settings

Advanced-Effects/Rendering-Lab-App

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

45 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Rendering Lab App

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

Roadmap

  • 🖥️ An OpenGL basic application.
  • 🎨 Integrated with Skia2D.
  • 🟥 That can draw objects
  • 🕐 animate keyframes with interpolation
  • 💨 Apply Effects and Modes

Understand the project

  • app/: Where the application begins! (main.cpp). Come here to see how the application's overall workflow works
  • src/: Our source code (libRenderingLab)
  • thirdparty/: Where third-party modules reside (skia and glad)
  • buildscripts/: Useful CMake scripts (CMAKE_MODULE_PATH)

How to run

🐧 Linux dependencies

You need the typical setup (CMake, Ninja, C++17 compiler, Git...) PLUS this:

apt-get install mesa-utils libglu1-mesa-dev freeglut3-dev mesa-common-dev
apt-get install libglew-dev libglfw3-dev libglm-dev

Windows dependencies

In construction

Build & run

Use these commands to clone the source code, setup CMake and build the project:

Use these commands exactly or you may get errors!

git clone https://github.com/Advanced-Effects/Rendering-Lab-App.git
cd Rendering-Lab-App
git submodule init
git submodule update
mkdir build && cd build
cmake ..
cmake --install . --prefix=.
cmake --build .

Run:

./app/RenderingLab

❌ Common errors

Command 'git', 'cmake', 'ninja', etc... cannot be found

If you're getting these errors it means you lack the tools in your system to build a C++ project. Git is used for downloading the source code, CMake and Ninja are for building the source code. You cannot skip these.

Cannot find -lskia.friction: File or directory does not exist

/usr/bin/ld: cannot find -lskia.friction: El fitxer o directori no existeix
collect2: error: ld returned 1 exit status

This error is a linking error. It means everything built well separately, but now that everything is being joined together something is not being found.

In this case, we are passing skia.friction as a library to link with the main executable:

# Source: app/CMakeLists.txt
target_link_libraries(Executable PRIVATE
    skia.friction
)

When doing this, we are telling CMake (or the linker, ld) to look for a file called libskia.friction.so in any of the paths CMake expects to find external library files. (This file was previously generated by thirdparty/skia/CMakeLists.txt and moved here by the script buildscripts/skia/CopySkiaLibraryToInstallDir.cmake)

include/core/SkCanvas.h: the file or directory does not exist

In file included from /home/programar/Documents/AE/Rendering-Lab-App/src/ISkiaGLWindow.cpp:1:
/home/programar/Documents/AE/Rendering-Lab-App/src/ISkiaGLWindow.h:4:10: fatal error: include/core/SkCanvas.h: El fitxer o directori no existeix
    4 | #include "include/core/SkCanvas.h"
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.

This error means that we are looking for a file in include/core/SkCanvas.h within the directories specified by target_include_directories, but none can be found. Usually, this means that you haven't pulled the skia source code.

✅ SOLUTION: Run git submodule init and git submodule update and trigger another build (you might need to re-run cmake ..)

About

An application to test AE's rendering engine in isolation. Uses OpenGL and Skia.

Resources

Stars

Watchers

Forks

Contributors 2

  •  
  •