SLProject  4.2.000
A platform independent 3D computer graphics framework for desktop OS, Android, iOS and online in web browsers
AppNodeGui.cpp
Go to the documentation of this file.
1 /**
2  * \file AppNodeGui.cpp
3  * \brief UI with the ImGUI framework fully rendered in OpenGL 3+
4  * \details The AppDemoGui class provides only the UI build function
5  * For more info on how to create a new app with SLProject see:
6  * https://github.com/cpvrlab/SLProject4/wiki/Creating-a-New-App
7  * For more info about App framework see:
8  * https://cpvrlab.github.io/SLProject4/app-framework.html
9  * \date Summer 2017
10  * \authors Marcus Hudritsch
11  * \copyright http://opensource.org/licenses/GPL-3.0
12  * \remarks Please use clangformat to format the code. See more code style on
13  * https://github.com/cpvrlab/SLProject4/wiki/SLProject-Coding-Style
14 */
15 
16 #include <AppNodeGui.h>
17 #include <AppNodeSceneView.h>
18 #include <SLScene.h>
19 #include <SLSceneView.h>
20 #include <imgui.h>
21 //-----------------------------------------------------------------------------
23 //-----------------------------------------------------------------------------
24 //! Creates the ImGui UI.
25 /*! This function must be passed as void* pointer to the slCreateSceneView
26 function. It is called in SLSceneView::onPaint for each frame.
27 */
29 {
30  ImGui::SetNextWindowPos(ImVec2(0.0f, 0.0f));
31  ImGui::Begin("Scene Information",
32  0,
33  ImGuiWindowFlags_NoResize |
34  ImGuiWindowFlags_AlwaysAutoResize |
35  ImGuiWindowFlags_NoMove);
36  ImGui::TextUnformatted(infoText.c_str());
37  ImGui::End();
38 }
39 //-----------------------------------------------------------------------------
Node transform test app to demonstrates all transforms of SLNode.
string SLstring
Definition: SL.h:158
static SLstring infoText
Definition: AppNodeGui.h:36
static void build(SLScene *s, SLSceneView *sv)
Creates the ImGui UI.
Definition: AppNodeGui.cpp:28
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