From 8a1f320bb708e150463981c47c67c0931864981c Mon Sep 17 00:00:00 2001 From: Nick Fisher Date: Tue, 24 Jun 2025 13:37:09 +0800 Subject: [PATCH] remove objective_c from dev_dependencies & change test_helper to create render target without importing textures --- thermion_dart/pubspec.yaml | 1 - thermion_dart/test/helpers.dart | 31 ++++++++++++++++--------------- 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/thermion_dart/pubspec.yaml b/thermion_dart/pubspec.yaml index 9bcba170..45d0b29f 100644 --- a/thermion_dart/pubspec.yaml +++ b/thermion_dart/pubspec.yaml @@ -24,7 +24,6 @@ dependencies: dev_dependencies: ffigen: ^18.1.0 - objective_c: ^8.0.0 test: mockito: ^5.0.0 build_runner: ^2.0.0 diff --git a/thermion_dart/test/helpers.dart b/thermion_dart/test/helpers.dart index 7e2c68f6..46ad8311 100644 --- a/thermion_dart/test/helpers.dart +++ b/thermion_dart/test/helpers.dart @@ -3,7 +3,6 @@ import 'dart:io'; import 'package:image/image.dart' as img; import 'package:image/image.dart'; import 'package:logging/logging.dart'; -import 'package:thermion_dart/src/swift/swift_bindings.g.dart'; import 'package:thermion_dart/src/filament/src/implementation/ffi_filament_app.dart'; import 'package:thermion_dart/src/filament/src/implementation/ffi_render_target.dart'; import 'package:thermion_dart/src/filament/src/implementation/ffi_swapchain.dart'; @@ -189,13 +188,13 @@ class TestHelper { /// /// /// - Future createTexture(int width, int height, - {bool depth = false, bool stencil = false}) async { - final object = ThermionTextureSwift(); - object.initWithWidth_height_isDepth_isStencil_( - width, height, depth, stencil); - return object; - } + // Future createTexture(int width, int height, + // {bool depth = false, bool stencil = false}) async { + // final object = ThermionTextureSwift(); + // object.initWithWidth_height_isDepth_isStencil_( + // width, height, depth, stencil); + // return object; + // } Future _loadResource(String uri) async { uri = uri.replaceAll("file://", ""); @@ -227,11 +226,11 @@ class TestHelper { FFIRenderTarget? renderTarget; if (createRenderTarget) { - var metalColorTexture = await createTexture( - viewportDimensions.width, viewportDimensions.height); - var metalDepthTexture = await createTexture( - viewportDimensions.width, viewportDimensions.height, - depth: true); + // var metalColorTexture = await createTexture( + // viewportDimensions.width, viewportDimensions.height); + // var metalDepthTexture = await createTexture( + // viewportDimensions.width, viewportDimensions.height, + // depth: true); var color = await FilamentApp.instance! .createTexture(viewportDimensions.width, viewportDimensions.height, flags: { @@ -240,7 +239,8 @@ class TestHelper { TextureUsage.TEXTURE_USAGE_SAMPLEABLE }, textureFormat: TextureFormat.RGBA32F, - importedTextureHandle: metalColorTexture.metalTextureAddress); + // importedTextureHandle: metalColorTexture.metalTextureAddress + ); var width = await color.getWidth(); var height = await color.getHeight(); var depth = await FilamentApp.instance!.createTexture( @@ -254,7 +254,8 @@ class TestHelper { textureFormat: createStencilBuffer ? TextureFormat.DEPTH32F_STENCIL8 : TextureFormat.DEPTH32F, - importedTextureHandle: metalDepthTexture.metalTextureAddress); + // importedTextureHandle: metalDepthTexture.metalTextureAddress + ); renderTarget = await FilamentApp.instance!.createRenderTarget( viewportDimensions.width, viewportDimensions.height,