SLProject  4.2.000
A platform independent 3D computer graphics framework for desktop OS, Android, iOS and online in web browsers
AppNodeScene.h
Go to the documentation of this file.
1 /**
2  * \file AppNodeScene.h
3  * \brief Scene creation callback for the the node demo app
4  * \date June 2024
5  * \authors Marino von Wattenwyl
6  * \copyright http://opensource.org/licenses/GPL-3.0
7  * \remarks Please use clangformat to format the code. See more code style on
8  * https://github.com/cpvrlab/SLProject4/wiki/SLProject-Coding-Style
9 */
10 
11 #ifndef APPNODESCENE_H
12 #define APPNODESCENE_H
13 
14 #include <SLScene.h>
15 
16 //-----------------------------------------------------------------------------
17 class AppNodeScene : public SLScene
18 {
19 public:
20  AppNodeScene();
21 
22  //! All scene specific assets have to be registered for async loading in here.
23  /*! @remark All scene sspecific assets have to be loaded async by overriding
24  SLScene::registerAssetsToLoad and SLScene::assemble. Async loading and
25  assembling means that it happens in a parallel thread and that in there are
26  no OpenGL calls allowed. OpenGL calls are only allowed in the main thread.*/
27  void registerAssetsToLoad(SLAssetLoader& al) override;
28 
29  //! After parallel loading of the assets the scene gets assembled in here.
30  /*! @remark All scene-specific assets have to be loaded async by overriding
31  SLScene::registerAssetsToLoad and SLScene::assemble. Async loading and
32  assembling means that it happens in a parallel thread and that in there
33  are no OpenGL calls allowed. OpenGL calls are only allowed in the main
34  thread. It is important that all object instantiations within
35  SLScene::assemble do NOT call any OpenGL functions (gl*) because they happen
36  in a parallel thread. All objects that get rendered have to do their
37  initialization when they are used the first time during rendering in the
38  main thread.*/
39  void assemble(SLAssetManager* am, SLSceneView* sv) override;
40 
41 private:
43 };
44 //-----------------------------------------------------------------------------
45 
46 #endif
SLNode * _axesNode
Definition: AppNodeScene.h:42
void registerAssetsToLoad(SLAssetLoader &al) override
All scene specific assets have to be registered for async loading in here.
void assemble(SLAssetManager *am, SLSceneView *sv) override
After parallel loading of the assets the scene gets assembled in here.
Toplevel holder of the assets meshes, materials, textures and shaders.
SLNode represents a node in a hierarchical scene graph.
Definition: SLNode.h:147
The SLScene class represents the top level instance holding the scene structure.
Definition: SLScene.h:47
SceneView class represents a dynamic real time 3D view onto the scene.
Definition: SLSceneView.h:69