Compare commits

...

529 Commits

Author SHA1 Message Date
Nick Fisher
9d3f87218e chore(release): publish packages
- thermion_dart@0.2.1-dev.18.0
 - thermion_flutter@0.2.1-dev.18.0
 - thermion_flutter_web@0.2.0+9
 - thermion_flutter_platform_interface@0.2.1-dev.18.0
 - thermion_flutter_ffi@0.2.1-dev.18.0
2024-11-18 22:56:40 +08:00
Nick Fisher
505b4bb156 fix: fix windows import header 2024-11-18 22:55:25 +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
bb27f40cb2 chore: add TMaterialInstance to ffigen.yaml 2024-11-15 22:55:16 +08:00
Nick Fisher
9853d6b721 chore: remove uvScale parameter from SceneManager and add some explicit logging 2024-11-15 22:24:30 +08:00
Nick Fisher
52f041afba chore: move TMaterialInstance FFI methods to own file/header 2024-11-15 22:24:07 +08:00
Nick Fisher
646814126f chore: test cleanup 2024-11-15 22:23:28 +08:00
Nick Fisher
05cb4325da chore: rebuild materials 2024-11-15 22:23:07 +08:00
Nick Fisher
e8b3468a3a chore: remove uvScale from unlit.mat 2024-11-15 22:22:49 +08:00
Nick Fisher
741607b78b chore: add checks to Makefile for FILAMENT_PATH 2024-11-15 22:22:31 +08:00
Nick Fisher
70414bb83c chore(release): publish packages
- thermion_dart@0.2.1-dev.0.0.17
 - thermion_flutter@0.2.1-dev.17
 - thermion_flutter_web@0.2.0+8
 - thermion_flutter_platform_interface@0.2.1-dev.17
 - thermion_flutter_ffi@0.2.1-dev.17
2024-11-15 17:59:12 +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
b59cadc061 add first pass vulkan implementation 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
f3e96fe94a remove external/internal D3D textures 2024-11-11 12:49:40 +08:00
Nick Fisher
ef97f0e6c2 refactor Windows rendering into standalone DLL 2024-11-11 12:49:40 +08:00
Nick Fisher
8976eb9621 update extras/Windows include path 2024-11-11 12:49:40 +08:00
Nick Fisher
e2cfe9247e improvements to BackingWindow (?) 2024-11-11 12:49:40 +08:00
Nick Fisher
6472670ec3 add createRenderTargetRenderThread 2024-11-11 12:49:40 +08:00
Nick Fisher
0eb81114dd expose GetSharedContext method on FlutterRenderContext 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
73470fa504 refactor WGLContext for easier legibility 2024-11-11 12:49:40 +08:00
Nick Fisher
14b815e009 remove unnecessary _context property from FilamentViewer 2024-11-11 12:49:40 +08:00
Nick Fisher
5ae028f1e9 print default gpu in cli_windows thermion_window 2024-11-11 12:49:40 +08:00
Nick Fisher
859a514bc5 chore: remove DLL from cli_windows project 2024-11-11 12:49:40 +08:00
Nick Fisher
4d97126ef6 chore: update cli_windows project 2024-11-11 12:49:40 +08:00
Nick Fisher
cc34cb20bd Merge branch 'develop' of https://github.com/nmfisher/thermion into develop 2024-11-02 16:32:06 +08:00
Nick Fisher
9c555c9ec0 chore: update cli_windows project 2024-11-02 16:29:36 +08:00
Nick Fisher
9537f75bc2 Update dart.yml 2024-11-02 16:41:14 +11:00
Nick Fisher
30e0012da6 Update dart.yml 2024-11-02 16:31:38 +11:00
Nick Fisher
1892235d5c Update dart.yml 2024-11-02 16:11:51 +11:00
Nick Fisher
82bd84b60d Update dart.yml 2024-11-02 16:07:04 +11:00
Nick Fisher
814adf8567 Update dart.yml 2024-11-02 16:01:09 +11:00
Nick Fisher
671880b405 chore: move windows extras to standalone cli_windows example 2024-11-02 12:55:56 +08:00
Nick Fisher
6ce2e22fac Update dart.yml 2024-11-02 15:54:05 +11:00
Nick Fisher
51d3dae1db Update dart.yml 2024-11-02 15:49:39 +11:00
Nick Fisher
a33a18da42 Merge branch 'develop' of https://github.com/nmfisher/thermion into develop 2024-11-02 13:24:18 +11:00
Nick Fisher
6ff04fb76a feat: add Dart methods for getRenderableBoundingBox, setParameterInt and setParameterFloat4 2024-11-02 10:23:36 +08:00
Nick Fisher
124938dbc2 temporarily disable UnprojectTexture 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
08c02c1590 chore(release): publish packages
- thermion_dart@0.2.1-dev.0.0.16
 - thermion_flutter@0.2.1-dev.16
 - thermion_flutter_web@0.2.0+7
 - thermion_flutter_platform_interface@0.2.1-dev.16
 - thermion_flutter_ffi@0.2.1-dev.16
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
c77ede9109 doc: fix links in README 2024-11-02 10:23:36 +08:00
Nick Fisher
0f56cbe7e7 doc: README 2024-11-02 10:23:36 +08:00
Nick Fisher
708e90117d doc: update README 2024-11-02 10:23:36 +08:00
Nick Fisher
33e5350605 chore(release): publish packages
- thermion_dart@0.2.1-dev.0.0.15
 - thermion_flutter@0.2.1-dev.15
 - thermion_flutter_web@0.2.0+6
 - thermion_flutter_platform_interface@0.2.1-dev.15
 - thermion_flutter_ffi@0.2.1-dev.15
2024-11-02 10:23:35 +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
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
eccbde4ebb chore(release): publish packages
- thermion_dart@0.2.1-dev.0.0.14
 - thermion_flutter@0.2.1-dev.14
 - thermion_flutter_platform_interface@0.2.1-dev.14
 - thermion_flutter_ffi@0.2.1-dev.14
 - thermion_flutter_web@0.2.0+5
2024-11-02 10:23:35 +08:00
Nick Fisher
27e1456b9f chore: add Dart/windows-only example project 2024-11-02 13:10:36 +11:00
Nick Fisher
9c6b2a92ac fix: replace assets symlink for quickstart project 2024-10-30 12:03:48 +08:00
Nick Fisher
1d6cb9cad2 fix: replace symlinks for camera_manipulation project 2024-10-30 15:01:15 +11:00
Nick Fisher
d31e6c8183 feat: sanitize file paths in build.dart for Windows compatibility 2024-10-30 14:35:49 +11:00
Nick Fisher
cf1a50c2e5 chore: use dependency_overrides for camera_manipulation project 2024-10-30 14:28:06 +11: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
b7c14ebbda chore(release): publish packages
- thermion_dart@0.2.1-dev.0.0.13
 - thermion_flutter_web@0.2.0+4
 - thermion_flutter@0.2.1-dev.13
 - thermion_flutter_ffi@0.2.1-dev.13
 - thermion_flutter_platform_interface@0.2.1-dev.13
2024-10-30 10:47:39 +08:00
Nick Fisher
2969321b8c chore: test cleanup 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
7be2b43c35 chore: remove sandbox from macos quickstart project 2024-10-30 10:47:39 +08:00
Nick Fisher
e5fe6d95e9 test: add perspective projection test 2024-10-30 10:47:39 +08:00
Nick Fisher
a8480a9eee Update dart.yml 2024-10-25 17:26:07 +08:00
Nick Fisher
1a4f53a3f9 Update dart.yml 2024-10-25 17:19:26 +08:00
Nick Fisher
11c374c25d Update dart.yml 2024-10-25 17:17:11 +08:00
Nick Fisher
618d633602 Update dart.yml 2024-10-25 17:16:02 +08:00
Nick Fisher
3effb837b7 chore: dummy tests 2024-10-25 16:59:27 +08:00
Nick Fisher
68d363388d chore: dummy tests 2024-10-25 14:49:11 +08:00
Nick Fisher
10fd78276c chore: dummy tests 2024-10-25 14:22:28 +08:00
Nick Fisher
4d778326c6 chore: dummy test for GitHub actions 2024-10-25 14:17:14 +08:00
Nick Fisher
e2d381b6b7 chore: rename test 2024-10-25 13:57:21 +08:00
Nick Fisher
4fc819e9b9 Update dart.yml 2024-10-25 13:51:39 +08:00
Nick Fisher
f0feb8aeb1 Merge branch 'develop' of https://github.com/nmfisher/thermion into develop 2024-10-25 16:45:58 +11:00
Nick Fisher
85013743fe chore: (flutter) (example) use dependency overrides for local thermion packages. We want to build this application for CI before releasing, so we need to be testing the packages that will be built 2024-10-25 16:45:44 +11:00
Nick Fisher
e5a1585c25 chore: (windows) remove unused libs 2024-10-25 16:44:42 +11:00
Nick Fisher
dd8bf920a5 chore: update dart.yml 2024-10-25 12:31:29 +08:00
Nick Fisher
b70c144784 chore: update dart.yml 2024-10-25 12:26:39 +08:00
Nick Fisher
d9849717de chore: cleanup tests 2024-10-25 12:25:47 +08:00
Nick Fisher
ec4fd5fd44 Update dart.yml 2024-10-25 12:20:10 +08:00
Nick Fisher
52b83d933d Update dart.yml 2024-10-25 12:04:11 +08:00
Nick Fisher
f1f2a237bb chore: remove combined integration_test 2024-10-25 12:01:01 +08:00
Nick Fisher
4a90031054 Update dart.yml 2024-10-25 11:55:34 +08:00
Nick Fisher
cf34b7867d Update dart.yml 2024-10-25 11:51:21 +08:00
Nick Fisher
e49330c34a Update dart.yml 2024-10-25 11:45:16 +08:00
Nick Fisher
53ff1de23c Merge branch 'master' into develop 2024-10-25 11:42:00 +08:00
Nick Fisher
7165b13d48 chore: clean up thermion_dart test directory for GitHub actions 2024-10-25 11:41:45 +08:00
Nick Fisher
f330721c0c Update dart.yml 2024-10-25 11:40:38 +08:00
Nick Fisher
01fe469a28 Update dart.yml 2024-10-25 11:36:59 +08:00
Nick Fisher
e716b55b5c Update dart.yml 2024-10-25 11:32:36 +08:00
Nick Fisher
e7ebf6e8b2 Update dart.yml 2024-10-25 11:31:00 +08:00
Nick Fisher
16e34bf76a Update dart.yml 2024-10-25 11:29:36 +08:00
Nick Fisher
3dce7a61a8 chore(release): publish packages
- thermion_dart@0.2.1-dev.0.0.12
 - thermion_flutter@0.2.1-dev.12
 - thermion_flutter_web@0.2.0+3
 - thermion_flutter_platform_interface@0.2.1-dev.12
 - thermion_flutter_ffi@0.2.1-dev.12
2024-10-25 11:25:11 +08:00
Nick Fisher
5dac06d335 chore(release): publish packages
- thermion_dart@0.2.1-dev.0.0.12
 - thermion_flutter_web@0.2.0+2
 - thermion_flutter_platform_interface@0.2.1-dev.11
 - thermion_flutter_ffi@0.2.1-dev.11
 - thermion_flutter@0.2.1-dev.11
2024-10-25 11:24:32 +08:00
Nick Fisher
a8d21fe316 Merge pull request #72 from nmfisher/develop
Gesture handling improvements & build fixes
2024-10-25 14:24:20 +11:00
Nick Fisher
d784efa44a Update dart.yml 2024-10-25 11:22:49 +08:00
Nick Fisher
b2a4955d54 Update dart.yml 2024-10-25 11:19:50 +08:00
Nick Fisher
02d7a0acfd Update dart.yml 2024-10-25 14:16:29 +11:00
Nick Fisher
ee5c08f795 fix: (flutter) (windows) remove deleted source file from Windows CMakeLists 2024-10-25 14:16:22 +11: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
06b20ec6fc fix: properly pass through loadResourcesAsync flag for loadGlbFromBuffer 2024-10-25 10:37:34 +08:00
Nick Fisher
a3b6d60e16 chore(release): publish packages
- thermion_dart@0.2.1-dev.0.0.11
 - thermion_flutter@0.2.1-dev.10
 - thermion_flutter_web@0.2.0+1
 - thermion_flutter_platform_interface@0.2.1-dev.10
 - thermion_flutter_ffi@0.2.1-dev.10
2024-10-24 12:59:43 +08:00
Nick Fisher
37608a8fbe fix: LFS materials 2024-10-24 12:58:13 +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
f65324e555 chore: cleanup LFS 2024-10-23 15:17:25 +08:00
Nick Fisher
1ba4b2a5be chore: merge master 2024-10-23 15:16:06 +08:00
Nick Fisher
de4733edf1 chore: remove superseded LFS files 2024-10-23 15:12:46 +08:00
Nick Fisher
75936c75d0 doc: fix doc index 2024-10-23 15:04:26 +08:00
Nick Fisher
6f6ee807cf chore: update published dependency for sample project 2024-10-23 14:59:31 +08:00
Nick Fisher
7a1ce5c281 docs: update doc index 2024-10-23 14:59:09 +08:00
Nick Fisher
74b7c938a8 feat: set SCALE2:InputAction.ZOOM by default 2024-10-23 14:36:47 +08:00
Nick Fisher
3dcacfe631 doc: update camera_manipulation example project and docs 2024-10-23 14:36:26 +08:00
Nick Fisher
bf02406bf4 doc: add camera_manipulation example project 2024-10-23 14:11:48 +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
11ca6972c6 chore(release): publish packages
- thermion_dart@0.2.1-dev.0.0.9
 - thermion_flutter@0.2.1-dev.8
 - thermion_flutter_ffi@0.2.1-dev.8
 - thermion_flutter_web@0.1.1
 - thermion_flutter_platform_interface@0.2.1-dev.8
2024-10-23 13:46:45 +08:00
Nick Fisher
e235d22c7c chore: add quickstart .metadata 2024-10-23 13:46:00 +08:00
Nick Fisher
512d74568a chore: test cleanup 2024-10-23 16:43:17 +11:00
Nick Fisher
617c2ba578 chore: test cleanup 2024-10-23 16:43:02 +11:00
Nick Fisher
5476c6248c chore: test cleanup 2024-10-23 16:42:33 +11:00
Nick Fisher
916366bd10 doc: add BUILDING.md with Windows instructions 2024-10-23 16:42:09 +11:00
Nick Fisher
5e66893719 chore!: View.getCamera returns Future<Camera> 2024-10-23 16:41:51 +11:00
Nick Fisher
16964b4987 fix:move createUnlitMaterialInstance and createGeometry to render thread 2024-10-23 16:40:55 +11:00
Nick Fisher
73846ffa9b feat: produce debug symbols on Windows 2024-10-23 16:40:30 +11:00
Nick Fisher
d5824239f5 fix:move createUnlitMaterialInstance and createGeometry to render thread 2024-10-23 16:39:42 +11:00
Nick Fisher
c4270fc918 fix:move createUnlitMaterialInstance and createGeometry to render thread 2024-10-23 16:38:23 +11:00
Nick Fisher
a29a1605a7 chore: rename SceneManager* methods 2024-10-23 16:28:42 +11:00
Nick Fisher
22868a594f fix: dont calculate surface orientation for non-triangle geometry 2024-10-23 16:28:00 +11:00
Nick Fisher
aed64a27e8 chore: test cleanup 2024-10-23 15:11:33 +11:00
Nick Fisher
2b338a63ba cleanup tests 2024-10-23 15:08:14 +11:00
Nick Fisher
cda4027f83 fix!: (windows) add flushAndWait call to capture() to prevent stalling on Windows; use provided buffer as pixelBuffer rather than duplicate allocation 2024-10-23 15:02:28 +11:00
Nick Fisher
e2175db7cb fix!: add meshoptimizer lib on Windows 2024-10-23 14:16:03 +11:00
Nick Fisher
f1828b0c92 fix!: Dart-only release mode builds on Window 2024-10-23 14:15:41 +11:00
Nick Fisher
5cf9fab4f2 fix: fix all Windows warnings so apps will compile with /WX 2024-10-23 02:41:16 +11:00
Nick Fisher
c3764df4e2 feat: (flutter) (windows) add DestroyRenderingSurface method 2024-10-23 02:25:06 +11:00
Nick Fisher
a2a1033701 feat: (flutter) (windows) add DestroyRenderingSurface method 2024-10-23 02:24:49 +11:00
Nick Fisher
2536f7fc6f feat: (flutter) (windows) add DestroyRenderingSurface method 2024-10-23 02:24:34 +11:00
Nick Fisher
b6fe78b82c feat: (flutter) (windows) add Destroy() to BackingWindow 2024-10-23 02:23:54 +11:00
Nick Fisher
f8cddf0bce chore: cleanup thermion_flutter pubspec.yaml 2024-10-23 02:23:15 +11:00
Nick Fisher
2c7a32b47e chore: cleanup quickstart pubspec.yaml 2024-10-23 02:22:45 +11:00
Nick Fisher
e6dd4c6cfe chore: cleanup thermion_flutter_ffi pubspec 2024-10-23 02:22:23 +11:00
Nick Fisher
fb756fe9ba chore: rearrange thermion_flutter_ffi src dir 2024-10-23 02:22:04 +11:00
Nick Fisher
c21e890b48 chore: update quickstart for Windows 2024-10-23 02:21:00 +11:00
Nick Fisher
3720aa98df Merge branch 'develop' of https://github.com/nmfisher/thermion into develop 2024-10-23 01:24:44 +11:00
Nick Fisher
640aa7854a doc: add camera_manipulation 2024-10-22 22:23:51 +08: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
fdbdc8e3f3 chore: update quickstart 2024-10-22 22:22:30 +08:00
Nick Fisher
071d3b3023 doc: update README 2024-10-22 22:22:16 +08:00
Nick Fisher
f6b12d946a merge 2024-10-23 01:20:22 +11:00
Nick Fisher
11572b4939 fix: on resize, destroy swapchain if destroySwapChainOnResize is true 2024-10-22 14:11:02 +08:00
Nick Fisher
0c75b9a994 chore: update quickstart android project files 2024-10-22 14:10:22 +08:00
Nick Fisher
ed44aad076 chore: add flutter quickstart example, assets and update README 2024-10-22 13:11:48 +08:00
Nick Fisher
6dc00bff74 fix: add listener in ThermionFlutterTextureBackedPlatform to unset viewer on dispose 2024-10-22 12:48:26 +08:00
Nick Fisher
5f2407baeb fix: add listener in ThermionFlutterMethodChannelInterface to unset viewer on dispose 2024-10-22 12:48:05 +08:00
Nick Fisher
45f41f3cf7 fix: clean up destruction logic for FlutterPlatformTexture 2024-10-22 12:47:35 +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
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
9295dfc7c1 docs: add quickstart to README 2024-10-22 12:43:31 +08:00
Nick Fisher
fb4bee4801 docs: remove Windows native_toolchain_c fixes from docs 2024-10-22 12:43:15 +08:00
Nick Fisher
8b7c2aa48d fix: set render target to null for each view and then destroy render targets when viewer disposed 2024-10-22 12:42:50 +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
cb517c907d chore(release): publish packages
- thermion_dart@0.2.1-dev.0.0.8
 - thermion_flutter_web@0.1.0+9
 - thermion_flutter@0.2.1-dev.7
 - thermion_flutter_platform_interface@0.2.1-dev.7
 - thermion_flutter_ffi@0.2.1-dev.7
2024-10-14 09:36:55 +08:00
Nick Fisher
a6f5e59cbb fix: move ThermionWin32.h to include 2024-10-14 09:36:28 +08:00
Nick Fisher
9420143a36 chore(release): publish packages
- thermion_dart@0.2.1-dev.0.0.7
 - thermion_flutter_web@0.1.0+8
 - thermion_flutter@0.2.1-dev.6
 - thermion_flutter_platform_interface@0.2.1-dev.6
 - thermion_flutter_ffi@0.2.1-dev.6
2024-10-14 09:25:59 +08:00
Nick Fisher
eb8835b63a Merge pull request #69 from nmfisher/feature/multiple_swapchains
Support multiple views/widgets/swapchains
2024-10-14 12:05:21 +11:00
Nick Fisher
f9468db266 Windows embedder fixes 2024-10-14 11:23:56 +11:00
Nick Fisher
1135ba054c cleanup 2024-10-12 15:07:14 +11:00
Nick Fisher
8f7509a23f cleanup 2024-10-12 15:06:57 +11:00
Nick Fisher
cba9ee98ad (flutter) set view renderable on Windows 2024-10-12 14:56:04 +11:00
Nick Fisher
0ec0fef8f3 move standalone Windows file to extras 2024-10-12 14:55:41 +11:00
Nick Fisher
a348562f56 cleanup 2024-10-12 14:36:51 +11:00
Nick Fisher
392a606bbc don't call endFrame() if no views were rendered 2024-10-12 14:36:05 +11:00
Nick Fisher
440bed4485 add files to run standalone Windows 2024-10-12 14:34:42 +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
f267aa6dc6 chore(release): publish packages
- thermion_dart@0.2.1-dev.0.0.6
 - thermion_flutter_web@0.1.0+7
 - thermion_flutter_platform_interface@0.2.1-dev.5
 - thermion_flutter@0.2.1-dev.5
 - thermion_flutter_ffi@0.2.1-dev.5
2024-10-10 20:58:19 +08:00
Nick Fisher
1c74e83c2c add native_assets_cli to dependencies 2024-10-10 20:57:50 +08:00
Nick Fisher
099a895eb6 chore(release): publish packages
- thermion_dart@0.2.1-dev.0.0.5
 - thermion_flutter_platform_interface@0.2.1-dev.4
 - thermion_flutter_web@0.1.0+6
 - thermion_flutter@0.2.1-dev.4
 - thermion_flutter_ffi@0.2.1-dev.4
2024-10-10 20:49:40 +08:00
Nick Fisher
3b810f84da add animation tests 2024-10-10 20:49:08 +08:00
Nick Fisher
10f2c7d36b update cube test asset with morph targets 2024-10-10 20:49:01 +08:00
Nick Fisher
5b849638de update cube test asset with morph targets 2024-10-10 20:48:54 +08:00
Nick Fisher
857fd6f782 update tests 2024-10-10 20:48:41 +08:00
Nick Fisher
29edec63ab bump animation_tools_dart dependency 2024-10-10 20:47:45 +08:00
Nick Fisher
c6afc4756a bump animation_tools_dart dependency 2024-10-10 20:47:33 +08:00
Nick Fisher
365657cf88 add pick to view tests 2024-10-10 20:47:17 +08:00
Nick Fisher
5441dedcf4 add fall-through for InputAction.ZOOM for Third Person camera delegate 2024-10-10 20:47:00 +08:00
Nick Fisher
254b6d8af2 move zoom delta to InputAction.ZOOM for FreeFlight rotation delegate 2024-10-10 20:46:34 +08:00
Nick Fisher
1459aea5cf move zoom delta to InputAction.ZOOM for FixedOrbit rotation delegate 2024-10-10 20:46:16 +08:00
Nick Fisher
80d8525671 pass through sensitivity options in DelegateGestureHandler and implement cameraUpdated 2024-10-10 20:45:33 +08:00
Nick Fisher
389a165ed3 rearrange package folders 2024-10-10 20:44:55 +08:00
Nick Fisher
d8f309d21b add stubbed methods 2024-10-10 20:44:39 +08:00
Nick Fisher
ee983ddfaa add InputAction.ZOOM 2024-10-10 20:43:58 +08:00
Nick Fisher
c1cdd37e9d add DefaultPickDelegate 2024-10-10 20:43:31 +08:00
Nick Fisher
646f05933d use condition_variable for render thread requestFrame as well as tasks 2024-10-10 20:43:04 +08:00
Nick Fisher
3f854a7f27 rearrange utils dir 2024-10-10 14:59:11 +08:00
Nick Fisher
740dbea8bd add Axis class and rearrange utils dir 2024-10-10 14:58:50 +08:00
Nick Fisher
95a44936ac add option for async loading glTF resources 2024-10-10 14:58:09 +08:00
Nick Fisher
9deafc7371 return View when picking, use uint32_t for morphIndices 2024-10-10 08:42:16 +08:00
Nick Fisher
c1af7e374d set bloom enabled by default, but 0 strength 2024-10-10 08:39:48 +08:00
Nick Fisher
cd71db72be chore(release): publish packages
- thermion_dart@0.2.1-dev.0.0.4
 - thermion_flutter_web@0.1.0+5
 - thermion_flutter@0.2.1-dev.3
 - thermion_flutter_platform_interface@0.2.1-dev.3
 - thermion_flutter_ffi@0.2.1-dev.3
2024-10-02 17:59:56 +08:00
Nick Fisher
a9d90f966b chore: make pub.dev happy 2024-10-02 17:59:34 +08:00
Nick Fisher
1a323ca551 chore(release): publish packages
- thermion_dart@0.2.1-dev.0.0.3
 - thermion_flutter_web@0.1.0+4
 - thermion_flutter@0.2.1-dev.2
 - thermion_flutter_platform_interface@0.2.1-dev.2
 - thermion_flutter_ffi@0.2.1-dev.2
2024-10-02 17:58:24 +08:00
Nick Fisher
2d85e191bc chore: make pub.dev happy 2024-10-02 17:58:08 +08:00
Nick Fisher
1b971a859c chore(release): publish packages
- thermion_dart@0.2.1-dev.0.0.2
 - thermion_flutter_web@0.1.0+3
 - thermion_flutter_ffi@0.2.1-dev.1
 - thermion_flutter@0.2.1-dev.1
 - thermion_flutter_platform_interface@0.2.1-dev.1
2024-10-02 17:56:55 +08:00
Nick Fisher
78b697d1c2 chore: make pub.dev happy 2024-10-02 17:56:37 +08:00
Nick Fisher
9da2ce6672 chore(release): publish packages
- thermion_dart@0.2.1-dev.0.0.1
 - thermion_flutter_web@0.1.0+2
 - thermion_flutter@0.2.1-dev.0
 - thermion_flutter_platform_interface@0.2.1-dev.0
 - thermion_flutter_ffi@0.2.1-dev.0
2024-10-02 17:55:23 +08:00
Nick Fisher
39fabd501d chore: move swift bindings to test folder to make pub.dev happy 2024-10-02 17:53:31 +08:00
Nick Fisher
3f1867dd6f chore(release): publish packages
- thermion_dart@0.2.1-dev.0.0.0
 - thermion_flutter@0.2.1-dev.0.0.0
 - thermion_flutter_ffi@0.2.1-dev.0.0.0
 - thermion_flutter_platform_interface@0.2.1-dev.0.0.0
 - thermion_flutter_web@0.1.0+1
2024-10-02 17:46:54 +08:00
Nick Fisher
68d29041b0 chore(release): publish packages
- thermion_dart@0.2.0
 - thermion_flutter@0.2.0
 - thermion_flutter_ffi@0.2.0
 - thermion_flutter_platform_interface@0.2.0
 - thermion_flutter_web@0.1.0
2024-10-02 17:41:13 +08:00
Nick Fisher
b300e86962 chore(release): publish packages
- thermion_dart@0.2.0-dev.8.0.0
 - thermion_flutter@0.2.0-dev.8.0.0
 - thermion_flutter_ffi@0.2.0-dev.8.0.0
 - thermion_flutter_platform_interface@0.2.0-dev.8.0.0
 - thermion_flutter_web@0.1.0-dev.8.0.0
2024-10-02 16:50:41 +08:00
Nick Fisher
562ecf2ee5 feat: camera and resizing improvements 2024-10-02 16:47:55 +08:00
Nick Fisher
d294938a2c chore: remove EMSCRIPTEN ifdefs in *RenderThread methods (no longer used) 2024-09-30 18:24:05 +08:00
Nick Fisher
027cf23069 chore: cleanup 2024-09-30 18:20:30 +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
65e60da288 chore: upgrade Swift interop gen 2024-09-28 17:59:05 +08:00
Nick Fisher
661185083e chore: refactoring and cleanup for Gizmo 2024-09-28 13:24:28 +08:00
Nick Fisher
a2a26555e2 feat: more work on multiple views/swapchains 2024-09-28 11:19:06 +08:00
Nick Fisher
7f11250b79 refactor!: refactor to support multiple Views/Render Targets 2024-09-27 23:16:01 +08:00
Nick Fisher
a6d2f2ecf9 feat!: big refactor to support multiple swapchains 2024-09-27 18:39:20 +08:00
Nick Fisher
399d447eec chore: don't keep superfluous handle to rtDepth and rtColor 2024-09-27 16:40:30 +08:00
Nick Fisher
fb6204e47c chore: cleanup 2024-09-27 15:19:53 +08:00
Nick Fisher
566856c8fb chore: update bindings 2024-09-27 15:13:45 +08:00
Nick Fisher
d29dd207b6 feat: add rendering check to ThermionWidget ticker 2024-09-27 15:13:33 +08:00
Nick Fisher
e20489900d fix!: replace queuePosition/Rotation with queueTransforms 2024-09-27 15:12:43 +08:00
Nick Fisher
567a268ded fix!: replace queuePosition/Rotation with queueTransforms 2024-09-27 15:12:33 +08:00
Nick Fisher
6a57d242f9 feat: add setParameterFloat2 method 2024-09-27 15:12:14 +08:00
Nick Fisher
41e0851d70 feat: add setParameterFloat2 method 2024-09-27 15:12:05 +08:00
Nick Fisher
95b378348c refactor!: remove RenderThread methods no longer needed 2024-09-27 15:11:47 +08:00
Nick Fisher
1309bf7c6e fix!: replace queuePosition/Rotation with queueTransforms 2024-09-27 15:10:13 +08:00
Nick Fisher
2531b507b0 fix!: replace queuePosition/Rotation with queueTransforms 2024-09-27 15:09:49 +08:00
Nick Fisher
16dc0419e2 feat: add uvScale to unlit material 2024-09-27 15:08:30 +08:00
Nick Fisher
4e7ec6bfb4 feat: add ThirdPersonCameraDelegate 2024-09-27 15:06:51 +08:00
Nick Fisher
035ad48fe4 feat!: set baseColorIndex to -1 by default in unlit materialss 2024-09-27 15:06:32 +08:00
Nick Fisher
ff7c582157 chore: update tests 2024-09-27 15:06:02 +08:00
Nick Fisher
0876a91e17 add ThirdPersonCameraDelegate 2024-09-27 15:05:41 +08:00
Nick Fisher
a2d3c1d73e chore: getter for native camera view matrix 2024-09-26 18:49:32 +08:00
Nick Fisher
1a721deee6 more camera work 2024-09-26 18:41:34 +08:00
Nick Fisher
4355d9c83f more camera work 2024-09-26 16:51:14 +08:00
Nick Fisher
239891c400 chore: rearrange library/export structure 2024-09-26 16:35:33 +08:00
Nick Fisher
ac10aa0a1e chore: camera transform tests 2024-09-26 15:56:54 +08:00
Nick Fisher
7ecf414a47 feat: set camera model matrix directly 2024-09-26 15:52:50 +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
a2684ae47d renaming/refactoring and allow creating new cameras 2024-09-25 23:56:25 +08:00
Nick Fisher
2b1339b560 feat: expose more camera methods 2024-09-25 23:09:27 +08:00
Nick Fisher
59aec2bcc9 chore(release): publish packages
- thermion_dart@0.2.0-dev.7.0
 - thermion_flutter_web@0.1.0-dev.7.0
 - thermion_flutter@0.2.0-dev.7.0
 - thermion_flutter_platform_interface@0.2.0-dev.7.0
 - thermion_flutter_ffi@0.2.0-dev.7.0
2024-09-25 22:35:46 +08:00
Nick Fisher
61d1581b96 fix!: fix min SDK for thermion_dart 2024-09-25 22:35:30 +08:00
Nick Fisher
8e47332ce8 chore(release): publish packages
- thermion_dart@0.2.0-dev.6.0
 - thermion_flutter_web@0.1.0-dev.6.0
 - thermion_flutter@0.2.0-dev.6.0
 - thermion_flutter_platform_interface@0.2.0-dev.6.0
 - thermion_flutter_ffi@0.2.0-dev.6.0
2024-09-25 21:58:28 +08:00
Nick Fisher
ffe8bee98b chore!: cleanup deleted export 2024-09-25 21:58:19 +08:00
Nick Fisher
1e07486017 chore(release): publish packages
- thermion_flutter@0.2.0-dev.6.0
2024-09-25 21:57:38 +08:00
Nick Fisher
58da196876 chore!: remove superseded HardwareKeyboard* classes 2024-09-25 21:56:16 +08:00
Nick Fisher
78af155a6d chore(release): publish packages
- thermion_dart@0.2.0-dev.5.0
 - thermion_flutter_web@0.1.0-dev.5.0
 - thermion_flutter@0.2.0-dev.5.0
 - thermion_flutter_platform_interface@0.2.0-dev.5.0
 - thermion_flutter_ffi@0.2.0-dev.5.0
2024-09-25 21:52:58 +08:00
Nick Fisher
d7e1b3d7ba chore!: remove EntityTransformController (requires replacement) 2024-09-25 21:52:42 +08:00
Nick Fisher
877eae35cd chore(release): publish packages
- thermion_dart@0.2.0-dev.4.0
 - thermion_flutter_web@0.1.0-dev.4.0
 - thermion_flutter@0.2.0-dev.4.0
 - thermion_flutter_platform_interface@0.2.0-dev.4.0
 - thermion_flutter_ffi@0.2.0-dev.4.0
2024-09-25 21:51:19 +08:00
Nick Fisher
87846b68de fix!: (web/wasm) free pick callbacks on dispose 2024-09-25 21:50:31 +08:00
Nick Fisher
6581ee8a2a chore!: restructure viewer folders as libraries to only export the public interface 2024-09-25 21:49:15 +08:00
Nick Fisher
951064e657 chore(release): publish packages
- thermion_flutter@0.2.0-dev.3.0
2024-09-25 21:20:54 +08:00
Nick Fisher
68ebf945a5 chore: add path to dev deps 2024-09-25 21:20:34 +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
9b99975017 chore(release): publish packages
- thermion_flutter@0.2.0-dev.2.0
2024-09-25 21:18:00 +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
b461b2c5db chore: (flutter) web packaging fixes 2024-09-25 21:17:09 +08:00
Nick Fisher
8f7f48bcaa chore: (flutter) add package:web to flutter deps 2024-09-25 21:16:48 +08:00
Nick Fisher
7dc8e394f7 chore!: remove EntityListWidget - will replace with new Scene 2024-09-25 21:16:24 +08:00
Nick Fisher
f5c8faa5c3 chore(release): publish packages
- thermion_dart@0.2.0-dev.1.0
 - thermion_flutter@0.2.0-dev.1.0
 - thermion_flutter_ffi@0.2.0-dev.1.0
 - thermion_flutter_platform_interface@0.2.0-dev.1.0
 - thermion_flutter_web@0.1.0-dev.1.0
2024-09-25 21:06:28 +08:00
Nick Fisher
c84b4010d1 Merge pull request #68 from nmfisher/improvements
Improvements
2024-09-25 21:02:53 +08:00
Nick Fisher
b720c1294f rename Android plugin class in pubspec.yaml 2024-09-25 19:27:38 +08:00
Nick Fisher
d442ab5ce6 add namespace for build.gradle 2024-09-25 19:27:19 +08:00
Nick Fisher
61fdf300f4 add namespace for AndroidManifest.xml 2024-09-25 19:27:04 +08:00
Nick Fisher
4dabca9160 rename Android package/paths 2024-09-25 19:26:51 +08:00
Nick Fisher
85d6946645 (flutter) provide nicer implementation of FixedOrbitCameraRotationDelegate 2024-09-25 19:26:19 +08:00
Nick Fisher
4b1d8ce729 (flutter) update FreeFlight camera delegate 2024-09-24 14:24:29 +08:00
Nick Fisher
c52b0084ce add PickDelegate to DelegateGestureHandler 2024-09-24 14:21:13 +08:00
Nick Fisher
8db725d8bd add PICK_ENTITY to GestureAction 2024-09-24 14:20:49 +08:00
Nick Fisher
c67d1cbbc4 add background color tests 2024-09-24 14:20:33 +08:00
Nick Fisher
3ea4062e33 normalize direction in addLight 2024-09-24 14:20:14 +08:00
Nick Fisher
65e99b9212 set clearOptions to true 2024-09-23 13:51:18 +08:00
Nick Fisher
e83193ba0d introduce stronger native typing, camera projection/culling methods, update tests 2024-09-21 11:36:41 +08:00
Nick Fisher
835338ef63 (flutter) use scheduleFrameCallback to invoke requestFrame to match Flutter/vsync 2024-09-21 10:22:49 +08:00
Nick Fisher
57872d2e40 rename from *FFI to *RenderThread, return bool from render() to check frame timings, update render loop to wait on condition variable, add requestFrame() method 2024-09-21 10:21:46 +08:00
Nick Fisher
b5a7996769 add Dart Camera type 2024-09-21 10:18:36 +08:00
Nick Fisher
ddbb4ec5c6 rename CameraPtr to TCamera and use named arguments for setCameraLensProjection 2024-09-20 18:31:20 +08:00
Nick Fisher
7cb3080596 move MaterialInstance methods to own class 2024-09-20 18:18:08 +08:00
Nick Fisher
f6c91294aa rename setLayerEnabled to setLayerVisibility, add setVisibilityLayer method 2024-09-20 17:34:17 +08:00
Nick Fisher
412d333525 add PickDelegate 2024-09-20 14:54:18 +08:00
Nick Fisher
378dede02d add ThermionPickResult typedef 2024-09-20 14:53:48 +08:00
Nick Fisher
0e3db2635f update bindings 2024-09-20 14:53:34 +08:00
Nick Fisher
77147cbafd add setMaterialDepthWrite method 2024-09-20 14:53:16 +08:00
Nick Fisher
43e5fd7766 add setMaterialDepthWrite method 2024-09-20 14:53:06 +08:00
Nick Fisher
fc3ca3d6b3 update tests 2024-09-20 14:08:47 +08:00
Nick Fisher
51f52bb71b update stub 2024-09-20 14:08:26 +08:00
Nick Fisher
033c3f632d add createUnlitMaterialInstance, setMaterialPropertyInt methods to viewer interface 2024-09-20 14:08:16 +08:00
Nick Fisher
6d862ef36a update bindings 2024-09-20 14:07:37 +08:00
Nick Fisher
f816274fb9 replace some async methods with futures, fix setMaterialProperty4, update unproject, setMaterialPropertyInt, createUnlitMaterialInstance 2024-09-20 14:07:09 +08:00
Nick Fisher
0816286696 export geometry from thermion_dart 2024-09-20 14:05:14 +08:00
Nick Fisher
b421df5e2f remove image.mat from LFS 2024-09-20 14:04:59 +08:00
Nick Fisher
f6a136643d remove image.mat from LFS 2024-09-20 14:04:43 +08:00
Nick Fisher
b5e278183a update built unlit material 2024-09-20 14:04:27 +08:00
Nick Fisher
8e85042e37 remove old default paramsf rom UnlitMaterialProvider 2024-09-20 14:04:11 +08:00
Nick Fisher
f943756624 add setMaterialProperty for int, add create_unlit_material_instance, use double4 instead of float4 2024-09-20 14:03:50 +08:00
Nick Fisher
92814aed56 add setMaterialProperty for int, add create_unlit_material_instance 2024-09-20 14:03:29 +08:00
Nick Fisher
e8a1b976e1 set default layer for loadGlb to 0,. add setMaterialProperty for int, add SceneManager::createUnlitMaterialInstance 2024-09-20 14:02:30 +08:00
Nick Fisher
ef48dbce30 add base color/texture to unlit 2024-09-20 14:01:59 +08:00
Nick Fisher
196cc6b980 set default layer for loadGlb to 0,. add setMaterialProperty for int 2024-09-20 14:01:41 +08:00
Nick Fisher
1788c74d4c change float4 to double4 2024-09-20 14:01:02 +08:00
Nick Fisher
74e808d1dc update tests 2024-09-19 21:10:42 +08:00
Nick Fisher
72dacc5b21 update unproject texture to accept input texture 2024-09-19 21:10:28 +08:00
Nick Fisher
ebdaf65b89 update unproject texture to accept input texture 2024-09-19 21:10:22 +08:00
Nick Fisher
fa43149c98 update unproject texture to accept input texture 2024-09-19 21:10:10 +08:00
Nick Fisher
e8ae7193ee update unproject texture to accept input texture 2024-09-19 21:09:23 +08:00
Nick Fisher
aa21c0fb76 don't call clearBackgroundImage when setBackgroundImage is called (would deadlock) 2024-09-19 21:08:55 +08:00
Nick Fisher
10826466a4 set default material for geometry to baseColorIndex 0 2024-09-19 17:08:06 +08:00
Nick Fisher
3b2d7d8c47 depth pre-pass when projecting texture 2024-09-19 16:59:01 +08:00
Nick Fisher
212443cb8e add spot constructor 2024-09-19 13:44:17 +08:00
Nick Fisher
523141d54b add test cube texture image 2024-09-19 13:02:51 +08:00
Nick Fisher
d8a0859f16 update test 2024-09-19 13:00:40 +08:00
Nick Fisher
c70cc9abb5 add image methods to test helper 2024-09-19 12:53:44 +08:00
Nick Fisher
66b626e605 update showcase 2024-09-19 12:53:30 +08:00
Nick Fisher
4b28119318 test updates 2024-09-19 12:52:27 +08:00
Nick Fisher
666506aed0 widget updates 2024-09-19 12:52:16 +08:00
Nick Fisher
a55f63a428 increase min Dart SDK to 3.5 for .address FFI accessors 2024-09-19 12:51:30 +08:00
Nick Fisher
fb441e151c update ffigen with new headers 2024-09-19 12:51:09 +08:00
Nick Fisher
82d85386c0 fixes for createMaterialInstance 2024-09-19 12:50:57 +08:00
Nick Fisher
242b2f6faa gesture detector fixes 2024-09-19 09:19:23 +08:00
Nick Fisher
31d31dd583 ThermionViewer: add create/destroy materialinstance, add MaterialInstance property to createGeometry, priority/layer to loadGlbFromBuffer 2024-09-19 09:17:45 +08:00
Nick Fisher
f6077012b1 widget cleanup 2024-09-19 09:16:45 +08:00
Nick Fisher
18bb45dcd8 use TMaterialInstance for FFI API, add priority/layer params to load_glb_from_buffer 2024-09-19 09:16:06 +08:00
Nick Fisher
10b919e4f4 add priority/layer to FFI viewer, use struct for model matrix, add createUbershaderMaterialInstance and destroyMaterialInstance 2024-09-19 09:15:31 +08:00
Nick Fisher
98cedf821c update bindings 2024-09-19 09:14:10 +08:00
Nick Fisher
729f72e768 use SceneManager::LAYERS enum for Overlay, set priority/layer in loadGlbFromBuffer, add create/destroy material instance 2024-09-19 09:12:57 +08:00
Nick Fisher
d01861e949 use SceneManager::LAYERS enum for Overlay 2024-09-19 09:12:16 +08:00
Nick Fisher
adec48f253 use SceneManager::LAYERS enum for gizmo 2024-09-19 09:12:02 +08:00
Nick Fisher
27a8ce18d5 add priority/layer to load_glb_from_buffer 2024-09-19 09:11:40 +08:00
Nick Fisher
4b740a9f5a native types, add create/destroy material instance, add SceneManager::LAYERS enum 2024-09-19 09:11:20 +08:00
Nick Fisher
0b34b4546e refactor: native types 2024-09-19 09:10:24 +08:00
Nick Fisher
c17919cd97 refactor: native types 2024-09-19 09:09:42 +08:00
Nick Fisher
462f1f02bf refactor: move native types to own header, add methods for create/destroy material instance, add priority/layer to load_glb_from_buffer 2024-09-19 09:09:16 +08:00
Nick Fisher
ddc433a126 refactor: Dart types 2024-09-19 09:07:35 +08:00
Nick Fisher
ab649e860d update gitattr 2024-09-16 20:51:27 +08:00
Nick Fisher
676ddc3773 add texture methods (including unproject) 2024-09-16 20:51:14 +08:00
Nick Fisher
7d2cf3f91b don't store gizmo material in LFS 2024-09-16 11:25:21 +08:00
Nick Fisher
492d41d756 test update 2024-09-16 11:24:24 +08:00
Nick Fisher
191c2fd709 restructure viewer/types/helper folders, remove old WASM/web FFI interop, add SceneUpdated stream 2024-09-16 11:08:27 +08:00
Nick Fisher
027fc9ae04 update tests 2024-09-16 11:08:19 +08:00
Nick Fisher
b73d0e1e96 restructure viewer/types/helper folders, remove old WASM/web FFI interop, add SceneUpdated stream 2024-09-16 11:07:54 +08:00
Nick Fisher
315f2b63b9 gesture handler & delegate improvements 2024-09-13 18:32:02 +08:00
Nick Fisher
ad205679cb allow setting material property by name 2024-09-13 15:27:46 +08:00
Nick Fisher
6ef8d19e94 (flutter) export delegate gesture handler 2024-09-13 15:27:20 +08:00
Nick Fisher
6b0f25ca59 remove using namespace filament* 2024-09-13 15:27:01 +08:00
Nick Fisher
820d341f67 update bindings 2024-09-13 15:26:44 +08:00
Nick Fisher
70f904d54c allow setting material property by name 2024-09-13 15:20:45 +08:00
Nick Fisher
aee607908d remove using namespace filament* 2024-09-13 15:18:01 +08:00
Nick Fisher
c99c57e24d geometry receives/casts shadows by default 2024-09-13 14:52:20 +08:00
Nick Fisher
00d75be479 gesture handler improvements 2024-09-13 14:25:10 +08:00
Nick Fisher
3a9bd31919 remove superseded desktop/mobile gesture detector widget 2024-09-13 13:47:26 +08:00
Nick Fisher
51be1bce39 add pan camera implementation and fix velocity timer 2024-09-13 13:46:41 +08:00
Nick Fisher
822b8e14c1 add delegate-based implementations for gesture handlers 2024-09-13 13:30:00 +08:00
Nick Fisher
2ab30a7933 remove double sided from HighlightOverlay material 2024-09-13 11:09:09 +08:00
Nick Fisher
1be8a5e862 adjust gizmo size 2024-09-13 11:08:49 +08:00
Nick Fisher
98d61fa1b3 fix setCameraModelMatrix4 2024-09-13 10:36:24 +08:00
Nick Fisher
5b3d16a316 update bindings 2024-09-13 10:36:07 +08:00
Nick Fisher
b6863828b4 initialize viewportDimensions to (0,0) in ThermionViewer 2024-09-13 10:35:57 +08:00
Nick Fisher
98fefd0e52 fix winding order in GeometryHelper 2024-09-13 10:35:33 +08:00
Nick Fisher
d476d78e2b reduce size of gizmo 2024-09-13 10:35:13 +08:00
Nick Fisher
98113fb79f remove logging 2024-09-13 10:34:59 +08:00
Nick Fisher
90827ff012 culling fixes for HighlightOverlay 2024-09-13 10:34:47 +08:00
Nick Fisher
44078ba2e0 add v2 gesture handlers 2024-09-13 10:34:23 +08:00
Nick Fisher
866219ee2e add v2 gesture handlers 2024-09-13 10:34:12 +08:00
Nick Fisher
d785bd6b7e chore!: rename controller to viewer in gesture detector widgets 2024-09-12 08:54:07 +08:00
Nick Fisher
3e4e6653a8 update material building in Makefile 2024-09-11 23:09:56 +08:00
Nick Fisher
8d250e2664 update test 2024-09-11 23:09:41 +08:00
Nick Fisher
d455cea29e use opaque CameraPtr to set camera matrices/properties/etc 2024-09-11 23:09:27 +08:00
Nick Fisher
374e8eb910 rename getBoundingBox to getViewportBoundingBox and add camera methods 2024-09-11 23:08:07 +08:00
Nick Fisher
833fc74b4c rename getBoundingBox to getViewportBoundingBox 2024-09-11 23:07:47 +08:00
Nick Fisher
62417bfebd explicitly mark type of Camera for Gizmo 2024-09-11 23:07:29 +08:00
Nick Fisher
abc9ecbeee use opaque CameraPtr to set camera matrices/properties/etc 2024-09-11 23:07:03 +08:00
Nick Fisher
a1f71ab459 remove camera methods from FilamentViewer 2024-09-11 23:06:32 +08:00
Nick Fisher
d123929fb4 remove camera methods from FilamentViewer 2024-09-11 23:06:06 +08:00
Nick Fisher
141827c59c use opaque CameraPtr to set camera matrices/properties/etc 2024-09-11 23:05:40 +08:00
Nick Fisher
9fbcc9edaf mark all ffigen functions as leaf 2024-09-11 23:04:57 +08:00
Nick Fisher
83d9c5be30 remove update_viewport_and_camera_projection_ffi 2024-09-11 23:04:36 +08:00
Nick Fisher
6aadbbc3d0 remove update_viewport_and_camera_projection_ffi 2024-09-11 23:04:27 +08:00
Nick Fisher
d5bc865cf4 add matrix helper 2024-09-11 23:04:02 +08:00
Nick Fisher
d766733489 update stubbed ThermionViewer methods 2024-09-11 23:03:53 +08:00
Nick Fisher
f51c640d17 remove unused get_camera_position method 2024-09-11 20:01:21 +08:00
Nick Fisher
66f10b598a update stub ThermionViewer 2024-09-11 19:59:43 +08:00
Nick Fisher
59957650aa update bindings 2024-09-11 19:59:33 +08:00
Nick Fisher
d43fbd8964 add loadGlbFromBuffer implementation to ThermionViewerFFI 2024-09-11 19:59:25 +08:00
Nick Fisher
f5de4349bf add createGeometryWithNormals to SceneManager 2024-09-11 18:09:42 +08:00
Nick Fisher
f67e1a021d add createGeometryWithNormals to SceneManager 2024-09-11 18:09:14 +08:00
Nick Fisher
33f2c5fbf7 add normals to CustomGeometry implementation 2024-09-11 18:08:48 +08:00
Nick Fisher
6a7bde930d add normals to CustomGeometry interface 2024-09-11 18:08:35 +08:00
Nick Fisher
b827a2142b HighlightOverlay fixes 2024-09-11 18:08:13 +08:00
Nick Fisher
8bd2416bad don't set stencil highlight in Gizmo 2024-09-11 18:07:38 +08:00
Nick Fisher
3684eb248c add create_geometry_with_normals method 2024-09-11 18:07:17 +08:00
Nick Fisher
9077632d1b add create_geometry_with_normals method 2024-09-11 18:07:07 +08:00
Nick Fisher
d40261ae29 add create_geometry_with_normals_ffi method, switch load_glb_from_buffer type to uint8_t for Dart leaf compat and add keepData param 2024-09-11 18:06:50 +08:00
Nick Fisher
77dbb574c7 add create_geometry_with_normals_ffi method, switch load_glb_from_buffer type to uint8_t for Dart leaf compat and add keepData param 2024-09-11 18:06:31 +08:00
Nick Fisher
89a660144e update test helpers 2024-09-11 18:05:36 +08:00
Nick Fisher
7554af5d41 (flutter) add experimental GestureHandler widget and decouple from ThermionGestureDetectorDesktop 2024-09-11 18:05:24 +08:00
Nick Fisher
4b742fea2d (flutter) add experimental GestureHandler widget and decouple from ThermionGestureDetectorDesktop 2024-09-11 18:05:18 +08:00
Nick Fisher
a6c6cff8b6 add loadGlbFromBuffer method and normals param to ThermionViewer 2024-09-11 18:04:36 +08:00
Nick Fisher
5813753ef9 (flutter) set enablePicking to false by default in ThermionGestureDetector 2024-09-11 18:03:52 +08:00
Nick Fisher
cf0dad2631 (flutter) add const FlutterWebOptions 2024-09-11 18:03:29 +08:00
Nick Fisher
cfddb99a8b (flutter) add CameraOrientationWidget 2024-09-11 18:01:45 +08:00
Nick Fisher
845d5bf223 (flutter) add const constructor for flutter options 2024-09-11 18:01:33 +08:00
Nick Fisher
dbbd972909 add GeometryHelper 2024-09-11 17:54:21 +08:00
Nick Fisher
aba3ba24af (flutter) add CameraOrientationWidget 2024-09-11 17:54:08 +08:00
Nick Fisher
81c27dde9f feat: parent the cloned entity instance when setting stencil highlight 2024-09-08 13:55:25 +08:00
Nick Fisher
476b552fd0 feat: add getAncestor method 2024-09-08 13:52:33 +08:00
Nick Fisher
5c4d5d4b9d feat: add getAncestor method 2024-09-08 13:52:04 +08:00
Nick Fisher
ae5ef2c286 update bindings 2024-09-07 18:01:39 +08:00
Nick Fisher
b0f3c8a087 feat: set stencil highlight on gizmo attach 2024-09-07 18:01:30 +08:00
Nick Fisher
43fc7ffc65 update tests 2024-09-07 18:01:03 +08:00
Nick Fisher
ee24fca20e feat: move createGeometry to SceneManager, add queueRelativePositionUpdateFromViewportVector and removeStencilHighlight 2024-09-07 18:00:50 +08:00
Nick Fisher
a00fdbe042 chore: remove createGeometry method from FilamentViewer, set default view blend mode 2024-09-07 17:59:55 +08:00
Nick Fisher
c2eb28a8f5 fix: properly destroy entities/material/etc in Gizmo on destruction, remove custom scene creation logic 2024-09-07 17:59:03 +08:00
Nick Fisher
4c6c20f3de feat: move HighlightOverlay to nested class, move createGeometry to SceneManager, add queueRelativePositionUpdateFromViewportVector 2024-09-07 17:57:38 +08:00
Nick Fisher
b2ae8135c6 feat: add removeStencilHighlight, accept color param for setStencilHighlight, queuePositionUpdateFromViewportCoords to ThermionDartApi 2024-09-07 17:55:40 +08:00
Nick Fisher
aecde97200 feat: add removeStencilHighlight, queuePositionUpdateFromViewportCoords to ThermionViewer 2024-09-07 17:54:42 +08:00
Nick Fisher
331caccc22 chore: delete old unlit_opaque material 2024-09-07 17:54:12 +08:00
Nick Fisher
63e2b74bb1 chore: rebuild unlit material 2024-09-07 17:53:55 +08:00
Nick Fisher
433f03161c feat: add scale parameter to unlit material 2024-09-07 17:53:41 +08:00
Nick Fisher
6ec84b6249 fix: add Fence to capture() and set stencil buffer by default 2024-09-06 13:03:51 +08:00
Nick Fisher
29b6a48816 test: add test cube.glb 2024-09-06 12:44:54 +08:00
Nick Fisher
00755fd417 chore: remove old materials Makefile 2024-09-06 12:44:40 +08:00
Nick Fisher
9c5156e41a feat: add flag for keepData for gltf instancing, add highlightScene, add stencilHighlight method 2024-09-06 12:36:16 +08:00
Nick Fisher
226c45ee2e chore: minor widget fixes 2024-09-05 22:22:25 +08:00
Nick Fisher
e04390b2fe feat: add grid material 2024-09-05 22:21:19 +08:00
Nick Fisher
9a87eb4d9b feat: allow passing null options to ThermionWidget 2024-09-05 22:21:09 +08:00
Nick Fisher
2284d9d081 feat: grid uses own material 2024-09-05 22:20:27 +08:00
Nick Fisher
cf61369a8d chore: clean up old commented code 2024-09-05 22:20:11 +08:00
Nick Fisher
4e14bd2396 fix: ignore pick results directly on axis 2024-09-05 22:19:54 +08:00
Nick Fisher
0798d5c071 feat: add grid material 2024-09-05 22:19:27 +08:00
Nick Fisher
80d5b1d23f feat: expose setLightDirection and setLightPosition 2024-09-05 22:18:54 +08:00
Nick Fisher
0bd87288d1 chore: update binding 2024-09-05 17:53:24 +08:00
Nick Fisher
51e06c2eb9 chore: (js) stub missing methods 2024-09-05 17:52:53 +08:00
Nick Fisher
b29663923d chore: (wasm) add missing interop methods 2024-09-05 17:52:40 +08:00
Nick Fisher
f57a323cda feat: (flutter) (web) if importCanvasAsWidget is false, render transparency 2024-09-05 17:52:19 +08:00
Nick Fisher
03ffe85113 chore: stub ThermionWidget methods 2024-09-05 17:51:36 +08:00
Nick Fisher
4edc8aa85b feat: (flutter) move DPR calculation to resizeTexture and add createViewerWithOptions method to ThermionFlutterFFI 2024-09-05 17:51:22 +08:00
Nick Fisher
04ecb4d56f fix: (flutter) pass ThermionFlutterOptions to ThermionWidget, use dpr for resizeTexture, delete unnecessary TransparencyPainter class 2024-09-05 17:49:02 +08:00
Nick Fisher
0ac0a92024 feat: add createViewerWithOptions to ThermionFlutterPlugin and mark createViewer as deprecated 2024-09-05 17:47:54 +08:00
Nick Fisher
ae1e14ddb7 feat: add createViewerWithOptions to ThermionFlutterPlugin and mark createViewer as deprecated 2024-09-05 17:47:41 +08:00
Nick Fisher
aa246ab63a feat: (flutter) (web) use options to determine whether to create canvas, and set fixed position + offset 2024-09-05 17:45:49 +08:00
Nick Fisher
d4350d7d99 test: update viewport gizmo test 2024-09-05 17:44:18 +08:00
Nick Fisher
f07fe6084a chore: (flutter) export platform interface from thermion_flutter package 2024-09-05 17:43:58 +08:00
Nick Fisher
4e29055a20 chore: stub new methods 2024-09-05 17:43:35 +08:00
Nick Fisher
6d0c06a853 doc: pixelRatio 2024-09-05 17:43:19 +08:00
Nick Fisher
abe6e1fcb8 feat: add ThermionFlutterOptions classes, rename interface parameter for offsetTop and ensure pixelRatio is passed to resizeTexture 2024-09-05 17:43:04 +08:00
Nick Fisher
683105c4f7 fix: emscripten export visibility for add_light 2024-09-05 17:42:17 +08:00
Nick Fisher
6f2331582c chore: use float instead of float32_t in FilamentViewer 2024-09-05 17:41:55 +08:00
Nick Fisher
f0f97e310c chore: add nested PickCallbackHandler to Gizmo 2024-09-05 17:41:24 +08:00
Nick Fisher
2331f2c31a chore: update Makefile to add missing headers to resgen files 2024-08-27 21:51:29 +08:00
Nick Fisher
704b7f6734 fix: (flutter/web) use window.devicePixelRatio for viewport 2024-08-27 21:51:09 +08:00
Nick Fisher
7ac7ae43ab fix: (wasm) use correct coords for pick, free memory correctly, keep pixelratio copy 2024-08-27 21:50:07 +08:00
Nick Fisher
d52b23d6b5 fix: (flutter) desktop gesture detector changes for new Gizmo methods 2024-08-27 21:49:28 +08:00
Nick Fisher
8b17916cd9 chore: Dart Gizmo class cleanup 2024-08-27 21:49:04 +08:00
Nick Fisher
4a0f4e3ac8 feat: add setGizmoVisibility/pickGizmo methods to ThermionViewer 2024-08-27 21:48:27 +08:00
Nick Fisher
85116f43a2 feat: remove gizmo view references, exclude gizmo entities from picking, add createIbl 2024-08-27 21:47:56 +08:00
Nick Fisher
3ecb8920ea feat: createIbl 2024-08-27 21:47:02 +08:00
Nick Fisher
8923d97129 chore: init SceneManager pointers to nullptr 2024-08-27 21:46:47 +08:00
Nick Fisher
375e1cc887 fix: add more nan checks for gizmo manipulation 2024-08-27 21:46:21 +08:00
Nick Fisher
78dcbc8bb9 feat: expose API methods for create_ibl, pick/set gizmo visibility 2024-08-27 21:45:49 +08:00
Nick Fisher
a3f7b98bf7 feat: create transparent overlay for gizmo for easier picking 2024-08-27 21:45:19 +08:00
Nick Fisher
12b61e8767 feat: rescale gizmo based on distance from camera 2024-08-27 16:54:40 +08:00
Nick Fisher
0e3b014c2c feat: rescale gizmo based on distance from camera 2024-08-27 16:50:54 +08:00
Nick Fisher
10db8c39f3 fix: add check for nan NDC coordinates for viewport translation 2024-08-25 21:54:08 +08:00
Nick Fisher
371bcb3706 fix stub methods 2024-08-24 16:28:12 +08:00
Nick Fisher
714c575409 add implementations to JS bridge/shim classes 2024-08-24 16:26:05 +08:00
Nick Fisher
c0941e3b7f add missing methods to wasm viewer 2024-08-24 16:25:37 +08:00
Nick Fisher
026acb7467 feat: highlight gizmo on hover 2024-08-24 16:25:17 +08:00
Nick Fisher
3c05cc6a43 add implementations to FFI viewer 2024-08-24 16:24:59 +08:00
Nick Fisher
f1a2926bdf fix!: (flutter) pass pixelRatio to createTexture 2024-08-24 16:24:06 +08:00
Nick Fisher
88e8a138ac (flutter) (web) initialize viewer to 1x1 then resize on createTexture 2024-08-24 16:23:54 +08:00
Nick Fisher
53d0301828 feat!: (flutter) (web) upgrade package:web dep to 1.0.0 2024-08-24 16:23:00 +08:00
Nick Fisher
b10fec1963 fix!: (flutter) pass pixelRatio to createTexture 2024-08-24 16:22:31 +08:00
Nick Fisher
08e1eb7778 feat: expose setLayerEnabled, viewportDimensions and getCameraFov on ThermionView 2024-08-24 16:22:12 +08:00
Nick Fisher
d6713c090c stub out new methods 2024-08-24 16:21:35 +08:00
Nick Fisher
497ecbf881 fix!: (flutter) pass pixelRatio to createTexture 2024-08-24 16:20:06 +08:00
Nick Fisher
6f7d03737e fix!: (flutter) pass pixelRatio to createTexture 2024-08-24 16:19:50 +08:00
Nick Fisher
ad60c6bbe1 chore: update bindings 2024-08-24 16:19:07 +08:00
Nick Fisher
92fdda722b chore: add viewport test 2024-08-24 16:18:53 +08:00
Nick Fisher
3cc876f972 feat: layers, grid 2024-08-24 16:18:23 +08:00
Nick Fisher
7d1e706045 feat: layers, grid 2024-08-24 16:18:12 +08:00
Nick Fisher
11756fcedd feat: ignore grid overlay and gizmo center when picking, implement highlighting 2024-08-24 16:17:34 +08:00
Nick Fisher
2e1f2cd56d feat: SceneManager updates (setLayer, add grid, queueRelativePositionUpdateWorld 2024-08-24 16:02:54 +08:00
Nick Fisher
c08611b2c3 feat: expose set_layer_enabled, get_camera_fov and queue_relative_position_updateg_world_axis to ThermionDartApi.h 2024-08-24 16:02:06 +08:00
Nick Fisher
f87f89427d feat: add getCameraFov to FilamentViewer 2024-08-24 16:01:03 +08:00
Nick Fisher
c3319ebbf3 feat: add new grid overlay files to web CmakeLists 2024-08-24 16:00:15 +08:00
Nick Fisher
f7b765c5d0 chore: rebuild materials 2024-08-24 15:59:55 +08:00
Nick Fisher
9512b74008 fix: update material output path in Makefile 2024-08-24 15:59:36 +08:00
Nick Fisher
5a3517f953 add grid overlay 2024-08-24 15:59:04 +08:00
Nick Fisher
731c4981c9 use inactive/active color gizmo 2024-08-24 15:58:49 +08:00
Nick Fisher
8f20a8a859 chore: don't use shader to overlay gizmo 2024-08-24 15:21:36 +08:00
Nick Fisher
7693a0fe14 feat: re-implement (native) Gizmo class, expose preserveScaling parameter for setParent, add methods for getting viewport bounding box from renderable entity 2024-08-22 18:04:06 +08:00
Nick Fisher
98c3676fdf fix: (web) add emscripten guards for flushAndWait call when swapchain destroyed 2024-08-21 17:18:37 +08:00
Nick Fisher
d7664a9746 feat!: (web) (flutter) create canvas when createViewer is called (no longer need to manually add canvas element to web HTML) 2024-08-21 17:17:58 +08:00
Nick Fisher
d868fd6970 feat: add capture() function and expose viewportDimensions on ThermionViewer (allows easier saving of captured images to PNG) 2024-08-21 14:33:48 +08:00
Nick Fisher
300396b97e feat: (web) allow table growth in emscripten module for passing C-style callback function pointers 2024-08-21 14:30:17 +08:00
Nick Fisher
1d8faa70a1 feat: (web) add capture() method and missing camera navigation controls 2024-08-21 14:29:40 +08:00
Nick Fisher
1051b1bb0e feat!: resize canvas on web 2024-08-17 11:43:43 +08:00
Nick Fisher
c367824041 feat!: update web/http dependencies 2024-08-17 11:43:03 +08:00
Nick Fisher
81cedf0d43 feat: download WASM module directly on web (no need to embed in index.html any more) and expose updateViewportAndCameraProjection 2024-08-17 11:42:25 +08:00
Nick Fisher
16c6203b97 feat: add startOffset parameter to gltf playAnimation 2024-07-29 16:13:45 +08:00
Nick Fisher
b7c0eeb7b4 chore(release): publish packages
- thermion_dart@0.1.3
 - thermion_flutter_ffi@0.1.0+12
 - thermion_flutter_web@0.0.3
 - thermion_flutter_platform_interface@0.1.0+11
 - thermion_flutter@0.1.1+13
2024-07-23 09:40:05 +08:00
Nick Fisher
7a362411b1 Merge pull request #56 from payl-ampa/patch-2
docs: correct link to windows page in quickstart page
2024-07-05 10:26:21 +10:00
Paul Ampadu
e95dfe4671 Update quickstart.mdx 2024-07-04 10:59:27 -07:00
Nick Fisher
e7b79bb6b9 fix: web/JS bool checks need to compare to int 2024-07-04 21:49:13 +08:00
Nick Fisher
59bc309f5b feat: allow passing assetPathPrefix to ThermionViewerWasm to account for Flutter build asset paths 2024-07-04 16:29:56 +08:00
Nick Fisher
d2fb40f317 fix: shadow JS<->WASM bridge methods 2024-07-04 16:29:08 +08:00
452 changed files with 141663 additions and 10832 deletions

View File

@@ -2,7 +2,6 @@
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.
name: Dart
on:
@@ -12,31 +11,72 @@ on:
branches: [ "develop" ]
jobs:
build:
runs-on: macos-13
thermion_dart:
name: thermion_dart
runs-on: self-hosted
defaults:
run:
working-directory: thermion_dart # Adjust this path
steps:
- uses: actions/checkout@v4
# Note: This workflow uses the latest stable version of the Dart SDK.
# You can specify other versions if desired, see documentation here:
# https://github.com/dart-lang/setup-dart/blob/main/README.md
# - uses: dart-lang/setup-dart@v1
- uses: dart-lang/setup-dart@9a04e6d73cca37bd455e0608d7e5092f881fd603
- name: Install dependencies
run: dart pub get
run: flutter pub get # even though this is a Dart package, it has as dev_dependency on objective_c for testing which for some reason has a Flutter dependency
# Uncomment this step to verify the use of 'dart format' on each commit.
# - name: Verify formatting
# run: dart format --output=none --set-exit-if-changed .
# Consider passing '--fatal-infos' for slightly stricter analysis.
- name: Analyze project source
run: dart analyze
#- name: Analyze project source
# run: dart analyze
# Your project will need to have tests in test/ and a dependency on
# package:test for this step to succeed. Note that Flutter projects will
# want to change this to 'flutter test'.
- name: Run tests
- name: Build and Test
shell: cmd
run: dart --enable-experiment=native-assets test
# Upload logs on failure
- name: Upload logs
if: failure() || steps.build.outcome == 'failure'
uses: actions/upload-artifact@v4
with:
name: build-logs
path: |
D:\a\thermion\thermion\thermion_dart\.dart_tool\thermion_dart\log\build.log
# /Users/runner/work/thermion/thermion/thermion_dart//.dart_tool/thermion_dart/log/build.log
retention-days: 5
# Capture crash dumps if they exist
- name: Collect crash dumps
if: failure()
uses: actions/upload-artifact@v3
with:
name: crash-dumps
path: |
${{ runner.temp }}/*.dmp
${{ env.LOCALAPPDATA }}/Temp/*.dmp
${{ env.LOCALAPPDATA }}/CrashDumps/*.dmp
# thermion_flutter:
# name: thermion_flutter
# runs-on: macos-13
# defaults:
# run:
# working-directory: thermion_flutter/thermion_flutter # Adjust this path
# steps:
# - uses: actions/checkout@v4
# - uses: dart-lang/setup-dart@9a04e6d73cca37bd455e0608d7e5092f881fd603
# - name: Install dependencies
# run: dart pub get
# # Uncomment this step to verify the use of 'dart format' on each commit.
# # - name: Verify formatting
# # run: dart format --output=none --set-exit-if-changed .
# - name: Analyze project source
# run: dart analyze
# - name: Run tests
# run: dart --enable-experiment=native-assets test

View File

@@ -3,6 +3,381 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## 2024-11-18
### Changes
---
Packages with breaking changes:
- There are no breaking changes in this release.
Packages with other changes:
- [`thermion_dart` - `v0.2.1-dev.18.0`](#thermion_dart---v021-dev180)
- [`thermion_flutter` - `v0.2.1-dev.18.0`](#thermion_flutter---v021-dev180)
- [`thermion_flutter_web` - `v0.2.0+9`](#thermion_flutter_web---v0209)
- [`thermion_flutter_platform_interface` - `v0.2.1-dev.18.0`](#thermion_flutter_platform_interface---v021-dev180)
- [`thermion_flutter_ffi` - `v0.2.1-dev.18.0`](#thermion_flutter_ffi---v021-dev180)
Packages with dependency updates only:
> Packages listed below depend on other packages in this workspace that have had changes. Their versions have been incremented to bump the minimum dependency versions of the packages they depend upon in this project.
- `thermion_flutter_web` - `v0.2.0+9`
- `thermion_flutter_platform_interface` - `v0.2.1-dev.18.0`
- `thermion_flutter_ffi` - `v0.2.1-dev.18.0`
---
#### `thermion_dart` - `v0.2.1-dev.18.0`
- **FEAT**: add MaterialInstance.setDepthFunc.
#### `thermion_flutter` - `v0.2.1-dev.18.0`
- **FIX**: fix windows import header.
## 2024-11-15
### Changes
---
Packages with breaking changes:
- There are no breaking changes in this release.
Packages with other changes:
- [`thermion_dart` - `v0.2.1-dev.0.0.17`](#thermion_dart---v021-dev0017)
- [`thermion_flutter` - `v0.2.1-dev.17`](#thermion_flutter---v021-dev17)
- [`thermion_flutter_web` - `v0.2.0+8`](#thermion_flutter_web---v0208)
- [`thermion_flutter_platform_interface` - `v0.2.1-dev.17`](#thermion_flutter_platform_interface---v021-dev17)
- [`thermion_flutter_ffi` - `v0.2.1-dev.17`](#thermion_flutter_ffi---v021-dev17)
Packages with dependency updates only:
> Packages listed below depend on other packages in this workspace that have had changes. Their versions have been incremented to bump the minimum dependency versions of the packages they depend upon in this project.
- `thermion_flutter_web` - `v0.2.0+8`
- `thermion_flutter_platform_interface` - `v0.2.1-dev.17`
- `thermion_flutter_ffi` - `v0.2.1-dev.17`
---
#### `thermion_dart` - `v0.2.1-dev.0.0.17`
- **FIX**: remove superfluous ceil() calls for picking coordinates.
- **FIX**: remove superfluous ceil() calls for picking coordinates.
- **FIX**: reduce size of pick functor for compatibility with armeabi-v7a.
- **FIX**: reduce size of pick functor for compatibility with armeabi-v7a.
- **FEAT**: add Dart methods for getRenderableBoundingBox, setParameterInt and setParameterFloat4.
- **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.
- **FEAT**: expose zoomSensitivity argument for flight input handler.
- **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.
- **FEAT**: expose zoomSensitivity argument for flight input handler.
- **FEAT**: sanitize file paths in build.dart for Windows compatibility.
- **FEAT**: pass through fragment coordinates for picking.
- **FEAT**: sanitize file paths in build.dart for Windows compatibility.
- **FEAT**: pass through fragment coordinates for picking.
#### `thermion_flutter` - `v0.2.1-dev.17`
- **FIX**: multiply coordinates by pixelRatio for scale events.
- **FIX**: multiply coordinates by pixelRatio for scale events.
## 2024-10-31
### Changes
---
Packages with breaking changes:
- There are no breaking changes in this release.
Packages with other changes:
- [`thermion_dart` - `v0.2.1-dev.0.0.16`](#thermion_dart---v021-dev0016)
- [`thermion_flutter` - `v0.2.1-dev.16`](#thermion_flutter---v021-dev16)
- [`thermion_flutter_web` - `v0.2.0+7`](#thermion_flutter_web---v0207)
- [`thermion_flutter_platform_interface` - `v0.2.1-dev.16`](#thermion_flutter_platform_interface---v021-dev16)
- [`thermion_flutter_ffi` - `v0.2.1-dev.16`](#thermion_flutter_ffi---v021-dev16)
Packages with dependency updates only:
> Packages listed below depend on other packages in this workspace that have had changes. Their versions have been incremented to bump the minimum dependency versions of the packages they depend upon in this project.
- `thermion_flutter` - `v0.2.1-dev.16`
- `thermion_flutter_web` - `v0.2.0+7`
- `thermion_flutter_platform_interface` - `v0.2.1-dev.16`
- `thermion_flutter_ffi` - `v0.2.1-dev.16`
---
#### `thermion_dart` - `v0.2.1-dev.0.0.16`
- **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-10-31
### Changes
---
Packages with breaking changes:
- There are no breaking changes in this release.
Packages with other changes:
- [`thermion_dart` - `v0.2.1-dev.0.0.15`](#thermion_dart---v021-dev0015)
- [`thermion_flutter` - `v0.2.1-dev.15`](#thermion_flutter---v021-dev15)
- [`thermion_flutter_web` - `v0.2.0+6`](#thermion_flutter_web---v0206)
- [`thermion_flutter_platform_interface` - `v0.2.1-dev.15`](#thermion_flutter_platform_interface---v021-dev15)
- [`thermion_flutter_ffi` - `v0.2.1-dev.15`](#thermion_flutter_ffi---v021-dev15)
Packages with dependency updates only:
> Packages listed below depend on other packages in this workspace that have had changes. Their versions have been incremented to bump the minimum dependency versions of the packages they depend upon in this project.
- `thermion_flutter_web` - `v0.2.0+6`
- `thermion_flutter_platform_interface` - `v0.2.1-dev.15`
- `thermion_flutter_ffi` - `v0.2.1-dev.15`
---
#### `thermion_dart` - `v0.2.1-dev.0.0.15`
- **FIX**: remove superfluous ceil() calls for picking coordinates.
- **FEAT**: expose zoomSensitivity argument for flight input handler.
#### `thermion_flutter` - `v0.2.1-dev.15`
- **FIX**: multiply coordinates by pixelRatio for scale events.
## 2024-10-30
### Changes
---
Packages with breaking changes:
- There are no breaking changes in this release.
Packages with other changes:
- [`thermion_dart` - `v0.2.1-dev.0.0.14`](#thermion_dart---v021-dev0014)
- [`thermion_flutter` - `v0.2.1-dev.14`](#thermion_flutter---v021-dev14)
- [`thermion_flutter_platform_interface` - `v0.2.1-dev.14`](#thermion_flutter_platform_interface---v021-dev14)
- [`thermion_flutter_ffi` - `v0.2.1-dev.14`](#thermion_flutter_ffi---v021-dev14)
- [`thermion_flutter_web` - `v0.2.0+5`](#thermion_flutter_web---v0205)
Packages with dependency updates only:
> Packages listed below depend on other packages in this workspace that have had changes. Their versions have been incremented to bump the minimum dependency versions of the packages they depend upon in this project.
- `thermion_flutter` - `v0.2.1-dev.14`
- `thermion_flutter_platform_interface` - `v0.2.1-dev.14`
- `thermion_flutter_ffi` - `v0.2.1-dev.14`
- `thermion_flutter_web` - `v0.2.0+5`
---
#### `thermion_dart` - `v0.2.1-dev.0.0.14`
- **FIX**: reduce size of pick functor for compatibility with armeabi-v7a.
- **FEAT**: sanitize file paths in build.dart for Windows compatibility.
- **FEAT**: pass through fragment coordinates for picking.
- **FEAT**: pass through fragment coordinates for picking.
## 2024-10-29
### Changes
---
Packages with breaking changes:
- There are no breaking changes in this release.
Packages with other changes:
- [`thermion_dart` - `v0.2.1-dev.0.0.13`](#thermion_dart---v021-dev0013)
- [`thermion_flutter_web` - `v0.2.0+4`](#thermion_flutter_web---v0204)
- [`thermion_flutter` - `v0.2.1-dev.13`](#thermion_flutter---v021-dev13)
- [`thermion_flutter_ffi` - `v0.2.1-dev.13`](#thermion_flutter_ffi---v021-dev13)
- [`thermion_flutter_platform_interface` - `v0.2.1-dev.13`](#thermion_flutter_platform_interface---v021-dev13)
Packages with dependency updates only:
> Packages listed below depend on other packages in this workspace that have had changes. Their versions have been incremented to bump the minimum dependency versions of the packages they depend upon in this project.
- `thermion_flutter_web` - `v0.2.0+4`
- `thermion_flutter` - `v0.2.1-dev.13`
- `thermion_flutter_ffi` - `v0.2.1-dev.13`
- `thermion_flutter_platform_interface` - `v0.2.1-dev.13`
---
#### `thermion_dart` - `v0.2.1-dev.0.0.13`
- **FIX**: properly pass through loadResourcesAsync flag for loadGlbFromBuffer.
- **FIX**: properly pass through loadResourcesAsync flag for loadGlbFromBuffer.
- **FEAT**: pass through fragment coordinates for picking.
- **FEAT**: add SCALE2_MOVE InputType.
- **FEAT**: add SCALE2_MOVE InputType.
## 2024-10-25
### Changes
---
Packages with breaking changes:
- There are no breaking changes in this release.
Packages with other changes:
- [`thermion_dart` - `v0.2.1-dev.0.0.12`](#thermion_dart---v021-dev0012)
- [`thermion_flutter` - `v0.2.1-dev.12`](#thermion_flutter---v021-dev12)
- [`thermion_flutter_web` - `v0.2.0+3`](#thermion_flutter_web---v0203)
- [`thermion_flutter_platform_interface` - `v0.2.1-dev.12`](#thermion_flutter_platform_interface---v021-dev12)
- [`thermion_flutter_ffi` - `v0.2.1-dev.12`](#thermion_flutter_ffi---v021-dev12)
Packages with dependency updates only:
> Packages listed below depend on other packages in this workspace that have had changes. Their versions have been incremented to bump the minimum dependency versions of the packages they depend upon in this project.
- `thermion_flutter_web` - `v0.2.0+3`
- `thermion_flutter_platform_interface` - `v0.2.1-dev.12`
- `thermion_flutter_ffi` - `v0.2.1-dev.12`
---
#### `thermion_dart` - `v0.2.1-dev.0.0.12`
- **FIX**: properly pass through loadResourcesAsync flag for loadGlbFromBuffer.
- **FIX**: properly pass through loadResourcesAsync flag for loadGlbFromBuffer.
- **FEAT**: add SCALE2_MOVE InputType.
- **FEAT**: add SCALE2_MOVE InputType.
#### `thermion_flutter` - `v0.2.1-dev.12`
- **FIX**: (flutter) (windows) remove deleted source file from Windows CMakeLists.
## 2024-10-25
### Changes
---
Packages with breaking changes:
- There are no breaking changes in this release.
Packages with other changes:
- [`thermion_dart` - `v0.2.1-dev.0.0.12`](#thermion_dart---v021-dev0012)
- [`thermion_flutter_web` - `v0.2.0+2`](#thermion_flutter_web---v0202)
- [`thermion_flutter_platform_interface` - `v0.2.1-dev.11`](#thermion_flutter_platform_interface---v021-dev11)
- [`thermion_flutter_ffi` - `v0.2.1-dev.11`](#thermion_flutter_ffi---v021-dev11)
- [`thermion_flutter` - `v0.2.1-dev.11`](#thermion_flutter---v021-dev11)
Packages with dependency updates only:
> Packages listed below depend on other packages in this workspace that have had changes. Their versions have been incremented to bump the minimum dependency versions of the packages they depend upon in this project.
- `thermion_flutter_web` - `v0.2.0+2`
- `thermion_flutter_platform_interface` - `v0.2.1-dev.11`
- `thermion_flutter_ffi` - `v0.2.1-dev.11`
- `thermion_flutter` - `v0.2.1-dev.11`
---
#### `thermion_dart` - `v0.2.1-dev.0.0.12`
- **FIX**: properly pass through loadResourcesAsync flag for loadGlbFromBuffer.
- **FEAT**: add SCALE2_MOVE InputType.
## 2024-10-24
### Changes
---
Packages with breaking changes:
- [`thermion_dart` - `v0.2.1-dev.0.0.11`](#thermion_dart---v021-dev0011)
- [`thermion_flutter` - `v0.2.1-dev.10`](#thermion_flutter---v021-dev10)
Packages with other changes:
- [`thermion_flutter_web` - `v0.2.0+1`](#thermion_flutter_web---v0201)
- [`thermion_flutter_platform_interface` - `v0.2.1-dev.10`](#thermion_flutter_platform_interface---v021-dev10)
- [`thermion_flutter_ffi` - `v0.2.1-dev.10`](#thermion_flutter_ffi---v021-dev10)
Packages with dependency updates only:
> Packages listed below depend on other packages in this workspace that have had changes. Their versions have been incremented to bump the minimum dependency versions of the packages they depend upon in this project.
- `thermion_flutter_web` - `v0.2.0+1`
- `thermion_flutter_platform_interface` - `v0.2.1-dev.10`
- `thermion_flutter_ffi` - `v0.2.1-dev.10`
---
#### `thermion_dart` - `v0.2.1-dev.0.0.11`
- **FEAT**: add SCALE2_ROTATE to InputHandler.
- **BREAKING** **FEAT**: expose velocity, rotation and timestamp for scale events in listener. accept rotationSensitivity/zoomSensitivity for FixedOrbitRotateInputHandlerDelegate.
#### `thermion_flutter` - `v0.2.1-dev.10`
- **REFACTOR**: continual refactor to support multiple render targets.
- **FIX**: fix all Windows warnings so apps will compile with /WX.
- **FIX**: use internal Set for determining first ThermionTextureWidget to call requestFrame and cleanup destruction logic.
- **FIX**: (flutter) pass ThermionFlutterOptions to ThermionWidget, use dpr for resizeTexture, delete unnecessary TransparencyPainter class.
- **FIX**: (flutter/web) use window.devicePixelRatio for viewport.
- **FIX**: (flutter) desktop gesture detector changes for new Gizmo methods.
- **FEAT**: (flutter) (windows) add DestroyRenderingSurface method.
- **FEAT**: (flutter) (windows) add DestroyRenderingSurface method.
- **FEAT**: (flutter) (windows) add DestroyRenderingSurface method.
- **FEAT**: (flutter) (windows) add Destroy() to BackingWindow.
- **FEAT**: camera and resizing improvements.
- **FEAT**: support multiple ThermionWidget on Android.
- **FEAT**: use imported texture on iOS.
- **FEAT**: working implementation of multiple widgets on macos.
- **FEAT**: add rendering check to ThermionWidget ticker.
- **FEAT**: allow passing null options to ThermionWidget.
- **FEAT**: (flutter) (web) if importCanvasAsWidget is false, render transparency.
- **FEAT**: add createViewerWithOptions to ThermionFlutterPlugin and mark createViewer as deprecated.
- **FEAT**: add createViewerWithOptions to ThermionFlutterPlugin and mark createViewer as deprecated.
- **FEAT**: highlight gizmo on hover.
- **BREAKING** **FIX**: remove EntityControllerMouseWidget (replace with GestureHandler).
- **BREAKING** **FIX**: (flutter) pass pixelRatio to createTexture.
- **BREAKING** **FIX**: (flutter) pass pixelRatio to createTexture.
- **BREAKING** **FEAT**: expose velocity, rotation and timestamp for scale events in listener. accept rotationSensitivity/zoomSensitivity for FixedOrbitRotateInputHandlerDelegate.
- **BREAKING** **FEAT**: (web) (flutter) create canvas when createViewer is called (no longer need to manually add canvas element to web HTML).
- **BREAKING** **FEAT**: resize canvas on web.
- **BREAKING** **CHORE**: remove superseded HardwareKeyboard* classes.
- **BREAKING** **CHORE**: (flutter) cleanup for pub.dev publishing.
- **BREAKING** **CHORE**: remove EntityListWidget - will replace with new Scene.
- **BREAKING** **CHORE**: rename controller to viewer in gesture detector widgets.
## 2024-10-23
### Changes

View File

@@ -22,15 +22,16 @@ bindings:
# eg: FILAMENT_PATH=/path/to/filament/out/release/bin make materials
#
materials: FORCE
ifndef FILAMENT_PATH
$(error FILAMENT_PATH is not set)
else
@echo "Using Filament build from ${FILAMENT_PATH}"
@for material in unlit image gizmo grid; do \
@for material in unlit image unlit_fixed_size grid; do \
${FILAMENT_PATH}/matc -a opengl -a metal -o materials/$$material.filamat materials/$$material.mat; \
$(FILAMENT_PATH)/resgen -c -p $$material -x thermion_dart/native/include/material/ materials/$$material.filamat; \
echo '#include "'$$material'.h"' | cat - thermion_dart/native/include/material/$$material.c > thermion_dart/native/include/material/$$material.c.new; \
mv thermion_dart/native/include/material/$$material.c.new thermion_dart/native/include/material/$$material.c; \
done
endif
#rm materials/*.filamat
FORCE: ;
FORCE: ;

View File

@@ -3,7 +3,7 @@
<p align="center">
<a href="https://thermion.dev/quickstart">Quickstart (Flutter)</a> •
<a href="https://thermion.dev/">Documentation</a> •
<a href="https://thermion.dev/examples">Showcase</a> •
<a href="https://thermion.dev/showcase">Showcase</a> •
<a href="https://dartpad.thermion.dev/">Playground</a> •
<a href="https://discord.gg/h2VdDK3EAQ">Discord</a>
</p>
@@ -24,13 +24,17 @@
### Quickstart (Flutter)
```
From the command line:
```bash
flutter channel master
flutter upgrade
flutter config --enable-native-assets
```
```
In your Flutter app:
```dart
_thermionViewer = await ThermionFlutterPlugin.createViewer();
// Geometry and models are represented as "entities". Here, we load a glTF
@@ -61,8 +65,8 @@ await _thermionViewer!.loadIbl("assets/default_env_ibl.ktx");
await _thermionViewer!.setRendering(true);
```
and then in your Flutter application:
```
and then in your widget tree:
```dart
@override
Widget build(BuildContext context) {
return Stack(children: [

View File

@@ -7,7 +7,8 @@
"Getting Started",
[
["Overview", "/"],
["Quick Start", "/quickstart"]
["Quick Start", "/quickstart"],
["Camera Manipulation", "/camera_manipulation"]
]
],
["Misc.", [

3
examples/dart/cli_windows/.gitignore vendored Normal file
View File

@@ -0,0 +1,3 @@
# https://dart.dev/guides/libraries/private-files
# Created by `dart pub`
.dart_tool/

View File

@@ -0,0 +1,3 @@
## 1.0.0
- Initial version.

View File

@@ -0,0 +1,7 @@
# Thermion Example - Dart/Windows-only (no Flutter)
A (Windows-only) command-line application that renders into a window without Flutter.
```
dart --enable-experiment=native-assets bin\cli_windows.dart
```

View File

@@ -0,0 +1,30 @@
# This file configures the static analysis results for your project (errors,
# warnings, and lints).
#
# This enables the 'recommended' set of lints from `package:lints`.
# This set helps identify many issues that may lead to problems when running
# or consuming Dart code, and enforces writing Dart using a single, idiomatic
# style and format.
#
# If you want a smaller set of lints you can change this to specify
# 'package:lints/core.yaml'. These are just the most critical lints
# (the recommended set includes the core lints).
# The core lints are also what is used by pub.dev for scoring packages.
include: package:lints/recommended.yaml
# Uncomment the following section to specify additional rules.
# linter:
# rules:
# - camel_case_types
# analyzer:
# exclude:
# - path/to/excluded/files/**
# For more information about the core and recommended set of lints, see
# https://dart.dev/go/core-lints
# For additional information about configuring this file, see
# https://dart.dev/guides/language/analysis-options

View File

@@ -0,0 +1,67 @@
import 'dart:ffi';
import 'dart:io';
import 'dart:math';
import 'package:ffi/ffi.dart';
import 'package:thermion_dart/src/utils/src/dart_resources.dart';
import 'package:thermion_dart/src/viewer/src/ffi/src/thermion_viewer_ffi.dart';
import 'package:thermion_dart/src/viewer/src/ffi/src/thermion_dart.g.dart';
import 'package:thermion_dart/thermion_dart.dart';
import 'package:vector_math/vector_math_64.dart';
import 'package:cli_windows/thermion_window.g.dart';
void main(List<String> arguments) async {
var hwnd = create_thermion_window(500, 500, 0, 0);
update();
final resourceLoader = calloc<ResourceLoaderWrapper>(1);
var loadToOut = NativeCallable<
Void Function(Pointer<Char>,
Pointer<ResourceBuffer>)>.listener(DartResourceLoader.loadResource);
resourceLoader.ref.loadToOut = loadToOut.nativeFunction;
var freeResource = NativeCallable<Void Function(ResourceBuffer)>.listener(
DartResourceLoader.freeResource);
resourceLoader.ref.freeResource = freeResource.nativeFunction;
var viewer = ThermionViewerFFI(
resourceLoader: resourceLoader.cast<Void>());
await viewer.initialized;
var swapChain = await viewer.createHeadlessSwapChain(500,500);
var view = await viewer.getViewAt(0);
await view.updateViewport(500, 500);
var camera = await viewer.getMainCamera();
await camera.setLensProjection();
await view.setRenderable(true, swapChain);
await viewer.setBackgroundColor(1.0, 0.0, 0.0, 1.0);
var skyboxPath = File("..\\..\\assets\\default_env_skybox.ktx").absolute;
await viewer.loadSkybox("file://${skyboxPath.uri.toFilePath(windows: true)}");
final cube = await viewer.createGeometry(GeometryHelper.cube());
var stopwatch = Stopwatch();
stopwatch.start();
var last = 0;
await viewer.setCameraPosition(0, 0, 10);
while(true) {
var angle = (stopwatch.elapsedMilliseconds / 1000) * 2 * pi;
var rotation = Quaternion.axisAngle(Vector3(0,1,0), angle);
var position = Vector3(10 * sin(angle), 0, 10 * cos(angle));
var modelMatrix = Matrix4.compose(position, rotation, Vector3.all(1));
await viewer.setCameraModelMatrix4(modelMatrix);
await viewer.render();
update();
await Future.delayed(Duration(milliseconds: 17));
}
}

View File

@@ -0,0 +1,35 @@
import 'dart:io';
import 'package:archive/archive.dart';
import 'package:logging/logging.dart';
import 'package:native_assets_cli/native_assets_cli.dart';
import 'package:native_toolchain_c/native_toolchain_c.dart';
import 'package:path/path.dart' as path;
void main(List<String> args) async {
final logger = Logger("")
..level = Level.ALL
..onRecord.listen((record) => print(
record.message + "\n"));
await build(args, (config, output) async {
final cbuilder = CBuilder.library(
name: "thermion_window",
language: Language.cpp,
assetName: 'thermion_window.dart',
sources: ['native/thermion_window.cpp'],
includes: ['native', '../../../thermion_dart/native/include'],
defines: {"UNICODE":"1"},
flags:[],
dartBuildFiles: ['hook/build.dart'],
);
await cbuilder.run(
buildConfig: config,
buildOutput: output,
logger: logger,
);
});
}

View File

@@ -0,0 +1,19 @@
// AUTO GENERATED FILE, DO NOT EDIT.
//
// Generated by `package:ffigen`.
// ignore_for_file: type=lint
@ffi.DefaultAsset('package:cli_windows/thermion_window.dart')
library;
import 'dart:ffi' as ffi;
@ffi.Native<ffi.Int Function(ffi.Int, ffi.Int, ffi.Int, ffi.Int)>(isLeaf: true)
external int create_thermion_window(
int width,
int height,
int left,
int top,
);
@ffi.Native<ffi.Void Function()>(isLeaf: true)
external void update();

View File

@@ -0,0 +1,390 @@
#pragma comment(lib, "dwmapi.lib")
#pragma comment(lib, "comctl32.lib")
#pragma comment(lib, "Shlwapi.lib")
#pragma comment(lib, "opengl32.lib")
#pragma comment(lib, "Gdi32.lib")
#pragma comment(lib, "User32.lib")
#pragma comment(lib, "dxgi.lib")
#include <dxgi.h>
#include <cstdint>
#include <chrono>
#include <thread>
#include <algorithm>
#include <Windows.h>
#include <dwmapi.h>
#include <ShObjIdl.h>
#include <iostream>
#include <Windows.h>
#include "thermion_window.h"
namespace thermion {
void PrintDefaultGPU() {
IDXGIFactory* factory = nullptr;
CreateDXGIFactory(__uuidof(IDXGIFactory), (void**)&factory);
IDXGIAdapter* adapter = nullptr;
factory->EnumAdapters(0, &adapter); // 0 is the default adapter
DXGI_ADAPTER_DESC desc;
adapter->GetDesc(&desc);
std::wcout << L"GPU: " << desc.Description << std::endl;
adapter->Release();
factory->Release();
}
///
/// Instantiating a ThermionWindow creates a HWND that can be passed
/// to Filament to create a swapchain.
///
///
class ThermionWindow {
public:
ThermionWindow(
int width,
int height,
int left,
int top);
HWND GetHandle();
void Resize(int width, int height, int left, int top);
uint32_t _width = 0;
uint32_t _height = 0;
uint32_t _left = 0;
uint32_t _top = 0;
private:
HWND _windowHandle;
};
static ThermionWindow* _window;
static bool _running = false;
static std::thread _renderThread;
// Add these for timing and stats
static int _frameCount = 0;
static std::chrono::time_point<std::chrono::steady_clock> _lastFpsLog;
static void RenderLoop() {
_lastFpsLog = std::chrono::steady_clock::now();
auto lastFrame = std::chrono::steady_clock::now();
while (_running) {
auto now = std::chrono::steady_clock::now();
auto frameDuration = std::chrono::duration_cast<std::chrono::microseconds>(now - lastFrame).count();
// Force a redraw
InvalidateRect(_window->GetHandle(), NULL, FALSE);
// Process any pending messages
MSG msg;
while (PeekMessage(&msg, NULL, 0, 0, PM_REMOVE)) {
if (msg.message == WM_QUIT) {
_running = false;
break;
}
TranslateMessage(&msg);
DispatchMessage(&msg);
}
// Wait for vsync
DwmFlush();
// Update timing stats
lastFrame = now;
_frameCount++;
// Log FPS every second
auto timeSinceLastLog = std::chrono::duration_cast<std::chrono::milliseconds>(now - _lastFpsLog).count();
if (timeSinceLastLog >= 1000) { // Every second
float fps = (_frameCount * 1000.0f) / timeSinceLastLog;
float avgFrameTime = timeSinceLastLog / (float)_frameCount;
std::cout << "FPS: " << fps << " Frame Time: " << avgFrameTime << "ms"
<< " Last Frame: " << frameDuration / 1000.0f << "ms" << std::endl;
_frameCount = 0;
_lastFpsLog = now;
}
}
}
extern "C" {
EMSCRIPTEN_KEEPALIVE intptr_t create_thermion_window(int width, int height, int left, int top) {
_window = new ThermionWindow(width, height, left, top);
// Start the render thread
_running = true;
_renderThread = std::thread(RenderLoop);
return (intptr_t)_window->GetHandle();
}
// Update function can now be simplified or removed since rendering happens in the thread
EMSCRIPTEN_KEEPALIVE void update() {
}
// Add a cleanup function
EMSCRIPTEN_KEEPALIVE void cleanup() {
_running = false;
if (_renderThread.joinable()) {
_renderThread.join();
}
if (_window) {
delete _window;
_window = nullptr;
}
}
}
static constexpr auto kClassName = L"THERMION_WINDOW";
static constexpr auto kWindowName = L"thermion_window";
static bool was_window_hidden_due_to_minimize_ = false;
static WPARAM last_wm_size_wparam_ = SIZE_RESTORED;
uint64_t last_thread_time_ = 0;
static constexpr auto kNativeViewPositionAndShowDelay = 300;
typedef enum _WINDOWCOMPOSITIONATTRIB {
WCA_UNDEFINED = 0,
WCA_NCRENDERING_ENABLED = 1,
WCA_NCRENDERING_POLICY = 2,
WCA_TRANSITIONS_FORCEDISABLED = 3,
WCA_ALLOW_NCPAINT = 4,
WCA_CAPTION_BUTTON_BOUNDS = 5,
WCA_NONCLIENT_RTL_LAYOUT = 6,
WCA_FORCE_ICONIC_REPRESENTATION = 7,
WCA_EXTENDED_FRAME_BOUNDS = 8,
WCA_HAS_ICONIC_BITMAP = 9,
WCA_THEME_ATTRIBUTES = 10,
WCA_NCRENDERING_EXILED = 11,
WCA_NCADORNMENTINFO = 12,
WCA_EXCLUDED_FROM_LIVEPREVIEW = 13,
WCA_VIDEO_OVERLAY_ACTIVE = 14,
WCA_FORCE_ACTIVEWINDOW_APPEARANCE = 15,
WCA_DISALLOW_PEEK = 16,
WCA_CLOAK = 17,
WCA_CLOAKED = 18,
WCA_ACCENT_POLICY = 19,
WCA_FREEZE_REPRESENTATION = 20,
WCA_EVER_UNCLOAKED = 21,
WCA_VISUAL_OWNER = 22,
WCA_HOLOGRAPHIC = 23,
WCA_EXCLUDED_FROM_DDA = 24,
WCA_PASSIVEUPDATEMODE = 25,
WCA_USEDARKMODECOLORS = 26,
WCA_LAST = 27
} WINDOWCOMPOSITIONATTRIB;
typedef struct _WINDOWCOMPOSITIONATTRIBDATA {
WINDOWCOMPOSITIONATTRIB Attrib;
PVOID pvData;
SIZE_T cbData;
} WINDOWCOMPOSITIONATTRIBDATA;
typedef enum _ACCENT_STATE {
ACCENT_DISABLED = 0,
ACCENT_ENABLE_GRADIENT = 1,
ACCENT_ENABLE_TRANSPARENTGRADIENT = 2,
ACCENT_ENABLE_BLURBEHIND = 3,
ACCENT_ENABLE_ACRYLICBLURBEHIND = 4,
ACCENT_ENABLE_HOSTBACKDROP = 5,
ACCENT_INVALID_STATE = 6
} ACCENT_STATE;
typedef struct _ACCENT_POLICY {
ACCENT_STATE AccentState;
DWORD AccentFlags;
DWORD GradientColor;
DWORD AnimationId;
} ACCENT_POLICY;
typedef BOOL(WINAPI* _GetWindowCompositionAttribute)(
HWND, WINDOWCOMPOSITIONATTRIBDATA*);
typedef BOOL(WINAPI* _SetWindowCompositionAttribute)(
HWND, WINDOWCOMPOSITIONATTRIBDATA*);
static _SetWindowCompositionAttribute g_set_window_composition_attribute = NULL;
static bool g_set_window_composition_attribute_initialized = false;
typedef LONG NTSTATUS, *PNTSTATUS;
#define STATUS_SUCCESS (0x00000000)
typedef NTSTATUS(WINAPI* RtlGetVersionPtr)(PRTL_OSVERSIONINFOW);
RTL_OSVERSIONINFOW GetWindowsVersion() {
HMODULE hmodule = ::GetModuleHandleW(L"ntdll.dll");
if (hmodule) {
RtlGetVersionPtr rtl_get_version_ptr =
(RtlGetVersionPtr)::GetProcAddress(hmodule, "RtlGetVersion");
if (rtl_get_version_ptr != nullptr) {
RTL_OSVERSIONINFOW rovi = {0};
rovi.dwOSVersionInfoSize = sizeof(rovi);
if (STATUS_SUCCESS == rtl_get_version_ptr(&rovi)) {
return rovi;
}
}
}
RTL_OSVERSIONINFOW rovi = {0};
return rovi;
}
void SetWindowComposition(HWND window, int32_t accent_state,
int32_t gradient_color) {
// TODO: Look for a better available API.
if (GetWindowsVersion().dwBuildNumber >= 18362) {
if (!g_set_window_composition_attribute_initialized) {
auto user32 = ::GetModuleHandleA("user32.dll");
if (user32) {
g_set_window_composition_attribute =
reinterpret_cast<_SetWindowCompositionAttribute>(
::GetProcAddress(user32, "SetWindowCompositionAttribute"));
if (g_set_window_composition_attribute) {
g_set_window_composition_attribute_initialized = true;
}
}
}
ACCENT_POLICY accent = {static_cast<ACCENT_STATE>(accent_state), 2,
static_cast<DWORD>(gradient_color), 0};
WINDOWCOMPOSITIONATTRIBDATA data;
data.Attrib = WCA_ACCENT_POLICY;
data.pvData = &accent;
data.cbData = sizeof(accent);
g_set_window_composition_attribute(window, &data);
}
}
// Add tracking for drag state
static bool isDragging = false;
static POINT dragStart = {0, 0};
static POINT windowStart = {0, 0};
LRESULT CALLBACK FilamentWindowProc(HWND const window, UINT const message,
WPARAM const wparam,
LPARAM const lparam) noexcept {
switch (message) {
case WM_DESTROY: {
PostQuitMessage(0);
return 0;
}
case WM_NCHITTEST: {
POINT pt = { LOWORD(lparam), HIWORD(lparam) };
ScreenToClient(window, &pt);
return HTCAPTION;
}
case WM_MOUSEMOVE: {
TRACKMOUSEEVENT event;
event.cbSize = sizeof(event);
event.hwndTrack = window;
event.dwFlags = TME_HOVER;
event.dwHoverTime = 200;
auto user_data = ::GetWindowLongPtr(window, GWLP_USERDATA);
if (user_data) {
HWND flutterRootWindow = reinterpret_cast<HWND>(user_data);
LONG ex_style = ::GetWindowLong(flutterRootWindow, GWL_EXSTYLE);
ex_style &= ~(WS_EX_TRANSPARENT | WS_EX_LAYERED);
::SetWindowLong(flutterRootWindow, GWL_EXSTYLE, ex_style);
}
break;
}
case WM_ERASEBKGND: {
HDC hdc = (HDC)wparam;
RECT rect;
GetClientRect(window, &rect);
ThermionWindow* thermionWindow = reinterpret_cast<ThermionWindow*>(
GetWindowLongPtr(window, GWLP_USERDATA));
if (thermionWindow) {
HBRUSH brush = CreateSolidBrush(RGB(0, 0, 255));
FillRect(hdc, &rect, brush);
DeleteObject(brush);
}
return TRUE;
}
case WM_SIZE:
case WM_MOVE:
case WM_MOVING:
case WM_WINDOWPOSCHANGED: {
auto user_data = ::GetWindowLongPtr(window, GWLP_USERDATA);
if (user_data) {
HWND flutterRootWindow = reinterpret_cast<HWND>(user_data);
LONG ex_style = ::GetWindowLong(flutterRootWindow, GWL_EXSTYLE);
ex_style &= ~(WS_EX_TRANSPARENT | WS_EX_LAYERED);
::SetWindowLong(flutterRootWindow, GWL_EXSTYLE, ex_style);
}
break;
}
default:
return ::DefWindowProc(window, message, wparam, lparam);
}
return 0;
}
ThermionWindow::ThermionWindow(int width,
int height,
int left,
int top) : _width(width), _height(height), _left(left), _top(top) {
PrintDefaultGPU();
auto window_class = WNDCLASSEX{};
::SecureZeroMemory(&window_class, sizeof(window_class));
window_class.cbSize = sizeof(window_class);
window_class.style = CS_HREDRAW | CS_VREDRAW | CS_OWNDC;
window_class.lpfnWndProc = FilamentWindowProc;
window_class.hInstance = GetModuleHandle(nullptr);
window_class.lpszClassName = L"THERMION_WINDOW";
window_class.hCursor = ::LoadCursorW(nullptr, IDC_ARROW);
window_class.hbrBackground = ::CreateSolidBrush(RGB(0,255,0));
::RegisterClassExW(&window_class);
// Create a normal popup window without forcing it to be topmost
_windowHandle = ::CreateWindowW(
L"THERMION_WINDOW",
L"thermion_window",
WS_OVERLAPPEDWINDOW,
left, top, width, height,
nullptr, nullptr,
GetModuleHandle(nullptr),
nullptr
);
// Store the this pointer for use in window procedure
::SetWindowLongPtr(_windowHandle, GWLP_USERDATA, reinterpret_cast<LONG_PTR>(this));
// Disable DWM animations
auto disable_window_transitions = TRUE;
DwmSetWindowAttribute(_windowHandle, DWMWA_TRANSITIONS_FORCEDISABLED,
&disable_window_transitions,
sizeof(disable_window_transitions));
::ShowWindow(_windowHandle, SW_SHOW);
UpdateWindow(_windowHandle);
}
void ThermionWindow::Resize(int width, int height, int left, int top) {
_width = width;
_height = height;
_left = left;
_top = top;
::SetWindowPos(_windowHandle, nullptr, left, top, width, height,
SWP_NOZORDER | SWP_NOACTIVATE);
}
HWND ThermionWindow::GetHandle() { return _windowHandle; }
} // namespace thermion

View File

@@ -0,0 +1,14 @@
#pragma once
#ifdef IS_DLL
#define EMSCRIPTEN_KEEPALIVE __declspec(dllimport)
#else
#define EMSCRIPTEN_KEEPALIVE __declspec(dllexport)
#endif
extern "C" {
intptr_t create_thermion_window(int width, int height, int left, int top);
void update();
}

View File

@@ -0,0 +1,42 @@
name: cli_windows
description: A sample command-line application with basic argument parsing.
version: 0.0.1
# repository: https://github.com/my_org/my_repo
environment:
sdk: ^3.6.0-326.0.dev
# Add regular dependencies here.
dependencies:
args: ^2.5.0
thermion_dart:
path: ../../../thermion_dart
ffi: ^2.1.3
vector_math: ^2.1.4
native_toolchain_c: ^0.4.2
native_assets_cli: ^0.6.1
dev_dependencies:
lints: ^5.0.0
test: ^1.24.0
ffigen: ^13.0.0
ffigen:
output: 'lib/thermion_window.g.dart'
headers:
entry-points:
- 'native/thermion_window.h'
include-directives:
- 'native/thermion_window.h'
ffi-native:
assetId: package:cli_windows/thermion_window.dart
ignore-source-errors: true
llvm-path:
- E:\clang+llvm-19.1.3-x86_64-pc-windows-msvc\bin
- E:\clang+llvm-19.1.3-x86_64-pc-windows-msvc\
- E:\clang+llvm-19.1.3-x86_64-pc-windows-msvc\lib
functions:
leaf:
include:
- '.*'

View File

@@ -0,0 +1 @@
../../assets

View File

@@ -1 +0,0 @@
../../../assets/cube.glb

View File

@@ -1 +0,0 @@
../../../assets/default_env_ibl.ktx

View File

@@ -1 +0,0 @@
../../../assets/default_env_skybox.ktx

View File

@@ -15,13 +15,23 @@ dependencies:
win32: 5.5.1
web: 1.0.0
thermion_flutter: ^0.2.1-dev.8
thermion_flutter: ^0.2.1-dev.9
dev_dependencies:
flutter_test:
sdk: flutter
flutter_lints: ^4.0.0
dependency_overrides:
thermion_dart:
path: ../../../thermion_dart
thermion_flutter:
path: ../../../thermion_flutter/thermion_flutter
thermion_flutter_ffi:
path: ../../../thermion_flutter/thermion_flutter_ffi
thermion_flutter_platform_interface:
path: ../../../thermion_flutter/thermion_flutter_platform_interface
flutter:
uses-material-design: true
assets:

View File

@@ -39,7 +39,7 @@ add_definitions(-DUNICODE -D_UNICODE)
# of modifying this function.
function(APPLY_STANDARD_SETTINGS TARGET)
target_compile_features(${TARGET} PUBLIC cxx_std_17)
target_compile_options(${TARGET} PRIVATE /W4 /WX /wd"4100")
target_compile_options(${TARGET} PRIVATE /W4 /wd"4100")
target_compile_options(${TARGET} PRIVATE /EHsc)
target_compile_definitions(${TARGET} PRIVATE "_HAS_EXCEPTIONS=0")
target_compile_definitions(${TARGET} PRIVATE "$<$<CONFIG:Debug>:_DEBUG>")

View File

@@ -0,0 +1 @@
../../assets

View File

@@ -1 +0,0 @@
../../../assets/cube.glb

View File

@@ -1 +0,0 @@
../../../assets/default_env_ibl.ktx

View File

@@ -1 +0,0 @@
../../../assets/default_env_skybox.ktx

View File

@@ -87,6 +87,7 @@
93162ABED09E78126BD3CDE5 /* Pods_Runner.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Runner.framework; sourceTree = BUILT_PRODUCTS_DIR; };
9491FF37DFB0425E4EA0B397 /* Pods_RunnerTests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_RunnerTests.framework; sourceTree = BUILT_PRODUCTS_DIR; };
9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = Debug.xcconfig; sourceTree = "<group>"; };
DB0270912CD09BDD00E05CE4 /* RunnerDebug.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = RunnerDebug.entitlements; sourceTree = "<group>"; };
E5EDF04F05E94A7EC21CBB16 /* Pods-RunnerTests.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RunnerTests.profile.xcconfig"; path = "Target Support Files/Pods-RunnerTests/Pods-RunnerTests.profile.xcconfig"; sourceTree = "<group>"; };
/* End PBXFileReference section */
@@ -188,6 +189,7 @@
33FAB671232836740065AC1E /* Runner */ = {
isa = PBXGroup;
children = (
DB0270912CD09BDD00E05CE4 /* RunnerDebug.entitlements */,
33CC10F02044A3C60003C045 /* AppDelegate.swift */,
33CC11122044BFA00003C045 /* MainFlutterWindow.swift */,
33E51913231747F40026EE4D /* DebugProfile.entitlements */,
@@ -703,7 +705,7 @@
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_ENTITLEMENTS = Runner/DebugProfile.entitlements;
CODE_SIGN_ENTITLEMENTS = Runner/RunnerDebug.entitlements;
CODE_SIGN_STYLE = Automatic;
COMBINE_HIDPI_IMAGES = YES;
INFOPLIST_FILE = Runner/Info.plist;

View File

@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>com.apple.security.cs.allow-jit</key>
<true/>
</dict>
</plist>

View File

@@ -16,6 +16,16 @@ dependencies:
web: 1.0.0
thermion_flutter: ^0.2.1-dev.7
dependency_overrides:
thermion_dart:
path: ../../../thermion_dart
thermion_flutter:
path: ../../../thermion_flutter/thermion_flutter
thermion_flutter_ffi:
path: ../../../thermion_flutter/thermion_flutter_ffi
thermion_flutter_platform_interface:
path: ../../../thermion_flutter/thermion_flutter_platform_interface
dev_dependencies:
flutter_test:
sdk: flutter

View File

@@ -13,10 +13,6 @@ material {
{
type : int,
name : baseColorIndex
},
{
type : float2,
name : uvScale
}
],
depthWrite : true,

View File

@@ -1,3 +1,178 @@
version https://git-lfs.github.com/spec/v1
oid sha256:bca5e20d7fa68fbc2bb7fa3cd65b07e0ac35c8cf961686cfaa267a941ab96d8f
size 7393
material {
name : unlit_fade,
requires : [ uv0, uv1, color ],
shadingModel : ${SHADINGMODEL},
blending : ${BLENDING},
doubleSided : ${DOUBLESIDED},
transparency : ${TRANSPARENCY},
flipUV : false,
specularAmbientOcclusion : simple,
specularAntiAliasing : true,
clearCoatIorChange : false,
reflections : screenspace,
parameters : [
{ type : float3, name : specularFactor },
{ type : float, name : glossinessFactor },
// Base Color
{ type : int, name : baseColorIndex },
{ type : float4, name : baseColorFactor },
{ type : sampler2d, name : baseColorMap },
{ type : mat3, name : baseColorUvMatrix, precision: high },
// Metallic-Roughness Map
{ type : int, name : metallicRoughnessIndex },
{ type : float, name : metallicFactor },
{ type : float, name : roughnessFactor },
{ type : sampler2d, name : metallicRoughnessMap },
{ type : mat3, name : metallicRoughnessUvMatrix, precision: high },
// Normal Map
{ type : int, name : normalIndex },
{ type : float, name : normalScale },
{ type : sampler2d, name : normalMap },
{ type : mat3, name : normalUvMatrix, precision: high },
// Ambient Occlusion
{ type : int, name : aoIndex },
{ type : float, name : aoStrength },
{ type : sampler2d, name : occlusionMap },
{ type : mat3, name : occlusionUvMatrix, precision: high },
// Emissive Map
{ type : int, name : emissiveIndex },
{ type : float3, name : emissiveFactor },
{ type : float, name : emissiveStrength },
{ type : sampler2d, name : emissiveMap },
{ type : mat3, name : emissiveUvMatrix, precision: high },
// Clear coat
{ type : float, name : clearCoatFactor },
{ type : float, name : clearCoatRoughnessFactor },
{ type : int, name : clearCoatIndex },
{ type : sampler2d, name : clearCoatMap },
{ type : mat3, name : clearCoatUvMatrix, precision: high },
{ type : int, name : clearCoatRoughnessIndex },
{ type : sampler2d, name : clearCoatRoughnessMap },
{ type : mat3, name : clearCoatRoughnessUvMatrix, precision: high },
{ type : int, name : clearCoatNormalIndex },
{ type : sampler2d, name : clearCoatNormalMap },
{ type : mat3, name : clearCoatNormalUvMatrix, precision: high },
{ type : float, name : clearCoatNormalScale },
// Reflectance
{ type : float, name : reflectance }
${CUSTOM_PARAMS}
],
}
vertex {
void materialVertex(inout MaterialVertexInputs material) {
${CUSTOM_VERTEX}
}
}
fragment {
void material(inout MaterialInputs material) {
highp float2 uvs[2];
uvs[0] = getUV0();
uvs[1] = getUV1();
#if !defined(SHADING_MODEL_UNLIT)
if (materialParams.normalIndex > -1) {
highp float2 uv = uvs[materialParams.normalIndex];
uv = (vec3(uv, 1.0) * materialParams.normalUvMatrix).xy;
material.normal = texture(materialParams_normalMap, uv).xyz * 2.0 - 1.0;
material.normal.xy *= materialParams.normalScale;
}
#if defined(SHADING_MODEL_LIT)
if (materialParams.clearCoatNormalIndex > -1) {
highp float2 uv = uvs[materialParams.clearCoatNormalIndex];
uv = (vec3(uv, 1.0) * materialParams.clearCoatNormalUvMatrix).xy;
material.clearCoatNormal = texture(materialParams_clearCoatNormalMap, uv).xyz * 2.0 - 1.0;
material.clearCoatNormal.xy *= materialParams.clearCoatNormalScale;
}
#endif
#endif
prepareMaterial(material);
material.baseColor = materialParams.baseColorFactor;
if (materialParams.baseColorIndex > -1) {
highp float2 uv = uvs[materialParams.baseColorIndex];
uv = (vec3(uv, 1.0) * materialParams.baseColorUvMatrix).xy;
material.baseColor *= texture(materialParams_baseColorMap, uv);
}
#if defined(BLEND_MODE_TRANSPARENT)
material.baseColor.rgb *= material.baseColor.a;
#endif
material.baseColor *= getColor();
#if !defined(SHADING_MODEL_UNLIT)
#if defined(SHADING_MODEL_LIT)
material.roughness = materialParams.roughnessFactor;
material.metallic = materialParams.metallicFactor;
// KHR_materials_clearcoat forbids clear coat from
// being applied in the specular/glossiness model
material.clearCoat = materialParams.clearCoatFactor;
material.clearCoatRoughness = materialParams.clearCoatRoughnessFactor;
if (materialParams.clearCoatIndex > -1) {
highp float2 uv = uvs[materialParams.clearCoatIndex];
uv = (vec3(uv, 1.0) * materialParams.clearCoatUvMatrix).xy;
material.clearCoat *= texture(materialParams_clearCoatMap, uv).r;
}
if (materialParams.clearCoatRoughnessIndex > -1) {
highp float2 uv = uvs[materialParams.clearCoatRoughnessIndex];
uv = (vec3(uv, 1.0) * materialParams.clearCoatRoughnessUvMatrix).xy;
material.clearCoatRoughness *= texture(materialParams_clearCoatRoughnessMap, uv).g;
}
#endif
material.emissive = vec4(materialParams.emissiveStrength *
materialParams.emissiveFactor.rgb, 0.0);
#if defined(SHADING_MODEL_SPECULAR_GLOSSINESS)
material.glossiness = materialParams.glossinessFactor;
material.specularColor = materialParams.specularFactor;
#else
material.reflectance = materialParams.reflectance;
#endif
if (materialParams.metallicRoughnessIndex > -1) {
highp float2 uv = uvs[materialParams.metallicRoughnessIndex];
uv = (vec3(uv, 1.0) * materialParams.metallicRoughnessUvMatrix).xy;
#if defined(SHADING_MODEL_SPECULAR_GLOSSINESS)
vec4 sg = texture(materialParams_metallicRoughnessMap, uv);
material.specularColor *= sg.rgb;
material.glossiness *= sg.a;
#else
vec4 mr = texture(materialParams_metallicRoughnessMap, uv);
material.roughness *= mr.g;
material.metallic *= mr.b;
#endif
}
if (materialParams.aoIndex > -1) {
highp float2 uv = uvs[materialParams.aoIndex];
uv = (vec3(uv, 1.0) * materialParams.occlusionUvMatrix).xy;
float occlusion = texture(materialParams_occlusionMap, uv).r;
material.ambientOcclusion = 1.0 + materialParams.aoStrength * (occlusion - 1.0);
}
if (materialParams.emissiveIndex > -1) {
highp float2 uv = uvs[materialParams.emissiveIndex];
uv = (vec3(uv, 1.0) * materialParams.emissiveUvMatrix).xy;
material.emissive.rgb *= texture(materialParams_emissiveMap, uv).rgb;
}
#endif
${CUSTOM_FRAGMENT}
}
}

View File

@@ -1,5 +1,5 @@
material {
name : Gizmo,
name : UnlitFixedSize,
parameters : [
{
type : mat4,
@@ -8,8 +8,13 @@
},
{
type : float4,
name : color,
name : baseColorFactor,
precision : low
},
{
type: float, // the number of world-space units between the camera and the (unscaled) gizmo
name: scale,
precision: low
}
],
depthWrite : true,
@@ -24,14 +29,13 @@
vertex {
void materialVertex(inout MaterialVertexInputs material) {
// we want to ensure the gizmo has the same size (in screen-space), no matter the distance from the camera
// we do this by scaling the model-space vertex positions by the distance from the camera
// the object should have the same size (in screen-space), no matter the distance from the camera
// scale the model-space vertex positions by the distance from the camera
vec4 modelSpace = getPosition();
vec4 worldSpace = getWorldFromModelMatrix() * modelSpace;
vec4 viewSpace = getViewFromWorldMatrix() * worldSpace;
float distanceFromCamera = length(viewSpace.xyz);
modelSpace.xyz *= (distanceFromCamera / 4.0f); // divide by 4 so that the size is equivalent to the camera being 4 world-space units away from the (unscaled) gizmo
modelSpace.xyz *= (distanceFromCamera / materialParams.scale);
worldSpace = getWorldFromModelMatrix() * modelSpace;
material.worldPosition = worldSpace;
@@ -44,7 +48,7 @@
fragment {
void material(inout MaterialInputs material) {
prepareMaterial(material);
material.baseColor = materialParams.color;
material.baseColor = materialParams.baseColorFactor;
}
}

View File

@@ -1,3 +1,66 @@
## 0.2.1-dev.18.0
- **FEAT**: add MaterialInstance.setDepthFunc.
## 0.2.1-dev.0.0.17
- **FIX**: remove superfluous ceil() calls for picking coordinates.
- **FIX**: remove superfluous ceil() calls for picking coordinates.
- **FIX**: reduce size of pick functor for compatibility with armeabi-v7a.
- **FIX**: reduce size of pick functor for compatibility with armeabi-v7a.
- **FEAT**: add Dart methods for getRenderableBoundingBox, setParameterInt and setParameterFloat4.
- **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.
- **FEAT**: expose zoomSensitivity argument for flight input handler.
- **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.
- **FEAT**: expose zoomSensitivity argument for flight input handler.
- **FEAT**: sanitize file paths in build.dart for Windows compatibility.
- **FEAT**: pass through fragment coordinates for picking.
- **FEAT**: sanitize file paths in build.dart for Windows compatibility.
- **FEAT**: pass through fragment coordinates for picking.
## 0.2.1-dev.0.0.16
- **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.
## 0.2.1-dev.0.0.15
- **FIX**: remove superfluous ceil() calls for picking coordinates.
- **FEAT**: expose zoomSensitivity argument for flight input handler.
## 0.2.1-dev.0.0.14
- **FIX**: reduce size of pick functor for compatibility with armeabi-v7a.
- **FEAT**: sanitize file paths in build.dart for Windows compatibility.
- **FEAT**: pass through fragment coordinates for picking.
- **FEAT**: pass through fragment coordinates for picking.
## 0.2.1-dev.0.0.13
- **FIX**: properly pass through loadResourcesAsync flag for loadGlbFromBuffer.
- **FIX**: properly pass through loadResourcesAsync flag for loadGlbFromBuffer.
- **FEAT**: pass through fragment coordinates for picking.
- **FEAT**: add SCALE2_MOVE InputType.
- **FEAT**: add SCALE2_MOVE InputType.
## 0.2.1-dev.0.0.12
- **FIX**: properly pass through loadResourcesAsync flag for loadGlbFromBuffer.
- **FIX**: properly pass through loadResourcesAsync flag for loadGlbFromBuffer.
- **FEAT**: add SCALE2_MOVE InputType.
- **FEAT**: add SCALE2_MOVE InputType.
## 0.2.1-dev.0.0.12
- **FIX**: properly pass through loadResourcesAsync flag for loadGlbFromBuffer.
- **FEAT**: add SCALE2_MOVE InputType.
## 0.2.1-dev.0.0.11
> Note: This release has breaking changes.
- **FEAT**: add SCALE2_ROTATE to InputHandler.
- **BREAKING** **FEAT**: expose velocity, rotation and timestamp for scale events in listener. accept rotationSensitivity/zoomSensitivity for FixedOrbitRotateInputHandlerDelegate.
## 0.2.1-dev.0.0.10
> Note: This release has breaking changes.

View File

@@ -3,7 +3,7 @@
<p align="center">
<a href="https://thermion.dev/quickstart">Quickstart (Flutter)</a> •
<a href="https://thermion.dev/quickstart">Documentation</a> •
<a href="https://thermion.dev/examples">Showcase</a> •
<a href="https://thermion.dev/showcase">Showcase</a> •
<a href="https://dartpad.thermion.dev/">Playground</a> •
<a href="https://discord.gg/h2VdDK3EAQ">Discord</a>
</p>

View File

@@ -1,30 +0,0 @@
cmake_minimum_required(VERSION 3.14)
set(PROJECT_NAME "thermion_windows")
project(${PROJECT_NAME} LANGUAGES C CXX)
cmake_policy(VERSION 3.14...3.25)
add_compile_definitions(WGL_USE_BACKING_WINDOW)
add_compile_definitions(UNICODE)
add_library(${PROJECT_NAME} SHARED
"thermion_window.cpp"
)
set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON)
target_compile_features(${PROJECT_NAME} PUBLIC cxx_std_20)
target_include_directories(${PROJECT_NAME} INTERFACE
"${CMAKE_CURRENT_SOURCE_DIR}/include"
"${CMAKE_SOURCE_DIR}/../../../../thermion_dart/native/include/filament"
"${CMAKE_SOURCE_DIR}/../../../../thermion_dart/native/include"
${CMAKE_CURRENT_SOURCE_DIR}/include
)
target_link_libraries(${PROJECT_NAME} PRIVATE
Shlwapi
opengl32
dwmapi
comctl32
)

View File

@@ -1,244 +0,0 @@
#include "thermion_window.h"
#include <cstdint>
#include <iostream>
#include <chrono>
#include <thread>
#include <Windows.h>
#include <dwmapi.h>
#include <ShObjIdl.h>
#pragma comment(lib, "dwmapi.lib")
#pragma comment(lib, "comctl32.lib")
namespace thermion {
static constexpr auto kClassName = L"THERMION_WINDOW";
static constexpr auto kWindowName = L"thermion_window";
static bool was_window_hidden_due_to_minimize_ = false;
static WPARAM last_wm_size_wparam_ = SIZE_RESTORED;
uint64_t last_thread_time_ = 0;
static constexpr auto kNativeViewPositionAndShowDelay = 300;
typedef enum _WINDOWCOMPOSITIONATTRIB {
WCA_UNDEFINED = 0,
WCA_NCRENDERING_ENABLED = 1,
WCA_NCRENDERING_POLICY = 2,
WCA_TRANSITIONS_FORCEDISABLED = 3,
WCA_ALLOW_NCPAINT = 4,
WCA_CAPTION_BUTTON_BOUNDS = 5,
WCA_NONCLIENT_RTL_LAYOUT = 6,
WCA_FORCE_ICONIC_REPRESENTATION = 7,
WCA_EXTENDED_FRAME_BOUNDS = 8,
WCA_HAS_ICONIC_BITMAP = 9,
WCA_THEME_ATTRIBUTES = 10,
WCA_NCRENDERING_EXILED = 11,
WCA_NCADORNMENTINFO = 12,
WCA_EXCLUDED_FROM_LIVEPREVIEW = 13,
WCA_VIDEO_OVERLAY_ACTIVE = 14,
WCA_FORCE_ACTIVEWINDOW_APPEARANCE = 15,
WCA_DISALLOW_PEEK = 16,
WCA_CLOAK = 17,
WCA_CLOAKED = 18,
WCA_ACCENT_POLICY = 19,
WCA_FREEZE_REPRESENTATION = 20,
WCA_EVER_UNCLOAKED = 21,
WCA_VISUAL_OWNER = 22,
WCA_HOLOGRAPHIC = 23,
WCA_EXCLUDED_FROM_DDA = 24,
WCA_PASSIVEUPDATEMODE = 25,
WCA_USEDARKMODECOLORS = 26,
WCA_LAST = 27
} WINDOWCOMPOSITIONATTRIB;
typedef struct _WINDOWCOMPOSITIONATTRIBDATA {
WINDOWCOMPOSITIONATTRIB Attrib;
PVOID pvData;
SIZE_T cbData;
} WINDOWCOMPOSITIONATTRIBDATA;
typedef enum _ACCENT_STATE {
ACCENT_DISABLED = 0,
ACCENT_ENABLE_GRADIENT = 1,
ACCENT_ENABLE_TRANSPARENTGRADIENT = 2,
ACCENT_ENABLE_BLURBEHIND = 3,
ACCENT_ENABLE_ACRYLICBLURBEHIND = 4,
ACCENT_ENABLE_HOSTBACKDROP = 5,
ACCENT_INVALID_STATE = 6
} ACCENT_STATE;
typedef struct _ACCENT_POLICY {
ACCENT_STATE AccentState;
DWORD AccentFlags;
DWORD GradientColor;
DWORD AnimationId;
} ACCENT_POLICY;
typedef BOOL(WINAPI* _GetWindowCompositionAttribute)(
HWND, WINDOWCOMPOSITIONATTRIBDATA*);
typedef BOOL(WINAPI* _SetWindowCompositionAttribute)(
HWND, WINDOWCOMPOSITIONATTRIBDATA*);
static _SetWindowCompositionAttribute g_set_window_composition_attribute = NULL;
static bool g_set_window_composition_attribute_initialized = false;
typedef LONG NTSTATUS, *PNTSTATUS;
#define STATUS_SUCCESS (0x00000000)
typedef NTSTATUS(WINAPI* RtlGetVersionPtr)(PRTL_OSVERSIONINFOW);
RTL_OSVERSIONINFOW GetWindowsVersion() {
HMODULE hmodule = ::GetModuleHandleW(L"ntdll.dll");
if (hmodule) {
RtlGetVersionPtr rtl_get_version_ptr =
(RtlGetVersionPtr)::GetProcAddress(hmodule, "RtlGetVersion");
if (rtl_get_version_ptr != nullptr) {
RTL_OSVERSIONINFOW rovi = {0};
rovi.dwOSVersionInfoSize = sizeof(rovi);
if (STATUS_SUCCESS == rtl_get_version_ptr(&rovi)) {
return rovi;
}
}
}
RTL_OSVERSIONINFOW rovi = {0};
return rovi;
}
void SetWindowComposition(HWND window, int32_t accent_state,
int32_t gradient_color) {
// TODO: Look for a better available API.
if (GetWindowsVersion().dwBuildNumber >= 18362) {
if (!g_set_window_composition_attribute_initialized) {
auto user32 = ::GetModuleHandleA("user32.dll");
if (user32) {
g_set_window_composition_attribute =
reinterpret_cast<_SetWindowCompositionAttribute>(
::GetProcAddress(user32, "SetWindowCompositionAttribute"));
if (g_set_window_composition_attribute) {
g_set_window_composition_attribute_initialized = true;
}
}
}
ACCENT_POLICY accent = {static_cast<ACCENT_STATE>(accent_state), 2,
static_cast<DWORD>(gradient_color), 0};
WINDOWCOMPOSITIONATTRIBDATA data;
data.Attrib = WCA_ACCENT_POLICY;
data.pvData = &accent;
data.cbData = sizeof(accent);
g_set_window_composition_attribute(window, &data);
}
}
LRESULT CALLBACK FilamentWindowProc(HWND const window, UINT const message,
WPARAM const wparam,
LPARAM const lparam) noexcept {
switch (message) {
std::cout << message <<std::endl;
case WM_MOUSEMOVE: {
TRACKMOUSEEVENT event;
event.cbSize = sizeof(event);
event.hwndTrack = window;
event.dwFlags = TME_HOVER;
event.dwHoverTime = 200;
auto user_data = ::GetWindowLongPtr(window, GWLP_USERDATA);
if (user_data) {
HWND flutterRootWindow = reinterpret_cast<HWND>(user_data);
::SetForegroundWindow(flutterRootWindow);
LONG ex_style = ::GetWindowLong(flutterRootWindow, GWL_EXSTYLE);
ex_style &= ~(WS_EX_TRANSPARENT | WS_EX_LAYERED);
::SetWindowLong(flutterRootWindow, GWL_EXSTYLE, ex_style);
}
break;
}
case WM_ERASEBKGND: {
HDC hdc = (HDC)wparam;
RECT rect;
GetClientRect(window, &rect);
// Get the ThermionWindow instance associated with this window
ThermionWindow* thermionWindow = reinterpret_cast<ThermionWindow*>(
GetWindowLongPtr(window, GWLP_USERDATA));
if (thermionWindow) {
HBRUSH brush = CreateSolidBrush(RGB(0, 0, 255));
FillRect(hdc, &rect, brush);
DeleteObject(brush);
}
break;
}
case WM_SIZE:
break;
case WM_MOVE:
case WM_MOVING:
case WM_ACTIVATE:
case WM_WINDOWPOSCHANGED: {
// NativeViewCore::GetInstance()->SetHitTestBehavior(0);
auto user_data = ::GetWindowLongPtr(window, GWLP_USERDATA);
if (user_data) {
HWND flutterRootWindow = reinterpret_cast<HWND>(user_data);
::SetForegroundWindow(flutterRootWindow);
// NativeViewCore::GetInstance()->SetHitTestBehavior(0);
LONG ex_style = ::GetWindowLong(flutterRootWindow, GWL_EXSTYLE);
ex_style &= ~(WS_EX_TRANSPARENT | WS_EX_LAYERED);
::SetWindowLong(flutterRootWindow, GWL_EXSTYLE, ex_style);
}
break;
}
default:
break;
}
return ::DefWindowProc(window, message, wparam, lparam);
}
ThermionWindow::ThermionWindow(int width,
int height,
int left,
int top) : _width(width), _height(height), _left(left), _top(top) {
// create the HWND for Filament
auto window_class = WNDCLASSEX{};
::SecureZeroMemory(&window_class, sizeof(window_class));
window_class.cbSize = sizeof(window_class);
window_class.style = CS_HREDRAW | CS_VREDRAW;
window_class.lpfnWndProc = FilamentWindowProc;
window_class.hInstance = 0;
window_class.lpszClassName = kClassName;
window_class.hCursor = ::LoadCursorW(nullptr, IDC_ARROW);
window_class.hbrBackground = ::CreateSolidBrush(RGB(0,255,0));
::RegisterClassExW(&window_class);
_windowHandle = ::CreateWindow(kClassName, kWindowName, WS_OVERLAPPEDWINDOW,
0, 0, _width, _height, nullptr,
nullptr, GetModuleHandle(nullptr), nullptr);
// Disable DWM animations
auto disable_window_transitions = TRUE;
DwmSetWindowAttribute(_windowHandle, DWMWA_TRANSITIONS_FORCEDISABLED,
&disable_window_transitions,
sizeof(disable_window_transitions));
auto style = ::GetWindowLong(_windowHandle, GWL_STYLE);
style &= ~(WS_CAPTION | WS_THICKFRAME | WS_MINIMIZEBOX | WS_MAXIMIZEBOX |
WS_EX_APPWINDOW);
::SetWindowLong(_windowHandle, GWL_STYLE, style);
// // remove taskbar entry for the window we created
// ITaskbarList3* taskbar = nullptr;
// ::CoCreateInstance(CLSID_TaskbarList, 0, CLSCTX_INPROC_SERVER,
// IID_PPV_ARGS(&taskbar));
// taskbar->DeleteTab(_windowHandle);
// taskbar->Release();
::ShowWindow(_windowHandle, SW_SHOW);
UpdateWindow(_windowHandle);
}
void ThermionWindow::Resize(int width, int height, int left, int top) {
_width = width;
_height = height;
_left = left;
_top = top;
}
HWND ThermionWindow::GetHandle() { return _windowHandle; }
} // namespace thermion_flutter

View File

@@ -1,57 +0,0 @@
#pragma once
#ifdef _WIN32
#ifdef IS_DLL
#define EMSCRIPTEN_KEEPALIVE __declspec(dllimport)
#else
#define EMSCRIPTEN_KEEPALIVE __declspec(dllexport)
#endif
#include <cstdint>
#include <iostream>
#include <Windows.h>
namespace thermion {
///
/// Instantiating a ThermionWindow creates a HWND that can be passed
/// to Filament to create a swapchain.
///
///
class ThermionWindow {
public:
ThermionWindow(
int width,
int height,
int left,
int top);
HWND GetHandle();
void Resize(int width, int height, int left, int top);
private:
HWND _windowHandle;
uint32_t _width = 0;
uint32_t _height = 0;
uint32_t _left = 0;
uint32_t _top = 0;
};
static ThermionWindow* _window;
extern "C" {
EMSCRIPTEN_KEEPALIVE intptr_t create_thermion_window(int width, int height, int left, int top) {
_window = new ThermionWindow(width, height, left, top);
return (intptr_t)_window->GetHandle();
}
EMSCRIPTEN_KEEPALIVE void update() {
MSG msg;
if(GetMessage(&msg, NULL, 0, 0))
{
TranslateMessage(&msg);
DispatchMessage(&msg);
}
}
}
}
#endif

View File

@@ -13,6 +13,7 @@ headers:
- '../native/include/TView.h'
- '../native/include/TCamera.h'
- '../native/include/TGizmo.h'
- '../native/include/TMaterialInstance.h'
- '../native/include/ResourceBuffer.h'
- '../native/include/APIBoundaryTypes.h'
ffi-native:

View File

@@ -3,11 +3,16 @@ import 'package:archive/archive.dart';
import 'package:logging/logging.dart';
import 'package:native_assets_cli/native_assets_cli.dart';
import 'package:native_toolchain_c/native_toolchain_c.dart';
import 'package:path/path.dart' as path;
void main(List<String> args) async {
await build(args, (config, output) async {
var logFile = File(
"${config.packageRoot.toFilePath()}.dart_tool/thermion_dart/log/build.log");
var pkgRootFilePath =
config.packageRoot.toFilePath(windows: Platform.isWindows);
var logPath = path.join(
pkgRootFilePath, ".dart_tool", "thermion_dart", "log", "build.log");
var logFile = File(logPath);
if (!logFile.parent.existsSync()) {
logFile.parent.createSync(recursive: true);
}
@@ -21,8 +26,9 @@ void main(List<String> args) async {
var platform = config.targetOS.toString().toLowerCase();
if(!config.dryRun) {
logger.info("Building Thermion for ${config.targetOS} in mode ${config.buildMode.name}");
if (!config.dryRun) {
logger.info(
"Building Thermion for ${config.targetOS} in mode ${config.buildMode.name}");
}
// We don't support Linux (yet), so the native/Filament libraries won't be
@@ -50,16 +56,23 @@ void main(List<String> args) async {
final packageName = config.packageName;
final sources = Directory("${config.packageRoot.toFilePath()}/native/src")
var sources = Directory(path.join(pkgRootFilePath, "native", "src"))
.listSync(recursive: true)
.whereType<File>()
.map((f) => f.path)
.where((f) => !(f.contains("CMakeLists") || f.contains("main.cpp")))
.toList();
if (config.targetOS != OS.windows) {
sources = sources.where((p) => !p.contains("windows")).toList();
}
sources.addAll([
"${config.packageRoot.toFilePath()}/native/include/material/gizmo_material.c",
"${config.packageRoot.toFilePath()}/native/include/material/image.c",
"${config.packageRoot.toFilePath()}/native/include/material/grid.c",
"${config.packageRoot.toFilePath()}/native/include/material/unlit.c",
path.join(pkgRootFilePath, "native", "include", "material",
"unlit_fixed_size.c"),
path.join(pkgRootFilePath, "native", "include", "material", "image.c"),
path.join(pkgRootFilePath, "native", "include", "material", "grid.c"),
path.join(pkgRootFilePath, "native", "include", "material", "unlit.c"),
]);
var libs = [
@@ -91,17 +104,11 @@ void main(List<String> args) async {
];
if (platform == "windows") {
libDir = Directory(libDir).uri.toFilePath();
libs = libs.map((lib) => "${libDir}${lib}.lib").toList();
libs.addAll(["${libDir}bluevk.lib", "${libDir}bluegl.lib"]);
libs.addAll([
"gdi32.lib",
"user32.lib",
"shell32.lib",
"opengl32.lib",
"dwmapi.lib",
"comctl32.lib"
]);
// we just need the libDir and don't need to explicitly link the actual libs
// (these are linked via ThermionWin32.h)
libDir = Directory(libDir)
.uri
.toFilePath(windows: config.targetOS == OS.windows);
} else {
libs.add("stdc++");
}
@@ -111,21 +118,19 @@ void main(List<String> args) async {
if (platform != "windows") {
flags.addAll(['-std=c++17']);
} else if(!config.dryRun) {
} else if (!config.dryRun) {
defines["WIN32"] = "1";
defines["_DLL"] = "1";
if(config.buildMode == BuildMode.debug) {
if (config.buildMode == BuildMode.debug) {
defines["_DEBUG"] = "1";
} else {
} else {
defines["RELEASE"] = "1";
defines["NDEBUG"] = "1";
}
flags.addAll([
"/std:c++20",
if(config.buildMode == BuildMode.debug)
...["/MDd","/Zi"],
if(config.buildMode == BuildMode.release)
"/MD",
if (config.buildMode == BuildMode.debug) ...["/MDd", "/Zi"],
if (config.buildMode == BuildMode.release) "/MD",
"/VERBOSE",
...defines.keys.map((k) => "/D$k=${defines[k]}").toList()
]);
@@ -169,11 +174,14 @@ void main(List<String> args) async {
if (platform == "ios") '-mios-version-min=13.0',
...flags,
...frameworks,
if (platform != "windows") ...libs.map((lib) => "-l$lib"),
if (platform != "windows") "-L$libDir",
if (platform != "windows") ...[
...libs.map((lib) => "-l$lib"),
"-L$libDir"
],
if (platform == "windows") ...[
"/I${config.packageRoot.toFilePath()}\\native\\include",
"/I${config.packageRoot.toFilePath()}native\\include\\filament",
"/I${path.join(pkgRootFilePath, "native", "include")}",
"/I${path.join(pkgRootFilePath, "native", "include", "filament")}",
"/I${path.join(pkgRootFilePath, "native", "include", "windows", "vulkan")}",
...sources,
'/link',
"/LIBPATH:$libDir",
@@ -224,18 +232,46 @@ void main(List<String> args) async {
architecture: config.targetArchitecture));
}
}
// do we need this?
if (config.targetOS == "windows") {
output.addAsset(
NativeCodeAsset(
if (config.targetOS == OS.windows) {
var importLib = File(path.join(
config.outputDirectory.path.substring(1).replaceAll("/", "\\"),
"thermion_dart.lib"));
output.addAsset(NativeCodeAsset(
package: config.packageName,
name: "thermion_dart.lib",
linkMode: DynamicLoadingBundled(),
os: config.targetOS,
file: importLib.uri,
architecture: config.targetArchitecture));
for(final dir in ["windows/vulkan"]) { // , "filament/bluevk", "filament/vulkan"
final targetSubdir = path
.join(config.outputDirectory.path, "include", dir)
.substring(1);
if (!Directory(targetSubdir).existsSync()) {
Directory(targetSubdir).createSync(recursive: true);
}
for (var file in Directory(path.join(
pkgRootFilePath, "native", "include", dir))
.listSync()) {
if (file is File) {
final targetPath = path.join(targetSubdir, path.basename(file.path));
file.copySync(targetPath);
output.addAsset(NativeCodeAsset(
package: config.packageName,
name: "thermion_dart.dll",
name: "include/$dir/${path.basename(file.path)}",
linkMode: DynamicLoadingBundled(),
os: config.targetOS,
file: Uri.file(
config.outputDirectory.toFilePath() + "/thermion_dart.dll"),
architecture: config.targetArchitecture),
linkInPackage: config.packageName);
file: file.uri,
architecture: config.targetArchitecture));
}
}
}
}
});
}
@@ -264,8 +300,14 @@ Future<Directory> getLibDir(BuildConfig config, Logger logger) async {
mode = config.buildMode == BuildMode.debug ? "debug" : "release";
}
var libDir = Directory(
"${config.packageRoot.toFilePath()}/.dart_tool/thermion_dart/lib/${_FILAMENT_VERSION}/$platform/$mode/");
var libDir = Directory(path.join(
config.packageRoot.toFilePath(windows: Platform.isWindows),
".dart_tool",
"thermion_dart",
"lib",
_FILAMENT_VERSION,
platform,
mode));
if (platform == "android") {
final archExtension = switch (config.targetArchitecture) {
@@ -275,7 +317,7 @@ Future<Directory> getLibDir(BuildConfig config, Logger logger) async {
Architecture.ia32 => "x86",
_ => throw FormatException('Invalid')
};
libDir = Directory("${libDir.path}/$archExtension/");
libDir = Directory(path.join(libDir.path, archExtension));
} else if (platform == "windows") {
if (config.targetArchitecture != Architecture.x64) {
throw Exception(
@@ -285,15 +327,20 @@ Future<Directory> getLibDir(BuildConfig config, Logger logger) async {
logger.info("Searching for Filament libraries under ${libDir.path}");
final url = _getLibraryUrl(platform, mode);
var url = _getLibraryUrl(platform, mode);
if (config.targetOS == OS.windows) {
url = url.replaceAll(".zip", "-vulkan.zip");
}
final filename = url.split("/").last;
// We will write an empty file called success to the unzip directory after successfully downloading/extracting the prebuilt libraries.
// If this file already exists, we assume everything has been successfully extracted and skip
final unzipDir = platform == "android" ? libDir.parent.path : libDir.path;
final successToken = File("$unzipDir/success");
final libraryZip = File("$unzipDir/$filename");
final successToken = File(path.join(
unzipDir, config.targetOS == OS.windows ? "success-vulkan" : "success"));
final libraryZip = File(path.join(unzipDir, filename));
if (!successToken.existsSync()) {
if (libraryZip.existsSync()) {
@@ -328,4 +375,4 @@ Future<Directory> getLibDir(BuildConfig config, Logger logger) async {
successToken.writeAsStringSync("SUCCESS");
}
return libDir;
}
}

View File

@@ -82,6 +82,7 @@ class DelegateInputHandler implements InputHandler {
{PickDelegate? pickDelegate,
bool freeLook = false,
double panSensitivity = 0.1,
double zoomSensitivity = 0.1,
double movementSensitivity = 0.1,
double rotateSensitivity = 0.01,
double? clampY,
@@ -93,6 +94,7 @@ class DelegateInputHandler implements InputHandler {
clampY: clampY,
entity: entity,
rotationSensitivity: rotateSensitivity,
zoomSensitivity:zoomSensitivity,
panSensitivity: panSensitivity,
movementSensitivity: movementSensitivity),
actions: {
@@ -260,10 +262,10 @@ class DelegateInputHandler implements InputHandler {
}
@override
Future<void> onScaleEnd(int pointerCount) async {}
Future<void> onScaleEnd(int pointerCount, double velocity) async {}
@override
Future<void> onScaleStart(Vector2 localPosition, int pointerCount) async {
Future<void> onScaleStart(Vector2 localPosition, int pointerCount, Duration? sourceTimestamp ) async {
// noop
}
@@ -276,7 +278,9 @@ class DelegateInputHandler implements InputHandler {
double horizontalScale,
double verticalScale,
double scale,
int pointerCount) async {
int pointerCount,
double rotation,
Duration? sourceTimestamp) async {
if (pointerCount == 1) {
_inputDeltas[InputType.SCALE1] =
Vector3(focalPointDelta.x, focalPointDelta.y, 0);

View File

@@ -14,6 +14,9 @@ class FixedOrbitRotateInputHandlerDelegate implements InputHandlerDelegate {
late Future<Camera> _camera;
final double minimumDistance;
late final Vector3 target;
final double rotationSensitivity;
final double zoomSensitivity;
Vector2 _queuedRotationDelta = Vector2.zero();
double _queuedZoomDelta = 0.0;
@@ -24,6 +27,8 @@ class FixedOrbitRotateInputHandlerDelegate implements InputHandlerDelegate {
this.viewer, {
Vector3? target,
this.minimumDistance = 10.0,
this.rotationSensitivity = 0.01,
this.zoomSensitivity = 0.1,
}) {
this.target = target ?? Vector3.zero();
_camera = viewer.getMainCamera().then((Camera cam) async {
@@ -95,7 +100,7 @@ class FixedOrbitRotateInputHandlerDelegate implements InputHandlerDelegate {
// Zoom
if (_queuedZoomDelta != 0.0) {
var newPosition = currentPosition +
(currentPosition - target).scaled(_queuedZoomDelta * 0.1);
(currentPosition - target).scaled(_queuedZoomDelta * zoomSensitivity);
var distToTarget = (newPosition - target).length;
@@ -113,8 +118,8 @@ class FixedOrbitRotateInputHandlerDelegate implements InputHandlerDelegate {
await (await _camera).setModelMatrix(newViewMatrix);
}
} else if (_queuedRotationDelta.length != 0) {
double rotateX = _queuedRotationDelta.x * 0.01;
double rotateY = _queuedRotationDelta.y * 0.01;
double rotateX = _queuedRotationDelta.x * rotationSensitivity;
double rotateY = _queuedRotationDelta.y * rotationSensitivity;
var modelMatrix = await viewer.getCameraModelMatrix();
@@ -126,9 +131,8 @@ class FixedOrbitRotateInputHandlerDelegate implements InputHandlerDelegate {
var rot2 = Matrix4.identity()
..setRotation(Quaternion.axisAngle(modelMatrix.right, rotateY)
.asRotationMatrix());
modelMatrix = rot1 *
rot2 * modelMatrix;
modelMatrix = rot1 * rot2 * modelMatrix;
await (await _camera).setModelMatrix(modelMatrix);
}

View File

@@ -13,7 +13,9 @@ enum InputType {
MMB_UP,
MMB_HOVER,
SCALE1,
SCALE2,
SCALE2, // two fingers pinchin in/out
SCALE2_ROTATE, // two fingers rotating in a circle
SCALE2_MOVE, // two fingers sliding along a line
SCROLLWHEEL,
POINTER_MOVE,
KEYDOWN_W,
@@ -35,9 +37,9 @@ abstract class InputHandler {
Future<void> onPointerMove(
Vector2 localPosition, Vector2 delta, bool isMiddle);
Future<void> onPointerUp(bool isMiddle);
Future<void> onScaleStart(Vector2 focalPoint, int pointerCount);
Future<void> onScaleUpdate(Vector2 focalPoint, Vector2 focalPointDelta, double horizontalScale, double verticalScale, double scale, int pointerCount);
Future<void> onScaleEnd(int pointerCount);
Future<void> onScaleStart(Vector2 focalPoint, int pointerCount, Duration? sourceTimestamp);
Future<void> onScaleUpdate(Vector2 focalPoint, Vector2 focalPointDelta, double horizontalScale, double verticalScale, double scale, int pointerCount, double rotation, Duration? sourceTimestamp);
Future<void> onScaleEnd(int pointerCount, double velocity);
Future<bool> get initialized;
Future dispose();

View File

@@ -29,7 +29,7 @@ class FFIGizmo extends BaseGizmo {
}
void _onPickResult(DartEntityId entityId, int x, int y, Pointer<TView> view) {
_callback?.call((entity: entityId, x: x, y: y));
_callback?.call((entity: entityId, x: x, y: y, depth: 0, fragX: 0, fragY: 0, fragZ: 0));
}
///

View File

@@ -7,6 +7,76 @@ library;
import 'dart:ffi' as ffi;
@ffi.Native<ffi.Void Function(ffi.Pointer<TMaterialInstance>, ffi.Bool)>(
isLeaf: true)
external void MaterialInstance_setDepthWrite(
ffi.Pointer<TMaterialInstance> materialInstance,
bool enabled,
);
@ffi.Native<ffi.Void Function(ffi.Pointer<TMaterialInstance>, ffi.Bool)>(
isLeaf: true)
external void MaterialInstance_setDepthCulling(
ffi.Pointer<TMaterialInstance> materialInstance,
bool enabled,
);
@ffi.Native<
ffi.Void Function(ffi.Pointer<TMaterialInstance>, ffi.Pointer<ffi.Char>,
ffi.Double, ffi.Double, ffi.Double, ffi.Double)>(isLeaf: true)
external void MaterialInstance_setParameterFloat4(
ffi.Pointer<TMaterialInstance> materialInstance,
ffi.Pointer<ffi.Char> name,
double x,
double y,
double w,
double z,
);
@ffi.Native<
ffi.Void Function(ffi.Pointer<TMaterialInstance>, ffi.Pointer<ffi.Char>,
ffi.Double, ffi.Double)>(isLeaf: true)
external void MaterialInstance_setParameterFloat2(
ffi.Pointer<TMaterialInstance> materialInstance,
ffi.Pointer<ffi.Char> name,
double x,
double y,
);
@ffi.Native<
ffi.Void Function(ffi.Pointer<TMaterialInstance>, ffi.Pointer<ffi.Char>,
ffi.Double)>(isLeaf: true)
external void MaterialInstance_setParameterFloat(
ffi.Pointer<TMaterialInstance> materialInstance,
ffi.Pointer<ffi.Char> name,
double value,
);
@ffi.Native<
ffi.Void Function(ffi.Pointer<TMaterialInstance>, ffi.Pointer<ffi.Char>,
ffi.Int)>(isLeaf: true)
external void MaterialInstance_setParameterInt(
ffi.Pointer<TMaterialInstance> materialInstance,
ffi.Pointer<ffi.Char> name,
int value,
);
@ffi.Native<ffi.Void Function(ffi.Pointer<TMaterialInstance>, ffi.UnsignedInt)>(
symbol: "MaterialInstance_setDepthFunc", isLeaf: true)
external void _MaterialInstance_setDepthFunc(
ffi.Pointer<TMaterialInstance> materialInstance,
int depthFunc,
);
void MaterialInstance_setDepthFunc(
ffi.Pointer<TMaterialInstance> materialInstance,
TDepthFunc depthFunc,
) =>
_MaterialInstance_setDepthFunc(
materialInstance,
depthFunc.value,
);
@ffi.Native<
ffi.Pointer<ffi.Void> Function(LoadFilamentResourceFromOwner,
FreeFilamentResourceFromOwner, ffi.Pointer<ffi.Void>)>(isLeaf: true)
@@ -150,8 +220,15 @@ external void Viewer_setViewRenderable(
ffi.Int,
ffi.Pointer<
ffi.NativeFunction<
ffi.Void Function(EntityId entityId, ffi.Int x, ffi.Int y,
ffi.Pointer<TView> tView)>>)>(isLeaf: true)
ffi.Void Function(
EntityId entityId,
ffi.Int x,
ffi.Int y,
ffi.Pointer<TView> tView,
ffi.Float depth,
ffi.Float fragX,
ffi.Float fragY,
ffi.Float fragZ)>>)>(isLeaf: true)
external void Viewer_pick(
ffi.Pointer<TViewer> viewer,
ffi.Pointer<TView> tView,
@@ -159,11 +236,24 @@ external void Viewer_pick(
int y,
ffi.Pointer<
ffi.NativeFunction<
ffi.Void Function(EntityId entityId, ffi.Int x, ffi.Int y,
ffi.Pointer<TView> tView)>>
ffi.Void Function(
EntityId entityId,
ffi.Int x,
ffi.Int y,
ffi.Pointer<TView> tView,
ffi.Float depth,
ffi.Float fragX,
ffi.Float fragY,
ffi.Float fragZ)>>
callback,
);
@ffi.Native<ffi.Bool Function(ffi.Pointer<TViewer>, EntityId)>(isLeaf: true)
external bool Viewer_isNonPickableEntity(
ffi.Pointer<TViewer> viewer,
int entityId,
);
@ffi.Native<ffi.Pointer<TEngine> Function(ffi.Pointer<TViewer>)>(isLeaf: true)
external ffi.Pointer<TEngine> Viewer_getEngine(
ffi.Pointer<TViewer> viewer,
@@ -418,23 +508,6 @@ external ffi.Pointer<TMaterialInstance> create_material_instance(
TMaterialKey materialConfig,
);
@ffi.Native<
ffi.Pointer<TMaterialInstance> Function(
ffi.Pointer<TSceneManager>)>(isLeaf: true)
external ffi.Pointer<TMaterialInstance> SceneManager_createUnlitMaterialInstance(
ffi.Pointer<TSceneManager> sceneManager,
);
@ffi.Native<
ffi.Pointer<TMaterialInstance> Function(
ffi.Pointer<TSceneManager>, ffi.Pointer<ffi.NativeFunction<ffi.Void Function(ffi.Pointer<TMaterialInstance>)>>)>(isLeaf: true)
external ffi.Pointer<TMaterialInstance> SceneManager_createUnlitMaterialInstanceRenderThread(
ffi.Pointer<TSceneManager> sceneManager,
ffi.Pointer<ffi.NativeFunction<ffi.Void Function(ffi.Pointer<TMaterialInstance>)>>
onComplete
);
@ffi.Native<
ffi.Void Function(ffi.Pointer<TSceneManager>,
ffi.Pointer<TMaterialInstance>)>(isLeaf: true)
@@ -618,6 +691,60 @@ external int get_bone(
int boneIndex,
);
@ffi.Native<
ffi.Pointer<TGizmo> Function(ffi.Pointer<TSceneManager>, ffi.Pointer<TView>,
ffi.Pointer<TScene>)>(isLeaf: true)
external ffi.Pointer<TGizmo> SceneManager_createGizmo(
ffi.Pointer<TSceneManager> tSceneManager,
ffi.Pointer<TView> tView,
ffi.Pointer<TScene> tScene,
);
@ffi.Native<
EntityId Function(
ffi.Pointer<TSceneManager>,
ffi.Pointer<ffi.Float>,
ffi.Int,
ffi.Pointer<ffi.Float>,
ffi.Int,
ffi.Pointer<ffi.Float>,
ffi.Int,
ffi.Pointer<ffi.Uint16>,
ffi.Int,
ffi.Int,
ffi.Pointer<TMaterialInstance>,
ffi.Bool)>(isLeaf: true)
external int SceneManager_createGeometry(
ffi.Pointer<TSceneManager> sceneManager,
ffi.Pointer<ffi.Float> vertices,
int numVertices,
ffi.Pointer<ffi.Float> normals,
int numNormals,
ffi.Pointer<ffi.Float> uvs,
int numUvs,
ffi.Pointer<ffi.Uint16> indices,
int numIndices,
int primitiveType,
ffi.Pointer<TMaterialInstance> materialInstance,
bool keepData,
);
@ffi.Native<
ffi.Pointer<TMaterialInstance> Function(
ffi.Pointer<TSceneManager>)>(isLeaf: true)
external ffi.Pointer<TMaterialInstance>
SceneManager_createUnlitMaterialInstance(
ffi.Pointer<TSceneManager> sceneManager,
);
@ffi.Native<
ffi.Pointer<TMaterialInstance> Function(
ffi.Pointer<TSceneManager>)>(isLeaf: true)
external ffi.Pointer<TMaterialInstance>
SceneManager_createUnlitFixedSizeMaterialInstance(
ffi.Pointer<TSceneManager> sceneManager,
);
@ffi.Native<
ffi.Bool Function(ffi.Pointer<TSceneManager>, EntityId,
ffi.Pointer<ffi.Double>)>(isLeaf: true)
@@ -956,35 +1083,6 @@ external void remove_animation_component(
int entityId,
);
@ffi.Native<
EntityId Function(
ffi.Pointer<TSceneManager>,
ffi.Pointer<ffi.Float>,
ffi.Int,
ffi.Pointer<ffi.Float>,
ffi.Int,
ffi.Pointer<ffi.Float>,
ffi.Int,
ffi.Pointer<ffi.Uint16>,
ffi.Int,
ffi.Int,
ffi.Pointer<TMaterialInstance>,
ffi.Bool)>(isLeaf: true)
external int SceneManager_createGeometry(
ffi.Pointer<TSceneManager> sceneManager,
ffi.Pointer<ffi.Float> vertices,
int numVertices,
ffi.Pointer<ffi.Float> normals,
int numNormals,
ffi.Pointer<ffi.Float> uvs,
int numUvs,
ffi.Pointer<ffi.Uint16> indices,
int numIndices,
int primitiveType,
ffi.Pointer<TMaterialInstance> materialInstance,
bool keepData,
);
@ffi.Native<EntityId Function(ffi.Pointer<TSceneManager>, EntityId)>(
isLeaf: true)
external int get_parent(
@@ -1024,6 +1122,12 @@ external void set_priority(
int priority,
);
@ffi.Native<Aabb3 Function(ffi.Pointer<TSceneManager>, EntityId)>(isLeaf: true)
external Aabb3 SceneManager_getRenderableBoundingBox(
ffi.Pointer<TSceneManager> sceneManager,
int entity,
);
@ffi.Native<
Aabb2 Function(
ffi.Pointer<TSceneManager>, ffi.Pointer<TView>, EntityId)>(isLeaf: true)
@@ -1171,30 +1275,6 @@ external ffi.Pointer<TMaterialInstance> get_material_instance_at(
int materialIndex,
);
@ffi.Native<ffi.Void Function(ffi.Pointer<TMaterialInstance>, ffi.Bool)>(
isLeaf: true)
external void MaterialInstance_setDepthWrite(
ffi.Pointer<TMaterialInstance> materialInstance,
bool enabled,
);
@ffi.Native<ffi.Void Function(ffi.Pointer<TMaterialInstance>, ffi.Bool)>(
isLeaf: true)
external void MaterialInstance_setDepthCulling(
ffi.Pointer<TMaterialInstance> materialInstance,
bool enabled,
);
@ffi.Native<
ffi.Void Function(ffi.Pointer<TMaterialInstance>, ffi.Pointer<ffi.Char>,
ffi.Double, ffi.Double)>(isLeaf: true)
external void MaterialInstance_setParameterFloat2(
ffi.Pointer<TMaterialInstance> materialInstance,
ffi.Pointer<ffi.Char> name,
double x,
double y,
);
@ffi.Native<TViewport Function(ffi.Pointer<TView>)>(isLeaf: true)
external TViewport View_getViewport(
ffi.Pointer<TView> view,
@@ -1441,6 +1521,24 @@ external void Viewer_loadIblRenderThread(
ffi.Pointer<ffi.NativeFunction<ffi.Void Function()>> onComplete,
);
@ffi.Native<
ffi.Void Function(
ffi.Pointer<TViewer>,
ffi.IntPtr,
ffi.Uint32,
ffi.Uint32,
ffi.Pointer<
ffi.NativeFunction<
ffi.Void Function(ffi.Pointer<TRenderTarget>)>>)>(isLeaf: true)
external void Viewer_createRenderTargetRenderThread(
ffi.Pointer<TViewer> viewer,
int texture,
int width,
int height,
ffi.Pointer<ffi.NativeFunction<ffi.Void Function(ffi.Pointer<TRenderTarget>)>>
onComplete,
);
@ffi.Native<
ffi.Void Function(
ffi.Pointer<TView>, ffi.Pointer<TEngine>, ffi.Int)>(isLeaf: true)
@@ -1527,6 +1625,38 @@ external void remove_skybox_render_thread(
ffi.Pointer<TViewer> viewer,
);
@ffi.Native<
ffi.Void Function(
ffi.Pointer<TSceneManager>,
ffi.Pointer<ffi.Float>,
ffi.Int,
ffi.Pointer<ffi.Float>,
ffi.Int,
ffi.Pointer<ffi.Float>,
ffi.Int,
ffi.Pointer<ffi.Uint16>,
ffi.Int,
ffi.Int,
ffi.Pointer<TMaterialInstance>,
ffi.Bool,
ffi.Pointer<ffi.NativeFunction<ffi.Void Function(EntityId)>>)>(
isLeaf: true)
external void SceneManager_createGeometryRenderThread(
ffi.Pointer<TSceneManager> sceneManager,
ffi.Pointer<ffi.Float> vertices,
int numVertices,
ffi.Pointer<ffi.Float> normals,
int numNormals,
ffi.Pointer<ffi.Float> uvs,
int numUvs,
ffi.Pointer<ffi.Uint16> indices,
int numIndices,
int primitiveType,
ffi.Pointer<TMaterialInstance> materialInstance,
bool keepData,
ffi.Pointer<ffi.NativeFunction<ffi.Void Function(EntityId)>> callback,
);
@ffi.Native<
ffi.Void Function(
ffi.Pointer<TSceneManager>,
@@ -1551,6 +1681,34 @@ external void SceneManager_loadGlbFromBufferRenderThread(
ffi.Pointer<ffi.NativeFunction<ffi.Void Function(EntityId)>> callback,
);
@ffi.Native<
ffi.Void Function(
ffi.Pointer<TSceneManager>,
ffi.Pointer<
ffi.NativeFunction<
ffi.Void Function(
ffi.Pointer<TMaterialInstance>)>>)>(isLeaf: true)
external void SceneManager_createUnlitMaterialInstanceRenderThread(
ffi.Pointer<TSceneManager> sceneManager,
ffi.Pointer<
ffi.NativeFunction<ffi.Void Function(ffi.Pointer<TMaterialInstance>)>>
callback,
);
@ffi.Native<
ffi.Void Function(
ffi.Pointer<TSceneManager>,
ffi.Pointer<
ffi.NativeFunction<
ffi.Void Function(
ffi.Pointer<TMaterialInstance>)>>)>(isLeaf: true)
external void SceneManager_createUnlitFixedSizeMaterialInstanceRenderThread(
ffi.Pointer<TSceneManager> sceneManager,
ffi.Pointer<
ffi.NativeFunction<ffi.Void Function(ffi.Pointer<TMaterialInstance>)>>
callback,
);
@ffi.Native<
ffi.Void Function(
ffi.Pointer<TSceneManager>,
@@ -1751,38 +1909,6 @@ external void reset_to_rest_pose_render_thread(
ffi.Pointer<ffi.NativeFunction<ffi.Void Function()>> callback,
);
@ffi.Native<
ffi.Void Function(
ffi.Pointer<TSceneManager>,
ffi.Pointer<ffi.Float>,
ffi.Int,
ffi.Pointer<ffi.Float>,
ffi.Int,
ffi.Pointer<ffi.Float>,
ffi.Int,
ffi.Pointer<ffi.Uint16>,
ffi.Int,
ffi.Int,
ffi.Pointer<TMaterialInstance>,
ffi.Bool,
ffi.Pointer<ffi.NativeFunction<ffi.Void Function(EntityId)>>)>(
isLeaf: true)
external void SceneManager_createGeometryRenderThread(
ffi.Pointer<TSceneManager> sceneManager,
ffi.Pointer<ffi.Float> vertices,
int numVertices,
ffi.Pointer<ffi.Float> normals,
int numNormals,
ffi.Pointer<ffi.Float> uvs,
int numUvs,
ffi.Pointer<ffi.Uint16> indices,
int numIndices,
int primitiveType,
ffi.Pointer<TMaterialInstance> materialInstance,
bool keepData,
ffi.Pointer<ffi.NativeFunction<ffi.Void Function(EntityId)>> callback,
);
@ffi.Native<
ffi.Void Function(
ffi.Pointer<TViewer>,
@@ -2003,15 +2129,6 @@ void Camera_setProjection(
far,
);
@ffi.Native<
ffi.Pointer<TGizmo> Function(ffi.Pointer<TEngine>, ffi.Pointer<TView>,
ffi.Pointer<TScene>)>(isLeaf: true)
external ffi.Pointer<TGizmo> Gizmo_new(
ffi.Pointer<TEngine> tEngine,
ffi.Pointer<TView> tView,
ffi.Pointer<TScene> tScene,
);
@ffi.Native<
ffi.Void Function(ffi.Pointer<TGizmo>, ffi.Uint32, ffi.Uint32,
GizmoPickCallback)>(isLeaf: true)
@@ -2028,10 +2145,51 @@ external void Gizmo_setVisibility(
bool visible,
);
final class TCamera extends ffi.Opaque {}
final class TMaterialInstance extends ffi.Opaque {}
enum TDepthFunc {
/// !< Less or equal
LE(0),
/// !< Greater or equal
GE(1),
/// !< Strictly less than
L(2),
/// !< Strictly greater than
G(3),
/// !< Equal
E(4),
/// !< Not equal
NE(5),
/// !< Always. Depth / stencil testing is deactivated.
A(6),
/// !< Never. The depth / stencil test always fails.
N(7);
final int value;
const TDepthFunc(this.value);
static TDepthFunc fromValue(int value) => switch (value) {
0 => LE,
1 => GE,
2 => L,
3 => G,
4 => E,
5 => NE,
6 => A,
7 => N,
_ => throw ArgumentError("Unknown value for TDepthFunc: $value"),
};
}
final class TCamera extends ffi.Opaque {}
final class TEngine extends ffi.Opaque {}
final class TEntityManager extends ffi.Opaque {}
@@ -2220,6 +2378,26 @@ final class Aabb2 extends ffi.Struct {
external double maxY;
}
final class Aabb3 extends ffi.Struct {
@ffi.Float()
external double centerX;
@ffi.Float()
external double centerY;
@ffi.Float()
external double centerZ;
@ffi.Float()
external double halfExtentX;
@ffi.Float()
external double halfExtentY;
@ffi.Float()
external double halfExtentZ;
}
final class ResourceBuffer extends ffi.Struct {
external ffi.Pointer<ffi.Void> data;

View File

@@ -1,4 +1,5 @@
import 'dart:async';
import 'dart:io';
import 'dart:math';
import 'dart:typed_data';
import 'package:animation_tools_dart/animation_tools_dart.dart';
@@ -83,8 +84,15 @@ class ThermionViewerFFI extends ThermionViewer {
this._sharedContext = sharedContext ?? nullptr;
_onPickResultCallable = NativeCallable<
Void Function(EntityId entityId, Int x, Int y,
Pointer<TView> view)>.listener(_onPickResult);
Void Function(
EntityId entityId,
Int x,
Int y,
Pointer<TView> view,
Float depth,
Float fragX,
Float fragY,
Float fragZ)>.listener(_onPickResult);
_initialize();
}
@@ -94,8 +102,10 @@ class ThermionViewerFFI extends ThermionViewer {
///
Future<RenderTarget> createRenderTarget(
int width, int height, int textureHandle) async {
final renderTarget =
Viewer_createRenderTarget(_viewer!, textureHandle, width, height);
final renderTarget = await withPointerCallback<TRenderTarget>((cb) {
Viewer_createRenderTargetRenderThread(_viewer!, textureHandle, width, height, cb);
});
return FFIRenderTarget(renderTarget, _viewer!);
}
@@ -190,11 +200,11 @@ class ThermionViewerFFI extends ThermionViewer {
///
///
///
Future destroySwapChain(FFISwapChain swapChain) async {
Future destroySwapChain(SwapChain swapChain) async {
if (_viewer != null) {
await withVoidCallback((callback) {
Viewer_destroySwapChainRenderThread(
_viewer!, swapChain.swapChain, callback);
_viewer!, (swapChain as FFISwapChain).swapChain, callback);
});
}
}
@@ -300,7 +310,7 @@ class ThermionViewerFFI extends ThermionViewer {
return;
}
_disposing = true;
await setRendering(false);
await clearEntities();
await clearLights();
@@ -1228,6 +1238,9 @@ class ThermionViewerFFI extends ThermionViewer {
///
@override
Future setAntiAliasing(bool msaa, bool fxaa, bool taa) async {
if(Platform.isWindows && msaa) {
throw Exception("MSAA is not currently supported on Windows");
}
final view = await getViewAt(0) as FFIView;
View_setAntiAliasing(view.view, msaa, fxaa, taa);
}
@@ -1509,26 +1522,47 @@ class ThermionViewerFFI extends ThermionViewer {
}
void _onPickResult(
ThermionEntity entityId, int x, int y, Pointer<TView> viewPtr) async {
ThermionEntity entityId,
int x,
int y,
Pointer<TView> viewPtr,
double depth,
double fragX,
double fragY,
double fragZ) async {
final view = FFIView(viewPtr, _viewer!);
final viewport = await view.getViewport();
_pickResultController
.add((entity: entityId, x: x.ceil(), y: (viewport.height - y).ceil()));
_pickResultController.add((
entity: entityId,
x: x,
y: (viewport.height - y),
depth: depth,
fragX: fragX,
fragY: viewport.height - fragY,
fragZ: fragZ
));
}
late NativeCallable<
Void Function(EntityId entityId, Int x, Int y, Pointer<TView> view)>
_onPickResultCallable;
Void Function(
EntityId entityId,
Int x,
Int y,
Pointer<TView> view,
Float depth,
Float fragX,
Float fragY,
Float fragZ)> _onPickResultCallable;
///
///
///
@override
void pick(int x, int y) async {
Future pick(int x, int y) async {
final view = (await getViewAt(0)) as FFIView;
var viewport = await view.getViewport();
y = (viewport.height - y).ceil();
y = viewport.height - y;
Viewer_pick(
_viewer!, view.view, x, y, _onPickResultCallable.nativeFunction);
}
@@ -1750,6 +1784,7 @@ class ThermionViewerFFI extends ThermionViewer {
throw Exception("Viewer must not be null");
}
var entity = await withIntCallback((callback) =>
SceneManager_createGeometryRenderThread(
_sceneManager!,
@@ -1835,6 +1870,18 @@ class ThermionViewerFFI extends ThermionViewer {
set_priority(_sceneManager!, entityId, priority);
}
///
///
///
@override
Future<v64.Aabb3> getRenderableBoundingBox(ThermionEntity entityId) async {
final result =
SceneManager_getRenderableBoundingBox(_sceneManager!, entityId);
return v64.Aabb3.centerAndHalfExtents(
Vector3(result.centerX, result.centerY, result.centerZ),
Vector3(result.halfExtentX, result.halfExtentY, result.halfExtentZ));
}
///
///
///
@@ -2035,6 +2082,9 @@ class ThermionViewerFFI extends ThermionViewer {
destroy_material_instance(_sceneManager!, materialInstance._pointer);
}
///
///
///
Future<ThermionFFIMaterialInstance> createUnlitMaterialInstance() async {
var instance = await withPointerCallback<TMaterialInstance>((cb) {
SceneManager_createUnlitMaterialInstanceRenderThread(_sceneManager!, cb);
@@ -2045,6 +2095,21 @@ class ThermionViewerFFI extends ThermionViewer {
return ThermionFFIMaterialInstance(instance);
}
///
///
///
Future<ThermionFFIMaterialInstance>
createUnlitFixedSizeMaterialInstance() async {
var instance = await withPointerCallback<TMaterialInstance>((cb) {
SceneManager_createUnlitFixedSizeMaterialInstanceRenderThread(
_sceneManager!, cb);
});
if (instance == nullptr) {
throw Exception("Failed to create material instance");
}
return ThermionFFIMaterialInstance(instance);
}
@override
Future setMaterialPropertyInt(ThermionEntity entity, String propertyName,
int materialIndex, int value) {
@@ -2163,7 +2228,7 @@ class ThermionViewerFFI extends ThermionViewer {
Future<Gizmo> createGizmo(FFIView view) async {
var view = (await getViewAt(0)) as FFIView;
var scene = View_getScene(view.view);
final gizmo = Gizmo_new(Viewer_getEngine(_viewer!), view.view, scene);
final gizmo = SceneManager_createGizmo(_sceneManager!, view.view, scene);
return FFIGizmo(gizmo, this);
}
}
@@ -2189,11 +2254,36 @@ class ThermionFFIMaterialInstance extends MaterialInstance {
MaterialInstance_setDepthWrite(this._pointer, enabled);
}
@override
Future setParameterFloat4(String name, double x, double y, double z, double w) async {
MaterialInstance_setParameterFloat4(
_pointer, name.toNativeUtf8().cast<Char>(), x, y, z, w);
}
@override
Future setParameterFloat2(String name, double x, double y) async {
MaterialInstance_setParameterFloat2(
_pointer, name.toNativeUtf8().cast<Char>(), x, y);
}
@override
Future setParameterFloat(String name, double value) async {
MaterialInstance_setParameterFloat(
_pointer, name.toNativeUtf8().cast<Char>(), value);
}
@override
Future setParameterInt(String name, int value) async {
MaterialInstance_setParameterInt(
_pointer, name.toNativeUtf8().cast<Char>(), value);
}
@override
Future setDepthFunc(SamplerCompareFunction depthFunc) async {
MaterialInstance_setDepthFunc(_pointer, TDepthFunc.values[depthFunc.index]);
}
}
class FFIRenderTarget extends RenderTarget {

View File

@@ -1,7 +1,32 @@
import 'package:thermion_dart/src/viewer/src/ffi/src/callbacks.dart';
enum SamplerCompareFunction {
/// !< Less or equal
LE,
/// !< Greater or equal
GE,
/// !< Strictly less than
L,
/// !< Strictly greater than
G,
/// !< Equal
E,
/// !< Not equal
NE,
/// !< Always. Depth / stencil testing is deactivated.
A,
/// !< Never. The depth / stencil test always fails.
N;
}
abstract class MaterialInstance {
Future setDepthWriteEnabled(bool enabled);
Future setDepthFunc(SamplerCompareFunction depthFunc);
Future setDepthCullingEnabled(bool enabled);
Future setParameterFloat4(String name, double x, double y, double z, double w);
Future setParameterFloat2(String name, double x, double y);
Future setParameterFloat(String name, double x);
Future setParameterInt(String name, int value);
}
enum AlphaMode { OPAQUE, MASK, BLEND }

View File

@@ -1,5 +1,17 @@
// "picking" means clicking/tapping on the viewport, and unprojecting the X/Y coordinate to determine whether any renderable entities were present at those coordinates.
import '../../viewer.dart';
typedef FilamentPickResult = ({ThermionEntity entity, int x, int y});
/// The result of a picking operation (see [ThermionViewer.pick] for more details).
/// [x] and [y] refer to the original screen coordinates used to call [pick]; this should
/// match the values of [fragX] and [fragY]. [fragZ] is the depth value in screen coordinates,
/// [depth] is the value in the depth buffer (i.e. fragZ = 1.0 - depth).
///
typedef FilamentPickResult = ({
ThermionEntity entity,
int x,
int y,
double depth,
double fragX,
double fragY,
double fragZ
});
typedef PickResult = FilamentPickResult;

View File

@@ -695,7 +695,7 @@ abstract class ThermionViewer {
/// This is asynchronous and will require 2-3 frames to complete - subscribe to the [pickResult] stream to receive the results of this method.
/// [x] and [y] must be in local logical coordinates (i.e. where 0,0 is at top-left of the ThermionWidget).
///
void pick(int x, int y);
Future pick(int x, int y);
///
/// Retrieves the name assigned to the given ThermionEntity (usually corresponds to the glTF mesh name).
@@ -790,20 +790,34 @@ abstract class ThermionViewer {
///
void onDispose(Future Function() callback);
///
/// Gets the 3D axis aligned bounding box for the given entity.
///
Future<Aabb3> getRenderableBoundingBox(ThermionEntity entity);
///
/// Gets the 2D bounding box (in viewport coordinates) for the given entity.
///
Future<Aabb2> getViewportBoundingBox(ThermionEntity entity);
///
/// Filament assigns renderables to a numeric layer.
/// We place all scene assets in layer 0 (enabled by default), gizmos in layer 1 (enabled by default), world grid in layer 2 (disabled by default).
/// Use this method to toggle visibility of the respective layer.
/// Toggles the visibility of the respective layer.
///
Future setLayerVisibility(int layer, bool visible);
///
/// Assigns [entity] to visibility layer [layer].
/// All renderable entities are assigned a layer mask.
///
/// By calling [setLayerVisibility], all renderable entities allocated to
/// the given layer can be efficiently hidden/revealed.
///
/// By default, all renderable entities are assigned to layer 0 (and this
/// layer is enabled by default). Call [setVisibilityLayer] to change the
/// layer for the specified entity.
///
/// Note that we currently also assign gizmos to layer 1 (enabled by default)
/// and the world grid to layer 2 (disabled by default). We suggest you avoid
/// using these layers.
///
Future setVisibilityLayer(ThermionEntity entity, int layer);
@@ -886,6 +900,11 @@ abstract class ThermionViewer {
///
Future<MaterialInstance> createUnlitMaterialInstance();
///
///
///
Future<MaterialInstance> createUnlitFixedSizeMaterialInstance();
///
///
///

View File

@@ -21,4 +21,28 @@ class ThermionWasmMaterialInstance extends MaterialInstance {
// TODO: implement setParameterFloat2
throw UnimplementedError();
}
@override
Future setParameterFloat(String name, double x) {
// TODO: implement setParameterFloat
throw UnimplementedError();
}
@override
Future setDepthFunc(SamplerCompareFunction depthFunc) {
// TODO: implement setDepthFunc
throw UnimplementedError();
}
@override
Future setParameterFloat4(String name, double x, double y, double z, double w) {
// TODO: implement setParameterFloat4
throw UnimplementedError();
}
@override
Future setParameterInt(String name, int value) {
// TODO: implement setParameterInt
throw UnimplementedError();
}
}

View File

View File

@@ -6,10 +6,10 @@ extern "C"
#endif
#include <stdint.h>
#include "TMaterialInstance.h"
typedef int32_t EntityId;
typedef struct TCamera TCamera;
typedef struct TMaterialInstance TMaterialInstance;
typedef struct TEngine TEngine;
typedef struct TEntityManager TEntityManager;
typedef struct TViewer TViewer;
@@ -19,18 +19,18 @@ extern "C"
typedef struct TView TView;
typedef struct TGizmo TGizmo;
typedef struct TScene TScene;
struct TMaterialKey {
bool doubleSided = true;
bool unlit = true;
bool hasVertexColors = true;
bool hasBaseColorTexture = true;
bool hasNormalTexture = true;
bool hasOcclusionTexture = true;
bool hasEmissiveTexture = true;
bool useSpecularGlossiness = true;
int alphaMode = 4;
bool enableDiagnostics = 4;
bool doubleSided;
bool unlit;
bool hasVertexColors;
bool hasBaseColorTexture;
bool hasNormalTexture;
bool hasOcclusionTexture;
bool hasEmissiveTexture;
bool useSpecularGlossiness;
int alphaMode;
bool enableDiagnostics;
union {
#ifdef __cplusplus
struct {
@@ -43,42 +43,42 @@ extern "C"
};
#else
struct {
bool hasMetallicRoughnessTexture = true;
uint8_t metallicRoughnessUV = 7;
bool hasMetallicRoughnessTexture;
uint8_t metallicRoughnessUV;
};
struct {
bool hasSpecularGlossinessTexture = true;
uint8_t specularGlossinessUV = 7;
bool hasSpecularGlossinessTexture;
uint8_t specularGlossinessUV;
};
#endif
};
uint8_t baseColorUV;
// -- 32 bit boundary --
bool hasClearCoatTexture = true;
uint8_t clearCoatUV = 7;
bool hasClearCoatRoughnessTexture = true;
uint8_t clearCoatRoughnessUV = 7;
bool hasClearCoatNormalTexture = true;
uint8_t clearCoatNormalUV = 7;
bool hasClearCoat = true;
bool hasTransmission = true;
bool hasTextureTransforms = 6;
bool hasClearCoatTexture;
uint8_t clearCoatUV;
bool hasClearCoatRoughnessTexture;
uint8_t clearCoatRoughnessUV;
bool hasClearCoatNormalTexture;
uint8_t clearCoatNormalUV;
bool hasClearCoat;
bool hasTransmission;
bool hasTextureTransforms;
// -- 32 bit boundary --
uint8_t emissiveUV;
uint8_t aoUV;
uint8_t normalUV;
bool hasTransmissionTexture = true;
uint8_t transmissionUV = 7;
bool hasTransmissionTexture;
uint8_t transmissionUV;
// -- 32 bit boundary --
bool hasSheenColorTexture = true;
uint8_t sheenColorUV = 7;
bool hasSheenRoughnessTexture = true;
uint8_t sheenRoughnessUV = 7;
bool hasVolumeThicknessTexture = true;
uint8_t volumeThicknessUV = 7;
bool hasSheen = true;
bool hasIOR = true;
bool hasVolume = true;
bool hasSheenColorTexture;
uint8_t sheenColorUV;
bool hasSheenRoughnessTexture;
uint8_t sheenRoughnessUV;
bool hasVolumeThicknessTexture;
uint8_t volumeThicknessUV ;
bool hasSheen;
bool hasIOR;
bool hasVolume;
} ;
typedef struct TMaterialKey TMaterialKey;
@@ -105,6 +105,17 @@ extern "C"
typedef struct Aabb2 Aabb2;
struct Aabb3 {
float centerX;
float centerY;
float centerZ;
float halfExtentX;
float halfExtentY;
float halfExtentZ;
};
typedef struct Aabb3 Aabb3;
#ifdef __cplusplus
}
#endif

View File

@@ -3,13 +3,16 @@
#include <stddef.h>
#include <filament/Engine.h>
#include <filament/Frustum.h>
#include <filament/VertexBuffer.h>
#include <filament/IndexBuffer.h>
#include <filament/TransformManager.h>
#include <filament/Texture.h>
#include <filament/RenderableManager.h>
#include <filament/Viewport.h>
#include <filament/Frustum.h>
#include <utils/Entity.h>
#include <utils/EntityManager.h>
namespace thermion
{
@@ -32,9 +35,13 @@ public:
Engine* engine);
~CustomGeometry();
VertexBuffer* vertexBuffer() const;
IndexBuffer* indexBuffer() const;
Box getBoundingBox() const;
utils::Entity createInstance(MaterialInstance *materialInstance);
private:
Engine* _engine;
VertexBuffer* vertexBuffer;
IndexBuffer* indexBuffer;
float* vertices = nullptr;
float* normals = nullptr;
@@ -45,11 +52,6 @@ public:
Box boundingBox;
RenderableManager::PrimitiveType primitiveType;
private:
Engine* _engine;
bool _vertexBufferFreed = false;
bool _indexBufferFreed = false;
void computeBoundingBox();
};

View File

@@ -98,7 +98,15 @@ namespace thermion
void clearBackgroundImage();
void setBackgroundImagePosition(float x, float y, bool clamp, uint32_t width, uint32_t height);
void pick(View *view, uint32_t x, uint32_t y, void (*callback)(EntityId entityId, int x, int y, View *view));
typedef void (*PickCallback)(EntityId entityId, int x, int y, View *view, float depth, float fragX, float fragY, float fragZ);
///
/// Returns true if the specified entity is a gizmo, grid or background image entity.
///
bool isNonPickableEntity(EntityId entityId);
void pick(View *view, uint32_t x, uint32_t y, PickCallback callback);
Engine* getEngine() {
return _engine;
}
@@ -145,7 +153,6 @@ namespace thermion
private:
const ResourceLoaderWrapperImpl *const _resourceLoaderWrapper;
void* _context = nullptr;
Scene *_scene = nullptr;
Engine *_engine = nullptr;
thermion::ThreadPool *_tp = nullptr;

View File

@@ -17,8 +17,6 @@
#include <filament/IndexBuffer.h>
#include <filament/InstanceBuffer.h>
#include "material/gizmo.h"
#include "ThermionDartApi.h"
namespace thermion {
@@ -31,7 +29,7 @@ class Gizmo {
enum Axis { X, Y, Z};
public:
Gizmo(Engine *engine, View *view, Scene *scene);
Gizmo(Engine *engine, View *view, Scene *scene, Material* material);
~Gizmo();
typedef void (*PickCallback)(EntityId entityId, uint32_t x, uint32_t y, View *view);
@@ -91,8 +89,10 @@ class Gizmo {
Engine *_engine;
Scene *_scene;
View *_view;
utils::Entity _entities[7] = { utils::Entity(), utils::Entity(), utils::Entity(), utils::Entity(), utils::Entity(), utils::Entity(), utils::Entity() };
Material* _material;
utils::Entity _entities[7] = { utils::Entity(), utils::Entity(), utils::Entity(), utils::Entity(), utils::Entity(), utils::Entity(), utils::Entity() };
MaterialInstance* _materialInstances[7];
math::float4 inactiveColors[3] {
math::float4 { 1.0f, 0.0f, 0.0f, 0.5f },

View File

@@ -19,9 +19,6 @@
#include <filament/IndexBuffer.h>
#include <filament/InstanceBuffer.h>
#include "material/gizmo.h"
namespace thermion {
using namespace filament;

View File

@@ -19,16 +19,17 @@
#include <filament/InstanceBuffer.h>
#include <utils/NameComponentManager.h>
#include "CustomGeometry.hpp"
#include "tsl/robin_map.h"
#include "APIBoundaryTypes.h"
#include "CustomGeometry.hpp"
#include "Gizmo.hpp"
#include "GridOverlay.hpp"
#include "ResourceBuffer.hpp"
#include "components/CollisionComponentManager.hpp"
#include "components/AnimationComponentManager.hpp"
#include "tsl/robin_map.h"
namespace thermion
{
@@ -229,7 +230,12 @@ namespace thermion
/// @param out a pointer large enough to store four floats (the min/max coordinates of the bounding box)
/// @return
///
Aabb2 getBoundingBox(View* view, EntityId entity);
Aabb2 getScreenSpaceBoundingBox(View* view, EntityId entity);
/// @brief returns the 3D bounding box of the renderable instance for the given entity.
/// @return the bounding box
///
Aabb3 getRenderableBoundingBox(EntityId entity);
///
/// Creates an entity with the specified geometry/material/normals and adds to the scene.
@@ -255,11 +261,15 @@ namespace thermion
return _unlitMaterialProvider;
}
bool isGeometryInstance(EntityId entity) {
return std::find(_geometryInstances.begin(), _geometryInstances.end(), entity) != _geometryInstances.end();
}
bool isGeometryEntity(EntityId entity) {
return _geometry.find(entity) != _geometry.end();
}
const CustomGeometry* const getGeometry(EntityId entityId) {
CustomGeometry* const getGeometry(EntityId entityId) {
return _geometry[entityId].get();
}
@@ -287,6 +297,8 @@ namespace thermion
return _ubershaderProvider;
}
MaterialInstance* createUnlitFixedSizeMaterialInstance();
MaterialInstance* createUnlitMaterialInstance();
void setVisibilityLayer(EntityId entityId, int layer);
@@ -298,6 +310,8 @@ namespace thermion
size_t getCameraCount();
Camera* getCameraAt(size_t index);
Gizmo *createGizmo(View *view, Scene *scene);
bool isGizmoEntity(utils::Entity entity);
@@ -321,6 +335,8 @@ namespace thermion
std::mutex _stencilMutex;
std::vector<MaterialInstance*> _materialInstances;
Material* _gizmoMaterial = nullptr;
utils::NameComponentManager *_ncm;
tsl::robin_map<
@@ -329,6 +345,7 @@ namespace thermion
_instances;
tsl::robin_map<EntityId, gltfio::FilamentAsset *> _assets;
tsl::robin_map<EntityId, unique_ptr<CustomGeometry>> _geometry;
std::vector<EntityId> _geometryInstances;
tsl::robin_map<EntityId, unique_ptr<HighlightOverlay>> _highlighted;
tsl::robin_map<EntityId, math::mat4> _transformUpdates;
std::set<Texture*> _textures;

View File

@@ -10,7 +10,6 @@ extern "C"
typedef void (*GizmoPickCallback)(EntityId entityId, uint32_t x, uint32_t y, TView* view);
EMSCRIPTEN_KEEPALIVE TGizmo* Gizmo_new(TEngine *tEngine, TView *tView, TScene *tScene);
EMSCRIPTEN_KEEPALIVE void Gizmo_pick(TGizmo *tGizmo, uint32_t x, uint32_t y, GizmoPickCallback callback);
EMSCRIPTEN_KEEPALIVE void Gizmo_setVisibility(TGizmo *tGizmo, bool visible);

View File

@@ -0,0 +1,78 @@
#pragma once
#ifdef _WIN32
#ifdef IS_DLL
#define EMSCRIPTEN_KEEPALIVE __declspec(dllimport)
#else
#define EMSCRIPTEN_KEEPALIVE __declspec(dllexport)
#endif
#else
#ifndef EMSCRIPTEN_KEEPALIVE
#define EMSCRIPTEN_KEEPALIVE __attribute__((visibility("default")))
#endif
#endif
// we copy the LLVM <stdbool.h> here rather than including,
// because on Windows it's difficult to pin the exact location which confuses dart ffigen
#ifndef __STDBOOL_H
#define __STDBOOL_H
#define __bool_true_false_are_defined 1
#if defined(__STDC_VERSION__) && __STDC_VERSION__ > 201710L
/* FIXME: We should be issuing a deprecation warning here, but cannot yet due
* to system headers which include this header file unconditionally.
*/
#elif !defined(__cplusplus)
#define bool _Bool
#define true 1
#define false 0
#elif defined(__GNUC__) && !defined(__STRICT_ANSI__)
/* Define _Bool as a GNU extension. */
#define _Bool bool
#if defined(__cplusplus) && __cplusplus < 201103L
/* For C++98, define bool, false, true as a GNU extension. */
#define bool bool
#define false false
#define true true
#endif
#endif
#endif /* __STDBOOL_H */
#if defined(__APPLE__) || defined(__EMSCRIPTEN__)
#include <stddef.h>
#endif
typedef struct TMaterialInstance TMaterialInstance;
// copied from SamplerCompareFunc in DriverEnums.h
enum TDepthFunc {
// don't change the enums values
LE = 0, //!< Less or equal
GE, //!< Greater or equal
L, //!< Strictly less than
G, //!< Strictly greater than
E, //!< Equal
NE, //!< Not equal
A, //!< Always. Depth / stencil testing is deactivated.
N //!< Never. The depth / stencil test always fails.
};
#ifdef __cplusplus
extern "C"
{
#endif
EMSCRIPTEN_KEEPALIVE void MaterialInstance_setDepthWrite(TMaterialInstance* materialInstance, bool enabled);
EMSCRIPTEN_KEEPALIVE void MaterialInstance_setDepthCulling(TMaterialInstance* materialInstance, bool enabled);
EMSCRIPTEN_KEEPALIVE void MaterialInstance_setParameterFloat4(TMaterialInstance* materialInstance, const char* name, double x, double y, double w, double z);
EMSCRIPTEN_KEEPALIVE void MaterialInstance_setParameterFloat2(TMaterialInstance* materialInstance, const char* name, double x, double y);
EMSCRIPTEN_KEEPALIVE void MaterialInstance_setParameterFloat(TMaterialInstance* materialInstance, const char* name, double value);
EMSCRIPTEN_KEEPALIVE void MaterialInstance_setParameterInt(TMaterialInstance* materialInstance, const char* name, int value);
EMSCRIPTEN_KEEPALIVE void MaterialInstance_setDepthFunc(TMaterialInstance* materialInstance, TDepthFunc depthFunc);
#ifdef __cplusplus
}
#endif

View File

@@ -49,14 +49,13 @@
#include "APIBoundaryTypes.h"
#include "ResourceBuffer.hpp"
#include "ThermionDartAPIUtils.h"
#include "TMaterialInstance.h"
#ifdef __cplusplus
extern "C"
{
#endif
EMSCRIPTEN_KEEPALIVE TViewer *Viewer_create(const void *const context, const void *const loader, void *const platform, const char *uberArchivePath);
EMSCRIPTEN_KEEPALIVE void destroy_filament_viewer(TViewer *viewer);
EMSCRIPTEN_KEEPALIVE TSceneManager *Viewer_getSceneManager(TViewer *viewer);
@@ -85,7 +84,8 @@ extern "C"
EMSCRIPTEN_KEEPALIVE void Viewer_setMainCamera(TViewer *tViewer, TView *tView);
EMSCRIPTEN_KEEPALIVE TSwapChain* Viewer_getSwapChainAt(TViewer *tViewer, int index);
EMSCRIPTEN_KEEPALIVE void Viewer_setViewRenderable(TViewer *viewer, TSwapChain *swapChain, TView* view, bool renderable);
EMSCRIPTEN_KEEPALIVE void Viewer_pick(TViewer *viewer, TView* tView, int x, int y, void (*callback)(EntityId entityId, int x, int y, TView *tView));
EMSCRIPTEN_KEEPALIVE void Viewer_pick(TViewer *viewer, TView* tView, int x, int y, void (*callback)(EntityId entityId, int x, int y, TView *tView, float depth, float fragX, float fragY, float fragZ));
EMSCRIPTEN_KEEPALIVE bool Viewer_isNonPickableEntity(TViewer *viewer, EntityId entityId);
// Engine
EMSCRIPTEN_KEEPALIVE TEngine *Viewer_getEngine(TViewer* viewer);
@@ -197,6 +197,7 @@ extern "C"
int skinIndex,
int boneIndex);
EMSCRIPTEN_KEEPALIVE TGizmo* SceneManager_createGizmo(TSceneManager *tSceneManager, TView *tView, TScene *tScene);
EMSCRIPTEN_KEEPALIVE EntityId SceneManager_createGeometry(
TSceneManager *sceneManager,
float *vertices,
@@ -211,6 +212,7 @@ extern "C"
TMaterialInstance *materialInstance,
bool keepData);
EMSCRIPTEN_KEEPALIVE TMaterialInstance *SceneManager_createUnlitMaterialInstance(TSceneManager *sceneManager);
EMSCRIPTEN_KEEPALIVE TMaterialInstance *SceneManager_createUnlitFixedSizeMaterialInstance(TSceneManager *sceneManager);
EMSCRIPTEN_KEEPALIVE bool SceneManager_setTransform(TSceneManager *sceneManager, EntityId entityId, const double *const transform);
EMSCRIPTEN_KEEPALIVE void SceneManager_queueTransformUpdates(TSceneManager *sceneManager, EntityId* entities, const double* const transforms, int numEntities);
EMSCRIPTEN_KEEPALIVE TCamera* SceneManager_findCameraByName(TSceneManager* tSceneManager, EntityId entity, const char* name);
@@ -274,6 +276,7 @@ extern "C"
EMSCRIPTEN_KEEPALIVE void test_collisions(TSceneManager *sceneManager, EntityId entity);
EMSCRIPTEN_KEEPALIVE void set_priority(TSceneManager *sceneManager, EntityId entityId, int priority);
EMSCRIPTEN_KEEPALIVE Aabb3 SceneManager_getRenderableBoundingBox(TSceneManager *sceneManager, EntityId entity);
EMSCRIPTEN_KEEPALIVE Aabb2 get_bounding_box(TSceneManager *sceneManager, TView *view, EntityId entity);
EMSCRIPTEN_KEEPALIVE void get_bounding_box_to_out(TSceneManager *sceneManager, TView *view, EntityId entity, float *minX, float *minY, float *maxX, float *maxY);
@@ -291,11 +294,6 @@ extern "C"
EMSCRIPTEN_KEEPALIVE TMaterialInstance* get_material_instance_at(TSceneManager *sceneManager, EntityId entity, int materialIndex);
EMSCRIPTEN_KEEPALIVE void MaterialInstance_setDepthWrite(TMaterialInstance* materialInstance, bool enabled);
EMSCRIPTEN_KEEPALIVE void MaterialInstance_setDepthCulling(TMaterialInstance* materialInstance, bool enabled);
EMSCRIPTEN_KEEPALIVE void MaterialInstance_setParameterFloat2(TMaterialInstance* materialInstance, const char* name, double x, double y);
#ifdef __cplusplus
}
#endif

View File

@@ -36,6 +36,7 @@ extern "C"
EMSCRIPTEN_KEEPALIVE void Viewer_captureRenderTargetRenderThread(TViewer *viewer, TView* view, TSwapChain* swapChain, TRenderTarget* renderTarget, uint8_t* out, void (*onComplete)());
EMSCRIPTEN_KEEPALIVE void Viewer_requestFrameRenderThread(TViewer *viewer, void(*onComplete)());
EMSCRIPTEN_KEEPALIVE void Viewer_loadIblRenderThread(TViewer *viewer, const char *iblPath, float intensity, void(*onComplete)());
EMSCRIPTEN_KEEPALIVE void Viewer_createRenderTargetRenderThread(TViewer *viewer, intptr_t texture, uint32_t width, uint32_t height, void(*onComplete)(TRenderTarget*));
EMSCRIPTEN_KEEPALIVE void View_setToneMappingRenderThread(TView *tView, TEngine *tEngine, thermion::ToneMapping toneMapping);
EMSCRIPTEN_KEEPALIVE void View_setBloomRenderThread(TView *tView, double bloom);
@@ -67,6 +68,7 @@ extern "C"
void (*callback)(EntityId));
EMSCRIPTEN_KEEPALIVE void SceneManager_loadGlbFromBufferRenderThread(TSceneManager *sceneManager, const uint8_t *const data, size_t length, int numInstances, bool keepData, int priority, int layer, bool loadResourcesAsync, void (*callback)(EntityId));
EMSCRIPTEN_KEEPALIVE void SceneManager_createUnlitMaterialInstanceRenderThread(TSceneManager *sceneManager, void (*callback)(TMaterialInstance*));
EMSCRIPTEN_KEEPALIVE void SceneManager_createUnlitFixedSizeMaterialInstanceRenderThread(TSceneManager *sceneManager, void (*callback)(TMaterialInstance*));
EMSCRIPTEN_KEEPALIVE void load_glb_render_thread(TSceneManager *sceneManager, const char *assetPath, int numInstances, bool keepData, void (*callback)(EntityId));
EMSCRIPTEN_KEEPALIVE void load_gltf_render_thread(TSceneManager *sceneManager, const char *assetPath, const char *relativePath, bool keepData, void (*callback)(EntityId));
EMSCRIPTEN_KEEPALIVE void create_instance_render_thread(TSceneManager *sceneManager, EntityId entityId, void (*callback)(EntityId));

View File

@@ -9,10 +9,9 @@
#pragma comment(lib, "comctl32.lib")
#pragma comment(lib, "filament.lib")
#pragma comment(lib, "bluevk.lib")
#pragma comment(lib, "vkshaders.lib")
#pragma comment(lib, "bluegl.lib")
#pragma comment(lib, "backend.lib")
#pragma comment(lib, "filameshio.lib")
#pragma comment(lib, "viewer.lib")
#pragma comment(lib, "filamat.lib")
#pragma comment(lib, "geometry.lib")
#pragma comment(lib, "utils.lib")
@@ -34,4 +33,8 @@
#pragma comment(lib, "uberarchive.lib")
#pragma comment(lib, "zstd.lib")
#pragma comment(lib, "basis_transcoder.lib")
#pragma comment(lib, "meshoptimizer.lib")
#pragma comment(lib, "meshoptimizer.lib")
#pragma comment(lib, "vulkan-1.lib")
#pragma comment(lib, "dxgi.lib")
#pragma comment(lib, "d3d11.lib")

View File

@@ -0,0 +1,994 @@
/*
* Copyright (C) 2022 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**********************************************************************************************
* Generated by bluevk/bluevk-gen.py
* DO NOT EDIT
**********************************************************************************************/
#ifndef TNT_FILAMENT_BLUEVK_H
#define TNT_FILAMENT_BLUEVK_H
#define VK_ENABLE_BETA_EXTENSIONS
// BlueVK dynamically loads all function pointers, so it cannot allow function prototypes, which
// would assume static linking for Vulkan entry points.
#if defined(VULKAN_H_) && !defined(VK_NO_PROTOTYPES)
#error Please do not include vulkan.h when using BlueVK
#endif
// Even though we don't use function prototypes, we still need to include vulkan.h for all Vulkan
// types, including the PFN_ types.
#ifndef VULKAN_H_
#ifndef VK_NO_PROTOTYPES
#define VK_NO_PROTOTYPES
#endif
#if defined(__ANDROID__)
#define VK_USE_PLATFORM_ANDROID_KHR 1
#elif defined(IOS)
#define VK_USE_PLATFORM_IOS_MVK 1
#elif defined(__linux__)
#if defined(FILAMENT_SUPPORTS_XCB)
#define VK_USE_PLATFORM_XCB_KHR 1
#endif
#if defined(FILAMENT_SUPPORTS_XLIB)
#define VK_USE_PLATFORM_XLIB_KHR 1
#endif
#if defined(FILAMENT_SUPPORTS_WAYLAND)
#define VK_USE_PLATFORM_WAYLAND_KHR 1
#endif
#elif defined(__APPLE__)
#define VK_USE_PLATFORM_MACOS_MVK 1
#elif defined(WIN32)
#define VK_USE_PLATFORM_WIN32_KHR 1
#endif
#include <vulkan/vulkan.h>
#endif
#include <utils/unwindows.h>
namespace bluevk {
// Returns false if BlueGL could not find the Vulkan shared library.
bool initialize();
void bindInstance(VkInstance instance);
#if defined(VK_VERSION_1_0)
extern PFN_vkAllocateCommandBuffers vkAllocateCommandBuffers;
extern PFN_vkAllocateDescriptorSets vkAllocateDescriptorSets;
extern PFN_vkAllocateMemory vkAllocateMemory;
extern PFN_vkBeginCommandBuffer vkBeginCommandBuffer;
extern PFN_vkBindBufferMemory vkBindBufferMemory;
extern PFN_vkBindImageMemory vkBindImageMemory;
extern PFN_vkCmdBeginQuery vkCmdBeginQuery;
extern PFN_vkCmdBeginRenderPass vkCmdBeginRenderPass;
extern PFN_vkCmdBindDescriptorSets vkCmdBindDescriptorSets;
extern PFN_vkCmdBindIndexBuffer vkCmdBindIndexBuffer;
extern PFN_vkCmdBindPipeline vkCmdBindPipeline;
extern PFN_vkCmdBindVertexBuffers vkCmdBindVertexBuffers;
extern PFN_vkCmdBlitImage vkCmdBlitImage;
extern PFN_vkCmdClearAttachments vkCmdClearAttachments;
extern PFN_vkCmdClearColorImage vkCmdClearColorImage;
extern PFN_vkCmdClearDepthStencilImage vkCmdClearDepthStencilImage;
extern PFN_vkCmdCopyBuffer vkCmdCopyBuffer;
extern PFN_vkCmdCopyBufferToImage vkCmdCopyBufferToImage;
extern PFN_vkCmdCopyImage vkCmdCopyImage;
extern PFN_vkCmdCopyImageToBuffer vkCmdCopyImageToBuffer;
extern PFN_vkCmdCopyQueryPoolResults vkCmdCopyQueryPoolResults;
extern PFN_vkCmdDispatch vkCmdDispatch;
extern PFN_vkCmdDispatchIndirect vkCmdDispatchIndirect;
extern PFN_vkCmdDraw vkCmdDraw;
extern PFN_vkCmdDrawIndexed vkCmdDrawIndexed;
extern PFN_vkCmdDrawIndexedIndirect vkCmdDrawIndexedIndirect;
extern PFN_vkCmdDrawIndirect vkCmdDrawIndirect;
extern PFN_vkCmdEndQuery vkCmdEndQuery;
extern PFN_vkCmdEndRenderPass vkCmdEndRenderPass;
extern PFN_vkCmdExecuteCommands vkCmdExecuteCommands;
extern PFN_vkCmdFillBuffer vkCmdFillBuffer;
extern PFN_vkCmdNextSubpass vkCmdNextSubpass;
extern PFN_vkCmdPipelineBarrier vkCmdPipelineBarrier;
extern PFN_vkCmdPushConstants vkCmdPushConstants;
extern PFN_vkCmdResetEvent vkCmdResetEvent;
extern PFN_vkCmdResetQueryPool vkCmdResetQueryPool;
extern PFN_vkCmdResolveImage vkCmdResolveImage;
extern PFN_vkCmdSetBlendConstants vkCmdSetBlendConstants;
extern PFN_vkCmdSetDepthBias vkCmdSetDepthBias;
extern PFN_vkCmdSetDepthBounds vkCmdSetDepthBounds;
extern PFN_vkCmdSetEvent vkCmdSetEvent;
extern PFN_vkCmdSetLineWidth vkCmdSetLineWidth;
extern PFN_vkCmdSetScissor vkCmdSetScissor;
extern PFN_vkCmdSetStencilCompareMask vkCmdSetStencilCompareMask;
extern PFN_vkCmdSetStencilReference vkCmdSetStencilReference;
extern PFN_vkCmdSetStencilWriteMask vkCmdSetStencilWriteMask;
extern PFN_vkCmdSetViewport vkCmdSetViewport;
extern PFN_vkCmdUpdateBuffer vkCmdUpdateBuffer;
extern PFN_vkCmdWaitEvents vkCmdWaitEvents;
extern PFN_vkCmdWriteTimestamp vkCmdWriteTimestamp;
extern PFN_vkCreateBuffer vkCreateBuffer;
extern PFN_vkCreateBufferView vkCreateBufferView;
extern PFN_vkCreateCommandPool vkCreateCommandPool;
extern PFN_vkCreateComputePipelines vkCreateComputePipelines;
extern PFN_vkCreateDescriptorPool vkCreateDescriptorPool;
extern PFN_vkCreateDescriptorSetLayout vkCreateDescriptorSetLayout;
extern PFN_vkCreateDevice vkCreateDevice;
extern PFN_vkCreateEvent vkCreateEvent;
extern PFN_vkCreateFence vkCreateFence;
extern PFN_vkCreateFramebuffer vkCreateFramebuffer;
extern PFN_vkCreateGraphicsPipelines vkCreateGraphicsPipelines;
extern PFN_vkCreateImage vkCreateImage;
extern PFN_vkCreateImageView vkCreateImageView;
extern PFN_vkCreateInstance vkCreateInstance;
extern PFN_vkCreatePipelineCache vkCreatePipelineCache;
extern PFN_vkCreatePipelineLayout vkCreatePipelineLayout;
extern PFN_vkCreateQueryPool vkCreateQueryPool;
extern PFN_vkCreateRenderPass vkCreateRenderPass;
extern PFN_vkCreateSampler vkCreateSampler;
extern PFN_vkCreateSemaphore vkCreateSemaphore;
extern PFN_vkCreateShaderModule vkCreateShaderModule;
extern PFN_vkDestroyBuffer vkDestroyBuffer;
extern PFN_vkDestroyBufferView vkDestroyBufferView;
extern PFN_vkDestroyCommandPool vkDestroyCommandPool;
extern PFN_vkDestroyDescriptorPool vkDestroyDescriptorPool;
extern PFN_vkDestroyDescriptorSetLayout vkDestroyDescriptorSetLayout;
extern PFN_vkDestroyDevice vkDestroyDevice;
extern PFN_vkDestroyEvent vkDestroyEvent;
extern PFN_vkDestroyFence vkDestroyFence;
extern PFN_vkDestroyFramebuffer vkDestroyFramebuffer;
extern PFN_vkDestroyImage vkDestroyImage;
extern PFN_vkDestroyImageView vkDestroyImageView;
extern PFN_vkDestroyInstance vkDestroyInstance;
extern PFN_vkDestroyPipeline vkDestroyPipeline;
extern PFN_vkDestroyPipelineCache vkDestroyPipelineCache;
extern PFN_vkDestroyPipelineLayout vkDestroyPipelineLayout;
extern PFN_vkDestroyQueryPool vkDestroyQueryPool;
extern PFN_vkDestroyRenderPass vkDestroyRenderPass;
extern PFN_vkDestroySampler vkDestroySampler;
extern PFN_vkDestroySemaphore vkDestroySemaphore;
extern PFN_vkDestroyShaderModule vkDestroyShaderModule;
extern PFN_vkDeviceWaitIdle vkDeviceWaitIdle;
extern PFN_vkEndCommandBuffer vkEndCommandBuffer;
extern PFN_vkEnumerateDeviceExtensionProperties vkEnumerateDeviceExtensionProperties;
extern PFN_vkEnumerateDeviceLayerProperties vkEnumerateDeviceLayerProperties;
extern PFN_vkEnumerateInstanceExtensionProperties vkEnumerateInstanceExtensionProperties;
extern PFN_vkEnumerateInstanceLayerProperties vkEnumerateInstanceLayerProperties;
extern PFN_vkEnumeratePhysicalDevices vkEnumeratePhysicalDevices;
extern PFN_vkFlushMappedMemoryRanges vkFlushMappedMemoryRanges;
extern PFN_vkFreeCommandBuffers vkFreeCommandBuffers;
extern PFN_vkFreeDescriptorSets vkFreeDescriptorSets;
extern PFN_vkFreeMemory vkFreeMemory;
extern PFN_vkGetBufferMemoryRequirements vkGetBufferMemoryRequirements;
extern PFN_vkGetDeviceMemoryCommitment vkGetDeviceMemoryCommitment;
extern PFN_vkGetDeviceProcAddr vkGetDeviceProcAddr;
extern PFN_vkGetDeviceQueue vkGetDeviceQueue;
extern PFN_vkGetEventStatus vkGetEventStatus;
extern PFN_vkGetFenceStatus vkGetFenceStatus;
extern PFN_vkGetImageMemoryRequirements vkGetImageMemoryRequirements;
extern PFN_vkGetImageSparseMemoryRequirements vkGetImageSparseMemoryRequirements;
extern PFN_vkGetImageSubresourceLayout vkGetImageSubresourceLayout;
extern PFN_vkGetInstanceProcAddr vkGetInstanceProcAddr;
extern PFN_vkGetPhysicalDeviceFeatures vkGetPhysicalDeviceFeatures;
extern PFN_vkGetPhysicalDeviceFormatProperties vkGetPhysicalDeviceFormatProperties;
extern PFN_vkGetPhysicalDeviceImageFormatProperties vkGetPhysicalDeviceImageFormatProperties;
extern PFN_vkGetPhysicalDeviceMemoryProperties vkGetPhysicalDeviceMemoryProperties;
extern PFN_vkGetPhysicalDeviceProperties vkGetPhysicalDeviceProperties;
extern PFN_vkGetPhysicalDeviceQueueFamilyProperties vkGetPhysicalDeviceQueueFamilyProperties;
extern PFN_vkGetPhysicalDeviceSparseImageFormatProperties vkGetPhysicalDeviceSparseImageFormatProperties;
extern PFN_vkGetPipelineCacheData vkGetPipelineCacheData;
extern PFN_vkGetQueryPoolResults vkGetQueryPoolResults;
extern PFN_vkGetRenderAreaGranularity vkGetRenderAreaGranularity;
extern PFN_vkInvalidateMappedMemoryRanges vkInvalidateMappedMemoryRanges;
extern PFN_vkMapMemory vkMapMemory;
extern PFN_vkMergePipelineCaches vkMergePipelineCaches;
extern PFN_vkQueueBindSparse vkQueueBindSparse;
extern PFN_vkQueueSubmit vkQueueSubmit;
extern PFN_vkQueueWaitIdle vkQueueWaitIdle;
extern PFN_vkResetCommandBuffer vkResetCommandBuffer;
extern PFN_vkResetCommandPool vkResetCommandPool;
extern PFN_vkResetDescriptorPool vkResetDescriptorPool;
extern PFN_vkResetEvent vkResetEvent;
extern PFN_vkResetFences vkResetFences;
extern PFN_vkSetEvent vkSetEvent;
extern PFN_vkUnmapMemory vkUnmapMemory;
extern PFN_vkUpdateDescriptorSets vkUpdateDescriptorSets;
extern PFN_vkWaitForFences vkWaitForFences;
#endif // defined(VK_VERSION_1_0)
#if defined(VK_VERSION_1_1)
extern PFN_vkBindBufferMemory2 vkBindBufferMemory2;
extern PFN_vkBindImageMemory2 vkBindImageMemory2;
extern PFN_vkCmdDispatchBase vkCmdDispatchBase;
extern PFN_vkCmdSetDeviceMask vkCmdSetDeviceMask;
extern PFN_vkCreateDescriptorUpdateTemplate vkCreateDescriptorUpdateTemplate;
extern PFN_vkCreateSamplerYcbcrConversion vkCreateSamplerYcbcrConversion;
extern PFN_vkDestroyDescriptorUpdateTemplate vkDestroyDescriptorUpdateTemplate;
extern PFN_vkDestroySamplerYcbcrConversion vkDestroySamplerYcbcrConversion;
extern PFN_vkEnumerateInstanceVersion vkEnumerateInstanceVersion;
extern PFN_vkEnumeratePhysicalDeviceGroups vkEnumeratePhysicalDeviceGroups;
extern PFN_vkGetBufferMemoryRequirements2 vkGetBufferMemoryRequirements2;
extern PFN_vkGetDescriptorSetLayoutSupport vkGetDescriptorSetLayoutSupport;
extern PFN_vkGetDeviceGroupPeerMemoryFeatures vkGetDeviceGroupPeerMemoryFeatures;
extern PFN_vkGetDeviceQueue2 vkGetDeviceQueue2;
extern PFN_vkGetImageMemoryRequirements2 vkGetImageMemoryRequirements2;
extern PFN_vkGetImageSparseMemoryRequirements2 vkGetImageSparseMemoryRequirements2;
extern PFN_vkGetPhysicalDeviceExternalBufferProperties vkGetPhysicalDeviceExternalBufferProperties;
extern PFN_vkGetPhysicalDeviceExternalFenceProperties vkGetPhysicalDeviceExternalFenceProperties;
extern PFN_vkGetPhysicalDeviceExternalSemaphoreProperties vkGetPhysicalDeviceExternalSemaphoreProperties;
extern PFN_vkGetPhysicalDeviceFeatures2 vkGetPhysicalDeviceFeatures2;
extern PFN_vkGetPhysicalDeviceFormatProperties2 vkGetPhysicalDeviceFormatProperties2;
extern PFN_vkGetPhysicalDeviceImageFormatProperties2 vkGetPhysicalDeviceImageFormatProperties2;
extern PFN_vkGetPhysicalDeviceMemoryProperties2 vkGetPhysicalDeviceMemoryProperties2;
extern PFN_vkGetPhysicalDeviceProperties2 vkGetPhysicalDeviceProperties2;
extern PFN_vkGetPhysicalDeviceQueueFamilyProperties2 vkGetPhysicalDeviceQueueFamilyProperties2;
extern PFN_vkGetPhysicalDeviceSparseImageFormatProperties2 vkGetPhysicalDeviceSparseImageFormatProperties2;
extern PFN_vkTrimCommandPool vkTrimCommandPool;
extern PFN_vkUpdateDescriptorSetWithTemplate vkUpdateDescriptorSetWithTemplate;
#endif // defined(VK_VERSION_1_1)
#if defined(VK_VERSION_1_2)
extern PFN_vkCmdBeginRenderPass2 vkCmdBeginRenderPass2;
extern PFN_vkCmdDrawIndexedIndirectCount vkCmdDrawIndexedIndirectCount;
extern PFN_vkCmdDrawIndirectCount vkCmdDrawIndirectCount;
extern PFN_vkCmdEndRenderPass2 vkCmdEndRenderPass2;
extern PFN_vkCmdNextSubpass2 vkCmdNextSubpass2;
extern PFN_vkCreateRenderPass2 vkCreateRenderPass2;
extern PFN_vkGetBufferDeviceAddress vkGetBufferDeviceAddress;
extern PFN_vkGetBufferOpaqueCaptureAddress vkGetBufferOpaqueCaptureAddress;
extern PFN_vkGetDeviceMemoryOpaqueCaptureAddress vkGetDeviceMemoryOpaqueCaptureAddress;
extern PFN_vkGetSemaphoreCounterValue vkGetSemaphoreCounterValue;
extern PFN_vkResetQueryPool vkResetQueryPool;
extern PFN_vkSignalSemaphore vkSignalSemaphore;
extern PFN_vkWaitSemaphores vkWaitSemaphores;
#endif // defined(VK_VERSION_1_2)
#if defined(VK_VERSION_1_3)
extern PFN_vkCmdBeginRendering vkCmdBeginRendering;
extern PFN_vkCmdBindVertexBuffers2 vkCmdBindVertexBuffers2;
extern PFN_vkCmdBlitImage2 vkCmdBlitImage2;
extern PFN_vkCmdCopyBuffer2 vkCmdCopyBuffer2;
extern PFN_vkCmdCopyBufferToImage2 vkCmdCopyBufferToImage2;
extern PFN_vkCmdCopyImage2 vkCmdCopyImage2;
extern PFN_vkCmdCopyImageToBuffer2 vkCmdCopyImageToBuffer2;
extern PFN_vkCmdEndRendering vkCmdEndRendering;
extern PFN_vkCmdPipelineBarrier2 vkCmdPipelineBarrier2;
extern PFN_vkCmdResetEvent2 vkCmdResetEvent2;
extern PFN_vkCmdResolveImage2 vkCmdResolveImage2;
extern PFN_vkCmdSetCullMode vkCmdSetCullMode;
extern PFN_vkCmdSetDepthBiasEnable vkCmdSetDepthBiasEnable;
extern PFN_vkCmdSetDepthBoundsTestEnable vkCmdSetDepthBoundsTestEnable;
extern PFN_vkCmdSetDepthCompareOp vkCmdSetDepthCompareOp;
extern PFN_vkCmdSetDepthTestEnable vkCmdSetDepthTestEnable;
extern PFN_vkCmdSetDepthWriteEnable vkCmdSetDepthWriteEnable;
extern PFN_vkCmdSetEvent2 vkCmdSetEvent2;
extern PFN_vkCmdSetFrontFace vkCmdSetFrontFace;
extern PFN_vkCmdSetPrimitiveRestartEnable vkCmdSetPrimitiveRestartEnable;
extern PFN_vkCmdSetPrimitiveTopology vkCmdSetPrimitiveTopology;
extern PFN_vkCmdSetRasterizerDiscardEnable vkCmdSetRasterizerDiscardEnable;
extern PFN_vkCmdSetScissorWithCount vkCmdSetScissorWithCount;
extern PFN_vkCmdSetStencilOp vkCmdSetStencilOp;
extern PFN_vkCmdSetStencilTestEnable vkCmdSetStencilTestEnable;
extern PFN_vkCmdSetViewportWithCount vkCmdSetViewportWithCount;
extern PFN_vkCmdWaitEvents2 vkCmdWaitEvents2;
extern PFN_vkCmdWriteTimestamp2 vkCmdWriteTimestamp2;
extern PFN_vkCreatePrivateDataSlot vkCreatePrivateDataSlot;
extern PFN_vkDestroyPrivateDataSlot vkDestroyPrivateDataSlot;
extern PFN_vkGetDeviceBufferMemoryRequirements vkGetDeviceBufferMemoryRequirements;
extern PFN_vkGetDeviceImageMemoryRequirements vkGetDeviceImageMemoryRequirements;
extern PFN_vkGetDeviceImageSparseMemoryRequirements vkGetDeviceImageSparseMemoryRequirements;
extern PFN_vkGetPhysicalDeviceToolProperties vkGetPhysicalDeviceToolProperties;
extern PFN_vkGetPrivateData vkGetPrivateData;
extern PFN_vkQueueSubmit2 vkQueueSubmit2;
extern PFN_vkSetPrivateData vkSetPrivateData;
#endif // defined(VK_VERSION_1_3)
#if defined(VK_AMD_buffer_marker)
extern PFN_vkCmdWriteBufferMarkerAMD vkCmdWriteBufferMarkerAMD;
#endif // defined(VK_AMD_buffer_marker)
#if defined(VK_AMD_display_native_hdr)
extern PFN_vkSetLocalDimmingAMD vkSetLocalDimmingAMD;
#endif // defined(VK_AMD_display_native_hdr)
#if defined(VK_AMD_draw_indirect_count)
extern PFN_vkCmdDrawIndexedIndirectCountAMD vkCmdDrawIndexedIndirectCountAMD;
extern PFN_vkCmdDrawIndirectCountAMD vkCmdDrawIndirectCountAMD;
#endif // defined(VK_AMD_draw_indirect_count)
#if defined(VK_AMD_shader_info)
extern PFN_vkGetShaderInfoAMD vkGetShaderInfoAMD;
#endif // defined(VK_AMD_shader_info)
#if defined(VK_ANDROID_external_memory_android_hardware_buffer)
extern PFN_vkGetAndroidHardwareBufferPropertiesANDROID vkGetAndroidHardwareBufferPropertiesANDROID;
extern PFN_vkGetMemoryAndroidHardwareBufferANDROID vkGetMemoryAndroidHardwareBufferANDROID;
#endif // defined(VK_ANDROID_external_memory_android_hardware_buffer)
#if defined(VK_ANDROID_native_buffer)
extern PFN_vkAcquireImageANDROID vkAcquireImageANDROID;
extern PFN_vkGetSwapchainGrallocUsage2ANDROID vkGetSwapchainGrallocUsage2ANDROID;
extern PFN_vkGetSwapchainGrallocUsageANDROID vkGetSwapchainGrallocUsageANDROID;
extern PFN_vkQueueSignalReleaseImageANDROID vkQueueSignalReleaseImageANDROID;
#endif // defined(VK_ANDROID_native_buffer)
#if defined(VK_EXT_acquire_drm_display)
extern PFN_vkAcquireDrmDisplayEXT vkAcquireDrmDisplayEXT;
extern PFN_vkGetDrmDisplayEXT vkGetDrmDisplayEXT;
#endif // defined(VK_EXT_acquire_drm_display)
#if defined(VK_EXT_acquire_xlib_display)
extern PFN_vkAcquireXlibDisplayEXT vkAcquireXlibDisplayEXT;
extern PFN_vkGetRandROutputDisplayEXT vkGetRandROutputDisplayEXT;
#endif // defined(VK_EXT_acquire_xlib_display)
#if defined(VK_EXT_buffer_device_address)
extern PFN_vkGetBufferDeviceAddressEXT vkGetBufferDeviceAddressEXT;
#endif // defined(VK_EXT_buffer_device_address)
#if defined(VK_EXT_calibrated_timestamps)
extern PFN_vkGetCalibratedTimestampsEXT vkGetCalibratedTimestampsEXT;
extern PFN_vkGetPhysicalDeviceCalibrateableTimeDomainsEXT vkGetPhysicalDeviceCalibrateableTimeDomainsEXT;
#endif // defined(VK_EXT_calibrated_timestamps)
#if defined(VK_EXT_color_write_enable)
extern PFN_vkCmdSetColorWriteEnableEXT vkCmdSetColorWriteEnableEXT;
#endif // defined(VK_EXT_color_write_enable)
#if defined(VK_EXT_conditional_rendering)
extern PFN_vkCmdBeginConditionalRenderingEXT vkCmdBeginConditionalRenderingEXT;
extern PFN_vkCmdEndConditionalRenderingEXT vkCmdEndConditionalRenderingEXT;
#endif // defined(VK_EXT_conditional_rendering)
#if defined(VK_EXT_debug_marker)
extern PFN_vkCmdDebugMarkerBeginEXT vkCmdDebugMarkerBeginEXT;
extern PFN_vkCmdDebugMarkerEndEXT vkCmdDebugMarkerEndEXT;
extern PFN_vkCmdDebugMarkerInsertEXT vkCmdDebugMarkerInsertEXT;
extern PFN_vkDebugMarkerSetObjectNameEXT vkDebugMarkerSetObjectNameEXT;
extern PFN_vkDebugMarkerSetObjectTagEXT vkDebugMarkerSetObjectTagEXT;
#endif // defined(VK_EXT_debug_marker)
#if defined(VK_EXT_debug_report)
extern PFN_vkCreateDebugReportCallbackEXT vkCreateDebugReportCallbackEXT;
extern PFN_vkDebugReportMessageEXT vkDebugReportMessageEXT;
extern PFN_vkDestroyDebugReportCallbackEXT vkDestroyDebugReportCallbackEXT;
#endif // defined(VK_EXT_debug_report)
#if defined(VK_EXT_debug_utils)
extern PFN_vkCmdBeginDebugUtilsLabelEXT vkCmdBeginDebugUtilsLabelEXT;
extern PFN_vkCmdEndDebugUtilsLabelEXT vkCmdEndDebugUtilsLabelEXT;
extern PFN_vkCmdInsertDebugUtilsLabelEXT vkCmdInsertDebugUtilsLabelEXT;
extern PFN_vkCreateDebugUtilsMessengerEXT vkCreateDebugUtilsMessengerEXT;
extern PFN_vkDestroyDebugUtilsMessengerEXT vkDestroyDebugUtilsMessengerEXT;
extern PFN_vkQueueBeginDebugUtilsLabelEXT vkQueueBeginDebugUtilsLabelEXT;
extern PFN_vkQueueEndDebugUtilsLabelEXT vkQueueEndDebugUtilsLabelEXT;
extern PFN_vkQueueInsertDebugUtilsLabelEXT vkQueueInsertDebugUtilsLabelEXT;
extern PFN_vkSetDebugUtilsObjectNameEXT vkSetDebugUtilsObjectNameEXT;
extern PFN_vkSetDebugUtilsObjectTagEXT vkSetDebugUtilsObjectTagEXT;
extern PFN_vkSubmitDebugUtilsMessageEXT vkSubmitDebugUtilsMessageEXT;
#endif // defined(VK_EXT_debug_utils)
#if defined(VK_EXT_direct_mode_display)
extern PFN_vkReleaseDisplayEXT vkReleaseDisplayEXT;
#endif // defined(VK_EXT_direct_mode_display)
#if defined(VK_EXT_directfb_surface)
extern PFN_vkCreateDirectFBSurfaceEXT vkCreateDirectFBSurfaceEXT;
extern PFN_vkGetPhysicalDeviceDirectFBPresentationSupportEXT vkGetPhysicalDeviceDirectFBPresentationSupportEXT;
#endif // defined(VK_EXT_directfb_surface)
#if defined(VK_EXT_discard_rectangles)
extern PFN_vkCmdSetDiscardRectangleEXT vkCmdSetDiscardRectangleEXT;
#endif // defined(VK_EXT_discard_rectangles)
#if defined(VK_EXT_display_control)
extern PFN_vkDisplayPowerControlEXT vkDisplayPowerControlEXT;
extern PFN_vkGetSwapchainCounterEXT vkGetSwapchainCounterEXT;
extern PFN_vkRegisterDeviceEventEXT vkRegisterDeviceEventEXT;
extern PFN_vkRegisterDisplayEventEXT vkRegisterDisplayEventEXT;
#endif // defined(VK_EXT_display_control)
#if defined(VK_EXT_display_surface_counter)
extern PFN_vkGetPhysicalDeviceSurfaceCapabilities2EXT vkGetPhysicalDeviceSurfaceCapabilities2EXT;
#endif // defined(VK_EXT_display_surface_counter)
#if defined(VK_EXT_extended_dynamic_state)
extern PFN_vkCmdBindVertexBuffers2EXT vkCmdBindVertexBuffers2EXT;
extern PFN_vkCmdSetCullModeEXT vkCmdSetCullModeEXT;
extern PFN_vkCmdSetDepthBoundsTestEnableEXT vkCmdSetDepthBoundsTestEnableEXT;
extern PFN_vkCmdSetDepthCompareOpEXT vkCmdSetDepthCompareOpEXT;
extern PFN_vkCmdSetDepthTestEnableEXT vkCmdSetDepthTestEnableEXT;
extern PFN_vkCmdSetDepthWriteEnableEXT vkCmdSetDepthWriteEnableEXT;
extern PFN_vkCmdSetFrontFaceEXT vkCmdSetFrontFaceEXT;
extern PFN_vkCmdSetPrimitiveTopologyEXT vkCmdSetPrimitiveTopologyEXT;
extern PFN_vkCmdSetScissorWithCountEXT vkCmdSetScissorWithCountEXT;
extern PFN_vkCmdSetStencilOpEXT vkCmdSetStencilOpEXT;
extern PFN_vkCmdSetStencilTestEnableEXT vkCmdSetStencilTestEnableEXT;
extern PFN_vkCmdSetViewportWithCountEXT vkCmdSetViewportWithCountEXT;
#endif // defined(VK_EXT_extended_dynamic_state)
#if defined(VK_EXT_extended_dynamic_state2)
extern PFN_vkCmdSetDepthBiasEnableEXT vkCmdSetDepthBiasEnableEXT;
extern PFN_vkCmdSetLogicOpEXT vkCmdSetLogicOpEXT;
extern PFN_vkCmdSetPatchControlPointsEXT vkCmdSetPatchControlPointsEXT;
extern PFN_vkCmdSetPrimitiveRestartEnableEXT vkCmdSetPrimitiveRestartEnableEXT;
extern PFN_vkCmdSetRasterizerDiscardEnableEXT vkCmdSetRasterizerDiscardEnableEXT;
#endif // defined(VK_EXT_extended_dynamic_state2)
#if defined(VK_EXT_external_memory_host)
extern PFN_vkGetMemoryHostPointerPropertiesEXT vkGetMemoryHostPointerPropertiesEXT;
#endif // defined(VK_EXT_external_memory_host)
#if defined(VK_EXT_full_screen_exclusive)
extern PFN_vkAcquireFullScreenExclusiveModeEXT vkAcquireFullScreenExclusiveModeEXT;
extern PFN_vkGetPhysicalDeviceSurfacePresentModes2EXT vkGetPhysicalDeviceSurfacePresentModes2EXT;
extern PFN_vkReleaseFullScreenExclusiveModeEXT vkReleaseFullScreenExclusiveModeEXT;
#endif // defined(VK_EXT_full_screen_exclusive)
#if defined(VK_EXT_hdr_metadata)
extern PFN_vkSetHdrMetadataEXT vkSetHdrMetadataEXT;
#endif // defined(VK_EXT_hdr_metadata)
#if defined(VK_EXT_headless_surface)
extern PFN_vkCreateHeadlessSurfaceEXT vkCreateHeadlessSurfaceEXT;
#endif // defined(VK_EXT_headless_surface)
#if defined(VK_EXT_host_query_reset)
extern PFN_vkResetQueryPoolEXT vkResetQueryPoolEXT;
#endif // defined(VK_EXT_host_query_reset)
#if defined(VK_EXT_image_compression_control)
extern PFN_vkGetImageSubresourceLayout2EXT vkGetImageSubresourceLayout2EXT;
#endif // defined(VK_EXT_image_compression_control)
#if defined(VK_EXT_image_drm_format_modifier)
extern PFN_vkGetImageDrmFormatModifierPropertiesEXT vkGetImageDrmFormatModifierPropertiesEXT;
#endif // defined(VK_EXT_image_drm_format_modifier)
#if defined(VK_EXT_line_rasterization)
extern PFN_vkCmdSetLineStippleEXT vkCmdSetLineStippleEXT;
#endif // defined(VK_EXT_line_rasterization)
#if defined(VK_EXT_metal_objects)
extern PFN_vkExportMetalObjectsEXT vkExportMetalObjectsEXT;
#endif // defined(VK_EXT_metal_objects)
#if defined(VK_EXT_metal_surface)
extern PFN_vkCreateMetalSurfaceEXT vkCreateMetalSurfaceEXT;
#endif // defined(VK_EXT_metal_surface)
#if defined(VK_EXT_multi_draw)
extern PFN_vkCmdDrawMultiEXT vkCmdDrawMultiEXT;
extern PFN_vkCmdDrawMultiIndexedEXT vkCmdDrawMultiIndexedEXT;
#endif // defined(VK_EXT_multi_draw)
#if defined(VK_EXT_pageable_device_local_memory)
extern PFN_vkSetDeviceMemoryPriorityEXT vkSetDeviceMemoryPriorityEXT;
#endif // defined(VK_EXT_pageable_device_local_memory)
#if defined(VK_EXT_pipeline_properties)
extern PFN_vkGetPipelinePropertiesEXT vkGetPipelinePropertiesEXT;
#endif // defined(VK_EXT_pipeline_properties)
#if defined(VK_EXT_private_data)
extern PFN_vkCreatePrivateDataSlotEXT vkCreatePrivateDataSlotEXT;
extern PFN_vkDestroyPrivateDataSlotEXT vkDestroyPrivateDataSlotEXT;
extern PFN_vkGetPrivateDataEXT vkGetPrivateDataEXT;
extern PFN_vkSetPrivateDataEXT vkSetPrivateDataEXT;
#endif // defined(VK_EXT_private_data)
#if defined(VK_EXT_sample_locations)
extern PFN_vkCmdSetSampleLocationsEXT vkCmdSetSampleLocationsEXT;
extern PFN_vkGetPhysicalDeviceMultisamplePropertiesEXT vkGetPhysicalDeviceMultisamplePropertiesEXT;
#endif // defined(VK_EXT_sample_locations)
#if defined(VK_EXT_tooling_info)
extern PFN_vkGetPhysicalDeviceToolPropertiesEXT vkGetPhysicalDeviceToolPropertiesEXT;
#endif // defined(VK_EXT_tooling_info)
#if defined(VK_EXT_transform_feedback)
extern PFN_vkCmdBeginQueryIndexedEXT vkCmdBeginQueryIndexedEXT;
extern PFN_vkCmdBeginTransformFeedbackEXT vkCmdBeginTransformFeedbackEXT;
extern PFN_vkCmdBindTransformFeedbackBuffersEXT vkCmdBindTransformFeedbackBuffersEXT;
extern PFN_vkCmdDrawIndirectByteCountEXT vkCmdDrawIndirectByteCountEXT;
extern PFN_vkCmdEndQueryIndexedEXT vkCmdEndQueryIndexedEXT;
extern PFN_vkCmdEndTransformFeedbackEXT vkCmdEndTransformFeedbackEXT;
#endif // defined(VK_EXT_transform_feedback)
#if defined(VK_EXT_validation_cache)
extern PFN_vkCreateValidationCacheEXT vkCreateValidationCacheEXT;
extern PFN_vkDestroyValidationCacheEXT vkDestroyValidationCacheEXT;
extern PFN_vkGetValidationCacheDataEXT vkGetValidationCacheDataEXT;
extern PFN_vkMergeValidationCachesEXT vkMergeValidationCachesEXT;
#endif // defined(VK_EXT_validation_cache)
#if defined(VK_EXT_vertex_input_dynamic_state)
extern PFN_vkCmdSetVertexInputEXT vkCmdSetVertexInputEXT;
#endif // defined(VK_EXT_vertex_input_dynamic_state)
#if defined(VK_FUCHSIA_buffer_collection)
extern PFN_vkCreateBufferCollectionFUCHSIA vkCreateBufferCollectionFUCHSIA;
extern PFN_vkDestroyBufferCollectionFUCHSIA vkDestroyBufferCollectionFUCHSIA;
extern PFN_vkGetBufferCollectionPropertiesFUCHSIA vkGetBufferCollectionPropertiesFUCHSIA;
extern PFN_vkSetBufferCollectionBufferConstraintsFUCHSIA vkSetBufferCollectionBufferConstraintsFUCHSIA;
extern PFN_vkSetBufferCollectionImageConstraintsFUCHSIA vkSetBufferCollectionImageConstraintsFUCHSIA;
#endif // defined(VK_FUCHSIA_buffer_collection)
#if defined(VK_FUCHSIA_external_memory)
extern PFN_vkGetMemoryZirconHandleFUCHSIA vkGetMemoryZirconHandleFUCHSIA;
extern PFN_vkGetMemoryZirconHandlePropertiesFUCHSIA vkGetMemoryZirconHandlePropertiesFUCHSIA;
#endif // defined(VK_FUCHSIA_external_memory)
#if defined(VK_FUCHSIA_external_semaphore)
extern PFN_vkGetSemaphoreZirconHandleFUCHSIA vkGetSemaphoreZirconHandleFUCHSIA;
extern PFN_vkImportSemaphoreZirconHandleFUCHSIA vkImportSemaphoreZirconHandleFUCHSIA;
#endif // defined(VK_FUCHSIA_external_semaphore)
#if defined(VK_FUCHSIA_imagepipe_surface)
extern PFN_vkCreateImagePipeSurfaceFUCHSIA vkCreateImagePipeSurfaceFUCHSIA;
#endif // defined(VK_FUCHSIA_imagepipe_surface)
#if defined(VK_GGP_stream_descriptor_surface)
extern PFN_vkCreateStreamDescriptorSurfaceGGP vkCreateStreamDescriptorSurfaceGGP;
#endif // defined(VK_GGP_stream_descriptor_surface)
#if defined(VK_GOOGLE_display_timing)
extern PFN_vkGetPastPresentationTimingGOOGLE vkGetPastPresentationTimingGOOGLE;
extern PFN_vkGetRefreshCycleDurationGOOGLE vkGetRefreshCycleDurationGOOGLE;
#endif // defined(VK_GOOGLE_display_timing)
#if defined(VK_HUAWEI_invocation_mask)
extern PFN_vkCmdBindInvocationMaskHUAWEI vkCmdBindInvocationMaskHUAWEI;
#endif // defined(VK_HUAWEI_invocation_mask)
#if defined(VK_HUAWEI_subpass_shading)
extern PFN_vkCmdSubpassShadingHUAWEI vkCmdSubpassShadingHUAWEI;
extern PFN_vkGetDeviceSubpassShadingMaxWorkgroupSizeHUAWEI vkGetDeviceSubpassShadingMaxWorkgroupSizeHUAWEI;
#endif // defined(VK_HUAWEI_subpass_shading)
#if defined(VK_INTEL_performance_query)
extern PFN_vkAcquirePerformanceConfigurationINTEL vkAcquirePerformanceConfigurationINTEL;
extern PFN_vkCmdSetPerformanceMarkerINTEL vkCmdSetPerformanceMarkerINTEL;
extern PFN_vkCmdSetPerformanceOverrideINTEL vkCmdSetPerformanceOverrideINTEL;
extern PFN_vkCmdSetPerformanceStreamMarkerINTEL vkCmdSetPerformanceStreamMarkerINTEL;
extern PFN_vkGetPerformanceParameterINTEL vkGetPerformanceParameterINTEL;
extern PFN_vkInitializePerformanceApiINTEL vkInitializePerformanceApiINTEL;
extern PFN_vkQueueSetPerformanceConfigurationINTEL vkQueueSetPerformanceConfigurationINTEL;
extern PFN_vkReleasePerformanceConfigurationINTEL vkReleasePerformanceConfigurationINTEL;
extern PFN_vkUninitializePerformanceApiINTEL vkUninitializePerformanceApiINTEL;
#endif // defined(VK_INTEL_performance_query)
#if defined(VK_KHR_acceleration_structure)
extern PFN_vkBuildAccelerationStructuresKHR vkBuildAccelerationStructuresKHR;
extern PFN_vkCmdBuildAccelerationStructuresIndirectKHR vkCmdBuildAccelerationStructuresIndirectKHR;
extern PFN_vkCmdBuildAccelerationStructuresKHR vkCmdBuildAccelerationStructuresKHR;
extern PFN_vkCmdCopyAccelerationStructureKHR vkCmdCopyAccelerationStructureKHR;
extern PFN_vkCmdCopyAccelerationStructureToMemoryKHR vkCmdCopyAccelerationStructureToMemoryKHR;
extern PFN_vkCmdCopyMemoryToAccelerationStructureKHR vkCmdCopyMemoryToAccelerationStructureKHR;
extern PFN_vkCmdWriteAccelerationStructuresPropertiesKHR vkCmdWriteAccelerationStructuresPropertiesKHR;
extern PFN_vkCopyAccelerationStructureKHR vkCopyAccelerationStructureKHR;
extern PFN_vkCopyAccelerationStructureToMemoryKHR vkCopyAccelerationStructureToMemoryKHR;
extern PFN_vkCopyMemoryToAccelerationStructureKHR vkCopyMemoryToAccelerationStructureKHR;
extern PFN_vkCreateAccelerationStructureKHR vkCreateAccelerationStructureKHR;
extern PFN_vkDestroyAccelerationStructureKHR vkDestroyAccelerationStructureKHR;
extern PFN_vkGetAccelerationStructureBuildSizesKHR vkGetAccelerationStructureBuildSizesKHR;
extern PFN_vkGetAccelerationStructureDeviceAddressKHR vkGetAccelerationStructureDeviceAddressKHR;
extern PFN_vkGetDeviceAccelerationStructureCompatibilityKHR vkGetDeviceAccelerationStructureCompatibilityKHR;
extern PFN_vkWriteAccelerationStructuresPropertiesKHR vkWriteAccelerationStructuresPropertiesKHR;
#endif // defined(VK_KHR_acceleration_structure)
#if defined(VK_KHR_android_surface)
extern PFN_vkCreateAndroidSurfaceKHR vkCreateAndroidSurfaceKHR;
#endif // defined(VK_KHR_android_surface)
#if defined(VK_KHR_bind_memory2)
extern PFN_vkBindBufferMemory2KHR vkBindBufferMemory2KHR;
extern PFN_vkBindImageMemory2KHR vkBindImageMemory2KHR;
#endif // defined(VK_KHR_bind_memory2)
#if defined(VK_KHR_buffer_device_address)
extern PFN_vkGetBufferDeviceAddressKHR vkGetBufferDeviceAddressKHR;
extern PFN_vkGetBufferOpaqueCaptureAddressKHR vkGetBufferOpaqueCaptureAddressKHR;
extern PFN_vkGetDeviceMemoryOpaqueCaptureAddressKHR vkGetDeviceMemoryOpaqueCaptureAddressKHR;
#endif // defined(VK_KHR_buffer_device_address)
#if defined(VK_KHR_copy_commands2)
extern PFN_vkCmdBlitImage2KHR vkCmdBlitImage2KHR;
extern PFN_vkCmdCopyBuffer2KHR vkCmdCopyBuffer2KHR;
extern PFN_vkCmdCopyBufferToImage2KHR vkCmdCopyBufferToImage2KHR;
extern PFN_vkCmdCopyImage2KHR vkCmdCopyImage2KHR;
extern PFN_vkCmdCopyImageToBuffer2KHR vkCmdCopyImageToBuffer2KHR;
extern PFN_vkCmdResolveImage2KHR vkCmdResolveImage2KHR;
#endif // defined(VK_KHR_copy_commands2)
#if defined(VK_KHR_create_renderpass2)
extern PFN_vkCmdBeginRenderPass2KHR vkCmdBeginRenderPass2KHR;
extern PFN_vkCmdEndRenderPass2KHR vkCmdEndRenderPass2KHR;
extern PFN_vkCmdNextSubpass2KHR vkCmdNextSubpass2KHR;
extern PFN_vkCreateRenderPass2KHR vkCreateRenderPass2KHR;
#endif // defined(VK_KHR_create_renderpass2)
#if defined(VK_KHR_deferred_host_operations)
extern PFN_vkCreateDeferredOperationKHR vkCreateDeferredOperationKHR;
extern PFN_vkDeferredOperationJoinKHR vkDeferredOperationJoinKHR;
extern PFN_vkDestroyDeferredOperationKHR vkDestroyDeferredOperationKHR;
extern PFN_vkGetDeferredOperationMaxConcurrencyKHR vkGetDeferredOperationMaxConcurrencyKHR;
extern PFN_vkGetDeferredOperationResultKHR vkGetDeferredOperationResultKHR;
#endif // defined(VK_KHR_deferred_host_operations)
#if defined(VK_KHR_descriptor_update_template)
extern PFN_vkCreateDescriptorUpdateTemplateKHR vkCreateDescriptorUpdateTemplateKHR;
extern PFN_vkDestroyDescriptorUpdateTemplateKHR vkDestroyDescriptorUpdateTemplateKHR;
extern PFN_vkUpdateDescriptorSetWithTemplateKHR vkUpdateDescriptorSetWithTemplateKHR;
#endif // defined(VK_KHR_descriptor_update_template)
#if defined(VK_KHR_device_group)
extern PFN_vkCmdDispatchBaseKHR vkCmdDispatchBaseKHR;
extern PFN_vkCmdSetDeviceMaskKHR vkCmdSetDeviceMaskKHR;
extern PFN_vkGetDeviceGroupPeerMemoryFeaturesKHR vkGetDeviceGroupPeerMemoryFeaturesKHR;
#endif // defined(VK_KHR_device_group)
#if defined(VK_KHR_device_group_creation)
extern PFN_vkEnumeratePhysicalDeviceGroupsKHR vkEnumeratePhysicalDeviceGroupsKHR;
#endif // defined(VK_KHR_device_group_creation)
#if defined(VK_KHR_display)
extern PFN_vkCreateDisplayModeKHR vkCreateDisplayModeKHR;
extern PFN_vkCreateDisplayPlaneSurfaceKHR vkCreateDisplayPlaneSurfaceKHR;
extern PFN_vkGetDisplayModePropertiesKHR vkGetDisplayModePropertiesKHR;
extern PFN_vkGetDisplayPlaneCapabilitiesKHR vkGetDisplayPlaneCapabilitiesKHR;
extern PFN_vkGetDisplayPlaneSupportedDisplaysKHR vkGetDisplayPlaneSupportedDisplaysKHR;
extern PFN_vkGetPhysicalDeviceDisplayPlanePropertiesKHR vkGetPhysicalDeviceDisplayPlanePropertiesKHR;
extern PFN_vkGetPhysicalDeviceDisplayPropertiesKHR vkGetPhysicalDeviceDisplayPropertiesKHR;
#endif // defined(VK_KHR_display)
#if defined(VK_KHR_display_swapchain)
extern PFN_vkCreateSharedSwapchainsKHR vkCreateSharedSwapchainsKHR;
#endif // defined(VK_KHR_display_swapchain)
#if defined(VK_KHR_draw_indirect_count)
extern PFN_vkCmdDrawIndexedIndirectCountKHR vkCmdDrawIndexedIndirectCountKHR;
extern PFN_vkCmdDrawIndirectCountKHR vkCmdDrawIndirectCountKHR;
#endif // defined(VK_KHR_draw_indirect_count)
#if defined(VK_KHR_dynamic_rendering)
extern PFN_vkCmdBeginRenderingKHR vkCmdBeginRenderingKHR;
extern PFN_vkCmdEndRenderingKHR vkCmdEndRenderingKHR;
#endif // defined(VK_KHR_dynamic_rendering)
#if defined(VK_KHR_external_fence_capabilities)
extern PFN_vkGetPhysicalDeviceExternalFencePropertiesKHR vkGetPhysicalDeviceExternalFencePropertiesKHR;
#endif // defined(VK_KHR_external_fence_capabilities)
#if defined(VK_KHR_external_fence_fd)
extern PFN_vkGetFenceFdKHR vkGetFenceFdKHR;
extern PFN_vkImportFenceFdKHR vkImportFenceFdKHR;
#endif // defined(VK_KHR_external_fence_fd)
#if defined(VK_KHR_external_fence_win32)
extern PFN_vkGetFenceWin32HandleKHR vkGetFenceWin32HandleKHR;
extern PFN_vkImportFenceWin32HandleKHR vkImportFenceWin32HandleKHR;
#endif // defined(VK_KHR_external_fence_win32)
#if defined(VK_KHR_external_memory_capabilities)
extern PFN_vkGetPhysicalDeviceExternalBufferPropertiesKHR vkGetPhysicalDeviceExternalBufferPropertiesKHR;
#endif // defined(VK_KHR_external_memory_capabilities)
#if defined(VK_KHR_external_memory_fd)
extern PFN_vkGetMemoryFdKHR vkGetMemoryFdKHR;
extern PFN_vkGetMemoryFdPropertiesKHR vkGetMemoryFdPropertiesKHR;
#endif // defined(VK_KHR_external_memory_fd)
#if defined(VK_KHR_external_memory_win32)
extern PFN_vkGetMemoryWin32HandleKHR vkGetMemoryWin32HandleKHR;
extern PFN_vkGetMemoryWin32HandlePropertiesKHR vkGetMemoryWin32HandlePropertiesKHR;
#endif // defined(VK_KHR_external_memory_win32)
#if defined(VK_KHR_external_semaphore_capabilities)
extern PFN_vkGetPhysicalDeviceExternalSemaphorePropertiesKHR vkGetPhysicalDeviceExternalSemaphorePropertiesKHR;
#endif // defined(VK_KHR_external_semaphore_capabilities)
#if defined(VK_KHR_external_semaphore_fd)
extern PFN_vkGetSemaphoreFdKHR vkGetSemaphoreFdKHR;
extern PFN_vkImportSemaphoreFdKHR vkImportSemaphoreFdKHR;
#endif // defined(VK_KHR_external_semaphore_fd)
#if defined(VK_KHR_external_semaphore_win32)
extern PFN_vkGetSemaphoreWin32HandleKHR vkGetSemaphoreWin32HandleKHR;
extern PFN_vkImportSemaphoreWin32HandleKHR vkImportSemaphoreWin32HandleKHR;
#endif // defined(VK_KHR_external_semaphore_win32)
#if defined(VK_KHR_fragment_shading_rate)
extern PFN_vkCmdSetFragmentShadingRateKHR vkCmdSetFragmentShadingRateKHR;
extern PFN_vkGetPhysicalDeviceFragmentShadingRatesKHR vkGetPhysicalDeviceFragmentShadingRatesKHR;
#endif // defined(VK_KHR_fragment_shading_rate)
#if defined(VK_KHR_get_display_properties2)
extern PFN_vkGetDisplayModeProperties2KHR vkGetDisplayModeProperties2KHR;
extern PFN_vkGetDisplayPlaneCapabilities2KHR vkGetDisplayPlaneCapabilities2KHR;
extern PFN_vkGetPhysicalDeviceDisplayPlaneProperties2KHR vkGetPhysicalDeviceDisplayPlaneProperties2KHR;
extern PFN_vkGetPhysicalDeviceDisplayProperties2KHR vkGetPhysicalDeviceDisplayProperties2KHR;
#endif // defined(VK_KHR_get_display_properties2)
#if defined(VK_KHR_get_memory_requirements2)
extern PFN_vkGetBufferMemoryRequirements2KHR vkGetBufferMemoryRequirements2KHR;
extern PFN_vkGetImageMemoryRequirements2KHR vkGetImageMemoryRequirements2KHR;
extern PFN_vkGetImageSparseMemoryRequirements2KHR vkGetImageSparseMemoryRequirements2KHR;
#endif // defined(VK_KHR_get_memory_requirements2)
#if defined(VK_KHR_get_physical_device_properties2)
extern PFN_vkGetPhysicalDeviceFeatures2KHR vkGetPhysicalDeviceFeatures2KHR;
extern PFN_vkGetPhysicalDeviceFormatProperties2KHR vkGetPhysicalDeviceFormatProperties2KHR;
extern PFN_vkGetPhysicalDeviceImageFormatProperties2KHR vkGetPhysicalDeviceImageFormatProperties2KHR;
extern PFN_vkGetPhysicalDeviceMemoryProperties2KHR vkGetPhysicalDeviceMemoryProperties2KHR;
extern PFN_vkGetPhysicalDeviceProperties2KHR vkGetPhysicalDeviceProperties2KHR;
extern PFN_vkGetPhysicalDeviceQueueFamilyProperties2KHR vkGetPhysicalDeviceQueueFamilyProperties2KHR;
extern PFN_vkGetPhysicalDeviceSparseImageFormatProperties2KHR vkGetPhysicalDeviceSparseImageFormatProperties2KHR;
#endif // defined(VK_KHR_get_physical_device_properties2)
#if defined(VK_KHR_get_surface_capabilities2)
extern PFN_vkGetPhysicalDeviceSurfaceCapabilities2KHR vkGetPhysicalDeviceSurfaceCapabilities2KHR;
extern PFN_vkGetPhysicalDeviceSurfaceFormats2KHR vkGetPhysicalDeviceSurfaceFormats2KHR;
#endif // defined(VK_KHR_get_surface_capabilities2)
#if defined(VK_KHR_maintenance1)
extern PFN_vkTrimCommandPoolKHR vkTrimCommandPoolKHR;
#endif // defined(VK_KHR_maintenance1)
#if defined(VK_KHR_maintenance3)
extern PFN_vkGetDescriptorSetLayoutSupportKHR vkGetDescriptorSetLayoutSupportKHR;
#endif // defined(VK_KHR_maintenance3)
#if defined(VK_KHR_maintenance4)
extern PFN_vkGetDeviceBufferMemoryRequirementsKHR vkGetDeviceBufferMemoryRequirementsKHR;
extern PFN_vkGetDeviceImageMemoryRequirementsKHR vkGetDeviceImageMemoryRequirementsKHR;
extern PFN_vkGetDeviceImageSparseMemoryRequirementsKHR vkGetDeviceImageSparseMemoryRequirementsKHR;
#endif // defined(VK_KHR_maintenance4)
#if defined(VK_KHR_performance_query)
extern PFN_vkAcquireProfilingLockKHR vkAcquireProfilingLockKHR;
extern PFN_vkEnumeratePhysicalDeviceQueueFamilyPerformanceQueryCountersKHR vkEnumeratePhysicalDeviceQueueFamilyPerformanceQueryCountersKHR;
extern PFN_vkGetPhysicalDeviceQueueFamilyPerformanceQueryPassesKHR vkGetPhysicalDeviceQueueFamilyPerformanceQueryPassesKHR;
extern PFN_vkReleaseProfilingLockKHR vkReleaseProfilingLockKHR;
#endif // defined(VK_KHR_performance_query)
#if defined(VK_KHR_pipeline_executable_properties)
extern PFN_vkGetPipelineExecutableInternalRepresentationsKHR vkGetPipelineExecutableInternalRepresentationsKHR;
extern PFN_vkGetPipelineExecutablePropertiesKHR vkGetPipelineExecutablePropertiesKHR;
extern PFN_vkGetPipelineExecutableStatisticsKHR vkGetPipelineExecutableStatisticsKHR;
#endif // defined(VK_KHR_pipeline_executable_properties)
#if defined(VK_KHR_present_wait)
extern PFN_vkWaitForPresentKHR vkWaitForPresentKHR;
#endif // defined(VK_KHR_present_wait)
#if defined(VK_KHR_push_descriptor)
extern PFN_vkCmdPushDescriptorSetKHR vkCmdPushDescriptorSetKHR;
#endif // defined(VK_KHR_push_descriptor)
#if (defined(VK_KHR_ray_tracing_maintenance1) && defined(VK_KHR_ray_tracing_pipeline))
extern PFN_vkCmdTraceRaysIndirect2KHR vkCmdTraceRaysIndirect2KHR;
#endif // (defined(VK_KHR_ray_tracing_maintenance1) && defined(VK_KHR_ray_tracing_pipeline))
#if defined(VK_KHR_ray_tracing_pipeline)
extern PFN_vkCmdSetRayTracingPipelineStackSizeKHR vkCmdSetRayTracingPipelineStackSizeKHR;
extern PFN_vkCmdTraceRaysIndirectKHR vkCmdTraceRaysIndirectKHR;
extern PFN_vkCmdTraceRaysKHR vkCmdTraceRaysKHR;
extern PFN_vkCreateRayTracingPipelinesKHR vkCreateRayTracingPipelinesKHR;
extern PFN_vkGetRayTracingCaptureReplayShaderGroupHandlesKHR vkGetRayTracingCaptureReplayShaderGroupHandlesKHR;
extern PFN_vkGetRayTracingShaderGroupHandlesKHR vkGetRayTracingShaderGroupHandlesKHR;
extern PFN_vkGetRayTracingShaderGroupStackSizeKHR vkGetRayTracingShaderGroupStackSizeKHR;
#endif // defined(VK_KHR_ray_tracing_pipeline)
#if defined(VK_KHR_sampler_ycbcr_conversion)
extern PFN_vkCreateSamplerYcbcrConversionKHR vkCreateSamplerYcbcrConversionKHR;
extern PFN_vkDestroySamplerYcbcrConversionKHR vkDestroySamplerYcbcrConversionKHR;
#endif // defined(VK_KHR_sampler_ycbcr_conversion)
#if defined(VK_KHR_shared_presentable_image)
extern PFN_vkGetSwapchainStatusKHR vkGetSwapchainStatusKHR;
#endif // defined(VK_KHR_shared_presentable_image)
#if defined(VK_KHR_surface)
extern PFN_vkDestroySurfaceKHR vkDestroySurfaceKHR;
extern PFN_vkGetPhysicalDeviceSurfaceCapabilitiesKHR vkGetPhysicalDeviceSurfaceCapabilitiesKHR;
extern PFN_vkGetPhysicalDeviceSurfaceFormatsKHR vkGetPhysicalDeviceSurfaceFormatsKHR;
extern PFN_vkGetPhysicalDeviceSurfacePresentModesKHR vkGetPhysicalDeviceSurfacePresentModesKHR;
extern PFN_vkGetPhysicalDeviceSurfaceSupportKHR vkGetPhysicalDeviceSurfaceSupportKHR;
#endif // defined(VK_KHR_surface)
#if defined(VK_KHR_swapchain)
extern PFN_vkAcquireNextImageKHR vkAcquireNextImageKHR;
extern PFN_vkCreateSwapchainKHR vkCreateSwapchainKHR;
extern PFN_vkDestroySwapchainKHR vkDestroySwapchainKHR;
extern PFN_vkGetSwapchainImagesKHR vkGetSwapchainImagesKHR;
extern PFN_vkQueuePresentKHR vkQueuePresentKHR;
#endif // defined(VK_KHR_swapchain)
#if defined(VK_KHR_synchronization2)
extern PFN_vkCmdPipelineBarrier2KHR vkCmdPipelineBarrier2KHR;
extern PFN_vkCmdResetEvent2KHR vkCmdResetEvent2KHR;
extern PFN_vkCmdSetEvent2KHR vkCmdSetEvent2KHR;
extern PFN_vkCmdWaitEvents2KHR vkCmdWaitEvents2KHR;
extern PFN_vkCmdWriteTimestamp2KHR vkCmdWriteTimestamp2KHR;
extern PFN_vkQueueSubmit2KHR vkQueueSubmit2KHR;
#endif // defined(VK_KHR_synchronization2)
#if (defined(VK_KHR_synchronization2) && defined(VK_AMD_buffer_marker))
extern PFN_vkCmdWriteBufferMarker2AMD vkCmdWriteBufferMarker2AMD;
#endif // (defined(VK_KHR_synchronization2) && defined(VK_AMD_buffer_marker))
#if (defined(VK_KHR_synchronization2) && defined(VK_NV_device_diagnostic_checkpoints))
extern PFN_vkGetQueueCheckpointData2NV vkGetQueueCheckpointData2NV;
#endif // (defined(VK_KHR_synchronization2) && defined(VK_NV_device_diagnostic_checkpoints))
#if defined(VK_KHR_timeline_semaphore)
extern PFN_vkGetSemaphoreCounterValueKHR vkGetSemaphoreCounterValueKHR;
extern PFN_vkSignalSemaphoreKHR vkSignalSemaphoreKHR;
extern PFN_vkWaitSemaphoresKHR vkWaitSemaphoresKHR;
#endif // defined(VK_KHR_timeline_semaphore)
#if defined(VK_KHR_video_decode_queue)
extern PFN_vkCmdDecodeVideoKHR vkCmdDecodeVideoKHR;
#endif // defined(VK_KHR_video_decode_queue)
#if defined(VK_KHR_video_encode_queue)
extern PFN_vkCmdEncodeVideoKHR vkCmdEncodeVideoKHR;
#endif // defined(VK_KHR_video_encode_queue)
#if defined(VK_KHR_video_queue)
extern PFN_vkBindVideoSessionMemoryKHR vkBindVideoSessionMemoryKHR;
extern PFN_vkCmdBeginVideoCodingKHR vkCmdBeginVideoCodingKHR;
extern PFN_vkCmdControlVideoCodingKHR vkCmdControlVideoCodingKHR;
extern PFN_vkCmdEndVideoCodingKHR vkCmdEndVideoCodingKHR;
extern PFN_vkCreateVideoSessionKHR vkCreateVideoSessionKHR;
extern PFN_vkCreateVideoSessionParametersKHR vkCreateVideoSessionParametersKHR;
extern PFN_vkDestroyVideoSessionKHR vkDestroyVideoSessionKHR;
extern PFN_vkDestroyVideoSessionParametersKHR vkDestroyVideoSessionParametersKHR;
extern PFN_vkGetPhysicalDeviceVideoCapabilitiesKHR vkGetPhysicalDeviceVideoCapabilitiesKHR;
extern PFN_vkGetPhysicalDeviceVideoFormatPropertiesKHR vkGetPhysicalDeviceVideoFormatPropertiesKHR;
extern PFN_vkGetVideoSessionMemoryRequirementsKHR vkGetVideoSessionMemoryRequirementsKHR;
extern PFN_vkUpdateVideoSessionParametersKHR vkUpdateVideoSessionParametersKHR;
#endif // defined(VK_KHR_video_queue)
#if defined(VK_KHR_wayland_surface)
extern PFN_vkCreateWaylandSurfaceKHR vkCreateWaylandSurfaceKHR;
extern PFN_vkGetPhysicalDeviceWaylandPresentationSupportKHR vkGetPhysicalDeviceWaylandPresentationSupportKHR;
#endif // defined(VK_KHR_wayland_surface)
#if defined(VK_KHR_win32_surface)
extern PFN_vkCreateWin32SurfaceKHR vkCreateWin32SurfaceKHR;
extern PFN_vkGetPhysicalDeviceWin32PresentationSupportKHR vkGetPhysicalDeviceWin32PresentationSupportKHR;
#endif // defined(VK_KHR_win32_surface)
#if defined(VK_KHR_xcb_surface)
extern PFN_vkCreateXcbSurfaceKHR vkCreateXcbSurfaceKHR;
extern PFN_vkGetPhysicalDeviceXcbPresentationSupportKHR vkGetPhysicalDeviceXcbPresentationSupportKHR;
#endif // defined(VK_KHR_xcb_surface)
#if defined(VK_KHR_xlib_surface)
extern PFN_vkCreateXlibSurfaceKHR vkCreateXlibSurfaceKHR;
extern PFN_vkGetPhysicalDeviceXlibPresentationSupportKHR vkGetPhysicalDeviceXlibPresentationSupportKHR;
#endif // defined(VK_KHR_xlib_surface)
#if defined(VK_MVK_ios_surface)
extern PFN_vkCreateIOSSurfaceMVK vkCreateIOSSurfaceMVK;
#endif // defined(VK_MVK_ios_surface)
#if defined(VK_MVK_macos_surface)
extern PFN_vkCreateMacOSSurfaceMVK vkCreateMacOSSurfaceMVK;
#endif // defined(VK_MVK_macos_surface)
#if defined(VK_NN_vi_surface)
extern PFN_vkCreateViSurfaceNN vkCreateViSurfaceNN;
#endif // defined(VK_NN_vi_surface)
#if defined(VK_NVX_binary_import)
extern PFN_vkCmdCuLaunchKernelNVX vkCmdCuLaunchKernelNVX;
extern PFN_vkCreateCuFunctionNVX vkCreateCuFunctionNVX;
extern PFN_vkCreateCuModuleNVX vkCreateCuModuleNVX;
extern PFN_vkDestroyCuFunctionNVX vkDestroyCuFunctionNVX;
extern PFN_vkDestroyCuModuleNVX vkDestroyCuModuleNVX;
#endif // defined(VK_NVX_binary_import)
#if defined(VK_NVX_image_view_handle)
extern PFN_vkGetImageViewAddressNVX vkGetImageViewAddressNVX;
extern PFN_vkGetImageViewHandleNVX vkGetImageViewHandleNVX;
#endif // defined(VK_NVX_image_view_handle)
#if defined(VK_NV_acquire_winrt_display)
extern PFN_vkAcquireWinrtDisplayNV vkAcquireWinrtDisplayNV;
extern PFN_vkGetWinrtDisplayNV vkGetWinrtDisplayNV;
#endif // defined(VK_NV_acquire_winrt_display)
#if defined(VK_NV_clip_space_w_scaling)
extern PFN_vkCmdSetViewportWScalingNV vkCmdSetViewportWScalingNV;
#endif // defined(VK_NV_clip_space_w_scaling)
#if defined(VK_NV_cooperative_matrix)
extern PFN_vkGetPhysicalDeviceCooperativeMatrixPropertiesNV vkGetPhysicalDeviceCooperativeMatrixPropertiesNV;
#endif // defined(VK_NV_cooperative_matrix)
#if defined(VK_NV_coverage_reduction_mode)
extern PFN_vkGetPhysicalDeviceSupportedFramebufferMixedSamplesCombinationsNV vkGetPhysicalDeviceSupportedFramebufferMixedSamplesCombinationsNV;
#endif // defined(VK_NV_coverage_reduction_mode)
#if defined(VK_NV_device_diagnostic_checkpoints)
extern PFN_vkCmdSetCheckpointNV vkCmdSetCheckpointNV;
extern PFN_vkGetQueueCheckpointDataNV vkGetQueueCheckpointDataNV;
#endif // defined(VK_NV_device_diagnostic_checkpoints)
#if defined(VK_NV_device_generated_commands)
extern PFN_vkCmdBindPipelineShaderGroupNV vkCmdBindPipelineShaderGroupNV;
extern PFN_vkCmdExecuteGeneratedCommandsNV vkCmdExecuteGeneratedCommandsNV;
extern PFN_vkCmdPreprocessGeneratedCommandsNV vkCmdPreprocessGeneratedCommandsNV;
extern PFN_vkCreateIndirectCommandsLayoutNV vkCreateIndirectCommandsLayoutNV;
extern PFN_vkDestroyIndirectCommandsLayoutNV vkDestroyIndirectCommandsLayoutNV;
extern PFN_vkGetGeneratedCommandsMemoryRequirementsNV vkGetGeneratedCommandsMemoryRequirementsNV;
#endif // defined(VK_NV_device_generated_commands)
#if defined(VK_NV_external_memory_capabilities)
extern PFN_vkGetPhysicalDeviceExternalImageFormatPropertiesNV vkGetPhysicalDeviceExternalImageFormatPropertiesNV;
#endif // defined(VK_NV_external_memory_capabilities)
#if defined(VK_NV_external_memory_rdma)
extern PFN_vkGetMemoryRemoteAddressNV vkGetMemoryRemoteAddressNV;
#endif // defined(VK_NV_external_memory_rdma)
#if defined(VK_NV_external_memory_win32)
extern PFN_vkGetMemoryWin32HandleNV vkGetMemoryWin32HandleNV;
#endif // defined(VK_NV_external_memory_win32)
#if defined(VK_NV_fragment_shading_rate_enums)
extern PFN_vkCmdSetFragmentShadingRateEnumNV vkCmdSetFragmentShadingRateEnumNV;
#endif // defined(VK_NV_fragment_shading_rate_enums)
#if defined(VK_NV_mesh_shader)
extern PFN_vkCmdDrawMeshTasksIndirectCountNV vkCmdDrawMeshTasksIndirectCountNV;
extern PFN_vkCmdDrawMeshTasksIndirectNV vkCmdDrawMeshTasksIndirectNV;
extern PFN_vkCmdDrawMeshTasksNV vkCmdDrawMeshTasksNV;
#endif // defined(VK_NV_mesh_shader)
#if defined(VK_NV_ray_tracing)
extern PFN_vkBindAccelerationStructureMemoryNV vkBindAccelerationStructureMemoryNV;
extern PFN_vkCmdBuildAccelerationStructureNV vkCmdBuildAccelerationStructureNV;
extern PFN_vkCmdCopyAccelerationStructureNV vkCmdCopyAccelerationStructureNV;
extern PFN_vkCmdTraceRaysNV vkCmdTraceRaysNV;
extern PFN_vkCmdWriteAccelerationStructuresPropertiesNV vkCmdWriteAccelerationStructuresPropertiesNV;
extern PFN_vkCompileDeferredNV vkCompileDeferredNV;
extern PFN_vkCreateAccelerationStructureNV vkCreateAccelerationStructureNV;
extern PFN_vkCreateRayTracingPipelinesNV vkCreateRayTracingPipelinesNV;
extern PFN_vkDestroyAccelerationStructureNV vkDestroyAccelerationStructureNV;
extern PFN_vkGetAccelerationStructureHandleNV vkGetAccelerationStructureHandleNV;
extern PFN_vkGetAccelerationStructureMemoryRequirementsNV vkGetAccelerationStructureMemoryRequirementsNV;
extern PFN_vkGetRayTracingShaderGroupHandlesNV vkGetRayTracingShaderGroupHandlesNV;
#endif // defined(VK_NV_ray_tracing)
#if defined(VK_NV_scissor_exclusive)
extern PFN_vkCmdSetExclusiveScissorNV vkCmdSetExclusiveScissorNV;
#endif // defined(VK_NV_scissor_exclusive)
#if defined(VK_NV_shading_rate_image)
extern PFN_vkCmdBindShadingRateImageNV vkCmdBindShadingRateImageNV;
extern PFN_vkCmdSetCoarseSampleOrderNV vkCmdSetCoarseSampleOrderNV;
extern PFN_vkCmdSetViewportShadingRatePaletteNV vkCmdSetViewportShadingRatePaletteNV;
#endif // defined(VK_NV_shading_rate_image)
#if defined(VK_QNX_screen_surface)
extern PFN_vkCreateScreenSurfaceQNX vkCreateScreenSurfaceQNX;
extern PFN_vkGetPhysicalDeviceScreenPresentationSupportQNX vkGetPhysicalDeviceScreenPresentationSupportQNX;
#endif // defined(VK_QNX_screen_surface)
#if defined(VK_VALVE_descriptor_set_host_mapping)
extern PFN_vkGetDescriptorSetHostMappingVALVE vkGetDescriptorSetHostMappingVALVE;
extern PFN_vkGetDescriptorSetLayoutHostMappingInfoVALVE vkGetDescriptorSetLayoutHostMappingInfoVALVE;
#endif // defined(VK_VALVE_descriptor_set_host_mapping)
#if (defined(VK_EXT_full_screen_exclusive) && defined(VK_KHR_device_group)) || (defined(VK_EXT_full_screen_exclusive) && defined(VK_VERSION_1_1))
extern PFN_vkGetDeviceGroupSurfacePresentModes2EXT vkGetDeviceGroupSurfacePresentModes2EXT;
#endif // (defined(VK_EXT_full_screen_exclusive) && defined(VK_KHR_device_group)) || (defined(VK_EXT_full_screen_exclusive) && defined(VK_VERSION_1_1))
#if (defined(VK_KHR_descriptor_update_template) && defined(VK_KHR_push_descriptor)) || (defined(VK_KHR_push_descriptor) && defined(VK_VERSION_1_1)) || (defined(VK_KHR_push_descriptor) && defined(VK_KHR_descriptor_update_template))
extern PFN_vkCmdPushDescriptorSetWithTemplateKHR vkCmdPushDescriptorSetWithTemplateKHR;
#endif // (defined(VK_KHR_descriptor_update_template) && defined(VK_KHR_push_descriptor)) || (defined(VK_KHR_push_descriptor) && defined(VK_VERSION_1_1)) || (defined(VK_KHR_push_descriptor) && defined(VK_KHR_descriptor_update_template))
#if (defined(VK_KHR_device_group) && defined(VK_KHR_surface)) || (defined(VK_KHR_swapchain) && defined(VK_VERSION_1_1))
extern PFN_vkGetDeviceGroupPresentCapabilitiesKHR vkGetDeviceGroupPresentCapabilitiesKHR;
extern PFN_vkGetDeviceGroupSurfacePresentModesKHR vkGetDeviceGroupSurfacePresentModesKHR;
extern PFN_vkGetPhysicalDevicePresentRectanglesKHR vkGetPhysicalDevicePresentRectanglesKHR;
#endif // (defined(VK_KHR_device_group) && defined(VK_KHR_surface)) || (defined(VK_KHR_swapchain) && defined(VK_VERSION_1_1))
#if (defined(VK_KHR_device_group) && defined(VK_KHR_swapchain)) || (defined(VK_KHR_swapchain) && defined(VK_VERSION_1_1))
extern PFN_vkAcquireNextImage2KHR vkAcquireNextImage2KHR;
#endif // (defined(VK_KHR_device_group) && defined(VK_KHR_swapchain)) || (defined(VK_KHR_swapchain) && defined(VK_VERSION_1_1))
} // namespace bluevk
#if !defined(NDEBUG)
#include <utils/Log.h>
utils::io::ostream& operator<<(utils::io::ostream& out, const VkImageLayout& value);
utils::io::ostream& operator<<(utils::io::ostream& out, const VkAttachmentLoadOp& value);
utils::io::ostream& operator<<(utils::io::ostream& out, const VkAttachmentStoreOp& value);
utils::io::ostream& operator<<(utils::io::ostream& out, const VkImageType& value);
utils::io::ostream& operator<<(utils::io::ostream& out, const VkImageTiling& value);
utils::io::ostream& operator<<(utils::io::ostream& out, const VkImageViewType& value);
utils::io::ostream& operator<<(utils::io::ostream& out, const VkCommandBufferLevel& value);
utils::io::ostream& operator<<(utils::io::ostream& out, const VkComponentSwizzle& value);
utils::io::ostream& operator<<(utils::io::ostream& out, const VkDescriptorType& value);
utils::io::ostream& operator<<(utils::io::ostream& out, const VkQueryType& value);
utils::io::ostream& operator<<(utils::io::ostream& out, const VkBorderColor& value);
utils::io::ostream& operator<<(utils::io::ostream& out, const VkPipelineBindPoint& value);
utils::io::ostream& operator<<(utils::io::ostream& out, const VkPipelineCacheHeaderVersion& value);
utils::io::ostream& operator<<(utils::io::ostream& out, const VkPrimitiveTopology& value);
utils::io::ostream& operator<<(utils::io::ostream& out, const VkSharingMode& value);
utils::io::ostream& operator<<(utils::io::ostream& out, const VkIndexType& value);
utils::io::ostream& operator<<(utils::io::ostream& out, const VkFilter& value);
utils::io::ostream& operator<<(utils::io::ostream& out, const VkSamplerMipmapMode& value);
utils::io::ostream& operator<<(utils::io::ostream& out, const VkSamplerAddressMode& value);
utils::io::ostream& operator<<(utils::io::ostream& out, const VkCompareOp& value);
utils::io::ostream& operator<<(utils::io::ostream& out, const VkPolygonMode& value);
utils::io::ostream& operator<<(utils::io::ostream& out, const VkFrontFace& value);
utils::io::ostream& operator<<(utils::io::ostream& out, const VkBlendFactor& value);
utils::io::ostream& operator<<(utils::io::ostream& out, const VkBlendOp& value);
utils::io::ostream& operator<<(utils::io::ostream& out, const VkStencilOp& value);
utils::io::ostream& operator<<(utils::io::ostream& out, const VkLogicOp& value);
utils::io::ostream& operator<<(utils::io::ostream& out, const VkInternalAllocationType& value);
utils::io::ostream& operator<<(utils::io::ostream& out, const VkSystemAllocationScope& value);
utils::io::ostream& operator<<(utils::io::ostream& out, const VkPhysicalDeviceType& value);
utils::io::ostream& operator<<(utils::io::ostream& out, const VkVertexInputRate& value);
utils::io::ostream& operator<<(utils::io::ostream& out, const VkFormat& value);
utils::io::ostream& operator<<(utils::io::ostream& out, const VkStructureType& value);
utils::io::ostream& operator<<(utils::io::ostream& out, const VkSubpassContents& value);
utils::io::ostream& operator<<(utils::io::ostream& out, const VkResult& value);
utils::io::ostream& operator<<(utils::io::ostream& out, const VkDynamicState& value);
utils::io::ostream& operator<<(utils::io::ostream& out, const VkDescriptorUpdateTemplateType& value);
utils::io::ostream& operator<<(utils::io::ostream& out, const VkObjectType& value);
utils::io::ostream& operator<<(utils::io::ostream& out, const VkSemaphoreType& value);
utils::io::ostream& operator<<(utils::io::ostream& out, const VkPresentModeKHR& value);
utils::io::ostream& operator<<(utils::io::ostream& out, const VkColorSpaceKHR& value);
utils::io::ostream& operator<<(utils::io::ostream& out, const VkTimeDomainEXT& value);
utils::io::ostream& operator<<(utils::io::ostream& out, const VkDebugReportObjectTypeEXT& value);
utils::io::ostream& operator<<(utils::io::ostream& out, const VkDeviceMemoryReportEventTypeEXT& value);
utils::io::ostream& operator<<(utils::io::ostream& out, const VkRasterizationOrderAMD& value);
utils::io::ostream& operator<<(utils::io::ostream& out, const VkValidationCheckEXT& value);
utils::io::ostream& operator<<(utils::io::ostream& out, const VkValidationFeatureEnableEXT& value);
utils::io::ostream& operator<<(utils::io::ostream& out, const VkValidationFeatureDisableEXT& value);
utils::io::ostream& operator<<(utils::io::ostream& out, const VkIndirectCommandsTokenTypeNV& value);
utils::io::ostream& operator<<(utils::io::ostream& out, const VkDisplayPowerStateEXT& value);
utils::io::ostream& operator<<(utils::io::ostream& out, const VkDeviceEventTypeEXT& value);
utils::io::ostream& operator<<(utils::io::ostream& out, const VkDisplayEventTypeEXT& value);
utils::io::ostream& operator<<(utils::io::ostream& out, const VkViewportCoordinateSwizzleNV& value);
utils::io::ostream& operator<<(utils::io::ostream& out, const VkDiscardRectangleModeEXT& value);
utils::io::ostream& operator<<(utils::io::ostream& out, const VkPointClippingBehavior& value);
utils::io::ostream& operator<<(utils::io::ostream& out, const VkSamplerReductionMode& value);
utils::io::ostream& operator<<(utils::io::ostream& out, const VkTessellationDomainOrigin& value);
utils::io::ostream& operator<<(utils::io::ostream& out, const VkSamplerYcbcrModelConversion& value);
utils::io::ostream& operator<<(utils::io::ostream& out, const VkSamplerYcbcrRange& value);
utils::io::ostream& operator<<(utils::io::ostream& out, const VkChromaLocation& value);
utils::io::ostream& operator<<(utils::io::ostream& out, const VkBlendOverlapEXT& value);
utils::io::ostream& operator<<(utils::io::ostream& out, const VkCoverageModulationModeNV& value);
utils::io::ostream& operator<<(utils::io::ostream& out, const VkCoverageReductionModeNV& value);
utils::io::ostream& operator<<(utils::io::ostream& out, const VkValidationCacheHeaderVersionEXT& value);
utils::io::ostream& operator<<(utils::io::ostream& out, const VkShaderInfoTypeAMD& value);
utils::io::ostream& operator<<(utils::io::ostream& out, const VkQueueGlobalPriorityKHR& value);
utils::io::ostream& operator<<(utils::io::ostream& out, const VkConservativeRasterizationModeEXT& value);
utils::io::ostream& operator<<(utils::io::ostream& out, const VkVendorId& value);
utils::io::ostream& operator<<(utils::io::ostream& out, const VkDriverId& value);
utils::io::ostream& operator<<(utils::io::ostream& out, const VkShadingRatePaletteEntryNV& value);
utils::io::ostream& operator<<(utils::io::ostream& out, const VkCoarseSampleOrderTypeNV& value);
utils::io::ostream& operator<<(utils::io::ostream& out, const VkCopyAccelerationStructureModeKHR& value);
utils::io::ostream& operator<<(utils::io::ostream& out, const VkBuildAccelerationStructureModeKHR& value);
utils::io::ostream& operator<<(utils::io::ostream& out, const VkAccelerationStructureTypeKHR& value);
utils::io::ostream& operator<<(utils::io::ostream& out, const VkGeometryTypeKHR& value);
utils::io::ostream& operator<<(utils::io::ostream& out, const VkAccelerationStructureMemoryRequirementsTypeNV& value);
utils::io::ostream& operator<<(utils::io::ostream& out, const VkAccelerationStructureBuildTypeKHR& value);
utils::io::ostream& operator<<(utils::io::ostream& out, const VkRayTracingShaderGroupTypeKHR& value);
utils::io::ostream& operator<<(utils::io::ostream& out, const VkAccelerationStructureCompatibilityKHR& value);
utils::io::ostream& operator<<(utils::io::ostream& out, const VkShaderGroupShaderKHR& value);
utils::io::ostream& operator<<(utils::io::ostream& out, const VkMemoryOverallocationBehaviorAMD& value);
utils::io::ostream& operator<<(utils::io::ostream& out, const VkScopeNV& value);
utils::io::ostream& operator<<(utils::io::ostream& out, const VkComponentTypeNV& value);
utils::io::ostream& operator<<(utils::io::ostream& out, const VkPerformanceCounterScopeKHR& value);
utils::io::ostream& operator<<(utils::io::ostream& out, const VkPerformanceCounterUnitKHR& value);
utils::io::ostream& operator<<(utils::io::ostream& out, const VkPerformanceCounterStorageKHR& value);
utils::io::ostream& operator<<(utils::io::ostream& out, const VkPerformanceConfigurationTypeINTEL& value);
utils::io::ostream& operator<<(utils::io::ostream& out, const VkQueryPoolSamplingModeINTEL& value);
utils::io::ostream& operator<<(utils::io::ostream& out, const VkPerformanceOverrideTypeINTEL& value);
utils::io::ostream& operator<<(utils::io::ostream& out, const VkPerformanceParameterTypeINTEL& value);
utils::io::ostream& operator<<(utils::io::ostream& out, const VkPerformanceValueTypeINTEL& value);
utils::io::ostream& operator<<(utils::io::ostream& out, const VkShaderFloatControlsIndependence& value);
utils::io::ostream& operator<<(utils::io::ostream& out, const VkPipelineExecutableStatisticFormatKHR& value);
utils::io::ostream& operator<<(utils::io::ostream& out, const VkLineRasterizationModeEXT& value);
utils::io::ostream& operator<<(utils::io::ostream& out, const VkFragmentShadingRateCombinerOpKHR& value);
utils::io::ostream& operator<<(utils::io::ostream& out, const VkFragmentShadingRateNV& value);
utils::io::ostream& operator<<(utils::io::ostream& out, const VkFragmentShadingRateTypeNV& value);
utils::io::ostream& operator<<(utils::io::ostream& out, const VkSubpassMergeStatusEXT& value);
utils::io::ostream& operator<<(utils::io::ostream& out, const VkProvokingVertexModeEXT& value);
utils::io::ostream& operator<<(utils::io::ostream& out, const VkAccelerationStructureMotionInstanceTypeNV& value);
#endif
#endif // TNT_FILAMENT_BLUEVK_H

View File

@@ -0,0 +1,310 @@
#ifndef VULKAN_VIDEO_CODEC_H264STD_H_
#define VULKAN_VIDEO_CODEC_H264STD_H_ 1
/*
** Copyright 2015-2022 The Khronos Group Inc.
**
** SPDX-License-Identifier: Apache-2.0
*/
/*
** This header is generated from the Khronos Vulkan XML API Registry.
**
*/
#ifdef __cplusplus
extern "C" {
#endif
#define vulkan_video_codec_h264std 1
#include <stdint.h>
#define STD_VIDEO_H264_CPB_CNT_LIST_SIZE 32
#define STD_VIDEO_H264_SCALING_LIST_4X4_NUM_LISTS 6
#define STD_VIDEO_H264_SCALING_LIST_4X4_NUM_ELEMENTS 16
#define STD_VIDEO_H264_SCALING_LIST_8X8_NUM_LISTS 6
#define STD_VIDEO_H264_SCALING_LIST_8X8_NUM_ELEMENTS 64
#define STD_VIDEO_H264_MAX_NUM_LIST_REF 32
#define STD_VIDEO_H264_MAX_CHROMA_PLANES 2
typedef enum StdVideoH264ChromaFormatIdc {
STD_VIDEO_H264_CHROMA_FORMAT_IDC_MONOCHROME = 0,
STD_VIDEO_H264_CHROMA_FORMAT_IDC_420 = 1,
STD_VIDEO_H264_CHROMA_FORMAT_IDC_422 = 2,
STD_VIDEO_H264_CHROMA_FORMAT_IDC_444 = 3,
STD_VIDEO_H264_CHROMA_FORMAT_IDC_INVALID = 0x7FFFFFFF,
STD_VIDEO_H264_CHROMA_FORMAT_IDC_MAX_ENUM = 0x7FFFFFFF
} StdVideoH264ChromaFormatIdc;
typedef enum StdVideoH264ProfileIdc {
STD_VIDEO_H264_PROFILE_IDC_BASELINE = 66,
STD_VIDEO_H264_PROFILE_IDC_MAIN = 77,
STD_VIDEO_H264_PROFILE_IDC_HIGH = 100,
STD_VIDEO_H264_PROFILE_IDC_HIGH_444_PREDICTIVE = 244,
STD_VIDEO_H264_PROFILE_IDC_INVALID = 0x7FFFFFFF,
STD_VIDEO_H264_PROFILE_IDC_MAX_ENUM = 0x7FFFFFFF
} StdVideoH264ProfileIdc;
typedef enum StdVideoH264LevelIdc {
STD_VIDEO_H264_LEVEL_IDC_1_0 = 0,
STD_VIDEO_H264_LEVEL_IDC_1_1 = 1,
STD_VIDEO_H264_LEVEL_IDC_1_2 = 2,
STD_VIDEO_H264_LEVEL_IDC_1_3 = 3,
STD_VIDEO_H264_LEVEL_IDC_2_0 = 4,
STD_VIDEO_H264_LEVEL_IDC_2_1 = 5,
STD_VIDEO_H264_LEVEL_IDC_2_2 = 6,
STD_VIDEO_H264_LEVEL_IDC_3_0 = 7,
STD_VIDEO_H264_LEVEL_IDC_3_1 = 8,
STD_VIDEO_H264_LEVEL_IDC_3_2 = 9,
STD_VIDEO_H264_LEVEL_IDC_4_0 = 10,
STD_VIDEO_H264_LEVEL_IDC_4_1 = 11,
STD_VIDEO_H264_LEVEL_IDC_4_2 = 12,
STD_VIDEO_H264_LEVEL_IDC_5_0 = 13,
STD_VIDEO_H264_LEVEL_IDC_5_1 = 14,
STD_VIDEO_H264_LEVEL_IDC_5_2 = 15,
STD_VIDEO_H264_LEVEL_IDC_6_0 = 16,
STD_VIDEO_H264_LEVEL_IDC_6_1 = 17,
STD_VIDEO_H264_LEVEL_IDC_6_2 = 18,
STD_VIDEO_H264_LEVEL_IDC_INVALID = 0x7FFFFFFF,
STD_VIDEO_H264_LEVEL_IDC_MAX_ENUM = 0x7FFFFFFF
} StdVideoH264LevelIdc;
typedef enum StdVideoH264PocType {
STD_VIDEO_H264_POC_TYPE_0 = 0,
STD_VIDEO_H264_POC_TYPE_1 = 1,
STD_VIDEO_H264_POC_TYPE_2 = 2,
STD_VIDEO_H264_POC_TYPE_INVALID = 0x7FFFFFFF,
STD_VIDEO_H264_POC_TYPE_MAX_ENUM = 0x7FFFFFFF
} StdVideoH264PocType;
typedef enum StdVideoH264AspectRatioIdc {
STD_VIDEO_H264_ASPECT_RATIO_IDC_UNSPECIFIED = 0,
STD_VIDEO_H264_ASPECT_RATIO_IDC_SQUARE = 1,
STD_VIDEO_H264_ASPECT_RATIO_IDC_12_11 = 2,
STD_VIDEO_H264_ASPECT_RATIO_IDC_10_11 = 3,
STD_VIDEO_H264_ASPECT_RATIO_IDC_16_11 = 4,
STD_VIDEO_H264_ASPECT_RATIO_IDC_40_33 = 5,
STD_VIDEO_H264_ASPECT_RATIO_IDC_24_11 = 6,
STD_VIDEO_H264_ASPECT_RATIO_IDC_20_11 = 7,
STD_VIDEO_H264_ASPECT_RATIO_IDC_32_11 = 8,
STD_VIDEO_H264_ASPECT_RATIO_IDC_80_33 = 9,
STD_VIDEO_H264_ASPECT_RATIO_IDC_18_11 = 10,
STD_VIDEO_H264_ASPECT_RATIO_IDC_15_11 = 11,
STD_VIDEO_H264_ASPECT_RATIO_IDC_64_33 = 12,
STD_VIDEO_H264_ASPECT_RATIO_IDC_160_99 = 13,
STD_VIDEO_H264_ASPECT_RATIO_IDC_4_3 = 14,
STD_VIDEO_H264_ASPECT_RATIO_IDC_3_2 = 15,
STD_VIDEO_H264_ASPECT_RATIO_IDC_2_1 = 16,
STD_VIDEO_H264_ASPECT_RATIO_IDC_EXTENDED_SAR = 255,
STD_VIDEO_H264_ASPECT_RATIO_IDC_INVALID = 0x7FFFFFFF,
STD_VIDEO_H264_ASPECT_RATIO_IDC_MAX_ENUM = 0x7FFFFFFF
} StdVideoH264AspectRatioIdc;
typedef enum StdVideoH264WeightedBipredIdc {
STD_VIDEO_H264_WEIGHTED_BIPRED_IDC_DEFAULT = 0,
STD_VIDEO_H264_WEIGHTED_BIPRED_IDC_EXPLICIT = 1,
STD_VIDEO_H264_WEIGHTED_BIPRED_IDC_IMPLICIT = 2,
STD_VIDEO_H264_WEIGHTED_BIPRED_IDC_INVALID = 0x7FFFFFFF,
STD_VIDEO_H264_WEIGHTED_BIPRED_IDC_MAX_ENUM = 0x7FFFFFFF
} StdVideoH264WeightedBipredIdc;
typedef enum StdVideoH264ModificationOfPicNumsIdc {
STD_VIDEO_H264_MODIFICATION_OF_PIC_NUMS_IDC_SHORT_TERM_SUBTRACT = 0,
STD_VIDEO_H264_MODIFICATION_OF_PIC_NUMS_IDC_SHORT_TERM_ADD = 1,
STD_VIDEO_H264_MODIFICATION_OF_PIC_NUMS_IDC_LONG_TERM = 2,
STD_VIDEO_H264_MODIFICATION_OF_PIC_NUMS_IDC_END = 3,
STD_VIDEO_H264_MODIFICATION_OF_PIC_NUMS_IDC_INVALID = 0x7FFFFFFF,
STD_VIDEO_H264_MODIFICATION_OF_PIC_NUMS_IDC_MAX_ENUM = 0x7FFFFFFF
} StdVideoH264ModificationOfPicNumsIdc;
typedef enum StdVideoH264MemMgmtControlOp {
STD_VIDEO_H264_MEM_MGMT_CONTROL_OP_END = 0,
STD_VIDEO_H264_MEM_MGMT_CONTROL_OP_UNMARK_SHORT_TERM = 1,
STD_VIDEO_H264_MEM_MGMT_CONTROL_OP_UNMARK_LONG_TERM = 2,
STD_VIDEO_H264_MEM_MGMT_CONTROL_OP_MARK_LONG_TERM = 3,
STD_VIDEO_H264_MEM_MGMT_CONTROL_OP_SET_MAX_LONG_TERM_INDEX = 4,
STD_VIDEO_H264_MEM_MGMT_CONTROL_OP_UNMARK_ALL = 5,
STD_VIDEO_H264_MEM_MGMT_CONTROL_OP_MARK_CURRENT_AS_LONG_TERM = 6,
STD_VIDEO_H264_MEM_MGMT_CONTROL_OP_INVALID = 0x7FFFFFFF,
STD_VIDEO_H264_MEM_MGMT_CONTROL_OP_MAX_ENUM = 0x7FFFFFFF
} StdVideoH264MemMgmtControlOp;
typedef enum StdVideoH264CabacInitIdc {
STD_VIDEO_H264_CABAC_INIT_IDC_0 = 0,
STD_VIDEO_H264_CABAC_INIT_IDC_1 = 1,
STD_VIDEO_H264_CABAC_INIT_IDC_2 = 2,
STD_VIDEO_H264_CABAC_INIT_IDC_INVALID = 0x7FFFFFFF,
STD_VIDEO_H264_CABAC_INIT_IDC_MAX_ENUM = 0x7FFFFFFF
} StdVideoH264CabacInitIdc;
typedef enum StdVideoH264DisableDeblockingFilterIdc {
STD_VIDEO_H264_DISABLE_DEBLOCKING_FILTER_IDC_DISABLED = 0,
STD_VIDEO_H264_DISABLE_DEBLOCKING_FILTER_IDC_ENABLED = 1,
STD_VIDEO_H264_DISABLE_DEBLOCKING_FILTER_IDC_PARTIAL = 2,
STD_VIDEO_H264_DISABLE_DEBLOCKING_FILTER_IDC_INVALID = 0x7FFFFFFF,
STD_VIDEO_H264_DISABLE_DEBLOCKING_FILTER_IDC_MAX_ENUM = 0x7FFFFFFF
} StdVideoH264DisableDeblockingFilterIdc;
typedef enum StdVideoH264SliceType {
STD_VIDEO_H264_SLICE_TYPE_P = 0,
STD_VIDEO_H264_SLICE_TYPE_B = 1,
STD_VIDEO_H264_SLICE_TYPE_I = 2,
STD_VIDEO_H264_SLICE_TYPE_INVALID = 0x7FFFFFFF,
STD_VIDEO_H264_SLICE_TYPE_MAX_ENUM = 0x7FFFFFFF
} StdVideoH264SliceType;
typedef enum StdVideoH264PictureType {
STD_VIDEO_H264_PICTURE_TYPE_P = 0,
STD_VIDEO_H264_PICTURE_TYPE_B = 1,
STD_VIDEO_H264_PICTURE_TYPE_I = 2,
STD_VIDEO_H264_PICTURE_TYPE_IDR = 5,
STD_VIDEO_H264_PICTURE_TYPE_INVALID = 0x7FFFFFFF,
STD_VIDEO_H264_PICTURE_TYPE_MAX_ENUM = 0x7FFFFFFF
} StdVideoH264PictureType;
typedef enum StdVideoH264NonVclNaluType {
STD_VIDEO_H264_NON_VCL_NALU_TYPE_SPS = 0,
STD_VIDEO_H264_NON_VCL_NALU_TYPE_PPS = 1,
STD_VIDEO_H264_NON_VCL_NALU_TYPE_AUD = 2,
STD_VIDEO_H264_NON_VCL_NALU_TYPE_PREFIX = 3,
STD_VIDEO_H264_NON_VCL_NALU_TYPE_END_OF_SEQUENCE = 4,
STD_VIDEO_H264_NON_VCL_NALU_TYPE_END_OF_STREAM = 5,
STD_VIDEO_H264_NON_VCL_NALU_TYPE_PRECODED = 6,
STD_VIDEO_H264_NON_VCL_NALU_TYPE_INVALID = 0x7FFFFFFF,
STD_VIDEO_H264_NON_VCL_NALU_TYPE_MAX_ENUM = 0x7FFFFFFF
} StdVideoH264NonVclNaluType;
typedef struct StdVideoH264SpsVuiFlags {
uint32_t aspect_ratio_info_present_flag : 1;
uint32_t overscan_info_present_flag : 1;
uint32_t overscan_appropriate_flag : 1;
uint32_t video_signal_type_present_flag : 1;
uint32_t video_full_range_flag : 1;
uint32_t color_description_present_flag : 1;
uint32_t chroma_loc_info_present_flag : 1;
uint32_t timing_info_present_flag : 1;
uint32_t fixed_frame_rate_flag : 1;
uint32_t bitstream_restriction_flag : 1;
uint32_t nal_hrd_parameters_present_flag : 1;
uint32_t vcl_hrd_parameters_present_flag : 1;
} StdVideoH264SpsVuiFlags;
typedef struct StdVideoH264HrdParameters {
uint8_t cpb_cnt_minus1;
uint8_t bit_rate_scale;
uint8_t cpb_size_scale;
uint8_t reserved1;
uint32_t bit_rate_value_minus1[STD_VIDEO_H264_CPB_CNT_LIST_SIZE];
uint32_t cpb_size_value_minus1[STD_VIDEO_H264_CPB_CNT_LIST_SIZE];
uint8_t cbr_flag[STD_VIDEO_H264_CPB_CNT_LIST_SIZE];
uint32_t initial_cpb_removal_delay_length_minus1;
uint32_t cpb_removal_delay_length_minus1;
uint32_t dpb_output_delay_length_minus1;
uint32_t time_offset_length;
} StdVideoH264HrdParameters;
typedef struct StdVideoH264SequenceParameterSetVui {
StdVideoH264SpsVuiFlags flags;
StdVideoH264AspectRatioIdc aspect_ratio_idc;
uint16_t sar_width;
uint16_t sar_height;
uint8_t video_format;
uint8_t colour_primaries;
uint8_t transfer_characteristics;
uint8_t matrix_coefficients;
uint32_t num_units_in_tick;
uint32_t time_scale;
uint8_t max_num_reorder_frames;
uint8_t max_dec_frame_buffering;
uint8_t chroma_sample_loc_type_top_field;
uint8_t chroma_sample_loc_type_bottom_field;
uint32_t reserved1;
const StdVideoH264HrdParameters* pHrdParameters;
} StdVideoH264SequenceParameterSetVui;
typedef struct StdVideoH264SpsFlags {
uint32_t constraint_set0_flag : 1;
uint32_t constraint_set1_flag : 1;
uint32_t constraint_set2_flag : 1;
uint32_t constraint_set3_flag : 1;
uint32_t constraint_set4_flag : 1;
uint32_t constraint_set5_flag : 1;
uint32_t direct_8x8_inference_flag : 1;
uint32_t mb_adaptive_frame_field_flag : 1;
uint32_t frame_mbs_only_flag : 1;
uint32_t delta_pic_order_always_zero_flag : 1;
uint32_t separate_colour_plane_flag : 1;
uint32_t gaps_in_frame_num_value_allowed_flag : 1;
uint32_t qpprime_y_zero_transform_bypass_flag : 1;
uint32_t frame_cropping_flag : 1;
uint32_t seq_scaling_matrix_present_flag : 1;
uint32_t vui_parameters_present_flag : 1;
} StdVideoH264SpsFlags;
typedef struct StdVideoH264ScalingLists {
uint16_t scaling_list_present_mask;
uint16_t use_default_scaling_matrix_mask;
uint8_t ScalingList4x4[STD_VIDEO_H264_SCALING_LIST_4X4_NUM_LISTS][STD_VIDEO_H264_SCALING_LIST_4X4_NUM_ELEMENTS];
uint8_t ScalingList8x8[STD_VIDEO_H264_SCALING_LIST_8X8_NUM_LISTS][STD_VIDEO_H264_SCALING_LIST_8X8_NUM_ELEMENTS];
} StdVideoH264ScalingLists;
typedef struct StdVideoH264SequenceParameterSet {
StdVideoH264SpsFlags flags;
StdVideoH264ProfileIdc profile_idc;
StdVideoH264LevelIdc level_idc;
StdVideoH264ChromaFormatIdc chroma_format_idc;
uint8_t seq_parameter_set_id;
uint8_t bit_depth_luma_minus8;
uint8_t bit_depth_chroma_minus8;
uint8_t log2_max_frame_num_minus4;
StdVideoH264PocType pic_order_cnt_type;
int32_t offset_for_non_ref_pic;
int32_t offset_for_top_to_bottom_field;
uint8_t log2_max_pic_order_cnt_lsb_minus4;
uint8_t num_ref_frames_in_pic_order_cnt_cycle;
uint8_t max_num_ref_frames;
uint8_t reserved1;
uint32_t pic_width_in_mbs_minus1;
uint32_t pic_height_in_map_units_minus1;
uint32_t frame_crop_left_offset;
uint32_t frame_crop_right_offset;
uint32_t frame_crop_top_offset;
uint32_t frame_crop_bottom_offset;
uint32_t reserved2;
const int32_t* pOffsetForRefFrame;
const StdVideoH264ScalingLists* pScalingLists;
const StdVideoH264SequenceParameterSetVui* pSequenceParameterSetVui;
} StdVideoH264SequenceParameterSet;
typedef struct StdVideoH264PpsFlags {
uint32_t transform_8x8_mode_flag : 1;
uint32_t redundant_pic_cnt_present_flag : 1;
uint32_t constrained_intra_pred_flag : 1;
uint32_t deblocking_filter_control_present_flag : 1;
uint32_t weighted_pred_flag : 1;
uint32_t bottom_field_pic_order_in_frame_present_flag : 1;
uint32_t entropy_coding_mode_flag : 1;
uint32_t pic_scaling_matrix_present_flag : 1;
} StdVideoH264PpsFlags;
typedef struct StdVideoH264PictureParameterSet {
StdVideoH264PpsFlags flags;
uint8_t seq_parameter_set_id;
uint8_t pic_parameter_set_id;
uint8_t num_ref_idx_l0_default_active_minus1;
uint8_t num_ref_idx_l1_default_active_minus1;
StdVideoH264WeightedBipredIdc weighted_bipred_idc;
int8_t pic_init_qp_minus26;
int8_t pic_init_qs_minus26;
int8_t chroma_qp_index_offset;
int8_t second_chroma_qp_index_offset;
const StdVideoH264ScalingLists* pScalingLists;
} StdVideoH264PictureParameterSet;
#ifdef __cplusplus
}
#endif
#endif

View File

@@ -0,0 +1,75 @@
#ifndef VULKAN_VIDEO_CODEC_H264STD_DECODE_H_
#define VULKAN_VIDEO_CODEC_H264STD_DECODE_H_ 1
/*
** Copyright 2015-2022 The Khronos Group Inc.
**
** SPDX-License-Identifier: Apache-2.0
*/
/*
** This header is generated from the Khronos Vulkan XML API Registry.
**
*/
#ifdef __cplusplus
extern "C" {
#endif
#define vulkan_video_codec_h264std_decode 1
// Vulkan 0.9 provisional Vulkan video H.264 decode std specification version number
#define VK_STD_VULKAN_VIDEO_CODEC_H264_DECODE_API_VERSION_0_9_8 VK_MAKE_VIDEO_STD_VERSION(0, 9, 8) // Patch version should always be set to 0
#define STD_VIDEO_DECODE_H264_FIELD_ORDER_COUNT_LIST_SIZE 2
#define VK_STD_VULKAN_VIDEO_CODEC_H264_DECODE_SPEC_VERSION VK_STD_VULKAN_VIDEO_CODEC_H264_DECODE_API_VERSION_0_9_8
#define VK_STD_VULKAN_VIDEO_CODEC_H264_DECODE_EXTENSION_NAME "VK_STD_vulkan_video_codec_h264_decode"
typedef enum StdVideoDecodeH264FieldOrderCount {
STD_VIDEO_DECODE_H264_FIELD_ORDER_COUNT_TOP = 0,
STD_VIDEO_DECODE_H264_FIELD_ORDER_COUNT_BOTTOM = 1,
STD_VIDEO_DECODE_H264_FIELD_ORDER_COUNT_INVALID = 0x7FFFFFFF,
STD_VIDEO_DECODE_H264_FIELD_ORDER_COUNT_MAX_ENUM = 0x7FFFFFFF
} StdVideoDecodeH264FieldOrderCount;
typedef struct StdVideoDecodeH264PictureInfoFlags {
uint32_t field_pic_flag : 1;
uint32_t is_intra : 1;
uint32_t IdrPicFlag : 1;
uint32_t bottom_field_flag : 1;
uint32_t is_reference : 1;
uint32_t complementary_field_pair : 1;
} StdVideoDecodeH264PictureInfoFlags;
typedef struct StdVideoDecodeH264PictureInfo {
StdVideoDecodeH264PictureInfoFlags flags;
uint8_t seq_parameter_set_id;
uint8_t pic_parameter_set_id;
uint8_t reserved1;
uint8_t reserved2;
uint16_t frame_num;
uint16_t idr_pic_id;
int32_t PicOrderCnt[STD_VIDEO_DECODE_H264_FIELD_ORDER_COUNT_LIST_SIZE];
} StdVideoDecodeH264PictureInfo;
typedef struct StdVideoDecodeH264ReferenceInfoFlags {
uint32_t top_field_flag : 1;
uint32_t bottom_field_flag : 1;
uint32_t used_for_long_term_reference : 1;
uint32_t is_non_existing : 1;
} StdVideoDecodeH264ReferenceInfoFlags;
typedef struct StdVideoDecodeH264ReferenceInfo {
StdVideoDecodeH264ReferenceInfoFlags flags;
uint16_t FrameNum;
uint16_t reserved;
int32_t PicOrderCnt[STD_VIDEO_DECODE_H264_FIELD_ORDER_COUNT_LIST_SIZE];
} StdVideoDecodeH264ReferenceInfo;
#ifdef __cplusplus
}
#endif
#endif

View File

@@ -0,0 +1,132 @@
#ifndef VULKAN_VIDEO_CODEC_H264STD_ENCODE_H_
#define VULKAN_VIDEO_CODEC_H264STD_ENCODE_H_ 1
/*
** Copyright 2015-2022 The Khronos Group Inc.
**
** SPDX-License-Identifier: Apache-2.0
*/
/*
** This header is generated from the Khronos Vulkan XML API Registry.
**
*/
#ifdef __cplusplus
extern "C" {
#endif
#define vulkan_video_codec_h264std_encode 1
// Vulkan 0.9 provisional Vulkan video H.264 encode std specification version number
#define VK_STD_VULKAN_VIDEO_CODEC_H264_ENCODE_API_VERSION_0_9_8 VK_MAKE_VIDEO_STD_VERSION(0, 9, 8) // Patch version should always be set to 0
#define VK_STD_VULKAN_VIDEO_CODEC_H264_ENCODE_SPEC_VERSION VK_STD_VULKAN_VIDEO_CODEC_H264_ENCODE_API_VERSION_0_9_8
#define VK_STD_VULKAN_VIDEO_CODEC_H264_ENCODE_EXTENSION_NAME "VK_STD_vulkan_video_codec_h264_encode"
typedef struct StdVideoEncodeH264WeightTableFlags {
uint32_t luma_weight_l0_flag;
uint32_t chroma_weight_l0_flag;
uint32_t luma_weight_l1_flag;
uint32_t chroma_weight_l1_flag;
} StdVideoEncodeH264WeightTableFlags;
typedef struct StdVideoEncodeH264WeightTable {
StdVideoEncodeH264WeightTableFlags flags;
uint8_t luma_log2_weight_denom;
uint8_t chroma_log2_weight_denom;
int8_t luma_weight_l0[STD_VIDEO_H264_MAX_NUM_LIST_REF];
int8_t luma_offset_l0[STD_VIDEO_H264_MAX_NUM_LIST_REF];
int8_t chroma_weight_l0[STD_VIDEO_H264_MAX_NUM_LIST_REF][STD_VIDEO_H264_MAX_CHROMA_PLANES];
int8_t chroma_offset_l0[STD_VIDEO_H264_MAX_NUM_LIST_REF][STD_VIDEO_H264_MAX_CHROMA_PLANES];
int8_t luma_weight_l1[STD_VIDEO_H264_MAX_NUM_LIST_REF];
int8_t luma_offset_l1[STD_VIDEO_H264_MAX_NUM_LIST_REF];
int8_t chroma_weight_l1[STD_VIDEO_H264_MAX_NUM_LIST_REF][STD_VIDEO_H264_MAX_CHROMA_PLANES];
int8_t chroma_offset_l1[STD_VIDEO_H264_MAX_NUM_LIST_REF][STD_VIDEO_H264_MAX_CHROMA_PLANES];
} StdVideoEncodeH264WeightTable;
typedef struct StdVideoEncodeH264SliceHeaderFlags {
uint32_t direct_spatial_mv_pred_flag : 1;
uint32_t num_ref_idx_active_override_flag : 1;
uint32_t no_output_of_prior_pics_flag : 1;
uint32_t adaptive_ref_pic_marking_mode_flag : 1;
uint32_t no_prior_references_available_flag : 1;
} StdVideoEncodeH264SliceHeaderFlags;
typedef struct StdVideoEncodeH264PictureInfoFlags {
uint32_t idr_flag : 1;
uint32_t is_reference_flag : 1;
uint32_t used_for_long_term_reference : 1;
} StdVideoEncodeH264PictureInfoFlags;
typedef struct StdVideoEncodeH264ReferenceInfoFlags {
uint32_t used_for_long_term_reference : 1;
} StdVideoEncodeH264ReferenceInfoFlags;
typedef struct StdVideoEncodeH264RefMgmtFlags {
uint32_t ref_pic_list_modification_l0_flag : 1;
uint32_t ref_pic_list_modification_l1_flag : 1;
} StdVideoEncodeH264RefMgmtFlags;
typedef struct StdVideoEncodeH264RefListModEntry {
StdVideoH264ModificationOfPicNumsIdc modification_of_pic_nums_idc;
uint16_t abs_diff_pic_num_minus1;
uint16_t long_term_pic_num;
} StdVideoEncodeH264RefListModEntry;
typedef struct StdVideoEncodeH264RefPicMarkingEntry {
StdVideoH264MemMgmtControlOp operation;
uint16_t difference_of_pic_nums_minus1;
uint16_t long_term_pic_num;
uint16_t long_term_frame_idx;
uint16_t max_long_term_frame_idx_plus1;
} StdVideoEncodeH264RefPicMarkingEntry;
typedef struct StdVideoEncodeH264RefMemMgmtCtrlOperations {
StdVideoEncodeH264RefMgmtFlags flags;
uint8_t refList0ModOpCount;
const StdVideoEncodeH264RefListModEntry* pRefList0ModOperations;
uint8_t refList1ModOpCount;
const StdVideoEncodeH264RefListModEntry* pRefList1ModOperations;
uint8_t refPicMarkingOpCount;
const StdVideoEncodeH264RefPicMarkingEntry* pRefPicMarkingOperations;
} StdVideoEncodeH264RefMemMgmtCtrlOperations;
typedef struct StdVideoEncodeH264PictureInfo {
StdVideoEncodeH264PictureInfoFlags flags;
uint8_t seq_parameter_set_id;
uint8_t pic_parameter_set_id;
StdVideoH264PictureType pictureType;
uint32_t frame_num;
int32_t PicOrderCnt;
} StdVideoEncodeH264PictureInfo;
typedef struct StdVideoEncodeH264ReferenceInfo {
StdVideoEncodeH264ReferenceInfoFlags flags;
uint32_t FrameNum;
int32_t PicOrderCnt;
uint16_t long_term_pic_num;
uint16_t long_term_frame_idx;
} StdVideoEncodeH264ReferenceInfo;
typedef struct StdVideoEncodeH264SliceHeader {
StdVideoEncodeH264SliceHeaderFlags flags;
uint32_t first_mb_in_slice;
StdVideoH264SliceType slice_type;
uint16_t idr_pic_id;
uint8_t num_ref_idx_l0_active_minus1;
uint8_t num_ref_idx_l1_active_minus1;
StdVideoH264CabacInitIdc cabac_init_idc;
StdVideoH264DisableDeblockingFilterIdc disable_deblocking_filter_idc;
int8_t slice_alpha_c0_offset_div2;
int8_t slice_beta_offset_div2;
const StdVideoEncodeH264WeightTable* pWeightTable;
} StdVideoEncodeH264SliceHeader;
#ifdef __cplusplus
}
#endif
#endif

View File

@@ -0,0 +1,443 @@
#ifndef VULKAN_VIDEO_CODEC_H265STD_H_
#define VULKAN_VIDEO_CODEC_H265STD_H_ 1
/*
** Copyright 2015-2022 The Khronos Group Inc.
**
** SPDX-License-Identifier: Apache-2.0
*/
/*
** This header is generated from the Khronos Vulkan XML API Registry.
**
*/
#ifdef __cplusplus
extern "C" {
#endif
#define vulkan_video_codec_h265std 1
#define STD_VIDEO_H265_SUBLAYERS_LIST_SIZE 7
#define STD_VIDEO_H265_CPB_CNT_LIST_SIZE 32
#define STD_VIDEO_H265_SCALING_LIST_4X4_NUM_LISTS 6
#define STD_VIDEO_H265_SCALING_LIST_4X4_NUM_ELEMENTS 16
#define STD_VIDEO_H265_SCALING_LIST_8X8_NUM_LISTS 6
#define STD_VIDEO_H265_SCALING_LIST_8X8_NUM_ELEMENTS 64
#define STD_VIDEO_H265_SCALING_LIST_16X16_NUM_LISTS 6
#define STD_VIDEO_H265_SCALING_LIST_16X16_NUM_ELEMENTS 64
#define STD_VIDEO_H265_SCALING_LIST_32X32_NUM_LISTS 2
#define STD_VIDEO_H265_SCALING_LIST_32X32_NUM_ELEMENTS 64
#define STD_VIDEO_H265_PREDICTOR_PALETTE_COMPONENTS_LIST_SIZE 3
#define STD_VIDEO_H265_PREDICTOR_PALETTE_COMP_ENTRIES_LIST_SIZE 128
#define STD_VIDEO_H265_MAX_DPB_SIZE 16
#define STD_VIDEO_H265_MAX_LONG_TERM_REF_PICS_SPS 32
#define STD_VIDEO_H265_CHROMA_QP_OFFSET_LIST_SIZE 6
#define STD_VIDEO_H265_CHROMA_QP_OFFSET_TILE_COLS_LIST_SIZE 19
#define STD_VIDEO_H265_CHROMA_QP_OFFSET_TILE_ROWS_LIST_SIZE 21
#define STD_VIDEO_H265_MAX_NUM_LIST_REF 15
#define STD_VIDEO_H265_MAX_CHROMA_PLANES 2
#define STD_VIDEO_H265_MAX_SHORT_TERM_REF_PIC_SETS 64
#define STD_VIDEO_H265_MAX_LONG_TERM_PICS 16
#define STD_VIDEO_H265_MAX_DELTA_POC 48
typedef enum StdVideoH265ChromaFormatIdc {
STD_VIDEO_H265_CHROMA_FORMAT_IDC_MONOCHROME = 0,
STD_VIDEO_H265_CHROMA_FORMAT_IDC_420 = 1,
STD_VIDEO_H265_CHROMA_FORMAT_IDC_422 = 2,
STD_VIDEO_H265_CHROMA_FORMAT_IDC_444 = 3,
STD_VIDEO_H265_CHROMA_FORMAT_IDC_INVALID = 0x7FFFFFFF,
STD_VIDEO_H265_CHROMA_FORMAT_IDC_MAX_ENUM = 0x7FFFFFFF
} StdVideoH265ChromaFormatIdc;
typedef enum StdVideoH265ProfileIdc {
STD_VIDEO_H265_PROFILE_IDC_MAIN = 1,
STD_VIDEO_H265_PROFILE_IDC_MAIN_10 = 2,
STD_VIDEO_H265_PROFILE_IDC_MAIN_STILL_PICTURE = 3,
STD_VIDEO_H265_PROFILE_IDC_FORMAT_RANGE_EXTENSIONS = 4,
STD_VIDEO_H265_PROFILE_IDC_SCC_EXTENSIONS = 9,
STD_VIDEO_H265_PROFILE_IDC_INVALID = 0x7FFFFFFF,
STD_VIDEO_H265_PROFILE_IDC_MAX_ENUM = 0x7FFFFFFF
} StdVideoH265ProfileIdc;
typedef enum StdVideoH265LevelIdc {
STD_VIDEO_H265_LEVEL_IDC_1_0 = 0,
STD_VIDEO_H265_LEVEL_IDC_2_0 = 1,
STD_VIDEO_H265_LEVEL_IDC_2_1 = 2,
STD_VIDEO_H265_LEVEL_IDC_3_0 = 3,
STD_VIDEO_H265_LEVEL_IDC_3_1 = 4,
STD_VIDEO_H265_LEVEL_IDC_4_0 = 5,
STD_VIDEO_H265_LEVEL_IDC_4_1 = 6,
STD_VIDEO_H265_LEVEL_IDC_5_0 = 7,
STD_VIDEO_H265_LEVEL_IDC_5_1 = 8,
STD_VIDEO_H265_LEVEL_IDC_5_2 = 9,
STD_VIDEO_H265_LEVEL_IDC_6_0 = 10,
STD_VIDEO_H265_LEVEL_IDC_6_1 = 11,
STD_VIDEO_H265_LEVEL_IDC_6_2 = 12,
STD_VIDEO_H265_LEVEL_IDC_INVALID = 0x7FFFFFFF,
STD_VIDEO_H265_LEVEL_IDC_MAX_ENUM = 0x7FFFFFFF
} StdVideoH265LevelIdc;
typedef enum StdVideoH265SliceType {
STD_VIDEO_H265_SLICE_TYPE_B = 0,
STD_VIDEO_H265_SLICE_TYPE_P = 1,
STD_VIDEO_H265_SLICE_TYPE_I = 2,
STD_VIDEO_H265_SLICE_TYPE_INVALID = 0x7FFFFFFF,
STD_VIDEO_H265_SLICE_TYPE_MAX_ENUM = 0x7FFFFFFF
} StdVideoH265SliceType;
typedef enum StdVideoH265PictureType {
STD_VIDEO_H265_PICTURE_TYPE_P = 0,
STD_VIDEO_H265_PICTURE_TYPE_B = 1,
STD_VIDEO_H265_PICTURE_TYPE_I = 2,
STD_VIDEO_H265_PICTURE_TYPE_IDR = 3,
STD_VIDEO_H265_PICTURE_TYPE_INVALID = 0x7FFFFFFF,
STD_VIDEO_H265_PICTURE_TYPE_MAX_ENUM = 0x7FFFFFFF
} StdVideoH265PictureType;
typedef enum StdVideoH265AspectRatioIdc {
STD_VIDEO_H265_ASPECT_RATIO_IDC_UNSPECIFIED = 0,
STD_VIDEO_H265_ASPECT_RATIO_IDC_SQUARE = 1,
STD_VIDEO_H265_ASPECT_RATIO_IDC_12_11 = 2,
STD_VIDEO_H265_ASPECT_RATIO_IDC_10_11 = 3,
STD_VIDEO_H265_ASPECT_RATIO_IDC_16_11 = 4,
STD_VIDEO_H265_ASPECT_RATIO_IDC_40_33 = 5,
STD_VIDEO_H265_ASPECT_RATIO_IDC_24_11 = 6,
STD_VIDEO_H265_ASPECT_RATIO_IDC_20_11 = 7,
STD_VIDEO_H265_ASPECT_RATIO_IDC_32_11 = 8,
STD_VIDEO_H265_ASPECT_RATIO_IDC_80_33 = 9,
STD_VIDEO_H265_ASPECT_RATIO_IDC_18_11 = 10,
STD_VIDEO_H265_ASPECT_RATIO_IDC_15_11 = 11,
STD_VIDEO_H265_ASPECT_RATIO_IDC_64_33 = 12,
STD_VIDEO_H265_ASPECT_RATIO_IDC_160_99 = 13,
STD_VIDEO_H265_ASPECT_RATIO_IDC_4_3 = 14,
STD_VIDEO_H265_ASPECT_RATIO_IDC_3_2 = 15,
STD_VIDEO_H265_ASPECT_RATIO_IDC_2_1 = 16,
STD_VIDEO_H265_ASPECT_RATIO_IDC_EXTENDED_SAR = 255,
STD_VIDEO_H265_ASPECT_RATIO_IDC_INVALID = 0x7FFFFFFF,
STD_VIDEO_H265_ASPECT_RATIO_IDC_MAX_ENUM = 0x7FFFFFFF
} StdVideoH265AspectRatioIdc;
typedef struct StdVideoH265DecPicBufMgr {
uint32_t max_latency_increase_plus1[STD_VIDEO_H265_SUBLAYERS_LIST_SIZE];
uint8_t max_dec_pic_buffering_minus1[STD_VIDEO_H265_SUBLAYERS_LIST_SIZE];
uint8_t max_num_reorder_pics[STD_VIDEO_H265_SUBLAYERS_LIST_SIZE];
} StdVideoH265DecPicBufMgr;
typedef struct StdVideoH265SubLayerHrdParameters {
uint32_t bit_rate_value_minus1[STD_VIDEO_H265_CPB_CNT_LIST_SIZE];
uint32_t cpb_size_value_minus1[STD_VIDEO_H265_CPB_CNT_LIST_SIZE];
uint32_t cpb_size_du_value_minus1[STD_VIDEO_H265_CPB_CNT_LIST_SIZE];
uint32_t bit_rate_du_value_minus1[STD_VIDEO_H265_CPB_CNT_LIST_SIZE];
uint32_t cbr_flag;
} StdVideoH265SubLayerHrdParameters;
typedef struct StdVideoH265HrdFlags {
uint32_t nal_hrd_parameters_present_flag : 1;
uint32_t vcl_hrd_parameters_present_flag : 1;
uint32_t sub_pic_hrd_params_present_flag : 1;
uint32_t sub_pic_cpb_params_in_pic_timing_sei_flag : 1;
uint32_t fixed_pic_rate_general_flag : 8;
uint32_t fixed_pic_rate_within_cvs_flag : 8;
uint32_t low_delay_hrd_flag : 8;
} StdVideoH265HrdFlags;
typedef struct StdVideoH265HrdParameters {
StdVideoH265HrdFlags flags;
uint8_t tick_divisor_minus2;
uint8_t du_cpb_removal_delay_increment_length_minus1;
uint8_t dpb_output_delay_du_length_minus1;
uint8_t bit_rate_scale;
uint8_t cpb_size_scale;
uint8_t cpb_size_du_scale;
uint8_t initial_cpb_removal_delay_length_minus1;
uint8_t au_cpb_removal_delay_length_minus1;
uint8_t dpb_output_delay_length_minus1;
uint8_t cpb_cnt_minus1[STD_VIDEO_H265_SUBLAYERS_LIST_SIZE];
uint16_t elemental_duration_in_tc_minus1[STD_VIDEO_H265_SUBLAYERS_LIST_SIZE];
uint16_t reserved[3];
const StdVideoH265SubLayerHrdParameters* pSubLayerHrdParametersNal;
const StdVideoH265SubLayerHrdParameters* pSubLayerHrdParametersVcl;
} StdVideoH265HrdParameters;
typedef struct StdVideoH265VpsFlags {
uint32_t vps_temporal_id_nesting_flag : 1;
uint32_t vps_sub_layer_ordering_info_present_flag : 1;
uint32_t vps_timing_info_present_flag : 1;
uint32_t vps_poc_proportional_to_timing_flag : 1;
} StdVideoH265VpsFlags;
typedef struct StdVideoH265ProfileTierLevelFlags {
uint32_t general_tier_flag : 1;
uint32_t general_progressive_source_flag : 1;
uint32_t general_interlaced_source_flag : 1;
uint32_t general_non_packed_constraint_flag : 1;
uint32_t general_frame_only_constraint_flag : 1;
} StdVideoH265ProfileTierLevelFlags;
typedef struct StdVideoH265ProfileTierLevel {
StdVideoH265ProfileTierLevelFlags flags;
StdVideoH265ProfileIdc general_profile_idc;
StdVideoH265LevelIdc general_level_idc;
} StdVideoH265ProfileTierLevel;
typedef struct StdVideoH265VideoParameterSet {
StdVideoH265VpsFlags flags;
uint8_t vps_video_parameter_set_id;
uint8_t vps_max_sub_layers_minus1;
uint8_t reserved1;
uint8_t reserved2;
uint32_t vps_num_units_in_tick;
uint32_t vps_time_scale;
uint32_t vps_num_ticks_poc_diff_one_minus1;
uint32_t reserved3;
const StdVideoH265DecPicBufMgr* pDecPicBufMgr;
const StdVideoH265HrdParameters* pHrdParameters;
const StdVideoH265ProfileTierLevel* pProfileTierLevel;
} StdVideoH265VideoParameterSet;
typedef struct StdVideoH265ScalingLists {
uint8_t ScalingList4x4[STD_VIDEO_H265_SCALING_LIST_4X4_NUM_LISTS][STD_VIDEO_H265_SCALING_LIST_4X4_NUM_ELEMENTS];
uint8_t ScalingList8x8[STD_VIDEO_H265_SCALING_LIST_8X8_NUM_LISTS][STD_VIDEO_H265_SCALING_LIST_8X8_NUM_ELEMENTS];
uint8_t ScalingList16x16[STD_VIDEO_H265_SCALING_LIST_16X16_NUM_LISTS][STD_VIDEO_H265_SCALING_LIST_16X16_NUM_ELEMENTS];
uint8_t ScalingList32x32[STD_VIDEO_H265_SCALING_LIST_32X32_NUM_LISTS][STD_VIDEO_H265_SCALING_LIST_32X32_NUM_ELEMENTS];
uint8_t ScalingListDCCoef16x16[STD_VIDEO_H265_SCALING_LIST_16X16_NUM_LISTS];
uint8_t ScalingListDCCoef32x32[STD_VIDEO_H265_SCALING_LIST_32X32_NUM_LISTS];
} StdVideoH265ScalingLists;
typedef struct StdVideoH265SpsVuiFlags {
uint32_t aspect_ratio_info_present_flag : 1;
uint32_t overscan_info_present_flag : 1;
uint32_t overscan_appropriate_flag : 1;
uint32_t video_signal_type_present_flag : 1;
uint32_t video_full_range_flag : 1;
uint32_t colour_description_present_flag : 1;
uint32_t chroma_loc_info_present_flag : 1;
uint32_t neutral_chroma_indication_flag : 1;
uint32_t field_seq_flag : 1;
uint32_t frame_field_info_present_flag : 1;
uint32_t default_display_window_flag : 1;
uint32_t vui_timing_info_present_flag : 1;
uint32_t vui_poc_proportional_to_timing_flag : 1;
uint32_t vui_hrd_parameters_present_flag : 1;
uint32_t bitstream_restriction_flag : 1;
uint32_t tiles_fixed_structure_flag : 1;
uint32_t motion_vectors_over_pic_boundaries_flag : 1;
uint32_t restricted_ref_pic_lists_flag : 1;
} StdVideoH265SpsVuiFlags;
typedef struct StdVideoH265SequenceParameterSetVui {
StdVideoH265SpsVuiFlags flags;
StdVideoH265AspectRatioIdc aspect_ratio_idc;
uint16_t sar_width;
uint16_t sar_height;
uint8_t video_format;
uint8_t colour_primaries;
uint8_t transfer_characteristics;
uint8_t matrix_coeffs;
uint8_t chroma_sample_loc_type_top_field;
uint8_t chroma_sample_loc_type_bottom_field;
uint8_t reserved1;
uint8_t reserved2;
uint16_t def_disp_win_left_offset;
uint16_t def_disp_win_right_offset;
uint16_t def_disp_win_top_offset;
uint16_t def_disp_win_bottom_offset;
uint32_t vui_num_units_in_tick;
uint32_t vui_time_scale;
uint32_t vui_num_ticks_poc_diff_one_minus1;
uint16_t min_spatial_segmentation_idc;
uint16_t reserved3;
uint8_t max_bytes_per_pic_denom;
uint8_t max_bits_per_min_cu_denom;
uint8_t log2_max_mv_length_horizontal;
uint8_t log2_max_mv_length_vertical;
const StdVideoH265HrdParameters* pHrdParameters;
} StdVideoH265SequenceParameterSetVui;
typedef struct StdVideoH265PredictorPaletteEntries {
uint16_t PredictorPaletteEntries[STD_VIDEO_H265_PREDICTOR_PALETTE_COMPONENTS_LIST_SIZE][STD_VIDEO_H265_PREDICTOR_PALETTE_COMP_ENTRIES_LIST_SIZE];
} StdVideoH265PredictorPaletteEntries;
typedef struct StdVideoH265SpsFlags {
uint32_t sps_temporal_id_nesting_flag : 1;
uint32_t separate_colour_plane_flag : 1;
uint32_t conformance_window_flag : 1;
uint32_t sps_sub_layer_ordering_info_present_flag : 1;
uint32_t scaling_list_enabled_flag : 1;
uint32_t sps_scaling_list_data_present_flag : 1;
uint32_t amp_enabled_flag : 1;
uint32_t sample_adaptive_offset_enabled_flag : 1;
uint32_t pcm_enabled_flag : 1;
uint32_t pcm_loop_filter_disabled_flag : 1;
uint32_t long_term_ref_pics_present_flag : 1;
uint32_t sps_temporal_mvp_enabled_flag : 1;
uint32_t strong_intra_smoothing_enabled_flag : 1;
uint32_t vui_parameters_present_flag : 1;
uint32_t sps_extension_present_flag : 1;
uint32_t sps_range_extension_flag : 1;
uint32_t transform_skip_rotation_enabled_flag : 1;
uint32_t transform_skip_context_enabled_flag : 1;
uint32_t implicit_rdpcm_enabled_flag : 1;
uint32_t explicit_rdpcm_enabled_flag : 1;
uint32_t extended_precision_processing_flag : 1;
uint32_t intra_smoothing_disabled_flag : 1;
uint32_t high_precision_offsets_enabled_flag : 1;
uint32_t persistent_rice_adaptation_enabled_flag : 1;
uint32_t cabac_bypass_alignment_enabled_flag : 1;
uint32_t sps_scc_extension_flag : 1;
uint32_t sps_curr_pic_ref_enabled_flag : 1;
uint32_t palette_mode_enabled_flag : 1;
uint32_t sps_palette_predictor_initializers_present_flag : 1;
uint32_t intra_boundary_filtering_disabled_flag : 1;
} StdVideoH265SpsFlags;
typedef struct StdVideoH265ShortTermRefPicSetFlags {
uint32_t inter_ref_pic_set_prediction_flag : 1;
uint32_t delta_rps_sign : 1;
} StdVideoH265ShortTermRefPicSetFlags;
typedef struct StdVideoH265ShortTermRefPicSet {
StdVideoH265ShortTermRefPicSetFlags flags;
uint32_t delta_idx_minus1;
uint16_t use_delta_flag;
uint16_t abs_delta_rps_minus1;
uint16_t used_by_curr_pic_flag;
uint16_t used_by_curr_pic_s0_flag;
uint16_t used_by_curr_pic_s1_flag;
uint16_t reserved1;
uint8_t reserved2;
uint8_t reserved3;
uint8_t num_negative_pics;
uint8_t num_positive_pics;
uint16_t delta_poc_s0_minus1[STD_VIDEO_H265_MAX_DPB_SIZE];
uint16_t delta_poc_s1_minus1[STD_VIDEO_H265_MAX_DPB_SIZE];
} StdVideoH265ShortTermRefPicSet;
typedef struct StdVideoH265LongTermRefPicsSps {
uint32_t used_by_curr_pic_lt_sps_flag;
uint32_t lt_ref_pic_poc_lsb_sps[STD_VIDEO_H265_MAX_LONG_TERM_REF_PICS_SPS];
} StdVideoH265LongTermRefPicsSps;
typedef struct StdVideoH265SequenceParameterSet {
StdVideoH265SpsFlags flags;
StdVideoH265ChromaFormatIdc chroma_format_idc;
uint32_t pic_width_in_luma_samples;
uint32_t pic_height_in_luma_samples;
uint8_t sps_video_parameter_set_id;
uint8_t sps_max_sub_layers_minus1;
uint8_t sps_seq_parameter_set_id;
uint8_t bit_depth_luma_minus8;
uint8_t bit_depth_chroma_minus8;
uint8_t log2_max_pic_order_cnt_lsb_minus4;
uint8_t log2_min_luma_coding_block_size_minus3;
uint8_t log2_diff_max_min_luma_coding_block_size;
uint8_t log2_min_luma_transform_block_size_minus2;
uint8_t log2_diff_max_min_luma_transform_block_size;
uint8_t max_transform_hierarchy_depth_inter;
uint8_t max_transform_hierarchy_depth_intra;
uint8_t num_short_term_ref_pic_sets;
uint8_t num_long_term_ref_pics_sps;
uint8_t pcm_sample_bit_depth_luma_minus1;
uint8_t pcm_sample_bit_depth_chroma_minus1;
uint8_t log2_min_pcm_luma_coding_block_size_minus3;
uint8_t log2_diff_max_min_pcm_luma_coding_block_size;
uint8_t reserved1;
uint8_t reserved2;
uint8_t palette_max_size;
uint8_t delta_palette_max_predictor_size;
uint8_t motion_vector_resolution_control_idc;
uint8_t sps_num_palette_predictor_initializers_minus1;
uint32_t conf_win_left_offset;
uint32_t conf_win_right_offset;
uint32_t conf_win_top_offset;
uint32_t conf_win_bottom_offset;
const StdVideoH265ProfileTierLevel* pProfileTierLevel;
const StdVideoH265DecPicBufMgr* pDecPicBufMgr;
const StdVideoH265ScalingLists* pScalingLists;
const StdVideoH265ShortTermRefPicSet* pShortTermRefPicSet;
const StdVideoH265LongTermRefPicsSps* pLongTermRefPicsSps;
const StdVideoH265SequenceParameterSetVui* pSequenceParameterSetVui;
const StdVideoH265PredictorPaletteEntries* pPredictorPaletteEntries;
} StdVideoH265SequenceParameterSet;
typedef struct StdVideoH265PpsFlags {
uint32_t dependent_slice_segments_enabled_flag : 1;
uint32_t output_flag_present_flag : 1;
uint32_t sign_data_hiding_enabled_flag : 1;
uint32_t cabac_init_present_flag : 1;
uint32_t constrained_intra_pred_flag : 1;
uint32_t transform_skip_enabled_flag : 1;
uint32_t cu_qp_delta_enabled_flag : 1;
uint32_t pps_slice_chroma_qp_offsets_present_flag : 1;
uint32_t weighted_pred_flag : 1;
uint32_t weighted_bipred_flag : 1;
uint32_t transquant_bypass_enabled_flag : 1;
uint32_t tiles_enabled_flag : 1;
uint32_t entropy_coding_sync_enabled_flag : 1;
uint32_t uniform_spacing_flag : 1;
uint32_t loop_filter_across_tiles_enabled_flag : 1;
uint32_t pps_loop_filter_across_slices_enabled_flag : 1;
uint32_t deblocking_filter_control_present_flag : 1;
uint32_t deblocking_filter_override_enabled_flag : 1;
uint32_t pps_deblocking_filter_disabled_flag : 1;
uint32_t pps_scaling_list_data_present_flag : 1;
uint32_t lists_modification_present_flag : 1;
uint32_t slice_segment_header_extension_present_flag : 1;
uint32_t pps_extension_present_flag : 1;
uint32_t cross_component_prediction_enabled_flag : 1;
uint32_t chroma_qp_offset_list_enabled_flag : 1;
uint32_t pps_curr_pic_ref_enabled_flag : 1;
uint32_t residual_adaptive_colour_transform_enabled_flag : 1;
uint32_t pps_slice_act_qp_offsets_present_flag : 1;
uint32_t pps_palette_predictor_initializers_present_flag : 1;
uint32_t monochrome_palette_flag : 1;
uint32_t pps_range_extension_flag : 1;
} StdVideoH265PpsFlags;
typedef struct StdVideoH265PictureParameterSet {
StdVideoH265PpsFlags flags;
uint8_t pps_pic_parameter_set_id;
uint8_t pps_seq_parameter_set_id;
uint8_t sps_video_parameter_set_id;
uint8_t num_extra_slice_header_bits;
uint8_t num_ref_idx_l0_default_active_minus1;
uint8_t num_ref_idx_l1_default_active_minus1;
int8_t init_qp_minus26;
uint8_t diff_cu_qp_delta_depth;
int8_t pps_cb_qp_offset;
int8_t pps_cr_qp_offset;
int8_t pps_beta_offset_div2;
int8_t pps_tc_offset_div2;
uint8_t log2_parallel_merge_level_minus2;
uint8_t log2_max_transform_skip_block_size_minus2;
uint8_t diff_cu_chroma_qp_offset_depth;
uint8_t chroma_qp_offset_list_len_minus1;
int8_t cb_qp_offset_list[STD_VIDEO_H265_CHROMA_QP_OFFSET_LIST_SIZE];
int8_t cr_qp_offset_list[STD_VIDEO_H265_CHROMA_QP_OFFSET_LIST_SIZE];
uint8_t log2_sao_offset_scale_luma;
uint8_t log2_sao_offset_scale_chroma;
int8_t pps_act_y_qp_offset_plus5;
int8_t pps_act_cb_qp_offset_plus5;
int8_t pps_act_cr_qp_offset_plus3;
uint8_t pps_num_palette_predictor_initializers;
uint8_t luma_bit_depth_entry_minus8;
uint8_t chroma_bit_depth_entry_minus8;
uint8_t num_tile_columns_minus1;
uint8_t num_tile_rows_minus1;
uint8_t reserved1;
uint8_t reserved2;
uint16_t column_width_minus1[STD_VIDEO_H265_CHROMA_QP_OFFSET_TILE_COLS_LIST_SIZE];
uint16_t row_height_minus1[STD_VIDEO_H265_CHROMA_QP_OFFSET_TILE_ROWS_LIST_SIZE];
uint32_t reserved3;
const StdVideoH265ScalingLists* pScalingLists;
const StdVideoH265PredictorPaletteEntries* pPredictorPaletteEntries;
} StdVideoH265PictureParameterSet;
#ifdef __cplusplus
}
#endif
#endif

View File

@@ -0,0 +1,65 @@
#ifndef VULKAN_VIDEO_CODEC_H265STD_DECODE_H_
#define VULKAN_VIDEO_CODEC_H265STD_DECODE_H_ 1
/*
** Copyright 2015-2022 The Khronos Group Inc.
**
** SPDX-License-Identifier: Apache-2.0
*/
/*
** This header is generated from the Khronos Vulkan XML API Registry.
**
*/
#ifdef __cplusplus
extern "C" {
#endif
#define vulkan_video_codec_h265std_decode 1
// Vulkan 0.9 provisional Vulkan video H.265 decode std specification version number
#define VK_STD_VULKAN_VIDEO_CODEC_H265_DECODE_API_VERSION_0_9_9 VK_MAKE_VIDEO_STD_VERSION(0, 9, 9) // Patch version should always be set to 0
#define STD_VIDEO_DECODE_H265_REF_PIC_SET_LIST_SIZE 8
#define VK_STD_VULKAN_VIDEO_CODEC_H265_DECODE_SPEC_VERSION VK_STD_VULKAN_VIDEO_CODEC_H265_DECODE_API_VERSION_0_9_9
#define VK_STD_VULKAN_VIDEO_CODEC_H265_DECODE_EXTENSION_NAME "VK_STD_vulkan_video_codec_h265_decode"
typedef struct StdVideoDecodeH265PictureInfoFlags {
uint32_t IrapPicFlag : 1;
uint32_t IdrPicFlag : 1;
uint32_t IsReference : 1;
uint32_t short_term_ref_pic_set_sps_flag : 1;
} StdVideoDecodeH265PictureInfoFlags;
typedef struct StdVideoDecodeH265PictureInfo {
StdVideoDecodeH265PictureInfoFlags flags;
uint8_t sps_video_parameter_set_id;
uint8_t pps_seq_parameter_set_id;
uint8_t pps_pic_parameter_set_id;
uint8_t NumDeltaPocsOfRefRpsIdx;
int32_t PicOrderCntVal;
uint16_t NumBitsForSTRefPicSetInSlice;
uint16_t reserved;
uint8_t RefPicSetStCurrBefore[STD_VIDEO_DECODE_H265_REF_PIC_SET_LIST_SIZE];
uint8_t RefPicSetStCurrAfter[STD_VIDEO_DECODE_H265_REF_PIC_SET_LIST_SIZE];
uint8_t RefPicSetLtCurr[STD_VIDEO_DECODE_H265_REF_PIC_SET_LIST_SIZE];
} StdVideoDecodeH265PictureInfo;
typedef struct StdVideoDecodeH265ReferenceInfoFlags {
uint32_t used_for_long_term_reference : 1;
uint32_t unused_for_reference : 1;
} StdVideoDecodeH265ReferenceInfoFlags;
typedef struct StdVideoDecodeH265ReferenceInfo {
StdVideoDecodeH265ReferenceInfoFlags flags;
int32_t PicOrderCntVal;
} StdVideoDecodeH265ReferenceInfo;
#ifdef __cplusplus
}
#endif
#endif

View File

@@ -0,0 +1,146 @@
#ifndef VULKAN_VIDEO_CODEC_H265STD_ENCODE_H_
#define VULKAN_VIDEO_CODEC_H265STD_ENCODE_H_ 1
/*
** Copyright 2015-2022 The Khronos Group Inc.
**
** SPDX-License-Identifier: Apache-2.0
*/
/*
** This header is generated from the Khronos Vulkan XML API Registry.
**
*/
#ifdef __cplusplus
extern "C" {
#endif
#define vulkan_video_codec_h265std_encode 1
// Vulkan 0.9 provisional Vulkan video H.265 encode std specification version number
#define VK_STD_VULKAN_VIDEO_CODEC_H265_ENCODE_API_VERSION_0_9_9 VK_MAKE_VIDEO_STD_VERSION(0, 9, 9) // Patch version should always be set to 0
#define VK_STD_VULKAN_VIDEO_CODEC_H265_ENCODE_SPEC_VERSION VK_STD_VULKAN_VIDEO_CODEC_H265_ENCODE_API_VERSION_0_9_9
#define VK_STD_VULKAN_VIDEO_CODEC_H265_ENCODE_EXTENSION_NAME "VK_STD_vulkan_video_codec_h265_encode"
typedef struct StdVideoEncodeH265WeightTableFlags {
uint16_t luma_weight_l0_flag;
uint16_t chroma_weight_l0_flag;
uint16_t luma_weight_l1_flag;
uint16_t chroma_weight_l1_flag;
} StdVideoEncodeH265WeightTableFlags;
typedef struct StdVideoEncodeH265WeightTable {
StdVideoEncodeH265WeightTableFlags flags;
uint8_t luma_log2_weight_denom;
int8_t delta_chroma_log2_weight_denom;
int8_t delta_luma_weight_l0[STD_VIDEO_H265_MAX_NUM_LIST_REF];
int8_t luma_offset_l0[STD_VIDEO_H265_MAX_NUM_LIST_REF];
int8_t delta_chroma_weight_l0[STD_VIDEO_H265_MAX_NUM_LIST_REF][STD_VIDEO_H265_MAX_CHROMA_PLANES];
int8_t delta_chroma_offset_l0[STD_VIDEO_H265_MAX_NUM_LIST_REF][STD_VIDEO_H265_MAX_CHROMA_PLANES];
int8_t delta_luma_weight_l1[STD_VIDEO_H265_MAX_NUM_LIST_REF];
int8_t luma_offset_l1[STD_VIDEO_H265_MAX_NUM_LIST_REF];
int8_t delta_chroma_weight_l1[STD_VIDEO_H265_MAX_NUM_LIST_REF][STD_VIDEO_H265_MAX_CHROMA_PLANES];
int8_t delta_chroma_offset_l1[STD_VIDEO_H265_MAX_NUM_LIST_REF][STD_VIDEO_H265_MAX_CHROMA_PLANES];
} StdVideoEncodeH265WeightTable;
typedef struct StdVideoEncodeH265SliceSegmentHeaderFlags {
uint32_t first_slice_segment_in_pic_flag : 1;
uint32_t no_output_of_prior_pics_flag : 1;
uint32_t dependent_slice_segment_flag : 1;
uint32_t pic_output_flag : 1;
uint32_t short_term_ref_pic_set_sps_flag : 1;
uint32_t slice_temporal_mvp_enable_flag : 1;
uint32_t slice_sao_luma_flag : 1;
uint32_t slice_sao_chroma_flag : 1;
uint32_t num_ref_idx_active_override_flag : 1;
uint32_t mvd_l1_zero_flag : 1;
uint32_t cabac_init_flag : 1;
uint32_t cu_chroma_qp_offset_enabled_flag : 1;
uint32_t deblocking_filter_override_flag : 1;
uint32_t slice_deblocking_filter_disabled_flag : 1;
uint32_t collocated_from_l0_flag : 1;
uint32_t slice_loop_filter_across_slices_enabled_flag : 1;
} StdVideoEncodeH265SliceSegmentHeaderFlags;
typedef struct StdVideoEncodeH265SliceSegmentLongTermRefPics {
uint8_t num_long_term_sps;
uint8_t num_long_term_pics;
uint8_t lt_idx_sps[STD_VIDEO_H265_MAX_LONG_TERM_REF_PICS_SPS];
uint8_t poc_lsb_lt[STD_VIDEO_H265_MAX_LONG_TERM_PICS];
uint16_t used_by_curr_pic_lt_flag;
uint8_t delta_poc_msb_present_flag[STD_VIDEO_H265_MAX_DELTA_POC];
uint8_t delta_poc_msb_cycle_lt[STD_VIDEO_H265_MAX_DELTA_POC];
} StdVideoEncodeH265SliceSegmentLongTermRefPics;
typedef struct StdVideoEncodeH265SliceSegmentHeader {
StdVideoEncodeH265SliceSegmentHeaderFlags flags;
StdVideoH265SliceType slice_type;
uint32_t slice_segment_address;
uint8_t short_term_ref_pic_set_idx;
uint8_t collocated_ref_idx;
uint8_t num_ref_idx_l0_active_minus1;
uint8_t num_ref_idx_l1_active_minus1;
uint8_t MaxNumMergeCand;
int8_t slice_cb_qp_offset;
int8_t slice_cr_qp_offset;
int8_t slice_beta_offset_div2;
int8_t slice_tc_offset_div2;
int8_t slice_act_y_qp_offset;
int8_t slice_act_cb_qp_offset;
int8_t slice_act_cr_qp_offset;
const StdVideoH265ShortTermRefPicSet* pShortTermRefPicSet;
const StdVideoEncodeH265SliceSegmentLongTermRefPics* pLongTermRefPics;
const StdVideoEncodeH265WeightTable* pWeightTable;
} StdVideoEncodeH265SliceSegmentHeader;
typedef struct StdVideoEncodeH265ReferenceModificationFlags {
uint32_t ref_pic_list_modification_flag_l0 : 1;
uint32_t ref_pic_list_modification_flag_l1 : 1;
} StdVideoEncodeH265ReferenceModificationFlags;
typedef struct StdVideoEncodeH265ReferenceModifications {
StdVideoEncodeH265ReferenceModificationFlags flags;
uint8_t referenceList0ModificationsCount;
const uint8_t* pReferenceList0Modifications;
uint8_t referenceList1ModificationsCount;
const uint8_t* pReferenceList1Modifications;
} StdVideoEncodeH265ReferenceModifications;
typedef struct StdVideoEncodeH265PictureInfoFlags {
uint32_t is_reference_flag : 1;
uint32_t IrapPicFlag : 1;
uint32_t long_term_flag : 1;
uint32_t discardable_flag : 1;
uint32_t cross_layer_bla_flag : 1;
} StdVideoEncodeH265PictureInfoFlags;
typedef struct StdVideoEncodeH265PictureInfo {
StdVideoEncodeH265PictureInfoFlags flags;
StdVideoH265PictureType PictureType;
uint8_t sps_video_parameter_set_id;
uint8_t pps_seq_parameter_set_id;
uint8_t pps_pic_parameter_set_id;
int32_t PicOrderCntVal;
uint8_t TemporalId;
} StdVideoEncodeH265PictureInfo;
typedef struct StdVideoEncodeH265ReferenceInfoFlags {
uint32_t used_for_long_term_reference : 1;
uint32_t unused_for_reference : 1;
} StdVideoEncodeH265ReferenceInfoFlags;
typedef struct StdVideoEncodeH265ReferenceInfo {
StdVideoEncodeH265ReferenceInfoFlags flags;
int32_t PicOrderCntVal;
uint8_t TemporalId;
} StdVideoEncodeH265ReferenceInfo;
#ifdef __cplusplus
}
#endif
#endif

View File

@@ -0,0 +1,31 @@
#ifndef VULKAN_VIDEO_CODECS_COMMON_H_
#define VULKAN_VIDEO_CODECS_COMMON_H_ 1
/*
** Copyright 2015-2022 The Khronos Group Inc.
**
** SPDX-License-Identifier: Apache-2.0
*/
/*
** This header is generated from the Khronos Vulkan XML API Registry.
**
*/
#ifdef __cplusplus
extern "C" {
#endif
#define vulkan_video_codecs_common 1
#define VK_MAKE_VIDEO_STD_VERSION(major, minor, patch) \
((((uint32_t)(major)) << 22) | (((uint32_t)(minor)) << 12) | ((uint32_t)(patch)))
#ifdef __cplusplus
}
#endif
#endif

View File

@@ -0,0 +1,245 @@
//
// File: vk_icd.h
//
/*
* Copyright (c) 2015-2016 The Khronos Group Inc.
* Copyright (c) 2015-2016 Valve Corporation
* Copyright (c) 2015-2016 LunarG, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
#ifndef VKICD_H
#define VKICD_H
#include "vulkan.h"
#include <stdbool.h>
// Loader-ICD version negotiation API. Versions add the following features:
// Version 0 - Initial. Doesn't support vk_icdGetInstanceProcAddr
// or vk_icdNegotiateLoaderICDInterfaceVersion.
// Version 1 - Add support for vk_icdGetInstanceProcAddr.
// Version 2 - Add Loader/ICD Interface version negotiation
// via vk_icdNegotiateLoaderICDInterfaceVersion.
// Version 3 - Add ICD creation/destruction of KHR_surface objects.
// Version 4 - Add unknown physical device extension querying via
// vk_icdGetPhysicalDeviceProcAddr.
// Version 5 - Tells ICDs that the loader is now paying attention to the
// application version of Vulkan passed into the ApplicationInfo
// structure during vkCreateInstance. This will tell the ICD
// that if the loader is older, it should automatically fail a
// call for any API version > 1.0. Otherwise, the loader will
// manually determine if it can support the expected version.
// Version 6 - Add support for vk_icdEnumerateAdapterPhysicalDevices.
#define CURRENT_LOADER_ICD_INTERFACE_VERSION 6
#define MIN_SUPPORTED_LOADER_ICD_INTERFACE_VERSION 0
#define MIN_PHYS_DEV_EXTENSION_ICD_INTERFACE_VERSION 4
// Old typedefs that don't follow a proper naming convention but are preserved for compatibility
typedef VkResult(VKAPI_PTR *PFN_vkNegotiateLoaderICDInterfaceVersion)(uint32_t *pVersion);
// This is defined in vk_layer.h which will be found by the loader, but if an ICD is building against this
// file directly, it won't be found.
#ifndef PFN_GetPhysicalDeviceProcAddr
typedef PFN_vkVoidFunction(VKAPI_PTR *PFN_GetPhysicalDeviceProcAddr)(VkInstance instance, const char *pName);
#endif
// Typedefs for loader/ICD interface
typedef VkResult (VKAPI_PTR *PFN_vk_icdNegotiateLoaderICDInterfaceVersion)(uint32_t* pVersion);
typedef PFN_vkVoidFunction (VKAPI_PTR *PFN_vk_icdGetInstanceProcAddr)(VkInstance instance, const char* pName);
typedef PFN_vkVoidFunction (VKAPI_PTR *PFN_vk_icdGetPhysicalDeviceProcAddr)(VkInstance instance, const char* pName);
#if defined(VK_USE_PLATFORM_WIN32_KHR)
typedef VkResult (VKAPI_PTR *PFN_vk_icdEnumerateAdapterPhysicalDevices)(VkInstance instance, LUID adapterLUID,
uint32_t* pPhysicalDeviceCount, VkPhysicalDevice* pPhysicalDevices);
#endif
// Prototypes for loader/ICD interface
#if !defined(VK_NO_PROTOTYPES)
#ifdef __cplusplus
extern "C" {
#endif
VKAPI_ATTR VkResult VKAPI_CALL vk_icdNegotiateLoaderICDInterfaceVersion(uint32_t* pVersion);
VKAPI_ATTR PFN_vkVoidFunction VKAPI_CALL vk_icdGetInstanceProcAddr(VkInstance instance, const char* pName);
VKAPI_ATTR PFN_vkVoidFunction VKAPI_CALL vk_icdGetPhysicalDeviceProcAddr(VkInstance isntance, const char* pName);
#if defined(VK_USE_PLATFORM_WIN32_KHR)
VKAPI_ATTR VkResult VKAPI_CALL vk_icdEnumerateAdapterPhysicalDevices(VkInstance instance, LUID adapterLUID,
uint32_t* pPhysicalDeviceCount, VkPhysicalDevice* pPhysicalDevices);
#endif
#ifdef __cplusplus
}
#endif
#endif
/*
* The ICD must reserve space for a pointer for the loader's dispatch
* table, at the start of <each object>.
* The ICD must initialize this variable using the SET_LOADER_MAGIC_VALUE macro.
*/
#define ICD_LOADER_MAGIC 0x01CDC0DE
typedef union {
uintptr_t loaderMagic;
void *loaderData;
} VK_LOADER_DATA;
static inline void set_loader_magic_value(void *pNewObject) {
VK_LOADER_DATA *loader_info = (VK_LOADER_DATA *)pNewObject;
loader_info->loaderMagic = ICD_LOADER_MAGIC;
}
static inline bool valid_loader_magic_value(void *pNewObject) {
const VK_LOADER_DATA *loader_info = (VK_LOADER_DATA *)pNewObject;
return (loader_info->loaderMagic & 0xffffffff) == ICD_LOADER_MAGIC;
}
/*
* Windows and Linux ICDs will treat VkSurfaceKHR as a pointer to a struct that
* contains the platform-specific connection and surface information.
*/
typedef enum {
VK_ICD_WSI_PLATFORM_MIR,
VK_ICD_WSI_PLATFORM_WAYLAND,
VK_ICD_WSI_PLATFORM_WIN32,
VK_ICD_WSI_PLATFORM_XCB,
VK_ICD_WSI_PLATFORM_XLIB,
VK_ICD_WSI_PLATFORM_ANDROID,
VK_ICD_WSI_PLATFORM_MACOS,
VK_ICD_WSI_PLATFORM_IOS,
VK_ICD_WSI_PLATFORM_DISPLAY,
VK_ICD_WSI_PLATFORM_HEADLESS,
VK_ICD_WSI_PLATFORM_METAL,
VK_ICD_WSI_PLATFORM_DIRECTFB,
VK_ICD_WSI_PLATFORM_VI,
VK_ICD_WSI_PLATFORM_GGP,
VK_ICD_WSI_PLATFORM_SCREEN,
} VkIcdWsiPlatform;
typedef struct {
VkIcdWsiPlatform platform;
} VkIcdSurfaceBase;
#ifdef VK_USE_PLATFORM_MIR_KHR
typedef struct {
VkIcdSurfaceBase base;
MirConnection *connection;
MirSurface *mirSurface;
} VkIcdSurfaceMir;
#endif // VK_USE_PLATFORM_MIR_KHR
#ifdef VK_USE_PLATFORM_WAYLAND_KHR
typedef struct {
VkIcdSurfaceBase base;
struct wl_display *display;
struct wl_surface *surface;
} VkIcdSurfaceWayland;
#endif // VK_USE_PLATFORM_WAYLAND_KHR
#ifdef VK_USE_PLATFORM_WIN32_KHR
typedef struct {
VkIcdSurfaceBase base;
HINSTANCE hinstance;
HWND hwnd;
} VkIcdSurfaceWin32;
#endif // VK_USE_PLATFORM_WIN32_KHR
#ifdef VK_USE_PLATFORM_XCB_KHR
typedef struct {
VkIcdSurfaceBase base;
xcb_connection_t *connection;
xcb_window_t window;
} VkIcdSurfaceXcb;
#endif // VK_USE_PLATFORM_XCB_KHR
#ifdef VK_USE_PLATFORM_XLIB_KHR
typedef struct {
VkIcdSurfaceBase base;
Display *dpy;
Window window;
} VkIcdSurfaceXlib;
#endif // VK_USE_PLATFORM_XLIB_KHR
#ifdef VK_USE_PLATFORM_DIRECTFB_EXT
typedef struct {
VkIcdSurfaceBase base;
IDirectFB *dfb;
IDirectFBSurface *surface;
} VkIcdSurfaceDirectFB;
#endif // VK_USE_PLATFORM_DIRECTFB_EXT
#ifdef VK_USE_PLATFORM_ANDROID_KHR
typedef struct {
VkIcdSurfaceBase base;
struct ANativeWindow *window;
} VkIcdSurfaceAndroid;
#endif // VK_USE_PLATFORM_ANDROID_KHR
#ifdef VK_USE_PLATFORM_MACOS_MVK
typedef struct {
VkIcdSurfaceBase base;
const void *pView;
} VkIcdSurfaceMacOS;
#endif // VK_USE_PLATFORM_MACOS_MVK
#ifdef VK_USE_PLATFORM_IOS_MVK
typedef struct {
VkIcdSurfaceBase base;
const void *pView;
} VkIcdSurfaceIOS;
#endif // VK_USE_PLATFORM_IOS_MVK
#ifdef VK_USE_PLATFORM_GGP
typedef struct {
VkIcdSurfaceBase base;
GgpStreamDescriptor streamDescriptor;
} VkIcdSurfaceGgp;
#endif // VK_USE_PLATFORM_GGP
typedef struct {
VkIcdSurfaceBase base;
VkDisplayModeKHR displayMode;
uint32_t planeIndex;
uint32_t planeStackIndex;
VkSurfaceTransformFlagBitsKHR transform;
float globalAlpha;
VkDisplayPlaneAlphaFlagBitsKHR alphaMode;
VkExtent2D imageExtent;
} VkIcdSurfaceDisplay;
typedef struct {
VkIcdSurfaceBase base;
} VkIcdSurfaceHeadless;
#ifdef VK_USE_PLATFORM_METAL_EXT
typedef struct {
VkIcdSurfaceBase base;
const CAMetalLayer *pLayer;
} VkIcdSurfaceMetal;
#endif // VK_USE_PLATFORM_METAL_EXT
#ifdef VK_USE_PLATFORM_VI_NN
typedef struct {
VkIcdSurfaceBase base;
void *window;
} VkIcdSurfaceVi;
#endif // VK_USE_PLATFORM_VI_NN
#ifdef VK_USE_PLATFORM_SCREEN_QNX
typedef struct {
VkIcdSurfaceBase base;
struct _screen_context *context;
struct _screen_window *window;
} VkIcdSurfaceScreen;
#endif // VK_USE_PLATFORM_SCREEN_QNX
#endif // VKICD_H

View File

@@ -0,0 +1,210 @@
//
// File: vk_layer.h
//
/*
* Copyright (c) 2015-2017 The Khronos Group Inc.
* Copyright (c) 2015-2017 Valve Corporation
* Copyright (c) 2015-2017 LunarG, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
/* Need to define dispatch table
* Core struct can then have ptr to dispatch table at the top
* Along with object ptrs for current and next OBJ
*/
#pragma once
#include "vulkan.h"
#if defined(__GNUC__) && __GNUC__ >= 4
#define VK_LAYER_EXPORT __attribute__((visibility("default")))
#elif defined(__SUNPRO_C) && (__SUNPRO_C >= 0x590)
#define VK_LAYER_EXPORT __attribute__((visibility("default")))
#else
#define VK_LAYER_EXPORT
#endif
#define MAX_NUM_UNKNOWN_EXTS 250
// Loader-Layer version negotiation API. Versions add the following features:
// Versions 0/1 - Initial. Doesn't support vk_layerGetPhysicalDeviceProcAddr
// or vk_icdNegotiateLoaderLayerInterfaceVersion.
// Version 2 - Add support for vk_layerGetPhysicalDeviceProcAddr and
// vk_icdNegotiateLoaderLayerInterfaceVersion.
#define CURRENT_LOADER_LAYER_INTERFACE_VERSION 2
#define MIN_SUPPORTED_LOADER_LAYER_INTERFACE_VERSION 1
#define VK_CURRENT_CHAIN_VERSION 1
// Typedef for use in the interfaces below
typedef PFN_vkVoidFunction (VKAPI_PTR *PFN_GetPhysicalDeviceProcAddr)(VkInstance instance, const char* pName);
// Version negotiation values
typedef enum VkNegotiateLayerStructType {
LAYER_NEGOTIATE_UNINTIALIZED = 0,
LAYER_NEGOTIATE_INTERFACE_STRUCT = 1,
} VkNegotiateLayerStructType;
// Version negotiation structures
typedef struct VkNegotiateLayerInterface {
VkNegotiateLayerStructType sType;
void *pNext;
uint32_t loaderLayerInterfaceVersion;
PFN_vkGetInstanceProcAddr pfnGetInstanceProcAddr;
PFN_vkGetDeviceProcAddr pfnGetDeviceProcAddr;
PFN_GetPhysicalDeviceProcAddr pfnGetPhysicalDeviceProcAddr;
} VkNegotiateLayerInterface;
// Version negotiation functions
typedef VkResult (VKAPI_PTR *PFN_vkNegotiateLoaderLayerInterfaceVersion)(VkNegotiateLayerInterface *pVersionStruct);
// Function prototype for unknown physical device extension command
typedef VkResult(VKAPI_PTR *PFN_PhysDevExt)(VkPhysicalDevice phys_device);
// ------------------------------------------------------------------------------------------------
// CreateInstance and CreateDevice support structures
/* Sub type of structure for instance and device loader ext of CreateInfo.
* When sType == VK_STRUCTURE_TYPE_LOADER_INSTANCE_CREATE_INFO
* or sType == VK_STRUCTURE_TYPE_LOADER_DEVICE_CREATE_INFO
* then VkLayerFunction indicates struct type pointed to by pNext
*/
typedef enum VkLayerFunction_ {
VK_LAYER_LINK_INFO = 0,
VK_LOADER_DATA_CALLBACK = 1,
VK_LOADER_LAYER_CREATE_DEVICE_CALLBACK = 2,
VK_LOADER_FEATURES = 3,
} VkLayerFunction;
typedef struct VkLayerInstanceLink_ {
struct VkLayerInstanceLink_ *pNext;
PFN_vkGetInstanceProcAddr pfnNextGetInstanceProcAddr;
PFN_GetPhysicalDeviceProcAddr pfnNextGetPhysicalDeviceProcAddr;
} VkLayerInstanceLink;
/*
* When creating the device chain the loader needs to pass
* down information about it's device structure needed at
* the end of the chain. Passing the data via the
* VkLayerDeviceInfo avoids issues with finding the
* exact instance being used.
*/
typedef struct VkLayerDeviceInfo_ {
void *device_info;
PFN_vkGetInstanceProcAddr pfnNextGetInstanceProcAddr;
} VkLayerDeviceInfo;
typedef VkResult (VKAPI_PTR *PFN_vkSetInstanceLoaderData)(VkInstance instance,
void *object);
typedef VkResult (VKAPI_PTR *PFN_vkSetDeviceLoaderData)(VkDevice device,
void *object);
typedef VkResult (VKAPI_PTR *PFN_vkLayerCreateDevice)(VkInstance instance, VkPhysicalDevice physicalDevice, const VkDeviceCreateInfo *pCreateInfo,
const VkAllocationCallbacks *pAllocator, VkDevice *pDevice, PFN_vkGetInstanceProcAddr layerGIPA, PFN_vkGetDeviceProcAddr *nextGDPA);
typedef void (VKAPI_PTR *PFN_vkLayerDestroyDevice)(VkDevice physicalDevice, const VkAllocationCallbacks *pAllocator, PFN_vkDestroyDevice destroyFunction);
typedef enum VkLoaderFeastureFlagBits {
VK_LOADER_FEATURE_PHYSICAL_DEVICE_SORTING = 0x00000001,
} VkLoaderFlagBits;
typedef VkFlags VkLoaderFeatureFlags;
typedef struct {
VkStructureType sType; // VK_STRUCTURE_TYPE_LOADER_INSTANCE_CREATE_INFO
const void *pNext;
VkLayerFunction function;
union {
VkLayerInstanceLink *pLayerInfo;
PFN_vkSetInstanceLoaderData pfnSetInstanceLoaderData;
struct {
PFN_vkLayerCreateDevice pfnLayerCreateDevice;
PFN_vkLayerDestroyDevice pfnLayerDestroyDevice;
} layerDevice;
VkLoaderFeatureFlags loaderFeatures;
} u;
} VkLayerInstanceCreateInfo;
typedef struct VkLayerDeviceLink_ {
struct VkLayerDeviceLink_ *pNext;
PFN_vkGetInstanceProcAddr pfnNextGetInstanceProcAddr;
PFN_vkGetDeviceProcAddr pfnNextGetDeviceProcAddr;
} VkLayerDeviceLink;
typedef struct {
VkStructureType sType; // VK_STRUCTURE_TYPE_LOADER_DEVICE_CREATE_INFO
const void *pNext;
VkLayerFunction function;
union {
VkLayerDeviceLink *pLayerInfo;
PFN_vkSetDeviceLoaderData pfnSetDeviceLoaderData;
} u;
} VkLayerDeviceCreateInfo;
#ifdef __cplusplus
extern "C" {
#endif
VKAPI_ATTR VkResult VKAPI_CALL vkNegotiateLoaderLayerInterfaceVersion(VkNegotiateLayerInterface *pVersionStruct);
typedef enum VkChainType {
VK_CHAIN_TYPE_UNKNOWN = 0,
VK_CHAIN_TYPE_ENUMERATE_INSTANCE_EXTENSION_PROPERTIES = 1,
VK_CHAIN_TYPE_ENUMERATE_INSTANCE_LAYER_PROPERTIES = 2,
VK_CHAIN_TYPE_ENUMERATE_INSTANCE_VERSION = 3,
} VkChainType;
typedef struct VkChainHeader {
VkChainType type;
uint32_t version;
uint32_t size;
} VkChainHeader;
typedef struct VkEnumerateInstanceExtensionPropertiesChain {
VkChainHeader header;
VkResult(VKAPI_PTR *pfnNextLayer)(const struct VkEnumerateInstanceExtensionPropertiesChain *, const char *, uint32_t *,
VkExtensionProperties *);
const struct VkEnumerateInstanceExtensionPropertiesChain *pNextLink;
#if defined(__cplusplus)
inline VkResult CallDown(const char *pLayerName, uint32_t *pPropertyCount, VkExtensionProperties *pProperties) const {
return pfnNextLayer(pNextLink, pLayerName, pPropertyCount, pProperties);
}
#endif
} VkEnumerateInstanceExtensionPropertiesChain;
typedef struct VkEnumerateInstanceLayerPropertiesChain {
VkChainHeader header;
VkResult(VKAPI_PTR *pfnNextLayer)(const struct VkEnumerateInstanceLayerPropertiesChain *, uint32_t *, VkLayerProperties *);
const struct VkEnumerateInstanceLayerPropertiesChain *pNextLink;
#if defined(__cplusplus)
inline VkResult CallDown(uint32_t *pPropertyCount, VkLayerProperties *pProperties) const {
return pfnNextLayer(pNextLink, pPropertyCount, pProperties);
}
#endif
} VkEnumerateInstanceLayerPropertiesChain;
typedef struct VkEnumerateInstanceVersionChain {
VkChainHeader header;
VkResult(VKAPI_PTR *pfnNextLayer)(const struct VkEnumerateInstanceVersionChain *, uint32_t *);
const struct VkEnumerateInstanceVersionChain *pNextLink;
#if defined(__cplusplus)
inline VkResult CallDown(uint32_t *pApiVersion) const {
return pfnNextLayer(pNextLink, pApiVersion);
}
#endif
} VkEnumerateInstanceVersionChain;
#ifdef __cplusplus
}
#endif

View File

@@ -0,0 +1,84 @@
//
// File: vk_platform.h
//
/*
** Copyright 2014-2022 The Khronos Group Inc.
**
** SPDX-License-Identifier: Apache-2.0
*/
#ifndef VK_PLATFORM_H_
#define VK_PLATFORM_H_
#ifdef __cplusplus
extern "C"
{
#endif // __cplusplus
/*
***************************************************************************************************
* Platform-specific directives and type declarations
***************************************************************************************************
*/
/* Platform-specific calling convention macros.
*
* Platforms should define these so that Vulkan clients call Vulkan commands
* with the same calling conventions that the Vulkan implementation expects.
*
* VKAPI_ATTR - Placed before the return type in function declarations.
* Useful for C++11 and GCC/Clang-style function attribute syntax.
* VKAPI_CALL - Placed after the return type in function declarations.
* Useful for MSVC-style calling convention syntax.
* VKAPI_PTR - Placed between the '(' and '*' in function pointer types.
*
* Function declaration: VKAPI_ATTR void VKAPI_CALL vkCommand(void);
* Function pointer type: typedef void (VKAPI_PTR *PFN_vkCommand)(void);
*/
#if defined(_WIN32)
// On Windows, Vulkan commands use the stdcall convention
#define VKAPI_ATTR
#define VKAPI_CALL __stdcall
#define VKAPI_PTR VKAPI_CALL
#elif defined(__ANDROID__) && defined(__ARM_ARCH) && __ARM_ARCH < 7
#error "Vulkan is not supported for the 'armeabi' NDK ABI"
#elif defined(__ANDROID__) && defined(__ARM_ARCH) && __ARM_ARCH >= 7 && defined(__ARM_32BIT_STATE)
// On Android 32-bit ARM targets, Vulkan functions use the "hardfloat"
// calling convention, i.e. float parameters are passed in registers. This
// is true even if the rest of the application passes floats on the stack,
// as it does by default when compiling for the armeabi-v7a NDK ABI.
#define VKAPI_ATTR __attribute__((pcs("aapcs-vfp")))
#define VKAPI_CALL
#define VKAPI_PTR VKAPI_ATTR
#else
// On other platforms, use the default calling convention
#define VKAPI_ATTR
#define VKAPI_CALL
#define VKAPI_PTR
#endif
#if !defined(VK_NO_STDDEF_H)
#include <stddef.h>
#endif // !defined(VK_NO_STDDEF_H)
#if !defined(VK_NO_STDINT_H)
#if defined(_MSC_VER) && (_MSC_VER < 1600)
typedef signed __int8 int8_t;
typedef unsigned __int8 uint8_t;
typedef signed __int16 int16_t;
typedef unsigned __int16 uint16_t;
typedef signed __int32 int32_t;
typedef unsigned __int32 uint32_t;
typedef signed __int64 int64_t;
typedef unsigned __int64 uint64_t;
#else
#include <stdint.h>
#endif
#endif // !defined(VK_NO_STDINT_H)
#ifdef __cplusplus
} // extern "C"
#endif // __cplusplus
#endif

View File

@@ -0,0 +1,69 @@
//
// File: vk_sdk_platform.h
//
/*
* Copyright (c) 2015-2016 The Khronos Group Inc.
* Copyright (c) 2015-2016 Valve Corporation
* Copyright (c) 2015-2016 LunarG, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef VK_SDK_PLATFORM_H
#define VK_SDK_PLATFORM_H
#if defined(_WIN32)
#define NOMINMAX
#ifndef __cplusplus
#undef inline
#define inline __inline
#endif // __cplusplus
#if (defined(_MSC_VER) && _MSC_VER < 1900 /*vs2015*/)
// C99:
// Microsoft didn't implement C99 in Visual Studio; but started adding it with
// VS2013. However, VS2013 still didn't have snprintf(). The following is a
// work-around (Note: The _CRT_SECURE_NO_WARNINGS macro must be set in the
// "CMakeLists.txt" file).
// NOTE: This is fixed in Visual Studio 2015.
#define snprintf _snprintf
#endif
#define strdup _strdup
#endif // _WIN32
// Check for noexcept support using clang, with fallback to Windows or GCC version numbers
#ifndef NOEXCEPT
#if defined(__clang__)
#if __has_feature(cxx_noexcept)
#define HAS_NOEXCEPT
#endif
#else
#if defined(__GXX_EXPERIMENTAL_CXX0X__) && __GNUC__ * 10 + __GNUC_MINOR__ >= 46
#define HAS_NOEXCEPT
#else
#if defined(_MSC_FULL_VER) && _MSC_FULL_VER >= 190023026 && defined(_HAS_EXCEPTIONS) && _HAS_EXCEPTIONS
#define HAS_NOEXCEPT
#endif
#endif
#endif
#ifdef HAS_NOEXCEPT
#define NOEXCEPT noexcept
#else
#define NOEXCEPT
#endif
#endif
#endif // VK_SDK_PLATFORM_H

View File

@@ -0,0 +1,91 @@
#ifndef VULKAN_H_
#define VULKAN_H_ 1
/*
** Copyright 2015-2022 The Khronos Group Inc.
**
** SPDX-License-Identifier: Apache-2.0
*/
#include "vk_platform.h"
#include "vulkan_core.h"
#ifdef VK_USE_PLATFORM_ANDROID_KHR
#include "vulkan_android.h"
#endif
#ifdef VK_USE_PLATFORM_FUCHSIA
#include <zircon/types.h>
#include "vulkan_fuchsia.h"
#endif
#ifdef VK_USE_PLATFORM_IOS_MVK
#include "vulkan_ios.h"
#endif
#ifdef VK_USE_PLATFORM_MACOS_MVK
#include "vulkan_macos.h"
#endif
#ifdef VK_USE_PLATFORM_METAL_EXT
#include "vulkan_metal.h"
#endif
#ifdef VK_USE_PLATFORM_VI_NN
#include "vulkan_vi.h"
#endif
#ifdef VK_USE_PLATFORM_WAYLAND_KHR
#include "vulkan_wayland.h"
#endif
#ifdef VK_USE_PLATFORM_WIN32_KHR
#include <windows.h>
#include "vulkan_win32.h"
#endif
#ifdef VK_USE_PLATFORM_XCB_KHR
#include <xcb/xcb.h>
#include "vulkan_xcb.h"
#endif
#ifdef VK_USE_PLATFORM_XLIB_KHR
#include <X11/Xlib.h>
#include "vulkan_xlib.h"
#endif
#ifdef VK_USE_PLATFORM_DIRECTFB_EXT
#include <directfb.h>
#include "vulkan_directfb.h"
#endif
#ifdef VK_USE_PLATFORM_XLIB_XRANDR_EXT
#include <X11/Xlib.h>
#include <X11/extensions/Xrandr.h>
#include "vulkan_xlib_xrandr.h"
#endif
#ifdef VK_USE_PLATFORM_GGP
#include <ggp_c/vulkan_types.h>
#include "vulkan_ggp.h"
#endif
#ifdef VK_USE_PLATFORM_SCREEN_QNX
#include <screen/screen.h>
#include "vulkan_screen.h"
#endif
#ifdef VK_ENABLE_BETA_EXTENSIONS
#include "vulkan_beta.h"
#endif
#endif // VULKAN_H_

View File

@@ -0,0 +1,125 @@
#ifndef VULKAN_ANDROID_H_
#define VULKAN_ANDROID_H_ 1
/*
** Copyright 2015-2022 The Khronos Group Inc.
**
** SPDX-License-Identifier: Apache-2.0
*/
/*
** This header is generated from the Khronos Vulkan XML API Registry.
**
*/
#ifdef __cplusplus
extern "C" {
#endif
#define VK_KHR_android_surface 1
struct ANativeWindow;
#define VK_KHR_ANDROID_SURFACE_SPEC_VERSION 6
#define VK_KHR_ANDROID_SURFACE_EXTENSION_NAME "VK_KHR_android_surface"
typedef VkFlags VkAndroidSurfaceCreateFlagsKHR;
typedef struct VkAndroidSurfaceCreateInfoKHR {
VkStructureType sType;
const void* pNext;
VkAndroidSurfaceCreateFlagsKHR flags;
struct ANativeWindow* window;
} VkAndroidSurfaceCreateInfoKHR;
typedef VkResult (VKAPI_PTR *PFN_vkCreateAndroidSurfaceKHR)(VkInstance instance, const VkAndroidSurfaceCreateInfoKHR* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface);
#ifndef VK_NO_PROTOTYPES
VKAPI_ATTR VkResult VKAPI_CALL vkCreateAndroidSurfaceKHR(
VkInstance instance,
const VkAndroidSurfaceCreateInfoKHR* pCreateInfo,
const VkAllocationCallbacks* pAllocator,
VkSurfaceKHR* pSurface);
#endif
#define VK_ANDROID_external_memory_android_hardware_buffer 1
struct AHardwareBuffer;
#define VK_ANDROID_EXTERNAL_MEMORY_ANDROID_HARDWARE_BUFFER_SPEC_VERSION 5
#define VK_ANDROID_EXTERNAL_MEMORY_ANDROID_HARDWARE_BUFFER_EXTENSION_NAME "VK_ANDROID_external_memory_android_hardware_buffer"
typedef struct VkAndroidHardwareBufferUsageANDROID {
VkStructureType sType;
void* pNext;
uint64_t androidHardwareBufferUsage;
} VkAndroidHardwareBufferUsageANDROID;
typedef struct VkAndroidHardwareBufferPropertiesANDROID {
VkStructureType sType;
void* pNext;
VkDeviceSize allocationSize;
uint32_t memoryTypeBits;
} VkAndroidHardwareBufferPropertiesANDROID;
typedef struct VkAndroidHardwareBufferFormatPropertiesANDROID {
VkStructureType sType;
void* pNext;
VkFormat format;
uint64_t externalFormat;
VkFormatFeatureFlags formatFeatures;
VkComponentMapping samplerYcbcrConversionComponents;
VkSamplerYcbcrModelConversion suggestedYcbcrModel;
VkSamplerYcbcrRange suggestedYcbcrRange;
VkChromaLocation suggestedXChromaOffset;
VkChromaLocation suggestedYChromaOffset;
} VkAndroidHardwareBufferFormatPropertiesANDROID;
typedef struct VkImportAndroidHardwareBufferInfoANDROID {
VkStructureType sType;
const void* pNext;
struct AHardwareBuffer* buffer;
} VkImportAndroidHardwareBufferInfoANDROID;
typedef struct VkMemoryGetAndroidHardwareBufferInfoANDROID {
VkStructureType sType;
const void* pNext;
VkDeviceMemory memory;
} VkMemoryGetAndroidHardwareBufferInfoANDROID;
typedef struct VkExternalFormatANDROID {
VkStructureType sType;
void* pNext;
uint64_t externalFormat;
} VkExternalFormatANDROID;
typedef struct VkAndroidHardwareBufferFormatProperties2ANDROID {
VkStructureType sType;
void* pNext;
VkFormat format;
uint64_t externalFormat;
VkFormatFeatureFlags2 formatFeatures;
VkComponentMapping samplerYcbcrConversionComponents;
VkSamplerYcbcrModelConversion suggestedYcbcrModel;
VkSamplerYcbcrRange suggestedYcbcrRange;
VkChromaLocation suggestedXChromaOffset;
VkChromaLocation suggestedYChromaOffset;
} VkAndroidHardwareBufferFormatProperties2ANDROID;
typedef VkResult (VKAPI_PTR *PFN_vkGetAndroidHardwareBufferPropertiesANDROID)(VkDevice device, const struct AHardwareBuffer* buffer, VkAndroidHardwareBufferPropertiesANDROID* pProperties);
typedef VkResult (VKAPI_PTR *PFN_vkGetMemoryAndroidHardwareBufferANDROID)(VkDevice device, const VkMemoryGetAndroidHardwareBufferInfoANDROID* pInfo, struct AHardwareBuffer** pBuffer);
#ifndef VK_NO_PROTOTYPES
VKAPI_ATTR VkResult VKAPI_CALL vkGetAndroidHardwareBufferPropertiesANDROID(
VkDevice device,
const struct AHardwareBuffer* buffer,
VkAndroidHardwareBufferPropertiesANDROID* pProperties);
VKAPI_ATTR VkResult VKAPI_CALL vkGetMemoryAndroidHardwareBufferANDROID(
VkDevice device,
const VkMemoryGetAndroidHardwareBufferInfoANDROID* pInfo,
struct AHardwareBuffer** pBuffer);
#endif
#ifdef __cplusplus
}
#endif
#endif

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,54 @@
#ifndef VULKAN_DIRECTFB_H_
#define VULKAN_DIRECTFB_H_ 1
/*
** Copyright 2015-2022 The Khronos Group Inc.
**
** SPDX-License-Identifier: Apache-2.0
*/
/*
** This header is generated from the Khronos Vulkan XML API Registry.
**
*/
#ifdef __cplusplus
extern "C" {
#endif
#define VK_EXT_directfb_surface 1
#define VK_EXT_DIRECTFB_SURFACE_SPEC_VERSION 1
#define VK_EXT_DIRECTFB_SURFACE_EXTENSION_NAME "VK_EXT_directfb_surface"
typedef VkFlags VkDirectFBSurfaceCreateFlagsEXT;
typedef struct VkDirectFBSurfaceCreateInfoEXT {
VkStructureType sType;
const void* pNext;
VkDirectFBSurfaceCreateFlagsEXT flags;
IDirectFB* dfb;
IDirectFBSurface* surface;
} VkDirectFBSurfaceCreateInfoEXT;
typedef VkResult (VKAPI_PTR *PFN_vkCreateDirectFBSurfaceEXT)(VkInstance instance, const VkDirectFBSurfaceCreateInfoEXT* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface);
typedef VkBool32 (VKAPI_PTR *PFN_vkGetPhysicalDeviceDirectFBPresentationSupportEXT)(VkPhysicalDevice physicalDevice, uint32_t queueFamilyIndex, IDirectFB* dfb);
#ifndef VK_NO_PROTOTYPES
VKAPI_ATTR VkResult VKAPI_CALL vkCreateDirectFBSurfaceEXT(
VkInstance instance,
const VkDirectFBSurfaceCreateInfoEXT* pCreateInfo,
const VkAllocationCallbacks* pAllocator,
VkSurfaceKHR* pSurface);
VKAPI_ATTR VkBool32 VKAPI_CALL vkGetPhysicalDeviceDirectFBPresentationSupportEXT(
VkPhysicalDevice physicalDevice,
uint32_t queueFamilyIndex,
IDirectFB* dfb);
#endif
#ifdef __cplusplus
}
#endif
#endif

View File

@@ -0,0 +1,258 @@
#ifndef VULKAN_FUCHSIA_H_
#define VULKAN_FUCHSIA_H_ 1
/*
** Copyright 2015-2022 The Khronos Group Inc.
**
** SPDX-License-Identifier: Apache-2.0
*/
/*
** This header is generated from the Khronos Vulkan XML API Registry.
**
*/
#ifdef __cplusplus
extern "C" {
#endif
#define VK_FUCHSIA_imagepipe_surface 1
#define VK_FUCHSIA_IMAGEPIPE_SURFACE_SPEC_VERSION 1
#define VK_FUCHSIA_IMAGEPIPE_SURFACE_EXTENSION_NAME "VK_FUCHSIA_imagepipe_surface"
typedef VkFlags VkImagePipeSurfaceCreateFlagsFUCHSIA;
typedef struct VkImagePipeSurfaceCreateInfoFUCHSIA {
VkStructureType sType;
const void* pNext;
VkImagePipeSurfaceCreateFlagsFUCHSIA flags;
zx_handle_t imagePipeHandle;
} VkImagePipeSurfaceCreateInfoFUCHSIA;
typedef VkResult (VKAPI_PTR *PFN_vkCreateImagePipeSurfaceFUCHSIA)(VkInstance instance, const VkImagePipeSurfaceCreateInfoFUCHSIA* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface);
#ifndef VK_NO_PROTOTYPES
VKAPI_ATTR VkResult VKAPI_CALL vkCreateImagePipeSurfaceFUCHSIA(
VkInstance instance,
const VkImagePipeSurfaceCreateInfoFUCHSIA* pCreateInfo,
const VkAllocationCallbacks* pAllocator,
VkSurfaceKHR* pSurface);
#endif
#define VK_FUCHSIA_external_memory 1
#define VK_FUCHSIA_EXTERNAL_MEMORY_SPEC_VERSION 1
#define VK_FUCHSIA_EXTERNAL_MEMORY_EXTENSION_NAME "VK_FUCHSIA_external_memory"
typedef struct VkImportMemoryZirconHandleInfoFUCHSIA {
VkStructureType sType;
const void* pNext;
VkExternalMemoryHandleTypeFlagBits handleType;
zx_handle_t handle;
} VkImportMemoryZirconHandleInfoFUCHSIA;
typedef struct VkMemoryZirconHandlePropertiesFUCHSIA {
VkStructureType sType;
void* pNext;
uint32_t memoryTypeBits;
} VkMemoryZirconHandlePropertiesFUCHSIA;
typedef struct VkMemoryGetZirconHandleInfoFUCHSIA {
VkStructureType sType;
const void* pNext;
VkDeviceMemory memory;
VkExternalMemoryHandleTypeFlagBits handleType;
} VkMemoryGetZirconHandleInfoFUCHSIA;
typedef VkResult (VKAPI_PTR *PFN_vkGetMemoryZirconHandleFUCHSIA)(VkDevice device, const VkMemoryGetZirconHandleInfoFUCHSIA* pGetZirconHandleInfo, zx_handle_t* pZirconHandle);
typedef VkResult (VKAPI_PTR *PFN_vkGetMemoryZirconHandlePropertiesFUCHSIA)(VkDevice device, VkExternalMemoryHandleTypeFlagBits handleType, zx_handle_t zirconHandle, VkMemoryZirconHandlePropertiesFUCHSIA* pMemoryZirconHandleProperties);
#ifndef VK_NO_PROTOTYPES
VKAPI_ATTR VkResult VKAPI_CALL vkGetMemoryZirconHandleFUCHSIA(
VkDevice device,
const VkMemoryGetZirconHandleInfoFUCHSIA* pGetZirconHandleInfo,
zx_handle_t* pZirconHandle);
VKAPI_ATTR VkResult VKAPI_CALL vkGetMemoryZirconHandlePropertiesFUCHSIA(
VkDevice device,
VkExternalMemoryHandleTypeFlagBits handleType,
zx_handle_t zirconHandle,
VkMemoryZirconHandlePropertiesFUCHSIA* pMemoryZirconHandleProperties);
#endif
#define VK_FUCHSIA_external_semaphore 1
#define VK_FUCHSIA_EXTERNAL_SEMAPHORE_SPEC_VERSION 1
#define VK_FUCHSIA_EXTERNAL_SEMAPHORE_EXTENSION_NAME "VK_FUCHSIA_external_semaphore"
typedef struct VkImportSemaphoreZirconHandleInfoFUCHSIA {
VkStructureType sType;
const void* pNext;
VkSemaphore semaphore;
VkSemaphoreImportFlags flags;
VkExternalSemaphoreHandleTypeFlagBits handleType;
zx_handle_t zirconHandle;
} VkImportSemaphoreZirconHandleInfoFUCHSIA;
typedef struct VkSemaphoreGetZirconHandleInfoFUCHSIA {
VkStructureType sType;
const void* pNext;
VkSemaphore semaphore;
VkExternalSemaphoreHandleTypeFlagBits handleType;
} VkSemaphoreGetZirconHandleInfoFUCHSIA;
typedef VkResult (VKAPI_PTR *PFN_vkImportSemaphoreZirconHandleFUCHSIA)(VkDevice device, const VkImportSemaphoreZirconHandleInfoFUCHSIA* pImportSemaphoreZirconHandleInfo);
typedef VkResult (VKAPI_PTR *PFN_vkGetSemaphoreZirconHandleFUCHSIA)(VkDevice device, const VkSemaphoreGetZirconHandleInfoFUCHSIA* pGetZirconHandleInfo, zx_handle_t* pZirconHandle);
#ifndef VK_NO_PROTOTYPES
VKAPI_ATTR VkResult VKAPI_CALL vkImportSemaphoreZirconHandleFUCHSIA(
VkDevice device,
const VkImportSemaphoreZirconHandleInfoFUCHSIA* pImportSemaphoreZirconHandleInfo);
VKAPI_ATTR VkResult VKAPI_CALL vkGetSemaphoreZirconHandleFUCHSIA(
VkDevice device,
const VkSemaphoreGetZirconHandleInfoFUCHSIA* pGetZirconHandleInfo,
zx_handle_t* pZirconHandle);
#endif
#define VK_FUCHSIA_buffer_collection 1
VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkBufferCollectionFUCHSIA)
#define VK_FUCHSIA_BUFFER_COLLECTION_SPEC_VERSION 2
#define VK_FUCHSIA_BUFFER_COLLECTION_EXTENSION_NAME "VK_FUCHSIA_buffer_collection"
typedef VkFlags VkImageFormatConstraintsFlagsFUCHSIA;
typedef enum VkImageConstraintsInfoFlagBitsFUCHSIA {
VK_IMAGE_CONSTRAINTS_INFO_CPU_READ_RARELY_FUCHSIA = 0x00000001,
VK_IMAGE_CONSTRAINTS_INFO_CPU_READ_OFTEN_FUCHSIA = 0x00000002,
VK_IMAGE_CONSTRAINTS_INFO_CPU_WRITE_RARELY_FUCHSIA = 0x00000004,
VK_IMAGE_CONSTRAINTS_INFO_CPU_WRITE_OFTEN_FUCHSIA = 0x00000008,
VK_IMAGE_CONSTRAINTS_INFO_PROTECTED_OPTIONAL_FUCHSIA = 0x00000010,
VK_IMAGE_CONSTRAINTS_INFO_FLAG_BITS_MAX_ENUM_FUCHSIA = 0x7FFFFFFF
} VkImageConstraintsInfoFlagBitsFUCHSIA;
typedef VkFlags VkImageConstraintsInfoFlagsFUCHSIA;
typedef struct VkBufferCollectionCreateInfoFUCHSIA {
VkStructureType sType;
const void* pNext;
zx_handle_t collectionToken;
} VkBufferCollectionCreateInfoFUCHSIA;
typedef struct VkImportMemoryBufferCollectionFUCHSIA {
VkStructureType sType;
const void* pNext;
VkBufferCollectionFUCHSIA collection;
uint32_t index;
} VkImportMemoryBufferCollectionFUCHSIA;
typedef struct VkBufferCollectionImageCreateInfoFUCHSIA {
VkStructureType sType;
const void* pNext;
VkBufferCollectionFUCHSIA collection;
uint32_t index;
} VkBufferCollectionImageCreateInfoFUCHSIA;
typedef struct VkBufferCollectionConstraintsInfoFUCHSIA {
VkStructureType sType;
const void* pNext;
uint32_t minBufferCount;
uint32_t maxBufferCount;
uint32_t minBufferCountForCamping;
uint32_t minBufferCountForDedicatedSlack;
uint32_t minBufferCountForSharedSlack;
} VkBufferCollectionConstraintsInfoFUCHSIA;
typedef struct VkBufferConstraintsInfoFUCHSIA {
VkStructureType sType;
const void* pNext;
VkBufferCreateInfo createInfo;
VkFormatFeatureFlags requiredFormatFeatures;
VkBufferCollectionConstraintsInfoFUCHSIA bufferCollectionConstraints;
} VkBufferConstraintsInfoFUCHSIA;
typedef struct VkBufferCollectionBufferCreateInfoFUCHSIA {
VkStructureType sType;
const void* pNext;
VkBufferCollectionFUCHSIA collection;
uint32_t index;
} VkBufferCollectionBufferCreateInfoFUCHSIA;
typedef struct VkSysmemColorSpaceFUCHSIA {
VkStructureType sType;
const void* pNext;
uint32_t colorSpace;
} VkSysmemColorSpaceFUCHSIA;
typedef struct VkBufferCollectionPropertiesFUCHSIA {
VkStructureType sType;
void* pNext;
uint32_t memoryTypeBits;
uint32_t bufferCount;
uint32_t createInfoIndex;
uint64_t sysmemPixelFormat;
VkFormatFeatureFlags formatFeatures;
VkSysmemColorSpaceFUCHSIA sysmemColorSpaceIndex;
VkComponentMapping samplerYcbcrConversionComponents;
VkSamplerYcbcrModelConversion suggestedYcbcrModel;
VkSamplerYcbcrRange suggestedYcbcrRange;
VkChromaLocation suggestedXChromaOffset;
VkChromaLocation suggestedYChromaOffset;
} VkBufferCollectionPropertiesFUCHSIA;
typedef struct VkImageFormatConstraintsInfoFUCHSIA {
VkStructureType sType;
const void* pNext;
VkImageCreateInfo imageCreateInfo;
VkFormatFeatureFlags requiredFormatFeatures;
VkImageFormatConstraintsFlagsFUCHSIA flags;
uint64_t sysmemPixelFormat;
uint32_t colorSpaceCount;
const VkSysmemColorSpaceFUCHSIA* pColorSpaces;
} VkImageFormatConstraintsInfoFUCHSIA;
typedef struct VkImageConstraintsInfoFUCHSIA {
VkStructureType sType;
const void* pNext;
uint32_t formatConstraintsCount;
const VkImageFormatConstraintsInfoFUCHSIA* pFormatConstraints;
VkBufferCollectionConstraintsInfoFUCHSIA bufferCollectionConstraints;
VkImageConstraintsInfoFlagsFUCHSIA flags;
} VkImageConstraintsInfoFUCHSIA;
typedef VkResult (VKAPI_PTR *PFN_vkCreateBufferCollectionFUCHSIA)(VkDevice device, const VkBufferCollectionCreateInfoFUCHSIA* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkBufferCollectionFUCHSIA* pCollection);
typedef VkResult (VKAPI_PTR *PFN_vkSetBufferCollectionImageConstraintsFUCHSIA)(VkDevice device, VkBufferCollectionFUCHSIA collection, const VkImageConstraintsInfoFUCHSIA* pImageConstraintsInfo);
typedef VkResult (VKAPI_PTR *PFN_vkSetBufferCollectionBufferConstraintsFUCHSIA)(VkDevice device, VkBufferCollectionFUCHSIA collection, const VkBufferConstraintsInfoFUCHSIA* pBufferConstraintsInfo);
typedef void (VKAPI_PTR *PFN_vkDestroyBufferCollectionFUCHSIA)(VkDevice device, VkBufferCollectionFUCHSIA collection, const VkAllocationCallbacks* pAllocator);
typedef VkResult (VKAPI_PTR *PFN_vkGetBufferCollectionPropertiesFUCHSIA)(VkDevice device, VkBufferCollectionFUCHSIA collection, VkBufferCollectionPropertiesFUCHSIA* pProperties);
#ifndef VK_NO_PROTOTYPES
VKAPI_ATTR VkResult VKAPI_CALL vkCreateBufferCollectionFUCHSIA(
VkDevice device,
const VkBufferCollectionCreateInfoFUCHSIA* pCreateInfo,
const VkAllocationCallbacks* pAllocator,
VkBufferCollectionFUCHSIA* pCollection);
VKAPI_ATTR VkResult VKAPI_CALL vkSetBufferCollectionImageConstraintsFUCHSIA(
VkDevice device,
VkBufferCollectionFUCHSIA collection,
const VkImageConstraintsInfoFUCHSIA* pImageConstraintsInfo);
VKAPI_ATTR VkResult VKAPI_CALL vkSetBufferCollectionBufferConstraintsFUCHSIA(
VkDevice device,
VkBufferCollectionFUCHSIA collection,
const VkBufferConstraintsInfoFUCHSIA* pBufferConstraintsInfo);
VKAPI_ATTR void VKAPI_CALL vkDestroyBufferCollectionFUCHSIA(
VkDevice device,
VkBufferCollectionFUCHSIA collection,
const VkAllocationCallbacks* pAllocator);
VKAPI_ATTR VkResult VKAPI_CALL vkGetBufferCollectionPropertiesFUCHSIA(
VkDevice device,
VkBufferCollectionFUCHSIA collection,
VkBufferCollectionPropertiesFUCHSIA* pProperties);
#endif
#ifdef __cplusplus
}
#endif
#endif

View File

@@ -0,0 +1,58 @@
#ifndef VULKAN_GGP_H_
#define VULKAN_GGP_H_ 1
/*
** Copyright 2015-2022 The Khronos Group Inc.
**
** SPDX-License-Identifier: Apache-2.0
*/
/*
** This header is generated from the Khronos Vulkan XML API Registry.
**
*/
#ifdef __cplusplus
extern "C" {
#endif
#define VK_GGP_stream_descriptor_surface 1
#define VK_GGP_STREAM_DESCRIPTOR_SURFACE_SPEC_VERSION 1
#define VK_GGP_STREAM_DESCRIPTOR_SURFACE_EXTENSION_NAME "VK_GGP_stream_descriptor_surface"
typedef VkFlags VkStreamDescriptorSurfaceCreateFlagsGGP;
typedef struct VkStreamDescriptorSurfaceCreateInfoGGP {
VkStructureType sType;
const void* pNext;
VkStreamDescriptorSurfaceCreateFlagsGGP flags;
GgpStreamDescriptor streamDescriptor;
} VkStreamDescriptorSurfaceCreateInfoGGP;
typedef VkResult (VKAPI_PTR *PFN_vkCreateStreamDescriptorSurfaceGGP)(VkInstance instance, const VkStreamDescriptorSurfaceCreateInfoGGP* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface);
#ifndef VK_NO_PROTOTYPES
VKAPI_ATTR VkResult VKAPI_CALL vkCreateStreamDescriptorSurfaceGGP(
VkInstance instance,
const VkStreamDescriptorSurfaceCreateInfoGGP* pCreateInfo,
const VkAllocationCallbacks* pAllocator,
VkSurfaceKHR* pSurface);
#endif
#define VK_GGP_frame_token 1
#define VK_GGP_FRAME_TOKEN_SPEC_VERSION 1
#define VK_GGP_FRAME_TOKEN_EXTENSION_NAME "VK_GGP_frame_token"
typedef struct VkPresentFrameTokenGGP {
VkStructureType sType;
const void* pNext;
GgpFrameToken frameToken;
} VkPresentFrameTokenGGP;
#ifdef __cplusplus
}
#endif
#endif

View File

@@ -0,0 +1,47 @@
#ifndef VULKAN_IOS_H_
#define VULKAN_IOS_H_ 1
/*
** Copyright 2015-2022 The Khronos Group Inc.
**
** SPDX-License-Identifier: Apache-2.0
*/
/*
** This header is generated from the Khronos Vulkan XML API Registry.
**
*/
#ifdef __cplusplus
extern "C" {
#endif
#define VK_MVK_ios_surface 1
#define VK_MVK_IOS_SURFACE_SPEC_VERSION 3
#define VK_MVK_IOS_SURFACE_EXTENSION_NAME "VK_MVK_ios_surface"
typedef VkFlags VkIOSSurfaceCreateFlagsMVK;
typedef struct VkIOSSurfaceCreateInfoMVK {
VkStructureType sType;
const void* pNext;
VkIOSSurfaceCreateFlagsMVK flags;
const void* pView;
} VkIOSSurfaceCreateInfoMVK;
typedef VkResult (VKAPI_PTR *PFN_vkCreateIOSSurfaceMVK)(VkInstance instance, const VkIOSSurfaceCreateInfoMVK* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface);
#ifndef VK_NO_PROTOTYPES
VKAPI_ATTR VkResult VKAPI_CALL vkCreateIOSSurfaceMVK(
VkInstance instance,
const VkIOSSurfaceCreateInfoMVK* pCreateInfo,
const VkAllocationCallbacks* pAllocator,
VkSurfaceKHR* pSurface);
#endif
#ifdef __cplusplus
}
#endif
#endif

View File

@@ -0,0 +1,47 @@
#ifndef VULKAN_MACOS_H_
#define VULKAN_MACOS_H_ 1
/*
** Copyright 2015-2022 The Khronos Group Inc.
**
** SPDX-License-Identifier: Apache-2.0
*/
/*
** This header is generated from the Khronos Vulkan XML API Registry.
**
*/
#ifdef __cplusplus
extern "C" {
#endif
#define VK_MVK_macos_surface 1
#define VK_MVK_MACOS_SURFACE_SPEC_VERSION 3
#define VK_MVK_MACOS_SURFACE_EXTENSION_NAME "VK_MVK_macos_surface"
typedef VkFlags VkMacOSSurfaceCreateFlagsMVK;
typedef struct VkMacOSSurfaceCreateInfoMVK {
VkStructureType sType;
const void* pNext;
VkMacOSSurfaceCreateFlagsMVK flags;
const void* pView;
} VkMacOSSurfaceCreateInfoMVK;
typedef VkResult (VKAPI_PTR *PFN_vkCreateMacOSSurfaceMVK)(VkInstance instance, const VkMacOSSurfaceCreateInfoMVK* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface);
#ifndef VK_NO_PROTOTYPES
VKAPI_ATTR VkResult VKAPI_CALL vkCreateMacOSSurfaceMVK(
VkInstance instance,
const VkMacOSSurfaceCreateInfoMVK* pCreateInfo,
const VkAllocationCallbacks* pAllocator,
VkSurfaceKHR* pSurface);
#endif
#ifdef __cplusplus
}
#endif
#endif

View File

@@ -0,0 +1,193 @@
#ifndef VULKAN_METAL_H_
#define VULKAN_METAL_H_ 1
/*
** Copyright 2015-2022 The Khronos Group Inc.
**
** SPDX-License-Identifier: Apache-2.0
*/
/*
** This header is generated from the Khronos Vulkan XML API Registry.
**
*/
#ifdef __cplusplus
extern "C" {
#endif
#define VK_EXT_metal_surface 1
#ifdef __OBJC__
@class CAMetalLayer;
#else
typedef void CAMetalLayer;
#endif
#define VK_EXT_METAL_SURFACE_SPEC_VERSION 1
#define VK_EXT_METAL_SURFACE_EXTENSION_NAME "VK_EXT_metal_surface"
typedef VkFlags VkMetalSurfaceCreateFlagsEXT;
typedef struct VkMetalSurfaceCreateInfoEXT {
VkStructureType sType;
const void* pNext;
VkMetalSurfaceCreateFlagsEXT flags;
const CAMetalLayer* pLayer;
} VkMetalSurfaceCreateInfoEXT;
typedef VkResult (VKAPI_PTR *PFN_vkCreateMetalSurfaceEXT)(VkInstance instance, const VkMetalSurfaceCreateInfoEXT* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface);
#ifndef VK_NO_PROTOTYPES
VKAPI_ATTR VkResult VKAPI_CALL vkCreateMetalSurfaceEXT(
VkInstance instance,
const VkMetalSurfaceCreateInfoEXT* pCreateInfo,
const VkAllocationCallbacks* pAllocator,
VkSurfaceKHR* pSurface);
#endif
#define VK_EXT_metal_objects 1
#ifdef __OBJC__
@protocol MTLDevice;
typedef id<MTLDevice> MTLDevice_id;
#else
typedef void* MTLDevice_id;
#endif
#ifdef __OBJC__
@protocol MTLCommandQueue;
typedef id<MTLCommandQueue> MTLCommandQueue_id;
#else
typedef void* MTLCommandQueue_id;
#endif
#ifdef __OBJC__
@protocol MTLBuffer;
typedef id<MTLBuffer> MTLBuffer_id;
#else
typedef void* MTLBuffer_id;
#endif
#ifdef __OBJC__
@protocol MTLTexture;
typedef id<MTLTexture> MTLTexture_id;
#else
typedef void* MTLTexture_id;
#endif
typedef struct __IOSurface* IOSurfaceRef;
#ifdef __OBJC__
@protocol MTLSharedEvent;
typedef id<MTLSharedEvent> MTLSharedEvent_id;
#else
typedef void* MTLSharedEvent_id;
#endif
#define VK_EXT_METAL_OBJECTS_SPEC_VERSION 1
#define VK_EXT_METAL_OBJECTS_EXTENSION_NAME "VK_EXT_metal_objects"
typedef enum VkExportMetalObjectTypeFlagBitsEXT {
VK_EXPORT_METAL_OBJECT_TYPE_METAL_DEVICE_BIT_EXT = 0x00000001,
VK_EXPORT_METAL_OBJECT_TYPE_METAL_COMMAND_QUEUE_BIT_EXT = 0x00000002,
VK_EXPORT_METAL_OBJECT_TYPE_METAL_BUFFER_BIT_EXT = 0x00000004,
VK_EXPORT_METAL_OBJECT_TYPE_METAL_TEXTURE_BIT_EXT = 0x00000008,
VK_EXPORT_METAL_OBJECT_TYPE_METAL_IOSURFACE_BIT_EXT = 0x00000010,
VK_EXPORT_METAL_OBJECT_TYPE_METAL_SHARED_EVENT_BIT_EXT = 0x00000020,
VK_EXPORT_METAL_OBJECT_TYPE_FLAG_BITS_MAX_ENUM_EXT = 0x7FFFFFFF
} VkExportMetalObjectTypeFlagBitsEXT;
typedef VkFlags VkExportMetalObjectTypeFlagsEXT;
typedef struct VkExportMetalObjectCreateInfoEXT {
VkStructureType sType;
const void* pNext;
VkExportMetalObjectTypeFlagBitsEXT exportObjectType;
} VkExportMetalObjectCreateInfoEXT;
typedef struct VkExportMetalObjectsInfoEXT {
VkStructureType sType;
const void* pNext;
} VkExportMetalObjectsInfoEXT;
typedef struct VkExportMetalDeviceInfoEXT {
VkStructureType sType;
const void* pNext;
MTLDevice_id mtlDevice;
} VkExportMetalDeviceInfoEXT;
typedef struct VkExportMetalCommandQueueInfoEXT {
VkStructureType sType;
const void* pNext;
VkQueue queue;
MTLCommandQueue_id mtlCommandQueue;
} VkExportMetalCommandQueueInfoEXT;
typedef struct VkExportMetalBufferInfoEXT {
VkStructureType sType;
const void* pNext;
VkDeviceMemory memory;
MTLBuffer_id mtlBuffer;
} VkExportMetalBufferInfoEXT;
typedef struct VkImportMetalBufferInfoEXT {
VkStructureType sType;
const void* pNext;
MTLBuffer_id mtlBuffer;
} VkImportMetalBufferInfoEXT;
typedef struct VkExportMetalTextureInfoEXT {
VkStructureType sType;
const void* pNext;
VkImage image;
VkImageView imageView;
VkBufferView bufferView;
VkImageAspectFlagBits plane;
MTLTexture_id mtlTexture;
} VkExportMetalTextureInfoEXT;
typedef struct VkImportMetalTextureInfoEXT {
VkStructureType sType;
const void* pNext;
VkImageAspectFlagBits plane;
MTLTexture_id mtlTexture;
} VkImportMetalTextureInfoEXT;
typedef struct VkExportMetalIOSurfaceInfoEXT {
VkStructureType sType;
const void* pNext;
VkImage image;
IOSurfaceRef ioSurface;
} VkExportMetalIOSurfaceInfoEXT;
typedef struct VkImportMetalIOSurfaceInfoEXT {
VkStructureType sType;
const void* pNext;
IOSurfaceRef ioSurface;
} VkImportMetalIOSurfaceInfoEXT;
typedef struct VkExportMetalSharedEventInfoEXT {
VkStructureType sType;
const void* pNext;
VkSemaphore semaphore;
VkEvent event;
MTLSharedEvent_id mtlSharedEvent;
} VkExportMetalSharedEventInfoEXT;
typedef struct VkImportMetalSharedEventInfoEXT {
VkStructureType sType;
const void* pNext;
MTLSharedEvent_id mtlSharedEvent;
} VkImportMetalSharedEventInfoEXT;
typedef void (VKAPI_PTR *PFN_vkExportMetalObjectsEXT)(VkDevice device, VkExportMetalObjectsInfoEXT* pMetalObjectsInfo);
#ifndef VK_NO_PROTOTYPES
VKAPI_ATTR void VKAPI_CALL vkExportMetalObjectsEXT(
VkDevice device,
VkExportMetalObjectsInfoEXT* pMetalObjectsInfo);
#endif
#ifdef __cplusplus
}
#endif
#endif

View File

@@ -0,0 +1,54 @@
#ifndef VULKAN_SCREEN_H_
#define VULKAN_SCREEN_H_ 1
/*
** Copyright 2015-2022 The Khronos Group Inc.
**
** SPDX-License-Identifier: Apache-2.0
*/
/*
** This header is generated from the Khronos Vulkan XML API Registry.
**
*/
#ifdef __cplusplus
extern "C" {
#endif
#define VK_QNX_screen_surface 1
#define VK_QNX_SCREEN_SURFACE_SPEC_VERSION 1
#define VK_QNX_SCREEN_SURFACE_EXTENSION_NAME "VK_QNX_screen_surface"
typedef VkFlags VkScreenSurfaceCreateFlagsQNX;
typedef struct VkScreenSurfaceCreateInfoQNX {
VkStructureType sType;
const void* pNext;
VkScreenSurfaceCreateFlagsQNX flags;
struct _screen_context* context;
struct _screen_window* window;
} VkScreenSurfaceCreateInfoQNX;
typedef VkResult (VKAPI_PTR *PFN_vkCreateScreenSurfaceQNX)(VkInstance instance, const VkScreenSurfaceCreateInfoQNX* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface);
typedef VkBool32 (VKAPI_PTR *PFN_vkGetPhysicalDeviceScreenPresentationSupportQNX)(VkPhysicalDevice physicalDevice, uint32_t queueFamilyIndex, struct _screen_window* window);
#ifndef VK_NO_PROTOTYPES
VKAPI_ATTR VkResult VKAPI_CALL vkCreateScreenSurfaceQNX(
VkInstance instance,
const VkScreenSurfaceCreateInfoQNX* pCreateInfo,
const VkAllocationCallbacks* pAllocator,
VkSurfaceKHR* pSurface);
VKAPI_ATTR VkBool32 VKAPI_CALL vkGetPhysicalDeviceScreenPresentationSupportQNX(
VkPhysicalDevice physicalDevice,
uint32_t queueFamilyIndex,
struct _screen_window* window);
#endif
#ifdef __cplusplus
}
#endif
#endif

View File

@@ -0,0 +1,47 @@
#ifndef VULKAN_VI_H_
#define VULKAN_VI_H_ 1
/*
** Copyright 2015-2022 The Khronos Group Inc.
**
** SPDX-License-Identifier: Apache-2.0
*/
/*
** This header is generated from the Khronos Vulkan XML API Registry.
**
*/
#ifdef __cplusplus
extern "C" {
#endif
#define VK_NN_vi_surface 1
#define VK_NN_VI_SURFACE_SPEC_VERSION 1
#define VK_NN_VI_SURFACE_EXTENSION_NAME "VK_NN_vi_surface"
typedef VkFlags VkViSurfaceCreateFlagsNN;
typedef struct VkViSurfaceCreateInfoNN {
VkStructureType sType;
const void* pNext;
VkViSurfaceCreateFlagsNN flags;
void* window;
} VkViSurfaceCreateInfoNN;
typedef VkResult (VKAPI_PTR *PFN_vkCreateViSurfaceNN)(VkInstance instance, const VkViSurfaceCreateInfoNN* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface);
#ifndef VK_NO_PROTOTYPES
VKAPI_ATTR VkResult VKAPI_CALL vkCreateViSurfaceNN(
VkInstance instance,
const VkViSurfaceCreateInfoNN* pCreateInfo,
const VkAllocationCallbacks* pAllocator,
VkSurfaceKHR* pSurface);
#endif
#ifdef __cplusplus
}
#endif
#endif

View File

@@ -0,0 +1,54 @@
#ifndef VULKAN_WAYLAND_H_
#define VULKAN_WAYLAND_H_ 1
/*
** Copyright 2015-2022 The Khronos Group Inc.
**
** SPDX-License-Identifier: Apache-2.0
*/
/*
** This header is generated from the Khronos Vulkan XML API Registry.
**
*/
#ifdef __cplusplus
extern "C" {
#endif
#define VK_KHR_wayland_surface 1
#define VK_KHR_WAYLAND_SURFACE_SPEC_VERSION 6
#define VK_KHR_WAYLAND_SURFACE_EXTENSION_NAME "VK_KHR_wayland_surface"
typedef VkFlags VkWaylandSurfaceCreateFlagsKHR;
typedef struct VkWaylandSurfaceCreateInfoKHR {
VkStructureType sType;
const void* pNext;
VkWaylandSurfaceCreateFlagsKHR flags;
struct wl_display* display;
struct wl_surface* surface;
} VkWaylandSurfaceCreateInfoKHR;
typedef VkResult (VKAPI_PTR *PFN_vkCreateWaylandSurfaceKHR)(VkInstance instance, const VkWaylandSurfaceCreateInfoKHR* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface);
typedef VkBool32 (VKAPI_PTR *PFN_vkGetPhysicalDeviceWaylandPresentationSupportKHR)(VkPhysicalDevice physicalDevice, uint32_t queueFamilyIndex, struct wl_display* display);
#ifndef VK_NO_PROTOTYPES
VKAPI_ATTR VkResult VKAPI_CALL vkCreateWaylandSurfaceKHR(
VkInstance instance,
const VkWaylandSurfaceCreateInfoKHR* pCreateInfo,
const VkAllocationCallbacks* pAllocator,
VkSurfaceKHR* pSurface);
VKAPI_ATTR VkBool32 VKAPI_CALL vkGetPhysicalDeviceWaylandPresentationSupportKHR(
VkPhysicalDevice physicalDevice,
uint32_t queueFamilyIndex,
struct wl_display* display);
#endif
#ifdef __cplusplus
}
#endif
#endif

View File

@@ -0,0 +1,315 @@
#ifndef VULKAN_WIN32_H_
#define VULKAN_WIN32_H_ 1
/*
** Copyright 2015-2022 The Khronos Group Inc.
**
** SPDX-License-Identifier: Apache-2.0
*/
/*
** This header is generated from the Khronos Vulkan XML API Registry.
**
*/
#ifdef __cplusplus
extern "C" {
#endif
#define VK_KHR_win32_surface 1
#define VK_KHR_WIN32_SURFACE_SPEC_VERSION 6
#define VK_KHR_WIN32_SURFACE_EXTENSION_NAME "VK_KHR_win32_surface"
typedef VkFlags VkWin32SurfaceCreateFlagsKHR;
typedef struct VkWin32SurfaceCreateInfoKHR {
VkStructureType sType;
const void* pNext;
VkWin32SurfaceCreateFlagsKHR flags;
HINSTANCE hinstance;
HWND hwnd;
} VkWin32SurfaceCreateInfoKHR;
typedef VkResult (VKAPI_PTR *PFN_vkCreateWin32SurfaceKHR)(VkInstance instance, const VkWin32SurfaceCreateInfoKHR* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface);
typedef VkBool32 (VKAPI_PTR *PFN_vkGetPhysicalDeviceWin32PresentationSupportKHR)(VkPhysicalDevice physicalDevice, uint32_t queueFamilyIndex);
#ifndef VK_NO_PROTOTYPES
VKAPI_ATTR VkResult VKAPI_CALL vkCreateWin32SurfaceKHR(
VkInstance instance,
const VkWin32SurfaceCreateInfoKHR* pCreateInfo,
const VkAllocationCallbacks* pAllocator,
VkSurfaceKHR* pSurface);
VKAPI_ATTR VkBool32 VKAPI_CALL vkGetPhysicalDeviceWin32PresentationSupportKHR(
VkPhysicalDevice physicalDevice,
uint32_t queueFamilyIndex);
#endif
#define VK_KHR_external_memory_win32 1
#define VK_KHR_EXTERNAL_MEMORY_WIN32_SPEC_VERSION 1
#define VK_KHR_EXTERNAL_MEMORY_WIN32_EXTENSION_NAME "VK_KHR_external_memory_win32"
typedef struct VkImportMemoryWin32HandleInfoKHR {
VkStructureType sType;
const void* pNext;
VkExternalMemoryHandleTypeFlagBits handleType;
HANDLE handle;
LPCWSTR name;
} VkImportMemoryWin32HandleInfoKHR;
typedef struct VkExportMemoryWin32HandleInfoKHR {
VkStructureType sType;
const void* pNext;
const SECURITY_ATTRIBUTES* pAttributes;
DWORD dwAccess;
LPCWSTR name;
} VkExportMemoryWin32HandleInfoKHR;
typedef struct VkMemoryWin32HandlePropertiesKHR {
VkStructureType sType;
void* pNext;
uint32_t memoryTypeBits;
} VkMemoryWin32HandlePropertiesKHR;
typedef struct VkMemoryGetWin32HandleInfoKHR {
VkStructureType sType;
const void* pNext;
VkDeviceMemory memory;
VkExternalMemoryHandleTypeFlagBits handleType;
} VkMemoryGetWin32HandleInfoKHR;
typedef VkResult (VKAPI_PTR *PFN_vkGetMemoryWin32HandleKHR)(VkDevice device, const VkMemoryGetWin32HandleInfoKHR* pGetWin32HandleInfo, HANDLE* pHandle);
typedef VkResult (VKAPI_PTR *PFN_vkGetMemoryWin32HandlePropertiesKHR)(VkDevice device, VkExternalMemoryHandleTypeFlagBits handleType, HANDLE handle, VkMemoryWin32HandlePropertiesKHR* pMemoryWin32HandleProperties);
#ifndef VK_NO_PROTOTYPES
VKAPI_ATTR VkResult VKAPI_CALL vkGetMemoryWin32HandleKHR(
VkDevice device,
const VkMemoryGetWin32HandleInfoKHR* pGetWin32HandleInfo,
HANDLE* pHandle);
VKAPI_ATTR VkResult VKAPI_CALL vkGetMemoryWin32HandlePropertiesKHR(
VkDevice device,
VkExternalMemoryHandleTypeFlagBits handleType,
HANDLE handle,
VkMemoryWin32HandlePropertiesKHR* pMemoryWin32HandleProperties);
#endif
#define VK_KHR_win32_keyed_mutex 1
#define VK_KHR_WIN32_KEYED_MUTEX_SPEC_VERSION 1
#define VK_KHR_WIN32_KEYED_MUTEX_EXTENSION_NAME "VK_KHR_win32_keyed_mutex"
typedef struct VkWin32KeyedMutexAcquireReleaseInfoKHR {
VkStructureType sType;
const void* pNext;
uint32_t acquireCount;
const VkDeviceMemory* pAcquireSyncs;
const uint64_t* pAcquireKeys;
const uint32_t* pAcquireTimeouts;
uint32_t releaseCount;
const VkDeviceMemory* pReleaseSyncs;
const uint64_t* pReleaseKeys;
} VkWin32KeyedMutexAcquireReleaseInfoKHR;
#define VK_KHR_external_semaphore_win32 1
#define VK_KHR_EXTERNAL_SEMAPHORE_WIN32_SPEC_VERSION 1
#define VK_KHR_EXTERNAL_SEMAPHORE_WIN32_EXTENSION_NAME "VK_KHR_external_semaphore_win32"
typedef struct VkImportSemaphoreWin32HandleInfoKHR {
VkStructureType sType;
const void* pNext;
VkSemaphore semaphore;
VkSemaphoreImportFlags flags;
VkExternalSemaphoreHandleTypeFlagBits handleType;
HANDLE handle;
LPCWSTR name;
} VkImportSemaphoreWin32HandleInfoKHR;
typedef struct VkExportSemaphoreWin32HandleInfoKHR {
VkStructureType sType;
const void* pNext;
const SECURITY_ATTRIBUTES* pAttributes;
DWORD dwAccess;
LPCWSTR name;
} VkExportSemaphoreWin32HandleInfoKHR;
typedef struct VkD3D12FenceSubmitInfoKHR {
VkStructureType sType;
const void* pNext;
uint32_t waitSemaphoreValuesCount;
const uint64_t* pWaitSemaphoreValues;
uint32_t signalSemaphoreValuesCount;
const uint64_t* pSignalSemaphoreValues;
} VkD3D12FenceSubmitInfoKHR;
typedef struct VkSemaphoreGetWin32HandleInfoKHR {
VkStructureType sType;
const void* pNext;
VkSemaphore semaphore;
VkExternalSemaphoreHandleTypeFlagBits handleType;
} VkSemaphoreGetWin32HandleInfoKHR;
typedef VkResult (VKAPI_PTR *PFN_vkImportSemaphoreWin32HandleKHR)(VkDevice device, const VkImportSemaphoreWin32HandleInfoKHR* pImportSemaphoreWin32HandleInfo);
typedef VkResult (VKAPI_PTR *PFN_vkGetSemaphoreWin32HandleKHR)(VkDevice device, const VkSemaphoreGetWin32HandleInfoKHR* pGetWin32HandleInfo, HANDLE* pHandle);
#ifndef VK_NO_PROTOTYPES
VKAPI_ATTR VkResult VKAPI_CALL vkImportSemaphoreWin32HandleKHR(
VkDevice device,
const VkImportSemaphoreWin32HandleInfoKHR* pImportSemaphoreWin32HandleInfo);
VKAPI_ATTR VkResult VKAPI_CALL vkGetSemaphoreWin32HandleKHR(
VkDevice device,
const VkSemaphoreGetWin32HandleInfoKHR* pGetWin32HandleInfo,
HANDLE* pHandle);
#endif
#define VK_KHR_external_fence_win32 1
#define VK_KHR_EXTERNAL_FENCE_WIN32_SPEC_VERSION 1
#define VK_KHR_EXTERNAL_FENCE_WIN32_EXTENSION_NAME "VK_KHR_external_fence_win32"
typedef struct VkImportFenceWin32HandleInfoKHR {
VkStructureType sType;
const void* pNext;
VkFence fence;
VkFenceImportFlags flags;
VkExternalFenceHandleTypeFlagBits handleType;
HANDLE handle;
LPCWSTR name;
} VkImportFenceWin32HandleInfoKHR;
typedef struct VkExportFenceWin32HandleInfoKHR {
VkStructureType sType;
const void* pNext;
const SECURITY_ATTRIBUTES* pAttributes;
DWORD dwAccess;
LPCWSTR name;
} VkExportFenceWin32HandleInfoKHR;
typedef struct VkFenceGetWin32HandleInfoKHR {
VkStructureType sType;
const void* pNext;
VkFence fence;
VkExternalFenceHandleTypeFlagBits handleType;
} VkFenceGetWin32HandleInfoKHR;
typedef VkResult (VKAPI_PTR *PFN_vkImportFenceWin32HandleKHR)(VkDevice device, const VkImportFenceWin32HandleInfoKHR* pImportFenceWin32HandleInfo);
typedef VkResult (VKAPI_PTR *PFN_vkGetFenceWin32HandleKHR)(VkDevice device, const VkFenceGetWin32HandleInfoKHR* pGetWin32HandleInfo, HANDLE* pHandle);
#ifndef VK_NO_PROTOTYPES
VKAPI_ATTR VkResult VKAPI_CALL vkImportFenceWin32HandleKHR(
VkDevice device,
const VkImportFenceWin32HandleInfoKHR* pImportFenceWin32HandleInfo);
VKAPI_ATTR VkResult VKAPI_CALL vkGetFenceWin32HandleKHR(
VkDevice device,
const VkFenceGetWin32HandleInfoKHR* pGetWin32HandleInfo,
HANDLE* pHandle);
#endif
#define VK_NV_external_memory_win32 1
#define VK_NV_EXTERNAL_MEMORY_WIN32_SPEC_VERSION 1
#define VK_NV_EXTERNAL_MEMORY_WIN32_EXTENSION_NAME "VK_NV_external_memory_win32"
typedef struct VkImportMemoryWin32HandleInfoNV {
VkStructureType sType;
const void* pNext;
VkExternalMemoryHandleTypeFlagsNV handleType;
HANDLE handle;
} VkImportMemoryWin32HandleInfoNV;
typedef struct VkExportMemoryWin32HandleInfoNV {
VkStructureType sType;
const void* pNext;
const SECURITY_ATTRIBUTES* pAttributes;
DWORD dwAccess;
} VkExportMemoryWin32HandleInfoNV;
typedef VkResult (VKAPI_PTR *PFN_vkGetMemoryWin32HandleNV)(VkDevice device, VkDeviceMemory memory, VkExternalMemoryHandleTypeFlagsNV handleType, HANDLE* pHandle);
#ifndef VK_NO_PROTOTYPES
VKAPI_ATTR VkResult VKAPI_CALL vkGetMemoryWin32HandleNV(
VkDevice device,
VkDeviceMemory memory,
VkExternalMemoryHandleTypeFlagsNV handleType,
HANDLE* pHandle);
#endif
#define VK_NV_win32_keyed_mutex 1
#define VK_NV_WIN32_KEYED_MUTEX_SPEC_VERSION 2
#define VK_NV_WIN32_KEYED_MUTEX_EXTENSION_NAME "VK_NV_win32_keyed_mutex"
typedef struct VkWin32KeyedMutexAcquireReleaseInfoNV {
VkStructureType sType;
const void* pNext;
uint32_t acquireCount;
const VkDeviceMemory* pAcquireSyncs;
const uint64_t* pAcquireKeys;
const uint32_t* pAcquireTimeoutMilliseconds;
uint32_t releaseCount;
const VkDeviceMemory* pReleaseSyncs;
const uint64_t* pReleaseKeys;
} VkWin32KeyedMutexAcquireReleaseInfoNV;
#define VK_EXT_full_screen_exclusive 1
#define VK_EXT_FULL_SCREEN_EXCLUSIVE_SPEC_VERSION 4
#define VK_EXT_FULL_SCREEN_EXCLUSIVE_EXTENSION_NAME "VK_EXT_full_screen_exclusive"
typedef enum VkFullScreenExclusiveEXT {
VK_FULL_SCREEN_EXCLUSIVE_DEFAULT_EXT = 0,
VK_FULL_SCREEN_EXCLUSIVE_ALLOWED_EXT = 1,
VK_FULL_SCREEN_EXCLUSIVE_DISALLOWED_EXT = 2,
VK_FULL_SCREEN_EXCLUSIVE_APPLICATION_CONTROLLED_EXT = 3,
VK_FULL_SCREEN_EXCLUSIVE_MAX_ENUM_EXT = 0x7FFFFFFF
} VkFullScreenExclusiveEXT;
typedef struct VkSurfaceFullScreenExclusiveInfoEXT {
VkStructureType sType;
void* pNext;
VkFullScreenExclusiveEXT fullScreenExclusive;
} VkSurfaceFullScreenExclusiveInfoEXT;
typedef struct VkSurfaceCapabilitiesFullScreenExclusiveEXT {
VkStructureType sType;
void* pNext;
VkBool32 fullScreenExclusiveSupported;
} VkSurfaceCapabilitiesFullScreenExclusiveEXT;
typedef struct VkSurfaceFullScreenExclusiveWin32InfoEXT {
VkStructureType sType;
const void* pNext;
HMONITOR hmonitor;
} VkSurfaceFullScreenExclusiveWin32InfoEXT;
typedef VkResult (VKAPI_PTR *PFN_vkGetPhysicalDeviceSurfacePresentModes2EXT)(VkPhysicalDevice physicalDevice, const VkPhysicalDeviceSurfaceInfo2KHR* pSurfaceInfo, uint32_t* pPresentModeCount, VkPresentModeKHR* pPresentModes);
typedef VkResult (VKAPI_PTR *PFN_vkAcquireFullScreenExclusiveModeEXT)(VkDevice device, VkSwapchainKHR swapchain);
typedef VkResult (VKAPI_PTR *PFN_vkReleaseFullScreenExclusiveModeEXT)(VkDevice device, VkSwapchainKHR swapchain);
typedef VkResult (VKAPI_PTR *PFN_vkGetDeviceGroupSurfacePresentModes2EXT)(VkDevice device, const VkPhysicalDeviceSurfaceInfo2KHR* pSurfaceInfo, VkDeviceGroupPresentModeFlagsKHR* pModes);
#ifndef VK_NO_PROTOTYPES
VKAPI_ATTR VkResult VKAPI_CALL vkGetPhysicalDeviceSurfacePresentModes2EXT(
VkPhysicalDevice physicalDevice,
const VkPhysicalDeviceSurfaceInfo2KHR* pSurfaceInfo,
uint32_t* pPresentModeCount,
VkPresentModeKHR* pPresentModes);
VKAPI_ATTR VkResult VKAPI_CALL vkAcquireFullScreenExclusiveModeEXT(
VkDevice device,
VkSwapchainKHR swapchain);
VKAPI_ATTR VkResult VKAPI_CALL vkReleaseFullScreenExclusiveModeEXT(
VkDevice device,
VkSwapchainKHR swapchain);
VKAPI_ATTR VkResult VKAPI_CALL vkGetDeviceGroupSurfacePresentModes2EXT(
VkDevice device,
const VkPhysicalDeviceSurfaceInfo2KHR* pSurfaceInfo,
VkDeviceGroupPresentModeFlagsKHR* pModes);
#endif
#ifdef __cplusplus
}
#endif
#endif

View File

@@ -0,0 +1,55 @@
#ifndef VULKAN_XCB_H_
#define VULKAN_XCB_H_ 1
/*
** Copyright 2015-2022 The Khronos Group Inc.
**
** SPDX-License-Identifier: Apache-2.0
*/
/*
** This header is generated from the Khronos Vulkan XML API Registry.
**
*/
#ifdef __cplusplus
extern "C" {
#endif
#define VK_KHR_xcb_surface 1
#define VK_KHR_XCB_SURFACE_SPEC_VERSION 6
#define VK_KHR_XCB_SURFACE_EXTENSION_NAME "VK_KHR_xcb_surface"
typedef VkFlags VkXcbSurfaceCreateFlagsKHR;
typedef struct VkXcbSurfaceCreateInfoKHR {
VkStructureType sType;
const void* pNext;
VkXcbSurfaceCreateFlagsKHR flags;
xcb_connection_t* connection;
xcb_window_t window;
} VkXcbSurfaceCreateInfoKHR;
typedef VkResult (VKAPI_PTR *PFN_vkCreateXcbSurfaceKHR)(VkInstance instance, const VkXcbSurfaceCreateInfoKHR* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface);
typedef VkBool32 (VKAPI_PTR *PFN_vkGetPhysicalDeviceXcbPresentationSupportKHR)(VkPhysicalDevice physicalDevice, uint32_t queueFamilyIndex, xcb_connection_t* connection, xcb_visualid_t visual_id);
#ifndef VK_NO_PROTOTYPES
VKAPI_ATTR VkResult VKAPI_CALL vkCreateXcbSurfaceKHR(
VkInstance instance,
const VkXcbSurfaceCreateInfoKHR* pCreateInfo,
const VkAllocationCallbacks* pAllocator,
VkSurfaceKHR* pSurface);
VKAPI_ATTR VkBool32 VKAPI_CALL vkGetPhysicalDeviceXcbPresentationSupportKHR(
VkPhysicalDevice physicalDevice,
uint32_t queueFamilyIndex,
xcb_connection_t* connection,
xcb_visualid_t visual_id);
#endif
#ifdef __cplusplus
}
#endif
#endif

View File

@@ -0,0 +1,55 @@
#ifndef VULKAN_XLIB_H_
#define VULKAN_XLIB_H_ 1
/*
** Copyright 2015-2022 The Khronos Group Inc.
**
** SPDX-License-Identifier: Apache-2.0
*/
/*
** This header is generated from the Khronos Vulkan XML API Registry.
**
*/
#ifdef __cplusplus
extern "C" {
#endif
#define VK_KHR_xlib_surface 1
#define VK_KHR_XLIB_SURFACE_SPEC_VERSION 6
#define VK_KHR_XLIB_SURFACE_EXTENSION_NAME "VK_KHR_xlib_surface"
typedef VkFlags VkXlibSurfaceCreateFlagsKHR;
typedef struct VkXlibSurfaceCreateInfoKHR {
VkStructureType sType;
const void* pNext;
VkXlibSurfaceCreateFlagsKHR flags;
Display* dpy;
Window window;
} VkXlibSurfaceCreateInfoKHR;
typedef VkResult (VKAPI_PTR *PFN_vkCreateXlibSurfaceKHR)(VkInstance instance, const VkXlibSurfaceCreateInfoKHR* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface);
typedef VkBool32 (VKAPI_PTR *PFN_vkGetPhysicalDeviceXlibPresentationSupportKHR)(VkPhysicalDevice physicalDevice, uint32_t queueFamilyIndex, Display* dpy, VisualID visualID);
#ifndef VK_NO_PROTOTYPES
VKAPI_ATTR VkResult VKAPI_CALL vkCreateXlibSurfaceKHR(
VkInstance instance,
const VkXlibSurfaceCreateInfoKHR* pCreateInfo,
const VkAllocationCallbacks* pAllocator,
VkSurfaceKHR* pSurface);
VKAPI_ATTR VkBool32 VKAPI_CALL vkGetPhysicalDeviceXlibPresentationSupportKHR(
VkPhysicalDevice physicalDevice,
uint32_t queueFamilyIndex,
Display* dpy,
VisualID visualID);
#endif
#ifdef __cplusplus
}
#endif
#endif

View File

@@ -0,0 +1,45 @@
#ifndef VULKAN_XLIB_XRANDR_H_
#define VULKAN_XLIB_XRANDR_H_ 1
/*
** Copyright 2015-2022 The Khronos Group Inc.
**
** SPDX-License-Identifier: Apache-2.0
*/
/*
** This header is generated from the Khronos Vulkan XML API Registry.
**
*/
#ifdef __cplusplus
extern "C" {
#endif
#define VK_EXT_acquire_xlib_display 1
#define VK_EXT_ACQUIRE_XLIB_DISPLAY_SPEC_VERSION 1
#define VK_EXT_ACQUIRE_XLIB_DISPLAY_EXTENSION_NAME "VK_EXT_acquire_xlib_display"
typedef VkResult (VKAPI_PTR *PFN_vkAcquireXlibDisplayEXT)(VkPhysicalDevice physicalDevice, Display* dpy, VkDisplayKHR display);
typedef VkResult (VKAPI_PTR *PFN_vkGetRandROutputDisplayEXT)(VkPhysicalDevice physicalDevice, Display* dpy, RROutput rrOutput, VkDisplayKHR* pDisplay);
#ifndef VK_NO_PROTOTYPES
VKAPI_ATTR VkResult VKAPI_CALL vkAcquireXlibDisplayEXT(
VkPhysicalDevice physicalDevice,
Display* dpy,
VkDisplayKHR display);
VKAPI_ATTR VkResult VKAPI_CALL vkGetRandROutputDisplayEXT(
VkPhysicalDevice physicalDevice,
Display* dpy,
RROutput rrOutput,
VkDisplayKHR* pDisplay);
#endif
#ifdef __cplusplus
}
#endif
#endif

View File

@@ -1,12 +0,0 @@
.global GIZMO_GIZMO_OFFSET;
.global GIZMO_GIZMO_SIZE;
.global GIZMO_PACKAGE
.section .rodata
GIZMO_PACKAGE:
.incbin "gizmo.bin"
GIZMO_GIZMO_OFFSET:
.int 0
GIZMO_GIZMO_SIZE:
.int 27809

View File

@@ -1,12 +0,0 @@
.global _GIZMO_GIZMO_OFFSET;
.global _GIZMO_GIZMO_SIZE;
.global _GIZMO_PACKAGE
.section __TEXT,__const
_GIZMO_PACKAGE:
.incbin "gizmo.bin"
_GIZMO_GIZMO_OFFSET:
.int 0
_GIZMO_GIZMO_SIZE:
.int 27809

View File

@@ -1,13 +0,0 @@
#ifndef GIZMO_H_
#define GIZMO_H_
#include <stdint.h>
extern "C" {
extern const uint8_t GIZMO_PACKAGE[];
extern int GIZMO_GIZMO_OFFSET;
extern int GIZMO_GIZMO_SIZE;
}
#define GIZMO_GIZMO_DATA (GIZMO_PACKAGE + GIZMO_GIZMO_OFFSET)
#endif

File diff suppressed because it is too large Load Diff

View File

@@ -8,5 +8,5 @@ UNLIT_PACKAGE:
UNLIT_UNLIT_OFFSET:
.int 0
UNLIT_UNLIT_SIZE:
.int 101456
.int 101394

View File

@@ -8,5 +8,5 @@ _UNLIT_PACKAGE:
_UNLIT_UNLIT_OFFSET:
.int 0
_UNLIT_UNLIT_SIZE:
.int 101456
.int 101394

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,12 @@
.global UNLIT_FIXED_SIZE_UNLIT_FIXED_SIZE_OFFSET;
.global UNLIT_FIXED_SIZE_UNLIT_FIXED_SIZE_SIZE;
.global UNLIT_FIXED_SIZE_PACKAGE
.section .rodata
UNLIT_FIXED_SIZE_PACKAGE:
.incbin "unlit_fixed_size.bin"
UNLIT_FIXED_SIZE_UNLIT_FIXED_SIZE_OFFSET:
.int 0
UNLIT_FIXED_SIZE_UNLIT_FIXED_SIZE_SIZE:
.int 28235

View File

@@ -0,0 +1,12 @@
.global _UNLIT_FIXED_SIZE_UNLIT_FIXED_SIZE_OFFSET;
.global _UNLIT_FIXED_SIZE_UNLIT_FIXED_SIZE_SIZE;
.global _UNLIT_FIXED_SIZE_PACKAGE
.section __TEXT,__const
_UNLIT_FIXED_SIZE_PACKAGE:
.incbin "unlit_fixed_size.bin"
_UNLIT_FIXED_SIZE_UNLIT_FIXED_SIZE_OFFSET:
.int 0
_UNLIT_FIXED_SIZE_UNLIT_FIXED_SIZE_SIZE:
.int 28235

Some files were not shown because too many files have changed in this diff Show More