mirror of
https://github.com/brunoherbelin/vimix.git
synced 2025-12-11 18:34:58 +01:00
Fixed vertical inversion of clones, rendering output, etc.
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -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<glm::mat4>(), 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<glm::mat4>(), projection);
|
||||
renderbuffer_->end();
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
|
||||
2
View.cpp
2
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<glm::mat4>(), P);
|
||||
|
||||
Reference in New Issue
Block a user