Quick start examples for integrating Banuba SDK on Desktop in C++ apps.
- Get the latest Banuba SDK archive for MacOS/Windows and the client token. Please fill out our form at form at banuba.com website, or contact us via [email protected].
- Copy
bnb_viewer_standalone/bnb_sdk/
into thequickstart-desktop-cpp/bnb_sdk
dir:bnb_viewer_standalone/bnb_sdk/
=>quickstart-desktop-cpp/bnb_sdk
- Copy
bnb_viewer_standalone/resources/
files into thequickstart-desktop-cpp/resources
dir:bnb_viewer_standalone/resources/
=>quickstart-desktop-cpp/resources
- Copy
bnb_viewer_standalone/third
files into thequickstart-desktop-cpp/third
dir:bnb_viewer_standalone/third/
=>quickstart-desktop-cpp/third
- Copy and Paste your client token into the appropriate section of
quickstart-desktop-cpp/main.cpp
- Generate project files by executing the following commands:
cd %path_to_repository% mkdir build cd build cmake -A Win32 ..
cd %path_to_repository% mkdir build cd build cmake -A x64 ..
cd %path_to_repository% mkdir build cd build cmake -G Xcode ..
- The previous step will generate a Xcode project for MacOS and a Visual Studio project for Windows. Open the viewer_standalone project in an appropriate IDE on your platform.
- Select target
example
. - Run build.
Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature
) - Commit your Changes (
git commit -m 'Add some AmazingFeature
) - Push to the Branch (
git push origin feature/AmazingFeature
) - Open a Pull Request
- offscreen_effect_player - is a wrapper for effect_player. It allows you to use your own implementation for offscreen_render_target
- offscreen_render_target - is an implementation option for the offscreen_render_target interface. Allows to prepare gl framebuffers and textures for receiving a frame from gpu, receive bytes of the processed frame from the gpu and pass them to the cpu, as well as, if necessary, set the orientation for the received frame. This implementation uses GLFW to work with gl context
- libraries
- renderer - used only to demonstrate how to work with offscreen_effect_player. Draws received frames to the specified GLFW window
- utils
- glfw_utils - contains helper classes to work with GLFW
- ogl_utils - contains helper classes to work with Open GL
- utils - сontains common helper classes such as thread_pool
- interfaces - offscreen effect player interfaces
- main.cpp - contains the main function implementation, demonstrating basic pipeline for frame processing to apply effect offscreen
For integration of the Offscreen Effect player to your application it is necessary to copy the offscreen_effect_player folder and implement interfaces for offscreen_render_target, but if your application is based on the GLFW library, you can just reuse offscreen_render_target with the utility library.