TerraForge3D  2.3.1
3D Terrain And Landscape Generator

◆ ShowSettings()

void SkyManager::ShowSettings ( bool *  pOpen)

Definition at line 58 of file SkySettings.cpp.

59{
60 ImGui::Begin("Sky Settings", pOpen);
61
62 if(!useProcedural )
63 {
64 if (ImGui::Button("Load HDRI"))
65 {
66 std::string path = ShowOpenFileDialog(".png");
67
68 if (path.size() > 2)
69 {
70 LoadHDRI(path);
71 }
72 }
73
74 ImGui::Separator();
75 ImGui::Text("Cubemap Faces");
76 ImGui::Text("PX");
77 ImGui::SameLine();
78
79 if (ImGui::ImageButton((ImTextureID)cubemap->textures[TEXTURE_CUBEMAP_PX]->GetRendererID(), ImVec2(50, 50)))
80 {
81 ChangeCubemapTile(TEXTURE_CUBEMAP_PX);
82 }
83
84 ImGui::SameLine();
85 ImGui::Text("PY");
86 ImGui::SameLine();
87
88 if (ImGui::ImageButton((ImTextureID)cubemap->textures[TEXTURE_CUBEMAP_PY]->GetRendererID(), ImVec2(50, 50)))
89 {
90 ChangeCubemapTile(TEXTURE_CUBEMAP_PY);
91 }
92
93 ImGui::SameLine();
94 ImGui::Text("PZ");
95 ImGui::SameLine();
96
97 if (ImGui::ImageButton((ImTextureID)cubemap->textures[TEXTURE_CUBEMAP_PZ]->GetRendererID(), ImVec2(50, 50)))
98 {
99 ChangeCubemapTile(TEXTURE_CUBEMAP_PZ);
100 }
101
102 ImGui::Text("NX");
103 ImGui::SameLine();
104
105 if (ImGui::ImageButton((ImTextureID)cubemap->textures[TEXTURE_CUBEMAP_NX]->GetRendererID(), ImVec2(50, 50)))
106 {
107 ChangeCubemapTile(TEXTURE_CUBEMAP_NX);
108 }
109
110 ImGui::SameLine();
111 ImGui::Text("NY");
112 ImGui::SameLine();
113
114 if (ImGui::ImageButton((ImTextureID)cubemap->textures[TEXTURE_CUBEMAP_NY]->GetRendererID(), ImVec2(50, 50)))
115 {
116 ChangeCubemapTile(TEXTURE_CUBEMAP_NY);
117 }
118
119 ImGui::SameLine();
120 ImGui::Text("NZ");
121 ImGui::SameLine();
122
123 if (ImGui::ImageButton((ImTextureID)cubemap->textures[TEXTURE_CUBEMAP_NZ]->GetRendererID(), ImVec2(50, 50)))
124 {
125 ChangeCubemapTile(TEXTURE_CUBEMAP_NZ);
126 }
127
128 ImGui::Separator();
129 }
130
131 else
132 {
133 ImGui::DragFloat("Clouds Time", &cltime, 0.01f);
134 ImGui::DragFloat("Clouds UPF", &upf, 0.01f);
135 ImGui::DragFloat("Cirrus Clouds", &cirrus, 0.005f, -1, 1);
136 ImGui::DragFloat("Cumulus Clouds", &cumulus, 0.005f, -1, 1);
137 ImGui::DragFloat3("Sun Position", fsun, 0.01f);
138 }
139
140 if(!useProcedural)
141 {
142 useProcedural = ImGui::Button("Use Procedural Sky");
143 }
144
145 else
146 {
147 useProcedural = !ImGui::Button("Use Cubemap Sky");
148 }
149
150 if(!useBox)
151 {
152 useBox = ImGui::Button("Use Sky Box");
153 }
154
155 else
156 {
157 useBox = !ImGui::Button("Use Sky Sphere");
158 }
159
160 ImGui::End();
161}