SLProject  4.2.000
A platform independent 3D computer graphics framework for desktop OS, Android, iOS and online in web browsers
AppDemoSceneSuzanne.h
Go to the documentation of this file.
1 /**
2  * \file AppDemoSceneSuzanne.h
3  * \brief Class declaration for an SLScene inherited class
4  * \details For more info about App framework and the scene assembly see:
5  * https://cpvrlab.github.io/SLProject4/app-framework.html
6  * \date May 2024
7  * \authors Marino von Wattenwyl
8  * \copyright http://opensource.org/licenses/GPL-3.0
9  * \remarks Please use clangformat to format the code. See more code style on
10  * https://github.com/cpvrlab/SLProject4/wiki/SLProject-Coding-Style
11 */
12 
13 #ifndef APPDEMOSCENESUZANNE_H
14 #define APPDEMOSCENESUZANNE_H
15 
16 #include <SLScene.h>
17 
18 //-----------------------------------------------------------------------------
19 //! Class for all variants of generated shaders on the Suzanne head
21 {
22 public:
24  bool textureMapping,
25  bool normalMapping,
26  bool occlusionMapping,
27  bool shadowMapping,
28  bool environmentMapping);
29 
30 
31  //! All scene specific assets have to be registered for async loading in here.
32  /*! @remark All scene sspecific assets have to be loaded async by overriding
33  SLScene::registerAssetsToLoad and SLScene::assemble. Async loading and
34  assembling means that it happens in a parallel thread and that in there are
35  no OpenGL calls allowed. OpenGL calls are only allowed in the main thread.*/
36  void registerAssetsToLoad(SLAssetLoader& al) override;
37 
38  //! After parallel loading of the assets the scene gets assembled in here.
39  /*! @remark All scene-specific assets have to be loaded async by overriding
40  SLScene::registerAssetsToLoad and SLScene::assemble. Async loading and
41  assembling means that it happens in a parallel thread and that in there
42  are no OpenGL calls allowed. OpenGL calls are only allowed in the main
43  thread. It is important that all object instantiations within
44  SLScene::assemble do NOT call any OpenGL functions (gl*) because they happen
45  in a parallel thread. All objects that get rendered have to do their
46  initialization when they are used the first time during rendering in the
47  main thread.*/
48  void assemble(SLAssetManager* am, SLSceneView* sv) override;
49 
50 private:
58 };
59 //-----------------------------------------------------------------------------
60 
61 #endif
string SLstring
Definition: SL.h:158
Class for all variants of generated shaders on the Suzanne head.
void assemble(SLAssetManager *am, SLSceneView *sv) override
After parallel loading of the assets the scene gets assembled in here.
void registerAssetsToLoad(SLAssetLoader &al) override
All scene specific assets have to be registered for async loading in here.
AppDemoSceneSuzanne(SLstring name, bool textureMapping, bool normalMapping, bool occlusionMapping, bool shadowMapping, bool environmentMapping)
Toplevel holder of the assets meshes, materials, textures and shaders.
SLNode represents a node in a hierarchical scene graph.
Definition: SLNode.h:147
const SLstring & name() const
Definition: SLObject.h:38
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
Skybox node class with a SLBox mesh.
Definition: SLSkybox.h:29