Commit Graph

185 Commits

Author SHA1 Message Date
Nick Fisher e43e1c9cbd flip camera wireframe direction 2025-01-07 08:25:48 +08:00
Nick Fisher c117555b2c gizmo improvements, use render thread methods for createCamera, allow setParent null to unparent transform 2025-01-07 08:25:48 +08:00
Nick Fisher abbf2d5391 update bindings 2025-01-07 08:25:48 +08:00
Nick Fisher a31c800204 add wireframe camera to geometry 2025-01-07 08:25:48 +08:00
Nick Fisher 877e8def80 add dithering to view 2025-01-07 08:25:48 +08:00
Nick Fisher 6d36dc7923 add dithering to view 2025-01-07 08:25:48 +08:00
Nick Fisher 151935913f allow null parent to setParent 2025-01-07 08:25:48 +08:00
Nick Fisher aa7350c419 gizmo & picking improvements 2025-01-07 08:25:48 +08:00
Nick Fisher c2077cb6b1 fix: store reference to material instances in ThermionViewer so they can be cleaned up on dispose 2025-01-07 08:25:48 +08:00
Nick Fisher c3c6465908 documentation 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 9ada6aae64 chore: rename to Viewer_destroy 2024-11-21 12:32:52 +08:00
Nick Fisher 0ef0f37bbf chore: update stubs 2024-11-21 12:32:34 +08:00
Nick Fisher 468cada6c6 update bindings 2024-11-21 12:31:58 +08:00
Nick Fisher d58a48061c fix: remove MaterialInstance from SceneManager storage when destroyed 2024-11-21 12:31:04 +08:00
Nick Fisher 9692c07da9 chore: free flight handler cleanup 2024-11-21 10:03:48 +08:00
Nick Fisher 2860db3fbd feat: use InputAction.ZOOM for scroll wheel in free flight handler 2024-11-21 08:44:36 +08:00
Nick Fisher 1ce5bd3bcf feat: free flight camera improvements 2024-11-19 16:30:35 +08:00
Nick Fisher 25320f45af chore: fix spelling 2024-11-15 22:58:04 +08:00
Nick Fisher 0b9f3160d9 feat: add MaterialInstance.setDepthFunc 2024-11-15 22:56:40 +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 6472670ec3 add createRenderTargetRenderThread 2024-11-11 12:49:40 +08:00
Nick Fisher 6ff04fb76a feat: add Dart methods for getRenderableBoundingBox, setParameterInt and setParameterFloat4 2024-11-02 10:23:36 +08:00
Nick Fisher 902f67e97d expose setParameterInt/setParameterFloat4, rename to getScreenSpaceBoundingBox, and expose method for getting renderable bounding box 2024-11-02 10:23:36 +08:00
Nick Fisher 4650ae1295 feat: Rename Gizmo material to UnlitFixedSize, and expose methods for using this material on other entities. Also exposes new methods for setting single float parameters. 2024-11-02 10:23:36 +08:00
Nick Fisher d25edfc097 fix: remove superfluous ceil() calls for picking coordinates 2024-11-02 10:23:35 +08:00
Nick Fisher 8c2b8a6cba feat: expose zoomSensitivity argument for flight input handler 2024-11-02 10:23:35 +08:00
Nick Fisher 7c15125a97 fix: reduce size of pick functor for compatibility with armeabi-v7a 2024-10-30 10:47:39 +08:00
Nick Fisher 036369a8dc feat: pass through fragment coordinates for picking 2024-10-30 10:47:39 +08:00
Nick Fisher d7debf981c Merge branch 'master' into develop 2024-10-25 14:15:51 +11:00
Nick Fisher 2b4a73f355 feat: add SCALE2_MOVE InputType 2024-10-25 10:37:57 +08:00
Nick Fisher 2713286ca5 Merge pull request #71 from nmfisher/develop
Allow finer control over input handling
2024-10-24 15:56:11 +11:00
Nick Fisher 6f648702e9 feat: add SCALE2_ROTATE to InputHandler 2024-10-24 12:52:14 +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 0fcc44bff8 doc: update docstrings for setLayerVisibilty and setVisibilityLayer 2024-10-23 15:48:34 +08:00
Nick Fisher 74b7c938a8 feat: set SCALE2:InputAction.ZOOM by default 2024-10-23 14:36:47 +08:00
Nick Fisher 4371dbda3c feat: track zoom delta for DelegateInputHandler 2024-10-23 14:10:41 +08:00
Nick Fisher c6640cef96 feat: set InputType.SCALE1 to ROTATE by default for DelegateInputHandler.fixedOrbit 2024-10-23 14:03:47 +08:00
Nick Fisher 5e66893719 chore!: View.getCamera returns Future<Camera> 2024-10-23 16:41:51 +11:00
Nick Fisher d5824239f5 fix:move createUnlitMaterialInstance and createGeometry to render thread 2024-10-23 16:39:42 +11:00
Nick Fisher 9689690730 feat: simplify FixedOrbitCameraRotationDelegate 2024-10-22 22:23:35 +08:00
Nick Fisher a08620d7c9 rename gestureHandler to inputHandler 2024-10-22 22:23:13 +08:00
Nick Fisher 2ae4f6b338 chore: remove destroy() methods from FFIRenderTarget/FFISwapChain, implement destroyRenderTarget/destroySwapChain and clean up ThermionViewerFFI disposal 2024-10-22 12:46:18 +08:00
Nick Fisher e28e41c1d9 chore: update stubbed methods 2024-10-22 12:45:30 +08:00
Nick Fisher 05dfe51260 chore: add destroySwapChain/destroyRenderTarget methods to Dart vieer and allow setting null renderTarget 2024-10-22 12:45:16 +08:00
Nick Fisher ec6e94f4ca chore: remove destroy() methods from RenderTarget and SwapChain (these need to be managed by Viewer to handle instances where the viewer itself has been disposed 2024-10-22 12:44:46 +08:00
Nick Fisher bdb332bd79 fix: set View render target to nullptr if Dart renderTarget is null 2024-10-22 12:44:00 +08:00
Nick Fisher 9bec96f160 chore: rename Viewer_destroyOnRenderThread method and cleanup unused SwapChain parameter in render threa 2024-10-22 12:42:19 +08:00
Nick Fisher f9468db266 Windows embedder fixes 2024-10-14 11:23:56 +11:00
Nick Fisher f180c1018f mobile gesture handler 2024-10-11 15:37:03 +08:00