mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-04-24 04:58:59 -05:00
Feature/thesis work merge (#566)
Web GUI from Klas Eskilson (three new modules: webgui, webbrowser and cefwebgui) Parallel connection refactorization Wormhole server added to the main repository Transfer function editor work from Cristoffer Särevall Update ghoul
This commit is contained in:
@@ -219,7 +219,6 @@ static void RenderDrawLists(ImDrawData* drawData) {
|
||||
glDisable(GL_SCISSOR_TEST);
|
||||
}
|
||||
|
||||
|
||||
void addScreenSpaceRenderableLocal(std::string texturePath) {
|
||||
if (!FileSys.fileExists(absPath(texturePath))) {
|
||||
LWARNING(fmt::format("Could not find image '{}'", texturePath));
|
||||
@@ -930,6 +929,7 @@ void GUI::render() {
|
||||
addImageBufferSize,
|
||||
ImGuiInputTextFlags_EnterReturnsTrue
|
||||
);
|
||||
|
||||
if (addImageOnline) {
|
||||
addScreenSpaceRenderableOnline(std::string(addImageOnlineBuffer));
|
||||
}
|
||||
@@ -952,6 +952,7 @@ void GUI::render() {
|
||||
);
|
||||
}
|
||||
|
||||
#ifdef SHOW_IMGUI_HELPERS
|
||||
ImGui::Checkbox("ImGUI Internals", &_showInternals);
|
||||
if (_showInternals) {
|
||||
ImGui::Begin("Style Editor");
|
||||
@@ -966,6 +967,7 @@ void GUI::render() {
|
||||
ImGui::ShowMetricsWindow();
|
||||
ImGui::End();
|
||||
}
|
||||
#endif
|
||||
|
||||
ImGui::End();
|
||||
}
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
#include <openspace/engine/openspaceengine.h>
|
||||
#include <openspace/util/timemanager.h>
|
||||
#include <openspace/interaction/navigationhandler.h>
|
||||
#include <openspace/network/parallelconnection.h>
|
||||
#include <openspace/network/parallelpeer.h>
|
||||
#include <openspace/network/messagestructures.h>
|
||||
|
||||
#include <ghoul/fmt.h>
|
||||
@@ -51,12 +51,22 @@ void GuiParallelComponent::renderDisconnected() {
|
||||
const bool connect = ImGui::Button("Connect");
|
||||
|
||||
if (connect) {
|
||||
OsEng.parallelConnection().clientConnect();
|
||||
OsEng.parallelPeer().connect();
|
||||
}
|
||||
}
|
||||
|
||||
void GuiParallelComponent::renderConnecting() {
|
||||
ImGui::Text("Connecting...");
|
||||
|
||||
const bool cancel = ImGui::Button("Cancel connection");
|
||||
|
||||
if (cancel) {
|
||||
OsEng.parallelPeer().disconnect();
|
||||
}
|
||||
}
|
||||
|
||||
void GuiParallelComponent::renderClientWithHost() {
|
||||
ParallelConnection& parallel = OsEng.parallelConnection();
|
||||
ParallelPeer& parallel = OsEng.parallelPeer();
|
||||
|
||||
std::string connectionInfo = "Session hosted by \"" + parallel.hostName() + "\"\n";
|
||||
size_t nConnections = parallel.nConnections();
|
||||
@@ -98,7 +108,7 @@ void GuiParallelComponent::renderClientWithHost() {
|
||||
}
|
||||
|
||||
void GuiParallelComponent::renderClientWithoutHost() {
|
||||
ParallelConnection& parallel = OsEng.parallelConnection();
|
||||
ParallelPeer& parallel = OsEng.parallelPeer();
|
||||
|
||||
std::string connectionInfo = "Connected to parallel session with no host\n";
|
||||
size_t nConnections = parallel.nConnections();
|
||||
@@ -122,7 +132,7 @@ void GuiParallelComponent::renderClientWithoutHost() {
|
||||
}
|
||||
|
||||
void GuiParallelComponent::renderClientCommon() {
|
||||
ParallelConnection& parallel = OsEng.parallelConnection();
|
||||
ParallelPeer& parallel = OsEng.parallelPeer();
|
||||
|
||||
bool requestHostship = ImGui::Button("Request hostship");
|
||||
const bool disconnect = ImGui::Button("Disconnect");
|
||||
@@ -132,12 +142,12 @@ void GuiParallelComponent::renderClientCommon() {
|
||||
}
|
||||
|
||||
if (disconnect) {
|
||||
parallel.signalDisconnect();
|
||||
parallel.disconnect();
|
||||
}
|
||||
}
|
||||
|
||||
void GuiParallelComponent::renderHost() {
|
||||
ParallelConnection& parallel = OsEng.parallelConnection();
|
||||
ParallelPeer& parallel = OsEng.parallelPeer();
|
||||
size_t nConnections = parallel.nConnections();
|
||||
|
||||
std::string connectionInfo = "";
|
||||
@@ -165,12 +175,15 @@ void GuiParallelComponent::render() {
|
||||
_isEnabled = v;
|
||||
_isCollapsed = ImGui::IsWindowCollapsed();
|
||||
|
||||
ParallelConnection::Status status = OsEng.parallelConnection().status();
|
||||
ParallelConnection::Status status = OsEng.parallelPeer().status();
|
||||
|
||||
switch (status) {
|
||||
case ParallelConnection::Status::Disconnected:
|
||||
renderDisconnected();
|
||||
break;
|
||||
case ParallelConnection::Status::Connecting:
|
||||
renderConnecting();
|
||||
break;
|
||||
case ParallelConnection::Status::ClientWithHost:
|
||||
renderClientWithHost();
|
||||
break;
|
||||
@@ -182,7 +195,7 @@ void GuiParallelComponent::render() {
|
||||
break;
|
||||
}
|
||||
|
||||
GuiPropertyComponent::renderPropertyOwner(&OsEng.parallelConnection());
|
||||
GuiPropertyComponent::renderPropertyOwner(&OsEng.parallelPeer());
|
||||
ImGui::End();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user