111 if (ImGui::BeginMainMenuBar())
113 if (ImGui::BeginMenu(
"View"))
115 if (ImGui::MenuItem(
"Reset Camera"))
124 ImGui::EndMainMenuBar();
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.
int SL_MAIN_FUNCTION(int argc, char *argv[])
static void buildGui(SLScene *s, SLSceneView *sv)
A static function that builds the UI with ImGui.
static SLScene * createScene(SLSceneID sceneID)
A static function in which you can create the new scene.
int SLSceneID
Scene identifier.
Wrapper Class around the external ImGui GUI-framework.
Declaration of the main Scene Library C-Interface.
SLScene SLSceneView SLint sceneID
static SLstring texturePath
Path to texture images.
Scene class derived from SLScene.
SLGLTexture * _woodTexture
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.
void addTextureToLoad(SLGLTexture *&texture, const SLstring &path, SLint min_filter=GL_LINEAR_MIPMAP_LINEAR, SLint mag_filter=GL_LINEAR, SLTextureType type=TT_unknown, SLint wrapS=GL_REPEAT, SLint wrapT=GL_REPEAT)
Add 2D textures with internal image allocation.
Toplevel holder of the assets meshes, materials, textures and shaders.
Active or visible camera node class.
void focalDist(const SLfloat f)
Texture object for OpenGL texturing.
SLLightDirect class for a directional light source.
Defines a standard CG material with textures and a shader program.
SLNode represents a node in a hierarchical scene graph.
void addChild(SLNode *child)
void translation(const SLVec3f &pos, SLTransformSpace relativeTo=TS_parent)
SLVec3f translationWS() const
virtual void addMesh(SLMesh *mesh)
void lookAt(SLfloat targetX, SLfloat targetY, SLfloat targetZ, SLfloat upX=0, SLfloat upY=1, SLfloat upZ=0, SLTransformSpace relativeTo=TS_world)
void translate(const SLVec3f &vec, SLTransformSpace relativeTo=TS_object)
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 camera(SLCamera *camera)
void doWaitOnIdle(SLbool doWI)
T distance(const SLVec3 &p) const
Calculate the distance to point p.
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.
OnNewSceneCallback onNewScene
OnGuiBuildCallback onGuiBuild