diff --git a/ImGuiVisitor.cpp b/ImGuiVisitor.cpp index f69cda1..de7e0fd 100644 --- a/ImGuiVisitor.cpp +++ b/ImGuiVisitor.cpp @@ -274,7 +274,7 @@ void ImGuiVisitor::visit (MediaSource& s) } else { ImGui::Text("Video File"); - if ( ImGui::Button("Open Media Player", ImVec2(IMGUI_RIGHT_ALIGN, 0)) ) + if ( ImGui::Button(IMGUI_TITLE_MEDIAPLAYER, ImVec2(IMGUI_RIGHT_ALIGN, 0)) ) Settings::application.media_player = true; } ImGuiToolkit::ButtonOpenUrl( SystemToolkit::path_filename(s.path()).c_str(), ImVec2(IMGUI_RIGHT_ALIGN, 0) ); @@ -294,6 +294,8 @@ void ImGuiVisitor::visit (SessionSource& s) void ImGuiVisitor::visit (RenderSource& s) { ImGui::Text("Rendering Output"); + if ( ImGui::Button(IMGUI_TITLE_PREVIEW, ImVec2(IMGUI_RIGHT_ALIGN, 0)) ) + Settings::application.preview = true; } void ImGuiVisitor::visit (CloneSource& s) diff --git a/SessionSource.cpp b/SessionSource.cpp index d9b1f27..31cf7ab 100644 --- a/SessionSource.cpp +++ b/SessionSource.cpp @@ -141,7 +141,7 @@ void SessionSource::render() session()->deleteSource(session()->failedSource()); // render the sesion into frame buffer - static glm::mat4 projection = glm::ortho(-1.f, 1.f, -1.f, 1.f, -1.f, 1.f); + static glm::mat4 projection = glm::ortho(-1.f, 1.f, 1.f, -1.f, -1.f, 1.f); renderbuffer_->begin(); sessionsurface_->draw(glm::identity(), projection); renderbuffer_->end(); @@ -207,7 +207,7 @@ void RenderSource::render() init(); else { // render the view into frame buffer - static glm::mat4 projection = glm::ortho(-1.f, 1.f, -1.f, 1.f, -1.f, 1.f); + static glm::mat4 projection = glm::ortho(-1.f, 1.f, 1.f, -1.f, -1.f, 1.f); renderbuffer_->begin(); sessionsurface_->draw(glm::identity(), projection); renderbuffer_->end(); diff --git a/UserInterfaceManager.cpp b/UserInterfaceManager.cpp index 37e018c..cb46167 100644 --- a/UserInterfaceManager.cpp +++ b/UserInterfaceManager.cpp @@ -506,7 +506,7 @@ void UserInterface::showMenuFile() std::thread (SessionFileDialogOpen, Settings::application.recentSessions.path).detach(); navigator.hidePannel(); } - if (ImGui::MenuItem( ICON_FA_FILE_EXPORT " Import")) { + if (ImGui::MenuItem( ICON_FA_FILE_EXPORT " Import")) { // launch file dialog to open a session file sessionFileDialogImport_ = true; std::thread (SessionFileDialogOpen, Settings::application.recentSessions.path).detach(); @@ -635,7 +635,8 @@ void UserInterface::RenderPreview() float width = ImGui::GetContentRegionAvail().x; ImVec2 imagesize ( width, width / ar); - ImGui::Image((void*)(intptr_t)output->texture(), imagesize, ImVec2(0.f, 1.f), ImVec2(1.f, 0.f)); + ImGui::Image((void*)(intptr_t)output->texture(), imagesize); +// ImGui::Image((void*)(intptr_t)output->texture(), imagesize, ImVec2(0.f, 1.f), ImVec2(1.f, 0.f)); ImGui::End(); } diff --git a/View.cpp b/View.cpp index dd283b2..05b0a40 100644 --- a/View.cpp +++ b/View.cpp @@ -206,7 +206,7 @@ void RenderView::setResolution(glm::vec3 resolution) void RenderView::draw() { - static glm::mat4 projection = glm::ortho(-1.f, 1.f, -1.f, 1.f, -SCENE_DEPTH, 1.f); + static glm::mat4 projection = glm::ortho(-1.f, 1.f, 1.f, -1.f, -SCENE_DEPTH, 1.f); glm::mat4 P = glm::scale( projection, glm::vec3(1.f / frame_buffer_->aspectRatio(), 1.f, 1.f)); frame_buffer_->begin(); scene.root()->draw(glm::identity(), P);