BabylonNative
BabylonNative copied to clipboard
TODOs and hacks remaining in NativeEngine implementation
- [x] Ensure that ViewClearState::Update is actually setting all the appropriate flags, or open issues/documentation to remedy that later: https://github.com/BabylonJS/BabylonNative/blob/1b40d7b59b6e4d01dd4b9bb1db4f0349a5d03cc6/Plugins/NativeEngine/Source/NativeEngine.h#L86-L92
- [x] Consider optimizing FrameBufferManager::Bind by only calling SetUpView when absolutely necessary (which may be as infrequently as on context loss): https://github.com/BabylonJS/BabylonNative/blob/1b40d7b59b6e4d01dd4b9bb1db4f0349a5d03cc6/Plugins/NativeEngine/Source/NativeEngine.h#L175-L185
- [x] bgfx currently reorders FrameBuffer submissions according to its own default order. Enforce the provided order so that behavior exactly matches the Web behavior: https://github.com/BabylonJS/BabylonNative/blob/1b40d7b59b6e4d01dd4b9bb1db4f0349a5d03cc6/Plugins/NativeEngine/Source/NativeEngine.h#L184 @CedricGuillemet
- [x] Investigate https://github.com/BabylonJS/BabylonNative/blob/88737319cf5ea006ae7dfdf84592e86dd0e01bff/Plugins/NativeEngine/Source/NativeEngine.cpp#L1279
- [x] Do we need these enums anymore? If not, remove them: https://github.com/BabylonJS/BabylonNative/blob/master/Library/Source/NativeEngineImpl.h#L295-L297 (dead link, enums already removed)
- [x] Remove NativeEngine::Impl::GetEngine once the real mechanism for creating/destroying engines is implemented: https://github.com/BabylonJS/BabylonNative/blob/1b40d7b59b6e4d01dd4b9bb1db4f0349a5d03cc6/Plugins/NativeEngine/Source/NativeEngine.h#L326 (@syntheticmagus)
- [x] Consider options for removing extricated bgfx internals from NativeEngine.cpp: https://github.com/BabylonJS/BabylonNative/blob/1b40d7b59b6e4d01dd4b9bb1db4f0349a5d03cc6/Plugins/NativeEngine/Source/NativeEngine.cpp#L21-L23
- [x] Discover implications of “num” value on non-D3D11 pipelines and implement/document accordingly: https://github.com/BabylonJS/BabylonNative/blob/master/Library/Source/NativeEngine.cpp#L115
- [x] Revisit empty bgfx::VertexDecl hack in NativeEngine::Impl::CreateVertexBuffer: https://github.com/BabylonJS/BabylonNative/blob/1b40d7b59b6e4d01dd4b9bb1db4f0349a5d03cc6/Plugins/NativeEngine/Source/NativeEngine.cpp#L539-L543
- [x] Experiment with ways to remove the infamous dFdy hack: https://github.com/BabylonJS/BabylonNative/blob/master/Library/Source/NativeEngine.cpp#L375-L377 (@bghgary)
- [ ] Set the Z offset in SetState: https://github.com/BabylonJS/BabylonNative/blob/1b40d7b59b6e4d01dd4b9bb1db4f0349a5d03cc6/Plugins/NativeEngine/Source/NativeEngine.cpp#L786-L787
- [x] Stubs: SetZOffset, GetZOffset, SetDepthTest, GetDepthWrite, SetDepthWrite, SetColorWrite. Implement or delete: https://github.com/BabylonJS/BabylonNative/blob/master/Library/Source/NativeEngine.cpp#L573-L611 @CedricGuillemet
- [x] SetIntArray stubs. Implement or delete: https://github.com/BabylonJS/BabylonNative/blob/master/Library/Source/NativeEngine.cpp#L634-L660 @CedricGuillemet
- [x] SetFloatArray stubs. Implement or delete: https://github.com/BabylonJS/BabylonNative/blob/master/Library/Source/NativeEngine.cpp#L679-L698 @CedricGuillemet
- [x] SetMatrix stubs. Implement or delete: https://github.com/BabylonJS/BabylonNative/blob/master/Library/Source/NativeEngine.cpp#L711-L723 @CedricGuillemet
- [x] SetBool stub. Implement or delete: https://github.com/BabylonJS/BabylonNative/blob/master/Library/Source/NativeEngine.cpp#L781-L786 @CedricGuillemet
- [x] Mipmaps: https://github.com/BabylonJS/BabylonNative/blob/master/Library/Source/NativeEngine.cpp#L805 @CedricGuillemet
- [x] Texture sampling, wrap, and anisotropic stubs. Implement or delete: https://github.com/BabylonJS/BabylonNative/blob/master/Library/Source/NativeEngine.cpp#L902-L926 @CedricGuillemet
- [x] Handle viewport in DrawIndexed: https://github.com/BabylonJS/BabylonNative/blob/master/Library/Source/NativeEngine.cpp#L1009 @CedricGuillemet
- [x] Draw stub. Implement or delete: https://github.com/BabylonJS/BabylonNative/blob/1b40d7b59b6e4d01dd4b9bb1db4f0349a5d03cc6/Plugins/NativeEngine/Source/NativeEngine.cpp#L1344-L1353 @CedricGuillemet
- [x] Confirm that GetRenderWidth and GetRenderHeight are returning the correct values: https://github.com/BabylonJS/BabylonNative/blob/1b40d7b59b6e4d01dd4b9bb1db4f0349a5d03cc6/Plugins/NativeEngine/Source/NativeEngine.cpp#L1375-L1383 @CedricGuillemet
- [ ] Fix stub for URL.createObjectURL in engine
- [ ] Fix stub for URL.revokeObjectURL in engine
- [ ] Fix stub for Blob in engine
I didn't find an equivalent for SetZOffset, GetZOffset in bgfx. Did I miss something?
Discover implications of “num” value on non-D3D11 pipelines -> only used with Vulkan when adding a sampler. I've updated the comment.
This issue seems outdated to me. Any objection for closing it? @bghgary @syntheticmagus
I think many of these are fixed now, but there are still some left that are not. I think we can open separate issues for the remaining items. Thoughts?
I checked a bunch of the checkboxes now that many of them are addressed. Only the zOffset one, which causes #1053 and stub ones are left.
@docEdub Do you mind splitting the remaining checkboxes into their own issues?
The checkbox for "Set the Z offset in SetState
:" is captured in issue https://github.com/BabylonJS/BabylonNative/issues/1053.
The checkboxes for URL.createObjectURL
and URL.revokeObjectURL
are now captured in issue https://github.com/BabylonJS/BabylonNative/issues/1240.
The checkbox for "Fix stub for Blob
in engine" is now captured in issue https://github.com/BabylonJS/BabylonNative/issues/1241.
Added issues to OP, closing in favor of separate issues.