Commit Graph

347 Commits

Author SHA1 Message Date
Nick Fisher
baf86d1ade refactor!: move light methods from FilamentViewer to SceneManager/TLightManager and rename clearLights/clearAssets to destroyLights/destroyAssets 2025-01-07 08:25:48 +08:00
Nick Fisher
5e89dc43e8 feat: add FocusNode to ThermionListenerWidget 2025-01-07 08:25:48 +08:00
Nick Fisher
dc690bb93a refactor: rename ThermionFlutterTexture->PlatformTextureDescriptor 2025-01-07 08:25:48 +08:00
Nick Fisher
bedd50ec38 chore: update pubspec.yaml with new package name 2025-01-07 08:25:48 +08:00
Nick Fisher
8a3525d879 chore: temporarily disable ThermionWidgetWebImpl 2025-01-07 08:25:48 +08:00
Nick Fisher
853f1d1a68 feat!: remove superseded ThermionWindows widget 2025-01-07 08:25:48 +08:00
Nick Fisher
7e50f0317e feat: use new createTextureAndBindToView in ThermionTextureWidget 2025-01-07 08:25:48 +08:00
Nick Fisher
724d7532e2 chore: docstring fixes 2025-01-07 08:25:48 +08:00
Nick Fisher
45a548afd2 feat!: rename thermion_flutter_ffi package to thermion_flutter_method_channel 2025-01-07 08:25:48 +08:00
Nick Fisher
e8b4b7806b feat!: rename thermion_flutter_ffi package to thermion_flutter_method_channel 2025-01-07 08:25:48 +08:00
Nick Fisher
133367669d feat: create separate createTexture and createTextureAndBindToView interface methods 2025-01-07 08:25:48 +08:00
Nick Fisher
9128fbbd61 chore: rename local variable in ThermionTexture.swift to avoid compiler warning 2025-01-07 08:25:48 +08:00
Nick Fisher
ed444b0615 feature!:
This is a breaking change needed to fully implement instancing and stencil highlighting.

Previously, users would work directly with entities (on the Dart side, ThermionEntity), e.g.

final entity = await viewer.loadGlb("some.glb");

However, Filament "entities" are a lower-level abstraction.

Loading a glTF file, for example, inserts multiple entities into the scene.

For example, each mesh, light, and camera within a glTF asset will be assigned an entity. A top-level (non-renderable) entity will also be created for the glTF asset, which can be used to transform the entire hierarchy.

"Asset" is a better representation for loading/inserting objects into the scene; think of this as a bundle of entities.

Unless you need to work directly with transforms, instancing, materials and renderables, you can work directly with ThermionAsset.
2024-11-27 15:02:37 +11:00
Nick Fisher
dcc523edff chore(release): publish packages
- thermion_dart@0.2.1-dev.19.0
 - thermion_flutter@0.2.1-dev.19.0
 - thermion_flutter_web@0.2.0+10
 - thermion_flutter_platform_interface@0.2.1-dev.19.0
 - thermion_flutter_ffi@0.2.1-dev.19.0
2024-11-21 10:08:10 +08:00
Nick Fisher
9d3f87218e chore(release): publish packages
- thermion_dart@0.2.1-dev.18.0
 - thermion_flutter@0.2.1-dev.18.0
 - thermion_flutter_web@0.2.0+9
 - thermion_flutter_platform_interface@0.2.1-dev.18.0
 - thermion_flutter_ffi@0.2.1-dev.18.0
2024-11-18 22:56:40 +08:00
Nick Fisher
505b4bb156 fix: fix windows import header 2024-11-18 22:55:25 +08:00
Nick Fisher
70414bb83c chore(release): publish packages
- thermion_dart@0.2.1-dev.0.0.17
 - thermion_flutter@0.2.1-dev.17
 - thermion_flutter_web@0.2.0+8
 - thermion_flutter_platform_interface@0.2.1-dev.17
 - thermion_flutter_ffi@0.2.1-dev.17
2024-11-15 17:59:12 +08:00
Nick Fisher
436873a455 successfully creating D3D texture with D3D11_RESOURCE_MISC_SHARED_NTHANDLE;
successfully allocating with VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT

working copying vulkan texture

successfully passing D3D texture back to Flutter

chore: Dart/Windows sample project: remove unnnecessary InvalidateRect from update()

chore: Dart/Windows sample project: add generated bindings

successfully blitting from Vulkan swapchain to D3D texture

working Vulkan texture integration with Flutter

refactor to allow disposal of resources in destructors

handle destroyTexture correctly

correctly implement surface resizing/destruction

move Windows engine to Vulkan backend and flush after creating swapchain

add vulkan + vkshaders to Windows libs

update materials with Vulkan

move Vulkan implementation to thermion_Dart

remove extras folder

thermion_flutter plugin updates

update build hook to copy .lib file to output directory and use -vulkan lib zip file

thermion_flutter cleanup

reinstate stereoscopic on Windows

add dxgi and d3d11.lib to windows header pragma

update cli_windows sample project

copy filament/vulkan headers to output directory. This was originally added to facilitate linking on Windows (where thermion_flutter_plugin.cpp needs the Vulkan-related headers), but this doesn't actually solve the problem because there's no way that I've found to get the directory structure correct in the Dart native_assets build directory unless you explicitly address each inidivual file. The current approach is therefore to just keep a permanent copy of the headers in the thermion_filament directory (meaning these will need to be updated manually if the Filament version changes). However, I decided to keep the changes to build.dart because it doesn't have much negative impact and may be helpful in future.

disable stereoscopic on Windows and disable handle use after free checks

use filament headers for thermion_flutter

throw Exception for MSAA on Windows (note that passing msaa:true for setAntiAliasing doesn't actually set MSAA on other platforms, but at least it won't cause the engine to crash)

change header include path for Windows/Vulkan

change header include path for Windows/Vulkan

add filament/vulkan headers for flutter (Windows)

ensure destroyTexture platform methods accept an integer rather than a list

handle Android/Windows swapchain creation separately
2024-11-11 12:49:40 +08:00
Nick Fisher
b59cadc061 add first pass vulkan implementation 2024-11-11 12:49:40 +08:00
Nick Fisher
bdcbd90ec6 split D3D/GLES texture creation 2024-11-11 12:49:40 +08:00
Nick Fisher
f3e96fe94a remove external/internal D3D textures 2024-11-11 12:49:40 +08:00
Nick Fisher
ef97f0e6c2 refactor Windows rendering into standalone DLL 2024-11-11 12:49:40 +08:00
Nick Fisher
e2cfe9247e improvements to BackingWindow (?) 2024-11-11 12:49:40 +08:00
Nick Fisher
0eb81114dd expose GetSharedContext method on FlutterRenderContext 2024-11-11 12:49:40 +08:00
Nick Fisher
31c5ef41eb use texture backed platform on Windows 2024-11-11 12:49:40 +08:00
Nick Fisher
73470fa504 refactor WGLContext for easier legibility 2024-11-11 12:49:40 +08:00
Nick Fisher
14b815e009 remove unnecessary _context property from FilamentViewer 2024-11-11 12:49:40 +08:00
Nick Fisher
08c02c1590 chore(release): publish packages
- thermion_dart@0.2.1-dev.0.0.16
 - thermion_flutter@0.2.1-dev.16
 - thermion_flutter_web@0.2.0+7
 - thermion_flutter_platform_interface@0.2.1-dev.16
 - thermion_flutter_ffi@0.2.1-dev.16
2024-11-02 10:23:36 +08:00
Nick Fisher
c77ede9109 doc: fix links in README 2024-11-02 10:23:36 +08:00
Nick Fisher
33e5350605 chore(release): publish packages
- thermion_dart@0.2.1-dev.0.0.15
 - thermion_flutter@0.2.1-dev.15
 - thermion_flutter_web@0.2.0+6
 - thermion_flutter_platform_interface@0.2.1-dev.15
 - thermion_flutter_ffi@0.2.1-dev.15
2024-11-02 10:23:35 +08:00
Nick Fisher
d1924cfdf4 chore: add logging to ThermionTextureWidget 2024-11-02 10:23:35 +08:00
Nick Fisher
dff214259a fix: multiply coordinates by pixelRatio for scale events 2024-11-02 10:23:35 +08:00
Nick Fisher
eccbde4ebb chore(release): publish packages
- thermion_dart@0.2.1-dev.0.0.14
 - thermion_flutter@0.2.1-dev.14
 - thermion_flutter_platform_interface@0.2.1-dev.14
 - thermion_flutter_ffi@0.2.1-dev.14
 - thermion_flutter_web@0.2.0+5
2024-11-02 10:23:35 +08:00
Nick Fisher
b7c14ebbda chore(release): publish packages
- thermion_dart@0.2.1-dev.0.0.13
 - thermion_flutter_web@0.2.0+4
 - thermion_flutter@0.2.1-dev.13
 - thermion_flutter_ffi@0.2.1-dev.13
 - thermion_flutter_platform_interface@0.2.1-dev.13
2024-10-30 10:47:39 +08:00
Nick Fisher
3dce7a61a8 chore(release): publish packages
- thermion_dart@0.2.1-dev.0.0.12
 - thermion_flutter@0.2.1-dev.12
 - thermion_flutter_web@0.2.0+3
 - thermion_flutter_platform_interface@0.2.1-dev.12
 - thermion_flutter_ffi@0.2.1-dev.12
2024-10-25 11:25:11 +08:00
Nick Fisher
5dac06d335 chore(release): publish packages
- thermion_dart@0.2.1-dev.0.0.12
 - thermion_flutter_web@0.2.0+2
 - thermion_flutter_platform_interface@0.2.1-dev.11
 - thermion_flutter_ffi@0.2.1-dev.11
 - thermion_flutter@0.2.1-dev.11
2024-10-25 11:24:32 +08:00
Nick Fisher
ee5c08f795 fix: (flutter) (windows) remove deleted source file from Windows CMakeLists 2024-10-25 14:16:22 +11:00
Nick Fisher
a3b6d60e16 chore(release): publish packages
- thermion_dart@0.2.1-dev.0.0.11
 - thermion_flutter@0.2.1-dev.10
 - thermion_flutter_web@0.2.0+1
 - thermion_flutter_platform_interface@0.2.1-dev.10
 - thermion_flutter_ffi@0.2.1-dev.10
2024-10-24 12:59:43 +08:00
Nick Fisher
5e17e0c6d1 feat!: expose velocity, rotation and timestamp for scale events in listener. accept rotationSensitivity/zoomSensitivity for FixedOrbitRotateInputHandlerDelegate 2024-10-24 10:07:32 +08:00
Nick Fisher
1ba4b2a5be chore: merge master 2024-10-23 15:16:06 +08:00
Nick Fisher
de4733edf1 chore: remove superseded LFS files 2024-10-23 15:12:46 +08:00
Nick Fisher
d4a3985a65 chore(release): publish packages
- thermion_dart@0.2.1-dev.0.0.10
 - thermion_flutter@0.2.1-dev.9
 - thermion_flutter_ffi@0.2.1-dev.9
 - thermion_flutter_platform_interface@0.2.1-dev.9
 - thermion_flutter_web@0.2.0
2024-10-23 14:46:40 +08:00
Nick Fisher
b96dda26c0 chore(release): publish packages
- thermion_dart@0.2.1-dev.0.0.9
 - thermion_flutter@0.2.1-dev.8
 - thermion_flutter_ffi@0.2.1-dev.8
 - thermion_flutter_web@0.1.1
 - thermion_flutter_platform_interface@0.2.1-dev.8
2024-10-23 14:45:47 +08:00
Nick Fisher
b99886095b fix: fix all Windows warnings so apps will compile with /WX 2024-10-23 14:45:46 +08:00
Nick Fisher
8dabe08792 feat: (flutter) (windows) add DestroyRenderingSurface method 2024-10-23 14:45:46 +08:00
Nick Fisher
de4fd3b8d0 feat: (flutter) (windows) add DestroyRenderingSurface method 2024-10-23 14:45:46 +08:00
Nick Fisher
7778afe3ec feat: (flutter) (windows) add DestroyRenderingSurface method 2024-10-23 14:45:46 +08:00
Nick Fisher
f817406dbc feat: (flutter) (windows) add Destroy() to BackingWindow 2024-10-23 14:45:46 +08:00
Nick Fisher
a16e3fcd3c chore: cleanup thermion_flutter pubspec.yaml 2024-10-23 14:45:46 +08:00
Nick Fisher
18023f1606 chore: cleanup thermion_flutter_ffi pubspec 2024-10-23 14:45:46 +08:00