FIX: windows remote rendering

jira: github-6536

Change-Id: I6ddb4aad1a9c7db80258b5fc0d872555c8be2d7c
(cherry picked from commit 5492a12310daa014818fb2e9ae0e4493fc6b755e)
This commit is contained in:
jun.zhang 2025-04-16 16:12:53 +08:00 committed by Lane.Wei
parent c34e985f18
commit a55520b5a2
2 changed files with 8 additions and 12 deletions

View File

@ -211,14 +211,13 @@ extern "C" {
#ifdef SLIC3R_GUI #ifdef SLIC3R_GUI
// Here one may push some additional parameters based on the wrapper type. // Here one may push some additional parameters based on the wrapper type.
bool force_mesa = false; bool force_mesa = false;
bool force_hw = false;//for rempote desktop,
#endif /* SLIC3R_GUI */ #endif /* SLIC3R_GUI */
for (int i = 1; i < argc; ++i) { for (int i = 1; i < argc; ++i) {
#ifdef SLIC3R_GUI #ifdef SLIC3R_GUI
if (wcscmp(argv[i], L"--sw-renderer") == 0) if (wcscmp(argv[i], L"--sw-renderer") == 0)
force_mesa = true; force_mesa = true;
else if (wcscmp(argv[i], L"--no-sw-renderer") == 0) else if (wcscmp(argv[i], L"--no-sw-renderer") == 0)
force_hw = true; force_mesa = false;
#endif /* SLIC3R_GUI */ #endif /* SLIC3R_GUI */
argv_extended.emplace_back(argv[i]); argv_extended.emplace_back(argv[i]);
} }
@ -228,9 +227,6 @@ extern "C" {
bool load_mesa = bool load_mesa =
// Forced from the command line. // Forced from the command line.
force_mesa || force_mesa ||
// Running over a rempote desktop, and the RemoteFX is not enabled, therefore Windows will only provide SW OpenGL 1.1 context.
// In that case, use Mesa.
(::GetSystemMetrics(SM_REMOTESESSION) && !force_hw) ||
// Try to load the default OpenGL driver and test its context version. // Try to load the default OpenGL driver and test its context version.
!opengl_version_check.load_opengl_dll() || !opengl_version_check.is_version_greater_or_equal_to(3, 2); !opengl_version_check.load_opengl_dll() || !opengl_version_check.is_version_greater_or_equal_to(3, 2);
#endif /* SLIC3R_GUI */ #endif /* SLIC3R_GUI */

View File

@ -1,4 +1,4 @@
#include "libslic3r/libslic3r.h" #include "libslic3r/libslic3r.h"
#include "OpenGLManager.hpp" #include "OpenGLManager.hpp"
#include "GUI.hpp" #include "GUI.hpp"