Commit Graph

100 Commits

Author SHA1 Message Date
Nick Fisher b69977929c in ThermionListenerWidget, don't return child before the input handler has initialized 2025-03-28 11:46:11 +08:00
Nick Fisher 255c0edd49 refactoring 2025-03-21 14:56:20 +08:00
Nick Fisher e2048c3efd refactoring 2025-03-19 16:03:44 +08:00
Nick Fisher 627447f8b0 refactoring 2025-03-19 12:27:13 +08:00
Nick Fisher 988e22fe95 rename updateViewport -> setViewport 2025-03-17 16:59:57 +08:00
Nick Fisher 15134c335b hide Texture import inside ThermionTextureWidget to avoid clash 2025-03-04 18:16:36 +08:00
Nick Fisher ffc256228a add fps counters and headroom 2025-03-01 13:02:05 +08:00
Nick Fisher 16ff7ef008 fix: rename msPerFrame property 2025-03-01 11:52:31 +08:00
Nick Fisher 61abed2fb7 internal: use msPerFrame to control render timing 2025-03-01 11:50:43 +08:00
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 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 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 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 bdcbd90ec6 split D3D/GLES texture creation 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 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 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 a08620d7c9 rename gestureHandler to inputHandler 2024-10-22 22:23:13 +08:00
Nick Fisher 0c29d61a35 fix: use internal Set for determining first ThermionTextureWidget to call requestFrame and cleanup destruction logic 2024-10-22 12:47:13 +08:00
Nick Fisher 58e549e3b3 chore: await future in ThermionFlutterPlugin 2024-10-22 12:46:36 +08:00
Nick Fisher f9468db266 Windows embedder fixes 2024-10-14 11:23:56 +11:00
Nick Fisher a321966e5b fix Windows build.dart to avoid native_assets fork; add implementations for ThermionFlutterWindows 2024-10-12 02:14:37 +11:00
Nick Fisher f180c1018f mobile gesture handler 2024-10-11 15:37:03 +08:00
Nick Fisher 2d85e191bc chore: make pub.dev happy 2024-10-02 17:58:08 +08:00
Nick Fisher 562ecf2ee5 feat: camera and resizing improvements 2024-10-02 16:47:55 +08:00
Nick Fisher c4598637bb feat: support multiple ThermionWidget on Android 2024-09-30 18:20:05 +08:00
Nick Fisher 8a94b6a334 feat: use imported texture on iOS 2024-09-30 14:51:11 +08:00
Nick Fisher c80c163212 feat: working implementation of multiple widgets on macos 2024-09-30 13:45:57 +08:00
Nick Fisher 921a994eb6 refactor: continual refactor to support multiple render targets 2024-09-28 18:28:05 +08:00
Nick Fisher d29dd207b6 feat: add rendering check to ThermionWidget ticker 2024-09-27 15:13:33 +08:00
Nick Fisher 1a721deee6 more camera work 2024-09-26 18:41:34 +08:00
Nick Fisher 239891c400 chore: rearrange library/export structure 2024-09-26 16:35:33 +08:00
Nick Fisher 87c96d06a4 chore: rearrange library dirs, gesture handler improvements 2024-09-26 15:52:23 +08:00
Nick Fisher 26a8d9c6b5 chore: import cleanup 2024-09-26 10:48:40 +08:00
Nick Fisher 947a77f619 chore: rearrange flutter gesture/widget directory structure 2024-09-26 10:46:52 +08:00
Nick Fisher c850513b7f chore: rearrange flutter gesture/widget directory structure 2024-09-26 10:46:10 +08:00
Nick Fisher c47d827139 chore: rename thermion_flutter src dir 2024-09-26 10:44:47 +08:00
Nick Fisher 58da196876 chore!: remove superseded HardwareKeyboard* classes 2024-09-25 21:56:16 +08:00
Nick Fisher 153817e859 chore!: (flutter) cleanup for pub.dev publishing 2024-09-25 21:20:04 +08:00
Nick Fisher ba0bc54fa7 fix!: remove EntityControllerMouseWidget (replace with GestureHandler) 2024-09-25 21:19:41 +08:00
Nick Fisher e6a6862ba4 chore: (flutter) web packaging fixes (use logger) 2024-09-25 21:17:38 +08:00
Nick Fisher b7d3e9191a chore: (flutter) web packaging fixes 2024-09-25 21:17:20 +08:00
Nick Fisher 7dc8e394f7 chore!: remove EntityListWidget - will replace with new Scene 2024-09-25 21:16:24 +08:00
Nick Fisher 85d6946645 (flutter) provide nicer implementation of FixedOrbitCameraRotationDelegate 2024-09-25 19:26:19 +08:00