Linux API Reference
The Linux C++ SDK API is identical to the Windows API. Please refer to:
The sections below cover Linux-specific notes only.
Linux-Specific Notes
Shared Library Loading
The SDK ships as a shared library libfacebetter.so. At runtime the OS must be able to locate it:
# Option 1: LD_LIBRARY_PATH (recommended during development)
export LD_LIBRARY_PATH=/path/to/facebetter-sdk/lib:$LD_LIBRARY_PATH
./your_app
# Option 2: Add to ldconfig (system-wide installation)
echo "/path/to/facebetter-sdk/lib" | sudo tee /etc/ld.so.conf.d/facebetter.conf
sudo ldconfig
# Option 3: Copy to a system library directory
sudo cp libfacebetter.so /usr/local/lib/
sudo ldconfigCMake Linkage
target_include_directories(your_target PRIVATE
/path/to/facebetter-sdk/include
)
target_link_libraries(your_target PRIVATE
${CMAKE_CURRENT_SOURCE_DIR}/lib/libfacebetter.so
# OpenGL dependencies
GL
glfw
)OpenGL Environment
A valid OpenGL context is required. Install the necessary graphics libraries first:
# Ubuntu / Debian
sudo apt install libgl1-mesa-dev libglu1-mesa-dev libglfw3-dev
# Fedora / RHEL
sudo dnf install mesa-libGL-devel mesa-libGLU-devel glfw-develFor headless servers (no display), use Mesa's off-screen rendering:
# Ubuntu / Debian
sudo apt install libosmesa6-devexternal_context Field
If your application already manages an OpenGL context (e.g. via GLFW), set:
EngineConfig cfg;
cfg.external_context = true; // Use the caller's current GL contextWhen true, the SDK does not create an internal GL context; all GPU calls run on the calling thread's active context.
SetRenderView Not Available
This method exists only on iOS and macOS. Do not call it on Linux.
DISPLAY Environment Variable
When using a windowed GLFW display, an X11 or Wayland server must be present:
echo $DISPLAY # should print something like :0 or :1For remote SSH sessions, enable X11 forwarding:
ssh -X user@hostFull API Documentation
For the complete reference covering all methods, enumerations, and data structures, see the Windows C++ API Reference — it applies equally to Linux.

