SLProject
4.2.000
A platform independent 3D computer graphics framework for desktop OS, Android, iOS and online in web browsers
AppDemoSceneShaderCook.h
Go to the documentation of this file.
1
/**
2
* \file AppDemoSceneShaderCook.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 APPDEMOSCENESHADERCOOK_H
14
#define APPDEMOSCENESHADERCOOK_H
15
16
#include <
SLScene.h
>
17
18
//-----------------------------------------------------------------------------
19
//! Class for Cook-Torrance lighting demo scene
20
class
AppDemoSceneShaderCook
:
public
SLScene
21
{
22
public
:
23
AppDemoSceneShaderCook
();
24
25
26
//! All scene specific assets have to be registered for async loading in here.
27
/*! @remark All scene sspecific assets have to be loaded async by overriding
28
SLScene::registerAssetsToLoad and SLScene::assemble. Async loading and
29
assembling means that it happens in a parallel thread and that in there are
30
no OpenGL calls allowed. OpenGL calls are only allowed in the main thread.*/
31
void
registerAssetsToLoad
(
SLAssetLoader
& al)
override
;
32
33
//! After parallel loading of the assets the scene gets assembled in here.
34
/*! @remark All scene-specific assets have to be loaded async by overriding
35
SLScene::registerAssetsToLoad and SLScene::assemble. Async loading and
36
assembling means that it happens in a parallel thread and that in there
37
are no OpenGL calls allowed. OpenGL calls are only allowed in the main
38
thread. It is important that all object instantiations within
39
SLScene::assemble do NOT call any OpenGL functions (gl*) because they happen
40
in a parallel thread. All objects that get rendered have to do their
41
initialization when they are used the first time during rendering in the
42
main thread.*/
43
void
assemble
(
SLAssetManager
* am,
SLSceneView
*
sv
)
override
;
44
45
private
:
46
SLGLProgram
*
_sp
;
47
SLGLProgram
*
_spTex
;
48
SLGLTexture
*
_texC
;
49
SLGLTexture
*
_texN
;
50
SLGLTexture
*
_texM
;
51
SLGLTexture
*
_texR
;
52
};
53
//-----------------------------------------------------------------------------
54
55
#endif
SLScene.h
AppDemoSceneShaderCook
Class for Cook-Torrance lighting demo scene.
Definition:
AppDemoSceneShaderCook.h:21
AppDemoSceneShaderCook::assemble
void assemble(SLAssetManager *am, SLSceneView *sv) override
After parallel loading of the assets the scene gets assembled in here.
Definition:
AppDemoSceneShaderCook.cpp:54
AppDemoSceneShaderCook::_texR
SLGLTexture * _texR
Definition:
AppDemoSceneShaderCook.h:51
AppDemoSceneShaderCook::_spTex
SLGLProgram * _spTex
Definition:
AppDemoSceneShaderCook.h:47
AppDemoSceneShaderCook::_sp
SLGLProgram * _sp
Definition:
AppDemoSceneShaderCook.h:46
AppDemoSceneShaderCook::_texC
SLGLTexture * _texC
Definition:
AppDemoSceneShaderCook.h:48
AppDemoSceneShaderCook::_texM
SLGLTexture * _texM
Definition:
AppDemoSceneShaderCook.h:50
AppDemoSceneShaderCook::AppDemoSceneShaderCook
AppDemoSceneShaderCook()
Definition:
AppDemoSceneShaderCook.cpp:21
AppDemoSceneShaderCook::registerAssetsToLoad
void registerAssetsToLoad(SLAssetLoader &al) override
All scene specific assets have to be registered for async loading in here.
Definition:
AppDemoSceneShaderCook.cpp:31
AppDemoSceneShaderCook::_texN
SLGLTexture * _texN
Definition:
AppDemoSceneShaderCook.h:49
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
AppDemoSceneShaderCook.h
Generated by
1.9.1