Radium Engine
1.5.20
|
#include <Headless/CLIViewer.hpp>
Public Member Functions | |
CLIRadiumEngineApp (std::unique_ptr< OpenGLContext > context) | |
Construct the viewer using an OpenGL context of the given version. | |
virtual | ~CLIRadiumEngineApp () |
Base destructor. | |
const Engine::RadiumEngine * | getEngine () const |
To have the same API to access Engine than in Qt based application. | |
int | init (int argc, const char *argv[]) override |
Application initialization method. | |
void | openGlAddOns (std::function< void()> f) |
void | bindOpenGLContext (bool on=true) |
Public Member Functions inherited from Ra::Headless::CLIBaseApplication | |
CLIBaseApplication ()=default | |
Base constructor. | |
virtual | ~CLIBaseApplication ()=default |
Base destructor. | |
template<typename... Args> | |
CLI::Option * | addOption (Args &&... args) |
template<typename... Args> | |
CLI::Option * | addFlag (Args &&... args) |
Protected Attributes | |
std::unique_ptr< OpenGLContext > | m_glContext |
Headless OpenGLContext. | |
bool | m_engineInitialized { false } |
is the engine initialized ? | |
Ra::Engine::RadiumEngine * | m_engine |
Instance of the radium engine. | |
Protected Attributes inherited from Ra::Headless::CLIBaseApplication | |
CLI::App | m_cmdLineParser |
Base class for radium based cmdline application.
This is the Headless pendant of the Ra::Gui::Viewer class, with only a very little interaction capabilities.
Definition at line 37 of file CLIViewer.hpp.
|
explicit |
Construct the viewer using an OpenGL context of the given version.
context | the opengl context, e.g. EglOpenGLContext or GlfwOpenGLContext. |
Definition at line 24 of file CLIViewer.cpp.
|
virtual |
Base destructor.
Definition at line 27 of file CLIViewer.cpp.
void Ra::Headless::CLIRadiumEngineApp::bindOpenGLContext | ( | bool | on = true | ) |
Activate/deactivate the OpenGL context
Definition at line 71 of file CLIViewer.cpp.
|
inline |
To have the same API to access Engine than in Qt based application.
Definition at line 49 of file CLIViewer.hpp.
|
overridevirtual |
Application initialization method.
This method is called by the main function to initialize the app giving its parameters.
argc | number of parameter |
argv | array of string representing the parameters |
Supported command line parameters are –help and –file <filename> from CLIRadiumApplication and the following parameters :
Reimplemented from Ra::Headless::CLIBaseApplication.
Definition at line 36 of file CLIViewer.cpp.
void Ra::Headless::CLIRadiumEngineApp::openGlAddOns | ( | std::function< void()> | f | ) |
Register OpenGL addons The given functor will be called with the OpenGL context bound
Definition at line 65 of file CLIViewer.cpp.
|
protected |
Instance of the radium engine.
Definition at line 85 of file CLIViewer.hpp.
|
protected |
is the engine initialized ?
Definition at line 82 of file CLIViewer.hpp.
|
protected |
Headless OpenGLContext.
Definition at line 79 of file CLIViewer.hpp.