SLProject  4.2.000
A platform independent 3D computer graphics framework for desktop OS, Android, iOS and online in web browsers
AppCommon Class Reference

Top level class for the major global instances off an SLProject app. More...

#include <AppCommon.h>

Static Public Member Functions

static void createApp (SLstring appName)
 Application creation function. More...
 
static void registerCoreAssetsLoad ()
 
static void switchScene (SLSceneView *sv, SLSceneID sceneID)
 
static void deleteApp ()
 Calls the destructor of the single scene instance. More...
 
static void handleParallelJob ()
 Starts parallel job if one is queued. More...
 
static void jobProgressMsg (string msg)
 Thread-safe setter of the progress message. More...
 
static void jobProgressNum (int num)
 
static void jobProgressMax (int max)
 
static string jobProgressMsg ()
 Thread-safe getter of the progress message. More...
 
static int jobProgressNum ()
 
static int jobProgressMax ()
 

Static Public Attributes

static SLInputManager inputManager
 Input events manager. More...
 
static SLAssetManagerassetManager = nullptr
 asset manager is the owner of all assets More...
 
static SLAssetLoaderassetLoader = nullptr
 Asset-loader for async asset loading. More...
 
static SLScenescene = nullptr
 Pointer to the one and only SLScene instance. More...
 
static SLVSceneView sceneViews
 Vector of sceneview pointers. More...
 
static SLUiInterfacegui = nullptr
 Pointer to the GUI. More...
 
static SLDeviceRotation devRot
 Mobile device rotation from IMU. More...
 
static SLDeviceLocation devLoc
 Mobile device location from GPS. More...
 
static SLstring name = "SLProjectApp"
 Application name. More...
 
static SLstring appTag = "SLProject"
 Tag string used in logging. More...
 
static SLstring version = "4.2.001"
 SLProject version string. More...
 
static SLstring asciiLabel
 SLProject ascii label string. More...
 
static SLstring configuration = "Release"
 Debug or Release configuration. More...
 
static SLstring gitBranch = SL_GIT_BRANCH
 Current GIT branch. More...
 
static SLstring gitCommit = SL_GIT_COMMIT
 Current GIT commit short hash id. More...
 
static SLstring gitDate = SL_GIT_DATE
 Current GIT commit date. More...
 
static SLstring exePath
 executable root path More...
 
static SLstring configPath
 Default path for calibration files. More...
 
static SLstring externalPath
 Default path for external file storage. More...
 
static SLstring dataPath
 Path to data directory (it is set platform dependent) More...
 
static SLstring shaderPath
 Path to GLSL shader programs. More...
 
static SLstring modelPath
 Path to 3D models. More...
 
static SLstring texturePath
 Path to texture images. More...
 
static SLstring fontPath
 Path to font images. More...
 
static SLstring videoPath
 Path to video files. More...
 
static SLSceneID sceneID = SL_EMPTY_SCENE_ID
 ID of currently loaded scene. More...
 
static optional< SLSceneIDsceneToLoad
 Scene id to load at start up. More...
 
static map< string, string > deviceParameter
 Generic device parameter. More...
 
static deque< function< void(void)> > jobsToBeThreaded
 Queue of functions to be executed in a thread. More...
 
static deque< function< void(void)> > jobsToFollowInMain
 Queue of function to follow in the main thread. More...
 
static atomic< bool > jobIsRunning
 True if a parallel job is running. More...
 
static CVCalibrationEstimatorParams calibrationEstimatorParams
 
static CVCalibrationEstimatorcalibrationEstimator = nullptr
 
static SLstring calibIniPath
 That's where data/calibrations folder is located. More...
 
static SLstring calibFilePath
 That's where calibrations are stored and loaded from. More...
 
static SLIOBuffer fontDataProp
 
static SLIOBuffer fontDataFixed
 
static const string CALIB_FTP_HOST = "pallas.ti.bfh.ch:21"
 ftp host for calibration up and download More...
 
static const string CALIB_FTP_USER = "upload"
 ftp login user for calibration up and download More...
 
static const string CALIB_FTP_PWD = "FaAdbD3F2a"
 ftp login pwd for calibration up and download More...
 
static const string CALIB_FTP_DIR = "calibrations"
 ftp directory for calibration up and download More...
 
static const string PROFILE_FTP_DIR = "profiles"
 ftp directory for profiles upload More...
 

Static Private Member Functions

static void onDoneLoading (SLSceneView *sv, SLScene *s, SLfloat startLoadMS)
 
static void onDoneAssembling (SLSceneView *sv, SLScene *s, SLfloat startLoadMS)
 

Static Private Attributes

static string _jobProgressMsg = ""
 Text message to show during progress. More...
 
static atomic< int > _jobProgressNum
 Integer value to show progress. More...
 
static atomic< int > _jobProgressMax
 Max. integer progress value. More...
 
static mutex _jobMutex
 Mutex to protect parallel access. More...
 

Detailed Description

Top level class for the major global instances off an SLProject app.

The AppCommon holds static instances of top-level items such as the asset manager, the scene pointer, the vector of all sceneviews, the gui pointer, the camera calibration objects and the device rotation and location information.
The static function createApp is called by the C-interface functions slCreateApp and the function deleteApp by slTerminate. At the moment only one scene can be open at the time.
AppCommon holds two static video camera calibrations, one for a main camera (mainCam) and one for the selfie camera on mobile devices (scndCam). The pointer activeCamera points to the active one.

Definition at line 54 of file AppCommon.h.

Member Function Documentation

◆ createApp()

void AppCommon::createApp ( SLstring  appName)
static

Application creation function.

Writes and inits the static application information and create the single instances of SLGLState, SLAssetManager and SLAssetLoader. Gets called by the C-interface function slCreateApp.

See examples usages in:

Definition at line 111 of file AppCommon.cpp.

112 {
113  assert(AppCommon::scene == nullptr &&
114  "You can create only one AppCommon");
115 
116  // Initialize the global SLGLState instance
118 
119  name = std::move(appName);
121 
123 
128 
130 
131 #ifdef SL_HAS_OPTIX
132  SLOptix::exePath = AppCommon::exePath;
133  SLOptix::createStreamAndContext();
134 #endif
135 }
static SLstring name
Application name.
Definition: AppCommon.h:72
static SLstring fontPath
Path to font images.
Definition: AppCommon.h:87
static SLstring configPath
Default path for calibration files.
Definition: AppCommon.h:81
static SLAssetManager * assetManager
asset manager is the owner of all assets
Definition: AppCommon.h:59
static SLstring exePath
executable root path
Definition: AppCommon.h:80
static SLstring modelPath
Path to 3D models.
Definition: AppCommon.h:85
static SLstring texturePath
Path to texture images.
Definition: AppCommon.h:86
static SLstring shaderPath
Path to GLSL shader programs.
Definition: AppCommon.h:84
static SLAssetLoader * assetLoader
Asset-loader for async asset loading.
Definition: AppCommon.h:60
static SLScene * scene
Pointer to the one and only SLScene instance.
Definition: AppCommon.h:61
static SLstring dataPath
Path to data directory (it is set platform dependent)
Definition: AppCommon.h:83
static void timerStart()
Definition: GlobalTimer.cpp:15
Toplevel holder of the assets meshes, materials, textures and shaders.
static void init(string shaderPath, string configPath)
Init by providing path to standard shader files.
static SLGLState * instance()
Public static instance getter for singleton pattern.
Definition: SLGLState.h:74
void initAll()
Definition: SLGLState.cpp:42

◆ deleteApp()

void AppCommon::deleteApp ( )
static

Calls the destructor of the single scene instance.

Destroys all data by calling the destructor of the single scene instance. All other date gets destroyed from there. This function gets called by the SLProject C-Interface function slTerminate that should be called at the end of any SLProject application.

Definition at line 298 of file AppCommon.cpp.

299 {
300  // The WebGL context is apparently already destroyed when we call this function
301 #ifndef SL_EMSCRIPTEN
302  assert(AppCommon::scene != nullptr &&
303  "You can delete a scene only once");
304 
305  for (auto* sv : sceneViews)
306  delete sv;
307  sceneViews.clear();
308 
309  delete scene;
310  scene = nullptr;
311 
312  delete assetManager;
313  assetManager = nullptr;
314 
315  delete assetLoader;
316  assetLoader = nullptr;
317 #endif
318 
319  if (gui)
320  {
321  delete gui;
322  gui = nullptr;
323  }
324 
325  // Deallocate global font data.
328 
329  // The WebGL context is apparently already destroyed when we call this function
330 #ifndef SL_EMSCRIPTEN
331  // delete default stuff:
334 #endif
335 
336  // Delete the default materials
339 
340  // Delete the global SLGLState instance
342 }
SLSceneView * sv
Definition: SLGLImGui.h:28
static SLIOBuffer fontDataProp
Definition: AppCommon.h:111
static SLUiInterface * gui
Pointer to the GUI.
Definition: AppCommon.h:63
static SLVSceneView sceneViews
Vector of sceneview pointers.
Definition: AppCommon.h:62
static SLIOBuffer fontDataFixed
Definition: AppCommon.h:112
static void deletePrograms()
Delete all instantiated programs.
static void deleteInstance()
global destruction
Definition: SLGLState.cpp:27
static void deleteInstance()
Definition: SLMaterial.h:292
SceneView class represents a dynamic real time 3D view onto the scene.
Definition: SLSceneView.h:69
void deallocate()
Deallocates the data owned by the buffer.

◆ handleParallelJob()

void AppCommon::handleParallelJob ( )
static

Starts parallel job if one is queued.

Parallel executed job can be queued in jobsToBeThreaded. Only functions are allowed that do not call any OpenGL functions. So no scenegraph changes are allowed because they involve mostly OpenGL state and context changes. Only one parallel job is executed at once parallel to the main rendering thread. The function in jobsToFollowInMain will be executed in the main tread after the parallel are finished.
The handleParallelJob function gets called in slUpdateAndPaint before a new frame gets started. See an example parallel job definition in AppDemoGui. If a parallel job is running the jobProgressMsg can be shown during execution. If jobProgressMax is 0 the jobProgressNum value can be shown an number. If jobProgressMax is not 0 the fraction of jobProgressNum/jobProgressMax can be shown within a progress bar. See the example in AppDemoGui::build.

Definition at line 359 of file AppCommon.cpp.

360 {
361  // Execute queued jobs in a parallel thread
364  {
365  function<void(void)> job = AppCommon::jobsToBeThreaded.front();
366  thread jobThread(job);
368  AppCommon::jobsToBeThreaded.pop_front();
369  jobThread.detach();
370  }
371 
372  // Execute the jobs to follow in the this (the main) thread
374  AppCommon::jobsToBeThreaded.empty() &&
376  {
377  for (const auto& jobToFollow : AppCommon::jobsToFollowInMain)
378  jobToFollow();
380  }
381 }
typedef void(SL_STDCALL *cbOnImGuiBuild)(SLScene *s
Callback function typedef for ImGui build function.
static deque< function< void(void)> > jobsToBeThreaded
Queue of functions to be executed in a thread.
Definition: AppCommon.h:102
static atomic< bool > jobIsRunning
True if a parallel job is running.
Definition: AppCommon.h:104
static deque< function< void(void)> > jobsToFollowInMain
Queue of function to follow in the main thread.
Definition: AppCommon.h:103

◆ jobProgressMax() [1/2]

static int AppCommon::jobProgressMax ( )
inlinestatic

Definition at line 99 of file AppCommon.h.

99 { return _jobProgressMax; }
static atomic< int > _jobProgressMax
Max. integer progress value.
Definition: AppCommon.h:126

◆ jobProgressMax() [2/2]

static void AppCommon::jobProgressMax ( int  max)
inlinestatic

Definition at line 96 of file AppCommon.h.

96 { _jobProgressMax = max; }

◆ jobProgressMsg() [1/2]

string AppCommon::jobProgressMsg ( )
static

Thread-safe getter of the progress message.

Definition at line 392 of file AppCommon.cpp.

393 {
394  lock_guard<mutex> guard(_jobMutex);
395  return _jobProgressMsg;
396 }
static string _jobProgressMsg
Text message to show during progress.
Definition: AppCommon.h:124
static mutex _jobMutex
Mutex to protect parallel access.
Definition: AppCommon.h:127

◆ jobProgressMsg() [2/2]

void AppCommon::jobProgressMsg ( string  msg)
static

Thread-safe setter of the progress message.

Definition at line 384 of file AppCommon.cpp.

385 {
386  AppCommon::_jobMutex.lock();
387  AppCommon::_jobProgressMsg = std::move(msg);
388  AppCommon::_jobMutex.unlock();
389 }

◆ jobProgressNum() [1/2]

static int AppCommon::jobProgressNum ( )
inlinestatic

Definition at line 98 of file AppCommon.h.

98 { return _jobProgressNum; }
static atomic< int > _jobProgressNum
Integer value to show progress.
Definition: AppCommon.h:125

◆ jobProgressNum() [2/2]

static void AppCommon::jobProgressNum ( int  num)
inlinestatic

Definition at line 95 of file AppCommon.h.

95 { _jobProgressNum = num; }

◆ onDoneAssembling()

void AppCommon::onDoneAssembling ( SLSceneView sv,
SLScene s,
SLfloat  startLoadMS 
)
staticprivate

Definition at line 267 of file AppCommon.cpp.

268 {
269  /* Assign the scene to the sceneview. The sceneview exists and is used
270  * before it knows its scene. This is new since we do async loading and
271  * show a spinner in the sceneview. */
272  sv->scene(s);
273  sv->postSceneLoad();
274 
275  // Make sure the scene view has a camera
276  if (!sv->camera())
278 
279  // call onInitialize on all scene views to init the scenegraph and stats
280  for (auto* sceneView : AppCommon::sceneViews)
281  if (sceneView != nullptr)
282  sceneView->onInitialize();
283 
285 
288 
289  s->loadTimeMS(GlobalTimer::timeMS() - startLoadMS);
290 }
static void onAfterSceneAssembly(SLSceneView *sv, SLScene *s)
SLScene * s
Definition: SLScene.h:31
static float timeMS()
Definition: GlobalTimer.cpp:25
The SLScene class represents the top level instance holding the scene structure.
Definition: SLScene.h:47
void loadTimeMS(SLfloat loadTimeMS)
Definition: SLScene.h:94
virtual void postSceneLoad()
Definition: SLSceneView.h:97
void camera(SLCamera *camera)
Definition: SLSceneView.h:145
void scene(SLScene *scene)
Definition: SLSceneView.h:146
SLCamera * sceneViewCamera()
Definition: SLSceneView.h:169
Config config
The configuration set in App::run.
Definition: AppAndroid.cpp:34
OnAfterSceneAssemblyCallback onAfterSceneAssembly
Definition: App.h:70

◆ onDoneLoading()

void AppCommon::onDoneLoading ( SLSceneView sv,
SLScene s,
SLfloat  startLoadMS 
)
staticprivate

OnDoneLoading is called when the asyn asset loading is finished and the async scene assembly can be started.

Definition at line 248 of file AppCommon.cpp.

249 {
252 
253  // Register a task to assemble the scene.
254  al->addLoadTask(std::bind(&SLScene::assemble, s, am, sv));
255 
256  // `onDone` is a wrapper around `onDoneAssembling` that will be called
257  // in the main thread after loading.
258  auto onDone = std::bind(onDoneAssembling, sv, s, startLoadMS);
259 
260  // Start assembling the scene asynchronously.
261  al->loadAssetsAsync(onDone);
262 
265 }
static void onBeforeSceneAssembly(SLSceneView *sv, SLScene *s)
static void onDoneAssembling(SLSceneView *sv, SLScene *s, SLfloat startLoadMS)
Definition: AppCommon.cpp:267
void loadAssetsAsync(function< void()> onDone)
void addLoadTask(SLAssetLoadTask task)
Add generic task.
virtual void assemble(SLAssetManager *am, SLSceneView *sv)
After parallel loading of the assets the scene gets assembled in here.
Definition: SLScene.h:75
OnBeforeSceneAssemblyCallback onBeforeSceneAssembly
Definition: App.h:69

◆ registerCoreAssetsLoad()

void AppCommon::registerCoreAssetsLoad ( )
static

Registers core assets to load async by all apps. Scene specific assets have to be loaded async by overriding SLScene::registerAssetsToLoad and SLScene::assemble. Async loading and assembling means that it happens in a parallel thread and that inthere are no OpenGL calls allowed. OpenGL calls are only allowed in the main thread.

Definition at line 143 of file AppCommon.cpp.

144 {
147 
148  // FIXME: There are dependencies between these load tasks, how do we express this?
149 
150  // Load all core shader programs.
151  al.addLoadTask([am]
153 
154  // Generate static fonts.
157 
158  // Load data for ImGUI fonts.
160  AppCommon::fontPath + "DroidSans.ttf",
161  IOK_font);
163  AppCommon::fontPath + "ProggyClean.ttf",
164  IOK_font);
165 }
@ IOK_font
Definition: SLFileStorage.h:43
void addRawDataToLoad(SLIOBuffer &buffer, SLstring filename, SLIOStreamKind kind)
void generateStaticFonts(SLstring fontPath)
static void loadPrograms()
Instantiate and load all programs.

◆ switchScene()

void AppCommon::switchScene ( SLSceneView sv,
SLSceneID  sceneID 
)
static

Deletes the current scene and creates a new one identified by the sceneID. All assets get registered for async loading while Imgui shows a progress spinner in the UI. After the parallel loading the scene gets assembled back in the main thread.

Parameters
svPointer to the sceneview
sceneIDScene identifier defined in SLEnum

Definition at line 175 of file AppCommon.cpp.

176 {
179 
180  SLfloat startLoadMS = GlobalTimer::timeMS();
181 
182  //////////////////////
183  // Delete old scene //
184  //////////////////////
185 
188 
189  if (AppCommon::scene)
190  {
191  delete AppCommon::scene;
192  AppCommon::scene = nullptr;
193  }
194 
195  // Deactivate in general the device sensors
198 
199  // reset existing sceneviews
200  for (auto* sceneView : AppCommon::sceneViews)
201  sceneView->unInit();
202 
203  // Clear all data in the asset manager
204  am->clear();
205 
206  ////////////////////
207  // Init new scene //
208  ////////////////////
209 
212  SL_LOG("Scene name : %s (SceneID: %d)",
213  s->name().c_str(),
215 
216  // Initialize all preloaded stuff from SLScene
217  s->init(am);
218 
219 #ifndef SL_EMSCRIPTEN
220  s->initOculus(AppCommon::dataPath + "shaders/");
221 #endif
222 
223  // Reset the global SLGLState state
225 
226  ///////////////////////////////
227  // Prepare for async loading //
228  ///////////////////////////////
229 
230  // Register assets on the loader that have to be loaded before assembly.
231  al->scene(s);
232  s->registerAssetsToLoad(*al);
233 
234  // `onDone` is a wrapper around `onDoneLoading` that will be called
235  // in the main thread after loading.
236  auto onDone = std::bind(onDoneLoading, sv, s, startLoadMS);
237 
238  // Start loading assets asynchronously.
239  al->loadAssetsAsync(onDone);
240 
243 }
static void onBeforeSceneDelete(SLSceneView *sv, SLScene *s)
static void onBeforeSceneLoad(SLSceneView *sv, SLScene *s)
float SLfloat
Definition: SL.h:173
#define SL_LOG(...)
Definition: SL.h:233
SLScene SLSceneView SLint sceneID
Definition: SLScene.h:33
static SLDeviceRotation devRot
Mobile device rotation from IMU.
Definition: AppCommon.h:64
static SLDeviceLocation devLoc
Mobile device location from GPS.
Definition: AppCommon.h:65
static void onDoneLoading(SLSceneView *sv, SLScene *s, SLfloat startLoadMS)
Definition: AppCommon.cpp:248
static SLSceneID sceneID
ID of currently loaded scene.
Definition: AppCommon.h:89
void scene(SLScene *scene)
Definition: SLAssetLoader.h:65
void clear()
for all assets, clear gpu data
void name(const SLstring &Name)
Definition: SLObject.h:34
virtual void registerAssetsToLoad(SLAssetLoader &al)
All assets the should be loaded in parallel must be registered in here.
Definition: SLScene.h:63
void initOculus(SLstring shaderDir)
Definition: SLScene.cpp:391
void init(SLAssetManager *am)
Definition: SLScene.cpp:72
OnNewSceneCallback onNewScene
Definition: App.h:66
OnBeforeSceneLoadCallback onBeforeSceneLoad
Definition: App.h:68
OnBeforeSceneDeleteCallback onBeforeSceneDelete
Definition: App.h:67

Member Data Documentation

◆ _jobMutex

mutex AppCommon::_jobMutex
staticprivate

Mutex to protect parallel access.

Definition at line 127 of file AppCommon.h.

◆ _jobProgressMax

atomic< int > AppCommon::_jobProgressMax
staticprivate

Max. integer progress value.

Definition at line 126 of file AppCommon.h.

◆ _jobProgressMsg

string AppCommon::_jobProgressMsg = ""
staticprivate

Text message to show during progress.

Definition at line 124 of file AppCommon.h.

◆ _jobProgressNum

atomic< int > AppCommon::_jobProgressNum
staticprivate

Integer value to show progress.

Definition at line 125 of file AppCommon.h.

◆ appTag

SLstring AppCommon::appTag = "SLProject"
static

Tag string used in logging.

Definition at line 73 of file AppCommon.h.

◆ asciiLabel

SLstring AppCommon::asciiLabel
static
Initial value:
= R"(
______ ___ _ __ ____ ___
/ __/ / / _ \_______ (_)__ ____/ /_ / / / |_ |
_\ \/ /__/ ___/ __/ _ \ / / -_) __/ __/ /_ _/ / __/
/___/____/_/ /_/ \___/_/ /\__/\__/\__/ /_/(_)____/
|___/
)"

SLProject ascii label string.

ASCII Label: https://patorjk.com/software/taag/#p=display&f=Small%20Slant&t=SLProject%204.2.

Definition at line 75 of file AppCommon.h.

◆ assetLoader

SLAssetLoader * AppCommon::assetLoader = nullptr
static

Asset-loader for async asset loading.

Definition at line 60 of file AppCommon.h.

◆ assetManager

SLAssetManager * AppCommon::assetManager = nullptr
static

asset manager is the owner of all assets

Definition at line 59 of file AppCommon.h.

◆ CALIB_FTP_DIR

const string AppCommon::CALIB_FTP_DIR = "calibrations"
static

ftp directory for calibration up and download

Definition at line 117 of file AppCommon.h.

◆ CALIB_FTP_HOST

const string AppCommon::CALIB_FTP_HOST = "pallas.ti.bfh.ch:21"
static

ftp host for calibration up and download

Definition at line 114 of file AppCommon.h.

◆ CALIB_FTP_PWD

const string AppCommon::CALIB_FTP_PWD = "FaAdbD3F2a"
static

ftp login pwd for calibration up and download

Definition at line 116 of file AppCommon.h.

◆ CALIB_FTP_USER

const string AppCommon::CALIB_FTP_USER = "upload"
static

ftp login user for calibration up and download

Definition at line 115 of file AppCommon.h.

◆ calibFilePath

SLstring AppCommon::calibFilePath
static

That's where calibrations are stored and loaded from.

Definition at line 109 of file AppCommon.h.

◆ calibIniPath

SLstring AppCommon::calibIniPath
static

That's where data/calibrations folder is located.

Definition at line 108 of file AppCommon.h.

◆ calibrationEstimator

CVCalibrationEstimator * AppCommon::calibrationEstimator = nullptr
static

Definition at line 107 of file AppCommon.h.

◆ calibrationEstimatorParams

CVCalibrationEstimatorParams AppCommon::calibrationEstimatorParams
static

Definition at line 106 of file AppCommon.h.

◆ configPath

SLstring AppCommon::configPath
static

Default path for calibration files.

Definition at line 81 of file AppCommon.h.

◆ configuration

SLstring AppCommon::configuration = "Release"
static

Debug or Release configuration.

Definition at line 76 of file AppCommon.h.

◆ dataPath

SLstring AppCommon::dataPath
static

Path to data directory (it is set platform dependent)

Definition at line 83 of file AppCommon.h.

◆ deviceParameter

map< string, string > AppCommon::deviceParameter
static

Generic device parameter.

Definition at line 101 of file AppCommon.h.

◆ devLoc

SLDeviceLocation AppCommon::devLoc
static

Mobile device location from GPS.

Definition at line 65 of file AppCommon.h.

◆ devRot

SLDeviceRotation AppCommon::devRot
static

Mobile device rotation from IMU.

Definition at line 64 of file AppCommon.h.

◆ exePath

SLstring AppCommon::exePath
static

executable root path

Definition at line 80 of file AppCommon.h.

◆ externalPath

SLstring AppCommon::externalPath
static

Default path for external file storage.

Definition at line 82 of file AppCommon.h.

◆ fontDataFixed

SLIOBuffer AppCommon::fontDataFixed
static

Definition at line 112 of file AppCommon.h.

◆ fontDataProp

SLIOBuffer AppCommon::fontDataProp
static

Definition at line 111 of file AppCommon.h.

◆ fontPath

SLstring AppCommon::fontPath
static

Path to font images.

Definition at line 87 of file AppCommon.h.

◆ gitBranch

SLstring AppCommon::gitBranch = SL_GIT_BRANCH
static

Current GIT branch.

Definition at line 77 of file AppCommon.h.

◆ gitCommit

SLstring AppCommon::gitCommit = SL_GIT_COMMIT
static

Current GIT commit short hash id.

Definition at line 78 of file AppCommon.h.

◆ gitDate

SLstring AppCommon::gitDate = SL_GIT_DATE
static

Current GIT commit date.

Definition at line 79 of file AppCommon.h.

◆ gui

SLUiInterface * AppCommon::gui = nullptr
static

Pointer to the GUI.

Definition at line 63 of file AppCommon.h.

◆ inputManager

SLInputManager AppCommon::inputManager
static

Input events manager.

Global static objects.

Definition at line 58 of file AppCommon.h.

◆ jobIsRunning

atomic< bool > AppCommon::jobIsRunning
static

True if a parallel job is running.

Definition at line 104 of file AppCommon.h.

◆ jobsToBeThreaded

deque< function< void(void)> > AppCommon::jobsToBeThreaded
static

Queue of functions to be executed in a thread.

Definition at line 102 of file AppCommon.h.

◆ jobsToFollowInMain

deque< function< void(void)> > AppCommon::jobsToFollowInMain
static

Queue of function to follow in the main thread.

Definition at line 103 of file AppCommon.h.

◆ modelPath

SLstring AppCommon::modelPath
static

Path to 3D models.

Definition at line 85 of file AppCommon.h.

◆ name

SLstring AppCommon::name = "SLProjectApp"
static

Application name.

Definition at line 72 of file AppCommon.h.

◆ PROFILE_FTP_DIR

const string AppCommon::PROFILE_FTP_DIR = "profiles"
static

ftp directory for profiles upload

Definition at line 118 of file AppCommon.h.

◆ scene

SLScene * AppCommon::scene = nullptr
static

Pointer to the one and only SLScene instance.

Definition at line 61 of file AppCommon.h.

◆ sceneID

SLSceneID AppCommon::sceneID = SL_EMPTY_SCENE_ID
static

ID of currently loaded scene.

Definition at line 89 of file AppCommon.h.

◆ sceneToLoad

std::optional< SLSceneID > AppCommon::sceneToLoad
static

Scene id to load at start up.

Definition at line 90 of file AppCommon.h.

◆ sceneViews

vector< SLSceneView * > AppCommon::sceneViews
static

Vector of sceneview pointers.

Definition at line 62 of file AppCommon.h.

◆ shaderPath

SLstring AppCommon::shaderPath
static

Path to GLSL shader programs.

Definition at line 84 of file AppCommon.h.

◆ texturePath

SLstring AppCommon::texturePath
static

Path to texture images.

Definition at line 86 of file AppCommon.h.

◆ version

SLstring AppCommon::version = "4.2.001"
static

SLProject version string.

Definition at line 74 of file AppCommon.h.

◆ videoPath

SLstring AppCommon::videoPath
static

Path to video files.

Definition at line 88 of file AppCommon.h.


The documentation for this class was generated from the following files: