SLProject
4.2.000
A platform independent 3D computer graphics framework for desktop OS, Android, iOS and online in web browsers
AppDemoSceneRevolver.h
Go to the documentation of this file.
1
/**
2
* \file AppDemoSceneRevolver.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 Marcus Hudritsch, 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 APPDEMOSCENEREVOLVER_H
14
#define APPDEMOSCENEREVOLVER_H
15
16
#include <
SLScene.h
>
17
18
//-----------------------------------------------------------------------------
19
//! Class for revolver mesh scene
20
class
AppDemoSceneRevolver
:
public
SLScene
21
{
22
public
:
23
AppDemoSceneRevolver
();
24
25
//! All scene specific assets have to be registered for async loading in here.
26
/*! @remark All scene sspecific assets have to be loaded async by overriding
27
SLScene::registerAssetsToLoad and SLScene::assemble. Async loading and
28
assembling means that it happens in a parallel thread and that in there are
29
no OpenGL calls allowed. OpenGL calls are only allowed in the main thread.*/
30
void
registerAssetsToLoad
(
SLAssetLoader
& al)
override
;
31
32
//! After parallel loading of the assets the scene gets assembled in here.
33
/*! @remark All scene-specific assets have to be loaded async by overriding
34
SLScene::registerAssetsToLoad and SLScene::assemble. Async loading and
35
assembling means that it happens in a parallel thread and that in there
36
are no OpenGL calls allowed. OpenGL calls are only allowed in the main
37
thread. It is important that all object instantiations within
38
SLScene::assemble do NOT call any OpenGL functions (gl*) because they happen
39
in a parallel thread. All objects that get rendered have to do their
40
initialization when they are used the first time during rendering in the
41
main thread.*/
42
void
assemble
(
SLAssetManager
* am,
SLSceneView
*
sv
)
override
;
43
44
private
:
45
SLGLTexture
*
_tex1C
;
46
SLGLTexture
*
_tex1N
;
47
SLGLTexture
*
_tex2
;
48
SLGLTexture
*
_tex3
;
49
SLGLTexture
*
_tex4
;
50
SLGLTexture
*
_tex5
;
51
SLGLProgram
*
_sp1
;
52
};
53
//-----------------------------------------------------------------------------
54
55
#endif
SLScene.h
AppDemoSceneRevolver
Class for revolver mesh scene.
Definition:
AppDemoSceneRevolver.h:21
AppDemoSceneRevolver::registerAssetsToLoad
void registerAssetsToLoad(SLAssetLoader &al) override
All scene specific assets have to be registered for async loading in here.
Definition:
AppDemoSceneRevolver.cpp:32
AppDemoSceneRevolver::AppDemoSceneRevolver
AppDemoSceneRevolver()
Definition:
AppDemoSceneRevolver.cpp:24
AppDemoSceneRevolver::assemble
void assemble(SLAssetManager *am, SLSceneView *sv) override
After parallel loading of the assets the scene gets assembled in here.
Definition:
AppDemoSceneRevolver.cpp:62
AppDemoSceneRevolver::_tex1C
SLGLTexture * _tex1C
Definition:
AppDemoSceneRevolver.h:45
AppDemoSceneRevolver::_sp1
SLGLProgram * _sp1
Definition:
AppDemoSceneRevolver.h:51
AppDemoSceneRevolver::_tex4
SLGLTexture * _tex4
Definition:
AppDemoSceneRevolver.h:49
AppDemoSceneRevolver::_tex2
SLGLTexture * _tex2
Definition:
AppDemoSceneRevolver.h:47
AppDemoSceneRevolver::_tex3
SLGLTexture * _tex3
Definition:
AppDemoSceneRevolver.h:48
AppDemoSceneRevolver::_tex1N
SLGLTexture * _tex1N
Definition:
AppDemoSceneRevolver.h:46
AppDemoSceneRevolver::_tex5
SLGLTexture * _tex5
Definition:
AppDemoSceneRevolver.h:50
SLAssetLoader
Definition:
SLAssetLoader.h:45
SLAssetManager
Toplevel holder of the assets meshes, materials, textures and shaders.
Definition:
SLAssetManager.h:33
SLGLProgram
Encapsulation of an OpenGL shader program object.
Definition:
SLGLProgram.h:56
SLGLTexture
Texture object for OpenGL texturing.
Definition:
SLGLTexture.h:110
SLScene
The SLScene class represents the top level instance holding the scene structure.
Definition:
SLScene.h:47
SLSceneView
SceneView class represents a dynamic real time 3D view onto the scene.
Definition:
SLSceneView.h:69
apps
app_demo
source
scenes
AppDemoSceneRevolver.h
Generated by
1.9.1