From 14b815e0096156fab9da873525527599262bbe0b Mon Sep 17 00:00:00 2001 From: Nick Fisher Date: Mon, 4 Nov 2024 08:30:28 +0800 Subject: [PATCH] remove unnecessary _context property from FilamentViewer --- thermion_dart/native/include/FilamentViewer.hpp | 1 - thermion_dart/native/src/FilamentViewer.cpp | 5 ++--- thermion_flutter/thermion_flutter/windows/CMakeLists.txt | 2 +- 3 files changed, 3 insertions(+), 5 deletions(-) diff --git a/thermion_dart/native/include/FilamentViewer.hpp b/thermion_dart/native/include/FilamentViewer.hpp index 327a182b..6ac49c0e 100644 --- a/thermion_dart/native/include/FilamentViewer.hpp +++ b/thermion_dart/native/include/FilamentViewer.hpp @@ -153,7 +153,6 @@ namespace thermion private: const ResourceLoaderWrapperImpl *const _resourceLoaderWrapper; - void* _context = nullptr; Scene *_scene = nullptr; Engine *_engine = nullptr; thermion::ThreadPool *_tp = nullptr; diff --git a/thermion_dart/native/src/FilamentViewer.cpp b/thermion_dart/native/src/FilamentViewer.cpp index 22e138d5..4838eebc 100644 --- a/thermion_dart/native/src/FilamentViewer.cpp +++ b/thermion_dart/native/src/FilamentViewer.cpp @@ -127,8 +127,7 @@ namespace thermion FilamentViewer::FilamentViewer(const void *sharedContext, const ResourceLoaderWrapperImpl *const resourceLoader, void *const platform, const char *uberArchivePath) : _resourceLoaderWrapper(resourceLoader) { - - _context = (void *)sharedContext; + Log("Creating engine wiht sharedContext %d", sharedContext); ASSERT_POSTCONDITION(_resourceLoaderWrapper != nullptr, "Resource loader must be non-null"); @@ -147,7 +146,7 @@ namespace thermion #else _engine = Engine::create(Engine::Backend::OPENGL, (backend::Platform *)platform, (void *)sharedContext, nullptr); #endif - + Log("Engine created"); _engine->setAutomaticInstancingEnabled(true); _renderer = _engine->createRenderer(); diff --git a/thermion_flutter/thermion_flutter/windows/CMakeLists.txt b/thermion_flutter/thermion_flutter/windows/CMakeLists.txt index 43f2e9c1..7d15ad3b 100644 --- a/thermion_flutter/thermion_flutter/windows/CMakeLists.txt +++ b/thermion_flutter/thermion_flutter/windows/CMakeLists.txt @@ -15,7 +15,7 @@ list(APPEND PLUGIN_SOURCES ) set(USE_ANGLE FALSE) -set(WGL_USE_BACKING_WINDOW TRUE) +set(WGL_USE_BACKING_WINDOW FALSE) if(USE_ANGLE) add_compile_definitions(USE_ANGLE)