128 #ifdef SL_BUILD_WITH_KTX
216 default:
SL_EXIT_MSG(
"appDemoSwitchScene: Unknown SceneID");
276 return trackingGotUpdated;
The App namespace declares the App::Config struct and the App::run function.
The AppCommon class holds the top-level instances of the app-demo.
C++ Header file for the class AppDemoGui.h.
static SLbool onUpdate(SLSceneView *sv)
int SL_MAIN_FUNCTION(int argc, char *argv[])
bool onUpdateVideo()
Implements the update per frame for video update and feature tracking.
static SLSceneView * createSceneView(SLScene *scene, int curDPI, SLInputManager &inputManager)
SLNode * gVideoTrackedNode
static void onBeforeSceneAssembly(SLSceneView *sv, SLScene *s)
static void onAfterSceneAssembly(SLSceneView *sv, SLScene *s)
SLGLTexture * gVideoTexture
static void onBeforeSceneDelete(SLSceneView *sv, SLScene *s)
static void onBeforeSceneLoad(SLSceneView *sv, SLScene *s)
CVTracked * gVideoTracker
static SLScene * createScene(SLSceneID sceneID)
Class declaration for an SLScene inherited class.
Class declaration for an SLScene inherited class.
Class declaration for an SLScene inherited class.
Class declaration for an SLScene inherited class.
Class declaration for an SLScene inherited class.
Class declaration for an SLScene inherited class.
Class declaration for an SLScene inherited class.
Class declaration for an SLScene inherited class.
Class declaration for an SLScene inherited class.
Class declaration for an SLScene inherited class.
Class declaration for an SLScene inherited class.
Class declaration for an SLScene inherited class.
Class declaration for an SLScene inherited class.
Class declaration for an SLScene inherited class.
Class declaration for an SLScene inherited class.
Class declaration for an SLScene inherited class.
Definition of scene IDs in the demo app.
@ SID_SuzannePerPixBlinnNmSm
@ SID_Benchmark_SkinnedAnimations
@ SID_VideoTrackChessScnd
@ SID_ParticleSystem_Many
@ SID_SuzannePerPixBlinnTmAo
@ SID_VideoTrackMediaPipeHandsMain
@ SID_Benchmark_LargeModel
@ SID_SuzannePerPixBlinnTmSm
@ SID_SuzannePerPixBlinnAoSm
@ SID_ParticleSystem_ComplexFire
@ SID_ParticleSystem_RingOfFire
@ SID_SuzannePerPixBlinnNm
@ SID_ShadowMappingSpotLights
@ SID_ErlebAR_BernChristoffel
@ SID_ParticleSystem_DustStorm
@ SID_SuzannePerPixBlinnNmAo
@ SID_ParticleSystem_Simple
@ SID_Benchmark_JansUniverse
@ SID_Benchmark_ColumnsNoLOD
@ SID_ParticleSystem_Fountain
@ SID_SuzannePerPixBlinnSm
@ SID_ShadowMappingLightTypes
@ SID_AnimationSkinnedMass
@ SID_SuzannePerPixBlinnTmNmSm
@ SID_ShaderPerPixelBlinn
@ SID_SuzannePerPixBlinnTm
@ SID_ErlebAR_AventicumAmphiteatre
@ SID_Benchmark_NodeAnimations
@ SID_Benchmark_ColumnsLOD
@ SID_ShadowMappingCascaded
@ SID_SuzannePerPixBlinnTmNmAoSm
@ SID_SuzannePerPixCookTmNmAoSmEm
@ SID_ErlebAR_AventicumCigognier
@ SID_ShadowMappingPointLights
@ SID_VideoTrackArucoMain
@ SID_Benchmark_ParticleSystemComplexFire
@ SID_Benchmark_LotsOfNodes
@ SID_VideoTrackArucoScnd
@ SID_SuzannePerPixBlinnTmNmAo
@ SID_VideoTrackFeature2DMain
@ SID_VolumeRayCastLighted
@ SID_ErlebAR_AventicumTheatre
@ SID_ShadowMappingBasicScene
@ SID_VideoTrackChessMain
@ SID_SuzannePerPixBlinnAo
@ SID_SuzannePerPixBlinnTmNm
@ SID_ErlebAR_AugustaRauricaTmpTht
@ SID_ErlebAR_SutzKirchrain18
@ SID_Robotics_FanucCRX_FK
@ SID_ShaderPerVertexBlinn
Class declaration for an SLScene inherited class.
Class declaration for an SLScene inherited class.
Class declaration for an SLScene inherited class.
Class declaration for an SLScene inherited class.
Class declaration for an SLScene inherited class.
Class declaration for an SLScene inherited class.
Class declaration for an SLScene inherited class.
Class declaration for an SLScene inherited class.
Class declaration for an SLScene inherited class.
Class declaration for an SLScene inherited class.
Class declaration for an SLScene inherited class.
Class declaration for an SLScene inherited class.
Class declaration for an SLScene inherited class.
Class declaration for an SLScene inherited class.
Class declaration for an SLScene inherited class.
Class declaration for an SLScene inherited class.
Class declaration for an SLScene inherited class.
Class declaration for an SLScene inherited class.
Class declaration for an SLScene inherited class.
Class declaration for an SLScene inherited class.
Class declaration for an SLScene inherited class.
Class declaration for an SLScene inherited class.
Class declaration for an SLScene inherited class.
Class declaration for an SLScene inherited class.
Class declaration for an SLScene inherited class.
Class declaration for an SLScene inherited class.
Class declaration for an SLScene inherited class.
Class declaration for an SLScene inherited class.
Class declaration for an SLScene inherited class.
Class declaration for an SLScene inherited class.
Class declaration for an SLScene inherited class.
Class declaration for an SLScene inherited class.
Class declaration for an SLScene inherited class.
Class declaration for an SLScene inherited class.
Class declaration for an SLScene inherited class.
Class declaration for an SLScene inherited class.
Class declaration for an SLScene inherited class.
Class declaration for an SLScene inherited class.
Class declaration for an SLScene inherited class.
Class declaration for an SLScene inherited class.
Class declaration for an SLScene inherited class.
Class declaration for an SLScene inherited class.
Class declaration for an SLScene inherited class.
Class declaration for an SLScene inherited class.
Class declaration for an SLScene inherited class.
Class declaration for an SLScene inherited class.
Class declaration for an SLScene inherited class.
@ VT_NONE
No camera needed.
#define SL_EXIT_MSG(message)
int SLSceneID
Scene identifier.
Singleton class for global render state.
SLScene SLSceneView SLint sceneID
static void loadConfig(SLint dotsPerInch)
Loads the UI configuration.
static void saveConfig()
Stores the UI configuration.
static void build(SLScene *s, SLSceneView *sv)
This is the main building function for the GUI of the Demo apps.
static SLstring loadingString
String shown during loading screens.
Class for 2D and 3D text scene.
Class for node animation test scene.
Class for benchmark mass animation test scene.
Class for mass animation test scene.
Class for skinned animation test scene.
Class for skinned animation test scene.
Class for skinned animation test scene.
Class for ErlebAR model for Augusta Raurica Tempel & Theater.
Class for ErlebAR model for Aventicum Amphitheater.
Class for ErlebAR model for Aventicum Cigognier.
Class for ErlebAR model for Aventicum Theater.
Class for ErlebAR model Christoffel Tower in Bern.
Class for ErlebAR model in Biel at BFH.
Class for ErlebAR model in Sutz.
Class for frustum culling test scene.
Class for GLTF file loading demo scene.
Class for the benchmark scene for Jans Universe.
Class for large model scene.
Class for level of detail test scene.
Class for scene with lots of nodes.
Class for mesh loading demo scene.
Class for fire ring particle system scene.
Class for simple particle system scene.
Class for simple particle system scene.
Class for benchmark scene with a particle system with many particles.
Class for fire ring particle system scene.
Class for simple particle system scene.
Class for sun particle system scene.
Class for point cloud test scene.
Class for the depth of field ray tracing scene.
Class for the lens ray tracing scene.
Class for the Muttenzer Box ray tracing scene.
Class for the ray tracing scene with sphere group.
Class for revolver mesh scene.
Class for a robot arm test scene.
Class for demo scene with Blinn-Phong lighting per vertex or per pixel.
Class for normal map bump mapping.
Class for Cook-Torrance lighting demo scene.
Class for image base lighting demo scene.
Class for image base lighting demo scene.
Class for parallax bump mapping demo scene.
Class for image base lighting demo scene.
Class for per vertex wave shader.
Class for basic shadow mapping demo scene.
Class for demo scene for cascaded shadow mapping.
Class for demo scene for point light shadow mapping.
Class for demo scene for spotlight shadow mapping.
Class for demo scene with all shadow mapping types.
Class for all variants of generated shaders on the Suzanne head.
Class for texture blending scene.
Class for texture compression test scene.
Class for texture filtering scene.
Class for devices IMU and GPS Sensors test scene.
Class for live or file video on texture test scene.
Class for ARUCO marker tracking test scene.
Class for video for chessboard test scene.
Class for facial feature tracking test scene.
Class for feature tracking test scene.
Class for Mediapipe hand tracking test scene.
Class for test scene for volume rendering of an angiographic MRI scan".
Class for test scene for lighted volume rendering of an angiographic MRI scan".
Class for z-fighting test scene.
CVSize captureSize
size of captured frame
void videoType(CVVideoType vt)
Setter for video type also sets the active calibration.
void start(float viewportWdivH)
starts the video capturing
static CVCapture * instance()
Public static instance getter for singleton pattern.
bool grabAndAdjustForSL(float viewportWdivH)
CVTracked is the pure virtual base class for tracking features in video.
static void resetTimes()
Resets all static variables.
Texture object for OpenGL texturing.
SLNode represents a node in a hierarchical scene graph.
The SLScene class represents the top level instance holding the scene structure.
SceneView class represents a dynamic real time 3D view onto the scene.
void viewportSameAsVideo(bool sameAsVideo)
void setViewportFromRatio(const SLVec2i &vpRatio, SLViewportAlign vpAlignment, SLbool vpSameAsVideo)
Sets the viewport ratio and the viewport rectangle.
SLViewportAlign viewportAlign() const
SLfloat viewportWdivH() const
int run(Config config)
App::run implementation from App.h for the Emscripten platform.
Config config
The configuration set in App::run.
App configuration struct to be passed to the App::run function.
OnGuiLoadConfigCallback onGuiLoadConfig
OnAfterSceneAssemblyCallback onAfterSceneAssembly
OnNewSceneViewCallback onNewSceneView
OnUpdateCallback onUpdate
OnBeforeSceneAssemblyCallback onBeforeSceneAssembly
OnGuiSaveConfigCallback onGuiSaveConfig
OnNewSceneCallback onNewScene
OnGuiBuildCallback onGuiBuild
OnBeforeSceneLoadCallback onBeforeSceneLoad
OnBeforeSceneDeleteCallback onBeforeSceneDelete