Commit Graph

271 Commits

Author SHA1 Message Date
Nick Fisher ccc0a53abc rename numInstances to initialInstances in loadGltf methods.
when initialInstances > 0, don't wait for createInstance to be called to create corresponding GltfSceneAsset
2025-06-26 10:11:29 +08:00
Nick Fisher e27be37378 add mRestart flag to immediately request the thread exits to force a commit frame 2025-06-23 12:43:03 +08:00
Nick Fisher 668c001b49 add inUse flag to assist with recycling gltf instances 2025-06-23 12:21:52 +08:00
Nick Fisher e503dd2e8b docstrings for GltfSceneAsset destroyInstance 2025-06-23 12:21:21 +08:00
Nick Fisher 86e0f7740f add Fence_waitAndDestroyRenderThread 2025-06-18 13:03:34 +08:00
Nick Fisher a44cb9a9cc add Fence_waitAndDestroy to TEngine.h 2025-06-18 13:02:48 +08:00
Nick Fisher 42f9538040 implement TSkybox and use setColor method to set the background color, rather than the image 2025-06-18 13:01:25 +08:00
Nick Fisher 65ca59ff22 merge native setImage with setImageWithDepth 2025-06-17 13:25:53 +08:00
Nick Fisher 47807d560f separate native methods for creating IBL from irradiance texture and harmonics 2025-06-12 11:33:38 +08:00
Nick Fisher ad26fc4563 add Dart IndirectLight and Ktx1Bundle classes, and separate KTX decoding from skybox/IBL creation 2025-06-12 11:31:44 +08:00
Nick Fisher f252c86152 update image material to support cubemaps 2025-06-12 08:40:28 +08:00
Nick Fisher 8f1da5e7bd separate skybox/ibl creation from KTX decoding 2025-06-11 09:48:17 +08:00
Nick Fisher 641d92515e move VoidCallback typedef to APIBoundaryTypes (now used outside the render thread header for texture upload callbacks) 2025-06-11 09:45:23 +08:00
Nick Fisher d447fb8e2a add RenderableManager_getBoundingBox 2025-06-11 09:44:46 +08:00
Nick Fisher 4c95bc5b70 (macos) add isStencil argument for creating depth texture on macOS (if true, creates texture with .depth24Unorm_stencil8 2025-06-09 18:24:15 +08:00
Nick Fisher acf03ea0c7 pass TFogOptions by value, not pointer, and rearrange struct fields to minimize alignment issues 2025-06-05 16:40:53 +08:00
Nick Fisher e147e59d8d don't call endFrame() unless beginFrame() was called
only use condition_variable on non-emscripten builds
2025-06-03 16:39:04 +08:00
Nick Fisher 7b80723560 add Texture_generateMipMapsRenderThread, AnimationManager_resetToRestPoseRenderThread 2025-06-02 11:51:19 +08:00
Nick Fisher 39a302c23e remove comments 2025-06-02 11:50:26 +08:00
Nick Fisher 2f7f363db9 pass shared NameComponentManager to gltfio AssetLoader 2025-05-31 11:21:57 +08:00
Nick Fisher 86894cf583 add alpha/requireAlpha argument when decoding images
remove size checks from setImage (we are assuming the caller knows the correct size)
This also adds some monkey-patch methods to js_interop to convert Float32List to a UInt8List (but use this with care, because it will only work for emscripten-allocated objects)
2025-05-29 22:26:42 +08:00
Nick Fisher 6ad76b6217 add stb_image.h 2025-05-29 19:02:35 +08:00
Nick Fisher 94eacec27e Texture improvements: generateMipmaps(), add levels to createTexture, tests to check auto mip level selection 2025-05-29 18:38:57 +08:00
Nick Fisher ff5921a505 remove unused StreamBufferAdapter 2025-05-28 21:52:53 +08:00
Nick Fisher 679af95901 allow directly creating an entity and setting transform 2025-05-24 16:34:47 +08:00
Nick Fisher 81fb0fb583 add setFogOptions 2025-05-24 15:05:03 +08:00
Nick Fisher 195a625738 when getMaterialInstance/setMaterialInstance are called, if entity is not renderable, return false
if no entity is passed, iterate through all entities and use the first renderable entity
2025-05-23 16:27:38 +08:00
Nick Fisher 1fb68b20e9 separate Gltf/Morph/BoneAnimationComponentManager definitions
move gltf animation instantiation to GltfAnimationComponentManager (this helps ensure we are creating the component on the correct entity)
2025-05-20 14:57:26 +08:00
Nick Fisher 11ff6c9053 remove TMaterialKey struct and pass directly as function params 2025-05-18 15:11:50 +08:00
Nick Fisher 25ada92574 add View_pickRenderThread method (only used in WASM builds so we can proxy the callback to the main thread 2025-05-18 15:09:05 +08:00
Nick Fisher 826a22f348 wip 2025-05-18 15:08:45 +08:00
Nick Fisher fe11479b08 remove relativeResourcePath from gltf resource loading;
all external resources should be added on the Dart side, Filament should never attempt to load these directly from the filesystem.
relativeResourcePath (called gltfPath on the Filament side) is only used for desktop loading, so this is now irrelevant.
Note that Filament must be compiled with GLTFIO_USE_FILESYSTEM=0
2025-05-17 21:48:18 +08:00
Nick Fisher c98e604e76 split animation components into GltfAnimation/MorphAnimation/BoneAnimation 2025-05-17 10:11:55 +08:00
Nick Fisher f9d09e17ef return false from AnimationManager_ methods if provided sceneAsset is not a glTF asset
rename playAnimation to playGltfAnimation etc where appropriate
2025-05-17 10:06:12 +08:00
Nick Fisher c47cfe9b57 transformToUnitCube returns bool (false when transform instance can't be found) 2025-05-10 09:04:06 +08:00
Nick Fisher 906f5bf931 remove redundant make_render_callback_fn_pointer definition 2025-05-09 11:22:08 +08:00
Nick Fisher 8a6ba637a7 store last render time in RenderTicker 2025-05-09 11:19:13 +08:00
Nick Fisher 2f16908992 feat! js_interop improvements 2025-05-07 17:06:38 +08:00
Nick Fisher e9628511fc remove C++ includes from C headers 2025-05-07 16:53:15 +08:00
Nick Fisher 4cb725d47e add Engine_destroyCamera 2025-04-19 09:49:19 +08:00
Nick Fisher e1d5d14ff7 add RenderTarget_destroyRenderThread 2025-04-17 13:35:07 +08:00
Nick Fisher 1be1979c05 rename requestAnimationFrame to requestFrame 2025-04-17 13:34:18 +08:00
Nick Fisher 241c0fe07c recompile materials 2025-04-16 19:08:55 +08:00
Nick Fisher 230bb5f9f6 use render thread methods for all async gltf loading 2025-04-16 19:07:31 +08:00
Nick Fisher 3c68731fe0 ensure __FILENAME__ is defined even if ENABLE_TRACING is off 2025-04-16 18:00:50 +08:00
Nick Fisher f272410803 update ffigen/objective_c dependencies 2025-04-16 17:59:46 +08:00
Nick Fisher 2d4342607d add async gltf resource loading 2025-04-16 17:06:51 +08:00
Nick Fisher 60e025e78d cleanup 2025-04-16 13:36:39 +08:00
Nick Fisher de5bc5c02e cleanup 2025-04-16 13:36:26 +08:00
Nick Fisher cf8e0f6ed2 rename utils.h etc to vulkan_utils.h to avoid filename clashes 2025-04-16 13:27:46 +08:00