sculpto
Public Member Functions | List of all members
scl::application_config_window Class Reference

#include <application_config_window.h>

Public Member Functions

 application_config_window ()=default
 
void Draw ()
 

Detailed Description

Application configuration GUI window class.

Definition at line 16 of file application_config_window.h.

Constructor & Destructor Documentation

◆ application_config_window()

scl::application_config_window::application_config_window ( )
default

Application configuration GUI window default constructor.

Member Function Documentation

◆ Draw()

void scl::application_config_window::Draw ( )
  • Application configuration GUI window draw function.
Parameters
None.
Returns
None.

Definition at line 19 of file application_config_window.cpp.

20{
21 ImGui::Begin("Application Configuration");
22 {
23 ImGui::Text("GUI configuration");
24 ImGui::Checkbox("Use Dock space", &gui::IsDockspace);
25 ImGui::Separator();
26
27 vec4 clear_color = render_bridge::GetClearColor();
28 bool is_wireframe = render_bridge::GetWireframeMode();
29 bool is_vsync = render_bridge::GetVSync();
30 ImGui::Text("Renderer configuration");
31 if (ImGui::ColorEdit4("Clear Color", (float *)&clear_color))
33 if (ImGui::Checkbox("Wireframe Mode", &is_wireframe)) render_bridge::SetWireframeMode(is_wireframe);
34 if (ImGui::Checkbox("VSync", &is_vsync)) render_bridge::SetVSync(is_vsync);
35 ImGui::NewLine();
36
37 float w = ImGui::GetContentRegionAvail().x;
38 ImGui::Text("Renderer build-in resources");
39
40 if (ImGui::Button("Reload##shd1", { w * 0.2f, 0 })) assets_manager::UpdateShader(render_bridge::GetGaussianBlurPassShader()); ImGui::SameLine();
41 ImGui::Text("Shader \"%s\"", render_bridge::GetGaussianBlurPassShader()->DebugName.c_str());
42
43 if (ImGui::Button("Reload##shd2", { w * 0.2f, 0 })) assets_manager::UpdateShader(render_bridge::GetPhongGeometryShader()); ImGui::SameLine();
44 ImGui::Text("Shader \"%s\"", render_bridge::GetPhongGeometryShader()->DebugName.c_str());
45
46 if (ImGui::Button("Reload##shd3", { w * 0.2f, 0 })) assets_manager::UpdateShader(render_bridge::GetPhongLightingShader()); ImGui::SameLine();
47 ImGui::Text("Shader \"%s\"", render_bridge::GetPhongLightingShader()->DebugName.c_str());
48
49 if (ImGui::Button("Reload##shd4", { w * 0.2f, 0 })) assets_manager::UpdateShader(render_bridge::GetShadowPassShader()); ImGui::SameLine();
50 ImGui::Text("Shader \"%s\"", render_bridge::GetShadowPassShader()->DebugName.c_str());
51
52 if (ImGui::Button("Reload##shd5", { w * 0.2f, 0 })) assets_manager::UpdateShader(render_bridge::GetSingleColorMaterialShader()); ImGui::SameLine();
53 ImGui::Text("Shader \"%s\"", render_bridge::GetSingleColorMaterialShader()->DebugName.c_str());
54
55 if (ImGui::Button("Reload##shd6", { w * 0.2f, 0 })) assets_manager::UpdateShader(render_bridge::GetToneMappingPassShader()); ImGui::SameLine();
56 ImGui::Text("Shader \"%s\"", render_bridge::GetToneMappingPassShader()->DebugName.c_str());
57 }
58 ImGui::End();
59}
static bool IsDockspace
Definition: gui.h:20
static shared< shader_program > GetGaussianBlurPassShader()
static void SetVSync(bool VSync)
Definition: render_bridge.h:44
static void SetClearColor(const vec4 &ClearColor)
Definition: render_bridge.h:38
static void SetWireframeMode(bool IsWireframe)
Definition: render_bridge.h:40
static shared< shader_program > GetPhongLightingShader()
static shared< shader_program > GetShadowPassShader()
static shared< shader_program > GetToneMappingPassShader()
static const vec4 & GetClearColor()
Definition: render_bridge.h:29
static shared< shader_program > GetPhongGeometryShader()
static shared< shader_program > GetSingleColorMaterialShader()
Definition: render_bridge.h:99
static bool GetVSync()
Definition: render_bridge.h:35
static bool GetWireframeMode()
Definition: render_bridge.h:31
void UpdateShader(shared< shader_program > ShaderProgram)
math::vec4< float > vec4
Definition: base.h:39

The documentation for this class was generated from the following files: