Commit Graph

232 Commits

Author SHA1 Message Date
afec6afe4c Fix managed UTF-8 string allocation not using correct encoding 2023-09-03 14:05:21 +03:00
Wojtek Figat
c32a139dbd Fix crash when unboxing managed structure with refs into Variant 2023-08-29 11:57:18 +02:00
Wojtek Figat
50c85aec6d Minor improvements to #1315 and add getter of current window style 2023-08-21 23:33:33 +02:00
Wojtek Figat
b4adb7f3e1 Merge branch 'set-window-mode' of https://github.com/Tryibion/FlaxEngine into Tryibion-set-window-mode 2023-08-21 22:42:13 +02:00
Wojtek Figat
b78db755ec Fix crash regression d9ee8f4665
#1318
2023-08-17 21:40:36 +02:00
Chandler Cox
6e5f693459 Small change to allow other platforms to use fullscreen and windowed in WindowMode function 2023-08-14 18:25:19 -05:00
Chandler Cox
cfd11a7e77 Add borderless window on Windows platform and add easy function in Screen class to change window mode. 2023-08-14 18:11:05 -05:00
Wojtek Figat
860dce487f Codestyle fixes 2023-08-14 15:47:24 +02:00
Wojtek Figat
6af6afc6a4 Merge branch 'managedhandlepool_refactor' of https://github.com/GoaLitiuM/FlaxEngine into GoaLitiuM-managedhandlepool_refactor 2023-08-14 15:43:57 +02:00
Wojtek Figat
d5245f6a8c Merge branch 'managedarray_pool_cache' of https://github.com/GoaLitiuM/FlaxEngine into GoaLitiuM-managedarray_pool_cache 2023-08-14 15:39:44 +02:00
Wojtek Figat
342ec4c3c2 Merge branch 'arraytype_cache' of https://github.com/GoaLitiuM/FlaxEngine into GoaLitiuM-arraytype_cache 2023-08-14 15:36:27 +02:00
Wojtek Figat
13e0582ef2 Codestyle fixes 2023-08-14 15:36:19 +02:00
Wojtek Figat
238ff38bf2 Merge branch 'invoker_ret_refactor' of https://github.com/GoaLitiuM/FlaxEngine into GoaLitiuM-invoker_ret_refactor 2023-08-14 15:31:50 +02:00
1b0976d99b Refactor ManagedHandlePool
Weak handles are now stored in one sets of dictionarys synchronized with
other threads. This so far seems the fastest way to manage the
dictionaries for now.
2023-08-13 22:14:37 +03:00
65de284a66 Optimize managed method invokers return value marshalling 2023-08-13 22:10:07 +03:00
d9ee8f4665 Cache pooled ManagedArray managed handles 2023-08-13 21:56:52 +03:00
1254af8bbb Optimize UnboxValue performance, safety and memory usage
- Avoids unnecessary boxing of the converted values by storing them in
unmanaged memory.
- Wrap ToNative-method in a delegate and cache it
- Fixes returning address to unpinned memory by pinning POD-types for
a short period of time.
2023-08-13 21:53:42 +03:00
44b70d87e5 Cache MakeArrayType results in native interop 2023-08-13 21:42:40 +03:00
9d8105e3f3 Separate managed assembly unloading and scripting ALC reinitialization
Fixes an issue with multiple managed assemblies unloading and releasing
all cached data before native resources were fully released in other
assemblies.
2023-08-08 17:39:31 +03:00
Wojtek Figat
619b0bff6b Merge branch 'fix/string-marshalling' of https://github.com/mtszkarbowiak/FlaxEngine into mtszkarbowiak-fix/string-marshalling 2023-07-24 18:14:24 +02:00
Wojtek Figat
11bb6d4364 Fix crash when using custom Anim Graph node (.NET 7 regression) 2023-07-24 14:23:28 +02:00
Mateusz Karbowiak
91e0e2011c Fix visibility of string wrapper 2023-07-22 18:44:36 +02:00
ff56152ef2 Fix releasing non-collectible types with collectible generic types 2023-07-15 13:20:56 +03:00
Wojtek Figat
04ef3c60d5 Fix regression from c79952a4d6 2023-07-05 09:27:21 +02:00
Wojtek Figat
c79952a4d6 Implement missing dotnet7 interop for field and stabilize interop 2023-07-04 17:57:59 +02:00
Wojtek Figat
9a1fd12a85 Fix sizeof struct within generic type instance
#1219
2023-07-03 11:42:15 +02:00
28335478bd Fix managed library location resolver 2023-07-02 21:56:41 +03:00
Wojtek Figat
3119c50789 Fix nullable warnings 2023-06-28 20:09:01 +02:00
87e96a9017 Fix native library lookup after hot reload 2023-06-20 16:29:04 +03:00
Wojtek Figat
6b8d8b7913 Various fixes and improvements to auto-generated bindings usability 2023-06-12 14:35:11 +02:00
Wojtek Figat
652f8ccb8d Fix crash when reading field value from C# in AOT on iOS 2023-06-11 15:05:14 +02:00
Wojtek Figat
ad1c573678 Fix false-positive error when interop structure has a additional memory size (alignment) 2023-05-25 00:12:54 +02:00
Wojtek Figat
c2cd3b64ff Improve generated bindings code usability in Editor 2023-05-24 23:50:51 +02:00
Wojtek Figat
3e792e6cd7 Add NativeInteropException for native interop crashes 2023-05-19 13:52:30 +02:00
Wojtek Figat
b402603b1d Merge branch 'latefixedupdate' of https://github.com/GoaLitiuM/FlaxEngine into GoaLitiuM-latefixedupdate 2023-05-12 14:41:49 +02:00
cbe07b842f Fix resolving managed scripts references in Editor 2023-05-11 22:11:46 +03:00
Wojtek Figat
637850d06c Fix crash when C# type has missing empty ctor or it throws an exception
#1019
2023-05-10 20:41:58 +02:00
Wojtek Figat
c73897ce7f Merge branch 'object_array_marshalling' of https://github.com/GoaLitiuM/FlaxEngine into GoaLitiuM-object_array_marshalling 2023-05-10 09:22:22 +02:00
da149d32cf Force GC to run periodically in order to reduce stuttering 2023-05-08 23:29:39 +03:00
66de1e744a Use Unsafe.As casting in generated managed marshallers 2023-05-08 23:28:54 +03:00
cae07f3623 Optimize marshalling managed arrays of object references 2023-05-08 23:28:49 +03:00
Wojtek Figat
69cdb1268a Merge remote-tracking branch 'origin/master' into 1.6 2023-05-08 12:58:42 +02:00
Wojtek Figat
ec2226f06e Fixes for dotnet7 after #1061 and 5e31a678bd 2023-05-05 11:58:11 +02:00
Wojtek Figat
17fbfc969b Merge branch 'weak_handle_improvements_2' of https://github.com/GoaLitiuM/FlaxEngine into GoaLitiuM-weak_handle_improvements_2 2023-05-05 10:04:27 +02:00
Wojtek Figat
f82e4b332d Merge branch 'reuse_pooled_array_buffers' of https://github.com/GoaLitiuM/FlaxEngine into GoaLitiuM-reuse_pooled_array_buffers 2023-05-05 10:02:28 +02:00
5efbfc86ad Prevent weak managed handle collections during long operations
Loading larger scenes may trigger multiple collections during the P/Invoke call,
so prevent collections from happening within a second to avoid in-flight handles
getting collected before the operation finishes.
2023-05-01 20:08:00 +03:00
36a9ffe3aa Try to reuse previously allocated buffers in pooled ManagedArrays 2023-05-01 20:07:27 +03:00
65b63da93a Improve custom attributes caching in managed classes 2023-05-01 20:06:51 +03:00
320955f8b7 Use weak handles for marshalling temporary managed-to-native parameters 2023-04-29 12:41:02 +03:00
6378f62acd Improve weak managed handle collection
Use thread-static pools for weak managed handles in order to reduce locking,
and collect the handles either right after garbage collection or when the pool
size becomes too large.
2023-04-29 12:40:58 +03:00