mirror of
https://github.com/brunoherbelin/vimix.git
synced 2025-12-13 19:29:58 +01:00
Fixed output monitor disablling
This commit is contained in:
@@ -816,9 +816,6 @@ void RenderingWindow::draw(FrameBuffer *fb)
|
||||
Rendering::manager().pushAttrib(window_attributes_);
|
||||
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
|
||||
|
||||
// if not disabled
|
||||
if (!Settings::application.render.disabled) {
|
||||
|
||||
// blit framebuffer
|
||||
if (Settings::application.render.blit) {
|
||||
|
||||
@@ -839,6 +836,9 @@ void RenderingWindow::draw(FrameBuffer *fb)
|
||||
#endif
|
||||
}
|
||||
|
||||
// if not disabled
|
||||
if (!Settings::application.render.disabled) {
|
||||
|
||||
// calculate scaling factor of frame buffer inside window
|
||||
int rx, ry, rw, rh;
|
||||
float renderingAspectRatio = fb->aspectRatio();
|
||||
@@ -866,8 +866,10 @@ void RenderingWindow::draw(FrameBuffer *fb)
|
||||
glBlitFramebuffer(0, fb->height(), fb->width(), 0, rx, ry, rw, rh, GL_COLOR_BUFFER_BIT, GL_LINEAR);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
// draw geometry
|
||||
else
|
||||
else if (!Settings::application.render.disabled)
|
||||
{
|
||||
// VAO is not shared between multiple contexts of different windows
|
||||
// so we have to create a new VAO for rendering the surface in this window
|
||||
@@ -898,11 +900,10 @@ void RenderingWindow::draw(FrameBuffer *fb)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// restore attribs
|
||||
Rendering::manager().popAttrib();
|
||||
|
||||
}
|
||||
|
||||
// give back context ownership
|
||||
glfwMakeContextCurrent(master_);
|
||||
}
|
||||
|
||||
@@ -1061,23 +1061,20 @@ void UserInterface::RenderPreview()
|
||||
Settings::application.widget.preview = false;
|
||||
if (ImGui::BeginMenu(IMGUI_TITLE_PREVIEW))
|
||||
{
|
||||
if ( ImGui::MenuItem( ICON_FA_PLUS " Insert Rendering Source") )
|
||||
Mixer::manager().addSource( Mixer::manager().createSourceRender() );
|
||||
|
||||
if ( ImGui::MenuItem( ICON_FA_WINDOW_RESTORE " Show output window") )
|
||||
// Output window menu
|
||||
if ( ImGui::MenuItem( ICON_FA_WINDOW_RESTORE " Show window") )
|
||||
Rendering::manager().outputWindow().show();
|
||||
|
||||
bool isfullscreen = Rendering::manager().outputWindow().isFullscreen();
|
||||
if ( ImGui::MenuItem( ICON_FA_EXPAND_ALT " Fullscreen output window", nullptr, &isfullscreen) ) {
|
||||
if ( ImGui::MenuItem( ICON_FA_EXPAND_ALT " Fullscreen window", nullptr, &isfullscreen) ) {
|
||||
Rendering::manager().outputWindow().show();
|
||||
Rendering::manager().outputWindow().toggleFullscreen();
|
||||
}
|
||||
|
||||
ImGui::MenuItem( ICON_FA_EYE_SLASH " Disable output", NULL, &Settings::application.render.disabled);
|
||||
|
||||
ImGui::MenuItem( ICON_FA_EYE_SLASH " Disable", NULL, &Settings::application.render.disabled);
|
||||
|
||||
// output manager menu
|
||||
ImGui::Separator();
|
||||
|
||||
bool pinned = Settings::application.widget.preview_view == Settings::application.current_view;
|
||||
if ( ImGui::MenuItem( ICON_FA_MAP_PIN " Pin window to view", nullptr, &pinned) ){
|
||||
if (pinned)
|
||||
@@ -1163,8 +1160,9 @@ void UserInterface::RenderPreview()
|
||||
//
|
||||
ImGui::EndMenu();
|
||||
}
|
||||
if (ImGui::BeginMenu("Share stream"))
|
||||
if (ImGui::BeginMenu("Share"))
|
||||
{
|
||||
|
||||
#if defined(LINUX_NOT_YET_WORKING)
|
||||
bool on = webcam_emulator_ != nullptr;
|
||||
if ( ImGui::MenuItem( ICON_FA_CAMERA " Emulate video camera", NULL, &on) ) {
|
||||
|
||||
Reference in New Issue
Block a user