diff --git a/.github/workflows/Linux.yml b/.github/workflows/Linux.yml new file mode 100644 index 00000000..77a69afd --- /dev/null +++ b/.github/workflows/Linux.yml @@ -0,0 +1,81 @@ +name: Linux + +on: + push: + branches: [master, motivation] + pull_request: + branches: [master, motivation] + + workflow_dispatch: + +jobs: + build: + runs-on: ubuntu-latest + timeout-minutes: 120 + env: + ENGINE_REF: ${{ github.head_ref || github.ref_name }} + strategy: + fail-fast: false + matrix: + buildconfig: [Editor, Game_linux] + configuration: [Debug, Release] + include: + - buildconfig: Editor + target: Havana + binary: Havana + - buildconfig: Game_linux + target: Game_EntryPoint + binary: Game_EntryPoint_x64 + + steps: + - name: Install Nix + uses: cachix/install-nix-action@v31 + with: + github_access_token: ${{ secrets.GITHUB_TOKEN }} + extra_nix_config: | + experimental-features = nix-command flakes + + - name: Grab the project setup file + run: curl -fsSLO "https://raw.githubusercontent.com/wobbier/MitchEngine/${ENGINE_REF}/Tools/NewProjectSetup.sh" + + - name: Generate a new project + run: bash NewProjectSetup.sh EmptyProject "$ENGINE_REF" + + - name: Compile Tools + if: ${{ matrix.buildconfig == 'Game_linux' }} + run: nix develop --command make -f EmptyProject.make Havana config=editor_release -j"$(nproc)" + + - name: Compile Project + run: | + config=$(echo "${{ matrix.buildconfig }}_${{ matrix.configuration }}" | tr '[:upper:]' '[:lower:]') + nix develop --command make -f EmptyProject.make "${{ matrix.target }}" config="$config" -j"$(nproc)" + + - name: Copy Assets + run: bash CopyAssets.sh "${{ matrix.buildconfig }}_${{ matrix.configuration }}" + + - name: Cook Assets + if: ${{ matrix.buildconfig == 'Game_linux' }} + continue-on-error: true + timeout-minutes: 20 + run: | + sudo apt-get update -q && sudo apt-get install -yq xvfb + bash CopyAssets.sh Editor_Release + # The cook resolves Engine/Tools/linux/shaderc relative to its + # working directory and expects texturec on PATH. + mkdir -p .build/Editor_Release/Engine/Tools + cp -a Engine/Tools/linux .build/Editor_Release/Engine/Tools/ + nix develop --command bash -c 'cd .build/Editor_Release && PATH="$PWD/Engine/Tools/linux:$PATH" LIBGL_ALWAYS_SOFTWARE=1 xvfb-run -a ./Havana -CompileAssets' + + - name: Copy Cooked Assets + if: ${{ matrix.buildconfig == 'Game_linux' }} + continue-on-error: true + run: cp -a .build/Editor_Release/Assets/. ".build/Game_linux_${{ matrix.configuration }}/Assets/" + + - name: Package + run: nix develop --command bash Engine/Tools/PackageLinuxBuild.sh "${{ matrix.buildconfig }}_${{ matrix.configuration }}" "${{ matrix.binary }}" + + - name: Archive Build + uses: actions/upload-artifact@v4 + with: + name: EmptyProject v${{ github.run_number }} - ${{ matrix.buildconfig }}_${{ matrix.configuration }} (Linux) + path: ${{ matrix.buildconfig }}_${{ matrix.configuration }}.tar.gz diff --git a/.github/workflows/UWP.yml b/.github/workflows/UWP.yml index bf13282c..fce8d0c7 100644 --- a/.github/workflows/UWP.yml +++ b/.github/workflows/UWP.yml @@ -3,6 +3,7 @@ name: UWP on: push: branches: [master, motivation] + pull_request: branches: [master, motivation] @@ -10,57 +11,151 @@ on: jobs: build: - runs-on: ${{ matrix.os }} + runs-on: windows-2022 + strategy: + fail-fast: false matrix: - os: [windows-2022] configuration: - Debug - Release - Retail type: - Game_UWP - include: - - os: windows-2022 - shell: cmd - compiler: cl - target: Windows steps: - name: Add MSBuild to PATH uses: microsoft/setup-msbuild@v2 + with: + msbuild-architecture: x64 - name: Install Mono shell: cmd - run: choco install mono --ignore-checksums + run: choco install mono --ignore-checksums --no-progress - - name: Setup dotnet - uses: actions/setup-dotnet@v4 + - name: Setup .NET 8 + id: setup-dotnet + uses: actions/setup-dotnet@v5 with: - dotnet-version: "5.0.100" + dotnet-version: "8.0.x" - - uses: suisei-cn/actions-download-file@818d6b7dc8fe73f2f924b6241f2b1134ca1377d9 # 1.6.0 + - name: Pin .NET SDK + shell: pwsh + run: | + @" + { + "sdk": { + "version": "${{ steps.setup-dotnet.outputs.dotnet-version }}", + "rollForward": "latestPatch", + "allowPrerelease": false + } + } + "@ | Set-Content -Path global.json -Encoding utf8 + + Write-Host "global.json:" + Get-Content global.json + + Write-Host "`nSelected .NET SDK:" + dotnet --version + + Write-Host "`nInstalled .NET SDKs:" + dotnet --list-sdks + + - name: Download project setup + uses: suisei-cn/actions-download-file@818d6b7dc8fe73f2f924b6241f2b1134ca1377d9 id: downloadfile - name: Grab the project setup file with: - url: "https://raw.githubusercontent.com/wobbier/MitchEngine/${{github.ref_name}}/Tools/NewProjectSetup.bat" + url: "https://raw.githubusercontent.com/${{ github.event.pull_request.head.repo.full_name || github.repository }}/${{ github.event.pull_request.head.sha || github.sha }}/Tools/NewProjectSetup.bat" target: ./ - - name: Generate a new project - shell: cmd - run: call NewProjectSetup.bat EmptyProject ${{github.ref_name}} + - name: Verify project setup + shell: pwsh + run: | + if (!(Test-Path "NewProjectSetup.bat")) { + throw "NewProjectSetup.bat was not downloaded." + } + + $contents = Get-Content "NewProjectSetup.bat" -Raw + + if ($contents -match '^404:') { + throw "NewProjectSetup.bat download returned a GitHub 404 response." + } - - name: Generate a new project + Get-Content "NewProjectSetup.bat" -TotalCount 5 + + - name: Generate project shell: cmd - run: cd Project && call GenerateSolution.bat && cd ../ + run: call NewProjectSetup.bat EmptyProject "${{ github.head_ref || github.ref_name }}" + + - name: Verify generated solution + shell: pwsh + run: | + if (!(Test-Path "EmptyProject.sln")) { + throw "EmptyProject.sln was not generated." + } + + $sharpmakeProject = Get-ChildItem ` + -Path ".tmp\project" ` + -Filter "SharpmakeProject_Win64.csproj" ` + -Recurse ` + -ErrorAction SilentlyContinue | + Select-Object -First 1 + + if (!$sharpmakeProject) { + throw "SharpmakeProject_Win64.csproj was not generated." + } + + Write-Host "Generated solution:" + Resolve-Path "EmptyProject.sln" + + Write-Host "`nGenerated Sharpmake project:" + Write-Host $sharpmakeProject.FullName + + - name: Restore generated Sharpmake project + shell: pwsh + run: | + $sharpmakeProject = Get-ChildItem ` + -Path ".tmp\project" ` + -Filter "SharpmakeProject_Win64.csproj" ` + -Recurse | + Select-Object -First 1 + + if (!$sharpmakeProject) { + throw "Could not locate SharpmakeProject_Win64.csproj." + } + + dotnet restore $sharpmakeProject.FullName --verbosity minimal + + if ($LASTEXITCODE -ne 0) { + throw "Sharpmake project restore failed with exit code $LASTEXITCODE." + } + + $assetsFile = Join-Path $sharpmakeProject.DirectoryName "obj\project.assets.json" + + if (!(Test-Path $assetsFile)) { + throw "Restore completed without generating $assetsFile." + } + + Write-Host "Generated NuGet assets file:" + Write-Host $assetsFile - name: Compile Tools shell: cmd - run: msbuild EmptyProject.sln /property:Configuration="Editor_Release" - - - name: Compile Project + run: > + msbuild EmptyProject.sln + /restore + /m + /property:Configuration="Editor_Release" + /verbosity:minimal + + - name: Compile UWP Project shell: cmd - run: msbuild EmptyProject.sln /property:Configuration="${{matrix.type}}_${{matrix.configuration}}" + run: > + msbuild EmptyProject.sln + /restore + /m + /property:Configuration="${{ matrix.type }}_${{ matrix.configuration }}" + /verbosity:minimal - name: Copy Assets shell: cmd @@ -68,39 +163,75 @@ jobs: - name: Copy Editor Assets shell: pwsh - continue-on-error: true run: | - robocopy ".build/Release/Assets" ".build\\Editor_Release\\Assets" *.* /w:0 /r:1 /v /E ; if ($lastexitcode -lt 8) { $global:LASTEXITCODE = $null } - robocopy "Engine/Tools" ".build\\Editor_Release\\Tools" Optick.exe /w:0 /r:1 /v /E ; if ($lastexitcode -lt 8) { $global:LASTEXITCODE = $null } - robocopy "Engine/Tools/Win64" ".build\\Editor_Release\\Tools\\Win64" *.* /w:0 /r:1 /v /E ; if ($lastexitcode -lt 8) { $global:LASTEXITCODE = $null } + robocopy ` + ".build\Release\Assets" ` + ".build\Editor_Release\Assets" ` + *.* /w:0 /r:1 /v /E + + if ($LASTEXITCODE -ge 8) { + throw "Copying editor assets failed with robocopy exit code $LASTEXITCODE." + } + + $global:LASTEXITCODE = 0 + + robocopy ` + "Engine\Tools" ` + ".build\Editor_Release\Tools" ` + Optick.exe /w:0 /r:1 /v + + if ($LASTEXITCODE -ge 8) { + throw "Copying Optick failed with robocopy exit code $LASTEXITCODE." + } + + $global:LASTEXITCODE = 0 + + robocopy ` + "Engine\Tools\Win64" ` + ".build\Editor_Release\Tools\Win64" ` + *.* /w:0 /r:1 /v /E + + if ($LASTEXITCODE -ge 8) { + throw "Copying Win64 tools failed with robocopy exit code $LASTEXITCODE." + } + + $global:LASTEXITCODE = 0 - name: Cook Assets shell: cmd run: | - cd ".build/Editor_Release/" + cd ".build\Editor_Release" call Havana.exe -CompileAssets - cd ../../ + cd ..\.. - name: Copy Cooked Assets shell: pwsh - continue-on-error: true run: | - robocopy ".build/Editor_Release/Assets" ".build\\${{matrix.type}}_${{matrix.configuration}}\\Assets" *.* /w:0 /r:1 /v /E ; if ($lastexitcode -lt 8) { $global:LASTEXITCODE = $null } + robocopy ` + ".build\Editor_Release\Assets" ` + ".build\${{ matrix.type }}_${{ matrix.configuration }}\Assets" ` + *.* /w:0 /r:1 /v /E + + if ($LASTEXITCODE -ge 8) { + throw "Copying cooked assets failed with robocopy exit code $LASTEXITCODE." + } + + $global:LASTEXITCODE = 0 - name: Archive Build uses: actions/upload-artifact@v4 with: - name: Heap v${{github.run_number}} - ${{matrix.type}} - ${{matrix.configuration}} + name: EmptyProject v${{ github.run_number }} - ${{ matrix.type }}_${{ matrix.configuration }} + if-no-files-found: error path: | - .build/${{matrix.type}}_${{matrix.configuration}} - .build/${{matrix.type}}_${{matrix.configuration}}/Assets - !.build/${{matrix.type}}_${{matrix.configuration}}/*.lib - !.build/${{matrix.type}}_${{matrix.configuration}}/*.pdb - !.build/${{matrix.type}}_${{matrix.configuration}}/*.exp - !.build/${{matrix.type}}_${{matrix.configuration}}/*.log - !.build/${{matrix.type}}_${{matrix.configuration}}/**/*.png - !.build/${{matrix.type}}_${{matrix.configuration}}/**/*.jpg - !.build/${{matrix.type}}_${{matrix.configuration}}/**/*.frag - !.build/${{matrix.type}}_${{matrix.configuration}}/**/*.vert - !.build/${{matrix.type}}_${{matrix.configuration}}/**/*.var - !.build/${{matrix.type}}_${{matrix.configuration}}/**/*.sh + .build/${{ matrix.type }}_${{ matrix.configuration }} + !.build/${{ matrix.type }}_${{ matrix.configuration }}/*.lib + !.build/${{ matrix.type }}_${{ matrix.configuration }}/*.pdb + !.build/${{ matrix.type }}_${{ matrix.configuration }}/*.exp + !.build/${{ matrix.type }}_${{ matrix.configuration }}/*.log + !.build/${{ matrix.type }}_${{ matrix.configuration }}/**/*.png + !.build/${{ matrix.type }}_${{ matrix.configuration }}/**/*.jpg + !.build/${{ matrix.type }}_${{ matrix.configuration }}/**/*.frag + !.build/${{ matrix.type }}_${{ matrix.configuration }}/**/*.vert + !.build/${{ matrix.type }}_${{ matrix.configuration }}/**/*.var + !.build/${{ matrix.type }}_${{ matrix.configuration }}/**/*.sh \ No newline at end of file diff --git a/.github/workflows/Windows.yml b/.github/workflows/Windows.yml index 536dc937..c393a6e3 100644 --- a/.github/workflows/Windows.yml +++ b/.github/workflows/Windows.yml @@ -36,30 +36,47 @@ jobs: run: choco install mono --ignore-checksums - name: Setup dotnet - uses: actions/setup-dotnet@v4 + id: setup-dotnet + uses: actions/setup-dotnet@v5 with: - dotnet-version: "5.0.100" + dotnet-version: "8.0.x" - - uses: suisei-cn/actions-download-file@818d6b7dc8fe73f2f924b6241f2b1134ca1377d9 # 1.6.0 + - name: Pin dotnet SDK + shell: pwsh + run: | + '{"sdk":{"version":"${{ steps.setup-dotnet.outputs.dotnet-version }}","rollForward":"latestPatch"}}' | + Set-Content -Encoding utf8 global.json + + Write-Host "Selected SDK:" + dotnet --version + + - uses: suisei-cn/actions-download-file@818d6b7dc8fe73f2f924b6241f2b1134ca1377d9 id: downloadfile name: Grab the project setup file with: - url: "https://raw.githubusercontent.com/wobbier/MitchEngine/${{github.ref_name}}/Tools/NewProjectSetup.bat" + url: "https://raw.githubusercontent.com/${{ github.event.pull_request.head.repo.full_name || github.repository }}/${{ github.event.pull_request.head.sha || github.sha }}/Tools/NewProjectSetup.bat" target: ./ - name: Generate a new project shell: cmd - run: call NewProjectSetup.bat EmptyProject ${{github.ref_name}} + run: call NewProjectSetup.bat EmptyProject "${{ github.head_ref || github.ref_name }}" - name: Compile Tools if: ${{ matrix.buildconfig == 'Game_Win64' }} shell: cmd - run: msbuild EmptyProject.sln /property:Configuration="Editor_Release" + run: > + msbuild EmptyProject.sln + /restore + /m + /property:Configuration="Editor_Release" - name: Compile Project shell: cmd - run: msbuild EmptyProject.sln /property:Configuration="${{matrix.buildconfig}}_${{matrix.configuration}}" - + run: > + msbuild EmptyProject.sln + /restore + /m + /property:Configuration="${{ matrix.buildconfig }}_${{ matrix.configuration }}" - name: Copy Assets shell: cmd run: call CopyAssets.bat diff --git a/.github/workflows/macOS.yml b/.github/workflows/macOS.yml index d350cad1..9fbfa198 100644 --- a/.github/workflows/macOS.yml +++ b/.github/workflows/macOS.yml @@ -3,6 +3,7 @@ name: macOS on: push: branches: [master, motivation] + pull_request: branches: [master, motivation] @@ -10,74 +11,90 @@ on: jobs: build: + runs-on: macos-15-intel + strategy: + fail-fast: false matrix: - platform: - - macOS - xcode: - - ^15 configuration: - Debug - Release type: - Editor - Game_macOS - runs-on: macos-13 + + env: + ENGINE_REPOSITORY: ${{ github.event.pull_request.head.repo.full_name || github.repository }} + ENGINE_REVISION: ${{ github.event.pull_request.head.sha || github.sha }} + ENGINE_BRANCH: ${{ github.head_ref || github.ref_name }} steps: - - uses: suisei-cn/actions-download-file@818d6b7dc8fe73f2f924b6241f2b1134ca1377d9 # 1.6.0 - id: downloadfile - name: Grab the project setup file - with: - url: "https://raw.githubusercontent.com/wobbier/MitchEngine/${{github.ref_name}}/Tools/NewProjectSetup.command" - target: ./ + - name: Download project setup + shell: bash + run: | + set -euo pipefail - - name: Setup dotnet - uses: actions/setup-dotnet@v4 + curl \ + --fail \ + --location \ + --show-error \ + --output NewProjectSetup.command \ + "https://raw.githubusercontent.com/${ENGINE_REPOSITORY}/${ENGINE_REVISION}/Tools/NewProjectSetup.command" + + echo "Downloaded setup script:" + head -n 5 NewProjectSetup.command + + - name: Setup .NET 8 + uses: actions/setup-dotnet@v5 with: - dotnet-version: "5.0.100" - - - name: Generate a new project - shell: bash - run: sh NewProjectSetup.command EmptyProject ${{github.ref_name}} + dotnet-version: "8.0.x" - - name: Generate a new project + - name: Generate project shell: bash - run: cd Project && sh GenerateSolution.command && cd ../ && ls + run: | + set -euo pipefail + + echo "Generating from branch: ${ENGINE_BRANCH}" + bash NewProjectSetup.command EmptyProject "${ENGINE_BRANCH}" + + echo "Generated workspace:" + find . -maxdepth 2 \ + \( -name "*.xcworkspace" -o -name "*.xcodeproj" \) \ + -print - name: Build Editor if: ${{ matrix.type == 'Editor' }} - uses: mxcl/xcodebuild@v2 + uses: mxcl/xcodebuild@v3 with: - xcode: ${{ matrix.xcode }} - platform: ${{ matrix.platform }} - action: build # default = `test` - code-coverage: true # default = `false` - warnings-as-errors: false # default = `false` + xcode: ^16 + platform: macOS + action: build + code-coverage: true + warnings-as-errors: false workspace: EmptyProject.xcworkspace - configuration: ${{ matrix.type }}_${{ matrix.configuration }} # no default, ie. `xcodebuild` decides itself + configuration: ${{ matrix.type }}_${{ matrix.configuration }} scheme: Havana_mac - name: Build Game if: ${{ matrix.type == 'Game_macOS' }} - uses: mxcl/xcodebuild@v2 + uses: mxcl/xcodebuild@v3 with: - xcode: ${{ matrix.xcode }} - platform: ${{ matrix.platform }} - action: build # default = `test` - code-coverage: true # default = `false` - warnings-as-errors: false # default = `false` + xcode: ^16 + platform: macOS + action: build + code-coverage: true + warnings-as-errors: false workspace: EmptyProject.xcworkspace - configuration: ${{ matrix.type }}_${{ matrix.configuration }} # no default, ie. `xcodebuild` decides itself + configuration: ${{ matrix.type }}_${{ matrix.configuration }} scheme: Game_EntryPoint_mac - - name: Copy Assets (Not Implemented) + - name: Copy Assets shell: bash - run: echo todo + run: echo "TODO" - name: Archive uses: actions/upload-artifact@v4 with: - name: EmptyProject - ${{matrix.type}} - ${{matrix.buildconfig}} - path: | - Build/${{matrix.buildconfig}} + name: EmptyProject - ${{ matrix.type }} - ${{ matrix.configuration }} + path: Build + if-no-files-found: warn \ No newline at end of file diff --git a/.gitignore b/.gitignore index d0291c92..ccf74486 100644 --- a/.gitignore +++ b/.gitignore @@ -212,4 +212,7 @@ engine.txt imgui.ini *.assbin -.DS_Store \ No newline at end of file +.DS_Store + +# compiled linux shaders +*.bin.d \ No newline at end of file diff --git a/Assets/Havana/UI/3D.png.meta b/Assets/Havana/UI/3D.png.meta index b3a7ce2c..a2b647d0 100644 --- a/Assets/Havana/UI/3D.png.meta +++ b/Assets/Havana/UI/3D.png.meta @@ -1,6 +1,6 @@ { "FileType": "png", - "Format": "BC1", + "Format": "BC3", "MIPs": false, "Quality": "h", "Type": "Default" diff --git a/Assets/Havana/UI/Audio.png.meta b/Assets/Havana/UI/Audio.png.meta index b3a7ce2c..a2b647d0 100644 --- a/Assets/Havana/UI/Audio.png.meta +++ b/Assets/Havana/UI/Audio.png.meta @@ -1,6 +1,6 @@ { "FileType": "png", - "Format": "BC1", + "Format": "BC3", "MIPs": false, "Quality": "h", "Type": "Default" diff --git a/Assets/Havana/UI/CSharp.png.meta b/Assets/Havana/UI/CSharp.png.meta index 54b6309a..f810d052 100644 --- a/Assets/Havana/UI/CSharp.png.meta +++ b/Assets/Havana/UI/CSharp.png.meta @@ -1,6 +1,6 @@ { "FileType": "png", - "Format": "BC1", + "Format": "BC3", "MIPs": false, "Quality": "d", "Type": "Default" diff --git a/Assets/Havana/UI/Close.png.meta b/Assets/Havana/UI/Close.png.meta index b3a7ce2c..a2b647d0 100644 --- a/Assets/Havana/UI/Close.png.meta +++ b/Assets/Havana/UI/Close.png.meta @@ -1,6 +1,6 @@ { "FileType": "png", - "Format": "BC1", + "Format": "BC3", "MIPs": false, "Quality": "h", "Type": "Default" diff --git a/Assets/Havana/UI/Code.png.meta b/Assets/Havana/UI/Code.png.meta index 54b6309a..f810d052 100644 --- a/Assets/Havana/UI/Code.png.meta +++ b/Assets/Havana/UI/Code.png.meta @@ -1,6 +1,6 @@ { "FileType": "png", - "Format": "BC1", + "Format": "BC3", "MIPs": false, "Quality": "d", "Type": "Default" diff --git a/Assets/Havana/UI/ExitMaximize.png.meta b/Assets/Havana/UI/ExitMaximize.png.meta index b3a7ce2c..a2b647d0 100644 --- a/Assets/Havana/UI/ExitMaximize.png.meta +++ b/Assets/Havana/UI/ExitMaximize.png.meta @@ -1,6 +1,6 @@ { "FileType": "png", - "Format": "BC1", + "Format": "BC3", "MIPs": false, "Quality": "h", "Type": "Default" diff --git a/Assets/Havana/UI/File.png.meta b/Assets/Havana/UI/File.png.meta index b3a7ce2c..a2b647d0 100644 --- a/Assets/Havana/UI/File.png.meta +++ b/Assets/Havana/UI/File.png.meta @@ -1,6 +1,6 @@ { "FileType": "png", - "Format": "BC1", + "Format": "BC3", "MIPs": false, "Quality": "h", "Type": "Default" diff --git a/Assets/Havana/UI/Image.png.meta b/Assets/Havana/UI/Image.png.meta index b3a7ce2c..a2b647d0 100644 --- a/Assets/Havana/UI/Image.png.meta +++ b/Assets/Havana/UI/Image.png.meta @@ -1,6 +1,6 @@ { "FileType": "png", - "Format": "BC1", + "Format": "BC3", "MIPs": false, "Quality": "h", "Type": "Default" diff --git a/Assets/Havana/UI/Info.png.meta b/Assets/Havana/UI/Info.png.meta index b3a7ce2c..a2b647d0 100644 --- a/Assets/Havana/UI/Info.png.meta +++ b/Assets/Havana/UI/Info.png.meta @@ -1,6 +1,6 @@ { "FileType": "png", - "Format": "BC1", + "Format": "BC3", "MIPs": false, "Quality": "h", "Type": "Default" diff --git a/Assets/Havana/UI/Maximize.png.meta b/Assets/Havana/UI/Maximize.png.meta index b3a7ce2c..a2b647d0 100644 --- a/Assets/Havana/UI/Maximize.png.meta +++ b/Assets/Havana/UI/Maximize.png.meta @@ -1,6 +1,6 @@ { "FileType": "png", - "Format": "BC1", + "Format": "BC3", "MIPs": false, "Quality": "h", "Type": "Default" diff --git a/Assets/Havana/UI/Minimize.png.meta b/Assets/Havana/UI/Minimize.png.meta index b3a7ce2c..a2b647d0 100644 --- a/Assets/Havana/UI/Minimize.png.meta +++ b/Assets/Havana/UI/Minimize.png.meta @@ -1,6 +1,6 @@ { "FileType": "png", - "Format": "BC1", + "Format": "BC3", "MIPs": false, "Quality": "h", "Type": "Default" diff --git a/Assets/Havana/UI/Profiler.png.meta b/Assets/Havana/UI/Profiler.png.meta index b3a7ce2c..a2b647d0 100644 --- a/Assets/Havana/UI/Profiler.png.meta +++ b/Assets/Havana/UI/Profiler.png.meta @@ -1,6 +1,6 @@ { "FileType": "png", - "Format": "BC1", + "Format": "BC3", "MIPs": false, "Quality": "h", "Type": "Default" diff --git a/Assets/Havana/UI/Stop.png.meta b/Assets/Havana/UI/Stop.png.meta index b3a7ce2c..a2b647d0 100644 --- a/Assets/Havana/UI/Stop.png.meta +++ b/Assets/Havana/UI/Stop.png.meta @@ -1,6 +1,6 @@ { "FileType": "png", - "Format": "BC1", + "Format": "BC3", "MIPs": false, "Quality": "h", "Type": "Default" diff --git a/Assets/Havana/UI/UI.png.meta b/Assets/Havana/UI/UI.png.meta index 54b6309a..f810d052 100644 --- a/Assets/Havana/UI/UI.png.meta +++ b/Assets/Havana/UI/UI.png.meta @@ -1,6 +1,6 @@ { "FileType": "png", - "Format": "BC1", + "Format": "BC3", "MIPs": false, "Quality": "d", "Type": "Default" diff --git a/Assets/Havana/UI/World.png.meta b/Assets/Havana/UI/World.png.meta index b3a7ce2c..a2b647d0 100644 --- a/Assets/Havana/UI/World.png.meta +++ b/Assets/Havana/UI/World.png.meta @@ -1,6 +1,6 @@ { "FileType": "png", - "Format": "BC1", + "Format": "BC3", "MIPs": false, "Quality": "h", "Type": "Default" diff --git a/Assets/Legal/DOTNET.png b/Assets/Legal/DOTNET.png new file mode 100644 index 00000000..72bedb1f Binary files /dev/null and b/Assets/Legal/DOTNET.png differ diff --git a/Assets/Legal/FMOD.png.meta b/Assets/Legal/FMOD.png.meta deleted file mode 100644 index a2b647d0..00000000 --- a/Assets/Legal/FMOD.png.meta +++ /dev/null @@ -1,7 +0,0 @@ -{ - "FileType": "png", - "Format": "BC3", - "MIPs": false, - "Quality": "h", - "Type": "Default" -} \ No newline at end of file diff --git a/Assets/Legal/Mono.png.meta b/Assets/Legal/Mono.png.meta deleted file mode 100644 index a2b647d0..00000000 --- a/Assets/Legal/Mono.png.meta +++ /dev/null @@ -1,7 +0,0 @@ -{ - "FileType": "png", - "Format": "BC3", - "MIPs": false, - "Quality": "h", - "Type": "Default" -} \ No newline at end of file diff --git a/Assets/Shaders/Diffuse.frag b/Assets/Shaders/Diffuse.frag index b156e444..39e51f8d 100644 --- a/Assets/Shaders/Diffuse.frag +++ b/Assets/Shaders/Diffuse.frag @@ -1,6 +1,4 @@ $input v_color0, v_normal, v_texcoord0 - - #include "Common.sh" SAMPLER2D(s_texDiffuse, 0); @@ -19,10 +17,10 @@ void main() vec4 color = texture2D(s_texDiffuse, uvs) * s_diffuse; vec4 ambient = s_ambient * color; - vec4 lightDir = normalize(s_sunDirection); + vec3 lightDir = normalize(s_sunDirection.xyz); vec3 skyDirection = vec3(0.0, 0.0, 1.0); - float diff = max(dot(normalize(v_normal), lightDir), 0.0); + float diff = max(dot(normalize(v_normal), lightDir), 0.0); float diffuseSky = 1.0 + 0.5 * dot(normalize(v_normal), skyDirection); diffuseSky *= 0.03; vec4 diffuse = diff * s_sunDiffuse;// * color; diff --git a/Assets/Shaders/Diffuse.var b/Assets/Shaders/Diffuse.var index 26287ed7..5185674d 100644 --- a/Assets/Shaders/Diffuse.var +++ b/Assets/Shaders/Diffuse.var @@ -7,3 +7,8 @@ vec3 a_normal : NORMAL; vec2 a_texcoord0 : TEXCOORD0; vec3 a_tangent : TANGENT; vec3 a_bitangent : BITANGENT; + +vec4 i_data0 : TEXCOORD7; +vec4 i_data1 : TEXCOORD6; +vec4 i_data2 : TEXCOORD5; +vec4 i_data3 : TEXCOORD4; diff --git a/Assets/Shaders/Diffuse.vert b/Assets/Shaders/Diffuse.vert index cf375c60..c95a38bd 100644 --- a/Assets/Shaders/Diffuse.vert +++ b/Assets/Shaders/Diffuse.vert @@ -1,14 +1,18 @@ -$input a_position, a_normal, a_texcoord0, a_tangent, a_bitangent +$input a_position, a_normal, a_texcoord0, a_tangent, a_bitangent, i_data0, i_data1, i_data2, i_data3 $output v_color0, v_normal, v_texcoord0 #include "Common.sh" void main() { - gl_Position = mul(u_modelViewProj, vec4(a_position, 1.0) ); + mat4 model = mtxFromCols(i_data0, i_data1, i_data2, i_data3); + + vec4 worldPos = mul(model, vec4(a_position, 1.0) ); + gl_Position = mul(u_viewProj, worldPos); + v_color0 = vec4(a_normal.x,a_normal.y,a_normal.z,1.0); v_texcoord0 = a_texcoord0; vec3 normal = a_normal.xyz; - v_normal = mul(u_model[0], vec4(normalize(normal), 0.0) ).xyz; + v_normal = mul(model, vec4(normalize(normal), 0.0) ).xyz; } diff --git a/Assets/Shaders/Picking/picking_id.frag b/Assets/Shaders/Picking/picking_id.frag index 689d48d1..f0acd3fc 100644 --- a/Assets/Shaders/Picking/picking_id.frag +++ b/Assets/Shaders/Picking/picking_id.frag @@ -5,7 +5,7 @@ $input v_pos, v_view, v_normal, v_color0 * License: https://github.com/bkaradzic/bgfx/blob/master/LICENSE */ -#include "../common.sh" +#include "../Common.sh" uniform vec4 u_id; diff --git a/Assets/Shaders/Picking/picking_shaded.frag b/Assets/Shaders/Picking/picking_shaded.frag index d55e008e..41a65c6f 100644 --- a/Assets/Shaders/Picking/picking_shaded.frag +++ b/Assets/Shaders/Picking/picking_shaded.frag @@ -5,7 +5,7 @@ $input v_pos, v_view, v_normal, v_color0 * License: https://github.com/bkaradzic/bgfx/blob/master/LICENSE */ -#include "../common.sh" +#include "../Common.sh" vec2 blinn(vec3 _lightDir, vec3 _normal, vec3 _viewDir) { diff --git a/Assets/Shaders/Picking/picking_shaded.vert b/Assets/Shaders/Picking/picking_shaded.vert index 84d927ec..2738a980 100644 --- a/Assets/Shaders/Picking/picking_shaded.vert +++ b/Assets/Shaders/Picking/picking_shaded.vert @@ -6,7 +6,7 @@ $output v_pos, v_view, v_normal, v_color0 * License: https://github.com/bkaradzic/bgfx/blob/master/LICENSE */ -#include "../common.sh" +#include "../Common.sh" uniform vec4 u_tint; diff --git a/Assets/Shaders/UI.frag b/Assets/Shaders/UI.frag index 245600c4..182b001d 100644 --- a/Assets/Shaders/UI.frag +++ b/Assets/Shaders/UI.frag @@ -8,6 +8,7 @@ void main() { vec4 src = toLinear(texture2D(s_texUI, v_texcoord0)); - vec3 finalColor = pow(src, 1.0 / 2.2); + float gamma = 1.0 / 2.2; + vec3 finalColor = pow(src.rgb, vec3(gamma, gamma, gamma)); gl_FragColor = vec4(finalColor.x, finalColor.y, finalColor.z, src.a); } \ No newline at end of file diff --git a/Docs/Architecture.md b/Docs/Architecture.md new file mode 100644 index 00000000..b92102e5 --- /dev/null +++ b/Docs/Architecture.md @@ -0,0 +1,195 @@ +# Architecture + +MitchEngine is a C++20 game engine organized as a small set of static-library modules around an ECS runtime. A singleton `Engine` owns the window, renderer, job system, and `World`; games subclass `Game` and are wired in with the `ME_APPLICATION_MAIN` macro. This doc covers the module layout, the engine lifecycle (init → frame loop → shutdown), the split between engine-owned and scene-loaded cores, and the compile-time feature-flag system that gates everything else. + +> Verified against engine commit 047f57b8, 2026-07-10. + +## Overview + +The engine proper lives in `Source/` and links against two foundational modules: **Dementia** (`Modules/Dementia/` — utilities: feature flags, logging, job systems, events, resource cache, file/path) and **Moonlight** (`Modules/Moonlight/` — the BGFX renderer). The **Havana** editor (`Modules/Havana/`) wraps the engine in an editor application; **ScriptCore** (`Modules/ScriptCore/`) is the C# half of the scripting system; **ImGUI** (`Modules/ImGUI/`) and **Tool** (`Modules/Tool/`) support editor/tool builds. Third-party code lives in `ThirdParty/`; prebuilt tool binaries (e.g. `shaderc`) in `Tools/`. + +Everything runs on one main thread except explicitly parallelized work dispatched through `SimpleJobSystem` (see `Docs/Jobs-and-Events.md`). There is no fixed timestep: the loop runs as fast as vsync/OS allows and passes the raw frame delta to updates. + +## Key Files + +| Path | Role | +|------|------| +| `Source/Engine/Engine.h` / `Source/Engine/Engine.cpp` | The `Engine` singleton: init, frame loop, scene loading, subsystem ownership | +| `Source/Game.h` | Abstract `Game` interface + `ME_APPLICATION_MAIN` entry-point macros (UWP and desktop variants) | +| `Source/Engine/World.h` / `Source/Engine/World.cpp` | ECS world — entities, cores, `Simulate()` (details in `Docs/ECS.md`) | +| `Source/Engine/Clock.h` | Frame clock (float seconds; `Update()` computes delta) | +| `Modules/Dementia/Source/Dementia.h` | Feature-flag definitions (`USING`, `IN_USE`, `USE_IF`) | +| `Source/Config/EngineConfig.h` | Window size/position/title persistence (`Assets\Config\Engine.cfg`) | +| `Source/Engine/Input.h` | Input state (two instances in editor builds — game + editor) | + +## How It Works + +### Module dependency graph + +```mermaid +flowchart TD + subgraph ThirdParty + BGFX[bgfx / bimg / bx] + SDL2[SDL2] + Bullet[Bullet3D] + FMOD[FMOD] + UL[Ultralight] + Assimp[Assimp] + end + Dementia["Dementia
(flags, jobs, events, resources, log)"] + Moonlight["Moonlight
(BGFX renderer)"] + EngineSrc["MitchEngine (Source/)
(ECS, cores, components, scripting C++)"] + ImGuiMod["ImGUI module"] + Havana["Havana (editor)"] + ScriptCore["ScriptCore (C#)"] + GameProj["Game project
(e.g. Drumsmith)"] + + Moonlight --> Dementia + Moonlight --> BGFX + EngineSrc --> Dementia + EngineSrc --> Moonlight + EngineSrc --> SDL2 + EngineSrc -.optional.-> Bullet + EngineSrc -.optional.-> FMOD + EngineSrc -.optional.-> UL + EngineSrc -.optional.-> Assimp + Havana --> EngineSrc + Havana --> ImGuiMod + EngineSrc -.ME_SCRIPTING.-> ScriptCore + GameProj --> EngineSrc + GameProj -.editor builds.-> Havana +``` + +The dotted edges are compile-time optional — each is gated by a feature flag that the build system only defines when the corresponding `ThirdParty/` directory exists (see `Docs/Build-System.md`). + +### Application bootstrap + +Games implement the pure-virtual `Game` interface (`Source/Game.h`): `OnInitialize`, `OnStart`, `OnUpdate(const UpdateContext&)`, `OnEnd`, `PreRender`, `PostRender`. `ME_APPLICATION_MAIN(className)` generates `main()`, constructs the game, and calls `GetEngine().Init(&app)` then `GetEngine().Run()`. There are **two variants** of the macro: the UWP one wraps everything in `WinMain` + `SDL_WinRTRunApp` + `Windows::Foundation::Initialize`; the desktop one is a plain `main`. The Havana editor is itself a `Game` subclass (`EditorApp`) using the same entry point. + +### `Engine::Init` sequence + +1. `CLog` set up — log file `Engine.txt`, verbosity `Info`. +2. **Editor-only config bootstrap quirk**: if running from the engine directory, `Assets\Config\Engine.cfg` is copied into the game project's config path if missing (directory creation is Win64-only). +3. `EngineConfig` loads window title/size/position from `Assets\Config\Engine.cfg` (note the hardcoded backslash-relative path handed to `Path`). +4. `SDLWindow` is created on **all** platforms — including UWP, where the dedicated `UWPWindow` implementation is commented out. The window gets a `ResizeFunc` lambda that forwards resizes to the renderer, `UICore`, config, and a `WindowResizedEvent`. +5. `BGFXRenderer::Create` — on Linux the SDL display pointer and window type (X11/Wayland) are passed through. +6. ImGui SDL2 backend init, chosen per platform: D3D (Win64), Metal (macOS), Vulkan (Linux). +7. `World` is created, then the **five engine-owned cores** are `new`ed: `CameraCore`, `SceneCore`, `RenderCore`, `AudioCore`, `UICore` (held as raw public members `Cameras`, `SceneNodes`, `ModelRenderer`, `AudioThread`, `UI`). +8. A gizmo-draw callback is registered on the renderer that iterates every core's `OnDrawGuizmo`. +9. `Engine::InitGame` adds the five cores to the world via `World::AddCore` and calls `Game::OnInitialize()`. (It also unconditionally logs the error-level marker `YIKES("Engine::InitGame")` — a leftover.) +10. `ResizeFunc` is fired once manually, and `SystemRegistry` registers `Engine`, the renderer, and the `SimpleJobSystem` so they are reachable through `UpdateContext`. + +### Engine-owned vs scene-loaded cores + +This is a load-bearing architectural split: + +- **Engine-owned cores** (`CameraCore`, `SceneCore`, `RenderCore`, `AudioCore`, `UICore`) are created in `Engine::Init`, held as raw pointers on `Engine`, and updated **explicitly by name** in the frame loop. +- **Scene-loaded cores** (`PhysicsCore`, `ScriptCore`, and any game-defined cores) are *not* created by the engine. They are instantiated by name from the `"Cores"` array of a `.lvl` scene file (see `Docs/Serialization-and-Scenes.md`) and live in `World::m_loadedCores`, updated via `World::UpdateLoadedCores` / `LateUpdateLoadedCores`. + +Consequences: physics only exists if the scene declares it; core update order is partly hardcoded (engine cores) and partly map-ordered (loaded cores); and the frame-loop comment `// TODO: This is wrong?? There's more than just physics in loaded cores...` in `Engine::Run` reflects that the loaded-core update block is profiled under the label "Physics" even though it updates every loaded core. + +### The frame loop (`Engine::Run`) + +```mermaid +flowchart TD + A["GameWindow->ParseMessageQueue()"] --> B{"ShouldClose()?"} + B -- yes --> Z["StopGame() → Game::OnEnd, break"] + B -- no --> C["EventManager::FirePendingEvents()"] + C --> D["Clock update: AccumulatedTime += delta"] + D --> E["Input::Update (+ EditorInput in editor)"] + E --> F["ImGui NewFrame + Renderer::BeginFrame
(mouse state, picking request)"] + F --> G["World::Simulate()
(entity ↔ core matching)"] + G --> H["Fire PickingEvent if renderer
returned a picked entity"] + H --> I["World::UpdateLoadedCores()
(Physics, Script, game cores)"] + I --> J["SceneNodes->Update()"] + J --> K["Game::OnUpdate()"] + K --> L["AudioThread->Update(dt)"] + L --> M["ModelRenderer->Update()
(parallel mesh job)"] + M --> N["UI->OnResize + UI->Update()"] + N --> O + subgraph O["Late update block"] + O1["World::LateUpdateLoadedCores()"] --> O2["Cameras->Update() ← CameraCore's ONLY update"] + O2 --> O3["SceneNodes->LateUpdate() → Cameras->LateUpdate()"] + O3 --> O4["AudioThread->LateUpdate() → ModelRenderer->LateUpdate() → UI->LateUpdate()"] + end + O --> P + subgraph P["Render block"] + P1["Game::PreRender()"] --> P2["UI->Render()"] + P2 --> P3["NewRenderer->Render(EditorCamera, frameSettings)"] + P3 --> P4["UI->PostRender() → Game::PostRender()"] + end + P --> Q["AccumulatedTime = 0
Input::PostUpdate"] + Q --> R["ResourceCache::Dump()"] + R --> A +``` + +Timing details worth knowing: + +- `DeltaTime` for the frame is `AccumulatedTime` (the clock delta accumulated since last frame). There is a commented-out `//if (AccumulatedTime >= MaxDeltaTime)` gate and an `AccumulatedTime = std::fmod(AccumulatedTime, MaxDeltaTime)` line whose result is immediately overwritten by `AccumulatedTime = 0` — remnants of an abandoned fixed-timestep design. `Engine::FPS` (144) only feeds the dead `MaxDeltaTime` math. +- `CameraCore` (`Cameras`) has **no early update** — its `Update` is called inside the late-update block, after game logic. Anything that moves a camera during `OnUpdate` is picked up the same frame; anything reading camera matrices during `OnUpdate` sees last frame's. +- In non-editor builds, `EditorCamera.OutputSize` is refreshed from the window each frame inside the render block — the member named "EditorCamera" is used as the backbuffer camera descriptor in game builds too. + +### Scene loading + +`Engine` subscribes to `LoadSceneEvent` (and `WindowMovedEvent`) in its constructor. `Engine::LoadScene`: + +1. `Cameras->Init()` — resets camera core state. +2. `CurrentScene->UnLoad()` + `delete CurrentScene` (raw pointer). +3. `World::Unload()` — destroys `DestroyOnLoad` entities/cores. +4. `SceneNodes->Init()`, then `new Scene(file)` + `Scene::Load(world)` (assert on failure unless it's a new empty scene). +5. `ScriptEngine::SetWorld` (scripting builds). +6. `GameWorld->AddCore(*UI)` — UICore is **re-added after every scene load** (the unload removes it from the world's map). +7. `World::Simulate()`, then `SceneLoadedEvent` fires. +8. **Non-editor builds only**: a second `Simulate()` plus `World::Start()` — in the editor, Start happens when the user presses Play (see `Docs/Editor-Havana.md`). + +### Shutdown + +Window close → `StopGame()` (which only calls `Game::OnEnd()`) → loop break → `engineConfig.Save()`. That is the entire teardown: `~Engine` is empty, and the `new`ed subsystems (`GameWindow`, `NewRenderer`, the five cores) are never deleted — process exit is the cleanup. Don't add shutdown-order-dependent logic to core destructors and expect it to run. + +### Feature flags (`Modules/Dementia/Source/Dementia.h`) + +The current implementation is simple value macros — `IN_USE` = `1`, `NOT_IN_USE` = `0`, `USING(x)` = `(x)`, `USE_IF(x)` = `((x) ? 1 : 0)`. (Older docs describe a `(1 1)` preprocessor-arithmetic trick; that scheme is gone.) The convention still stands: **always test with `#if USING( ME_FLAG )`**, never `#ifdef`, so composite `USE_IF` expressions keep working. + +Flags are driven by `DEFINE_ME_*` preprocessor defines that Sharpmake sets per target (see `Docs/Build-System.md`): + +| Flag | Meaning / derivation | +|------|----------------------| +| `ME_PLATFORM_WIN64` / `ME_PLATFORM_UWP` / `ME_PLATFORM_MACOS` / `ME_PLATFORM_LINUX` | Target platform | +| `ME_PLATFORM_WINDOWS` | `WIN64 \|\| UWP` | +| `ME_DEBUG` | From `_DEBUG` (not a `DEFINE_ME_*`) | +| `ME_RELEASE` / `ME_RETAIL` | Build config | +| `ME_EDITOR` | Havana editor build | +| `ME_TOOLS` | Effectively always on when `DEFINE_ME_TOOLS` is defined (`USE_IF(EDITOR \|\| IN_USE)`), else only with editor | +| `ME_GAME_TOOLS` | `TOOLS && !EDITOR` — debug tooling in game builds | +| `ME_FMOD` | `DEFINE_ME_FMOD && !HEADLESS` | +| `ME_DOTNET` → `ME_SCRIPTING` | .NET scripting chain | +| `ME_ULTRALIGHT` → `ME_UI` | `ULTRALIGHT && !HEADLESS` | +| `ME_OPTICK` | **Value-checked** (`#if DEFINE_ME_OPTICK`), unlike every other flag which is presence-checked — `DEFINE_ME_OPTICK` must be defined *to a value* | +| `ME_PROFILING` | `DEBUG \|\| RELEASE` (i.e. not RETAIL) | +| `ME_IMGUI` | `EDITOR \|\| TOOLS \|\| PROFILING` | +| `ME_BASIC_PROFILER` | `IMGUI && PROFILING` | +| `ME_HEADLESS` | No window/rendering | +| `ME_ENABLE_RENDERDOC` | RenderDoc integration | +| `ME_EDITOR_WIN64` / `ME_EDITOR_MACOS` | Editor + platform composites | + +## Caveats & Fragility + +- **No teardown.** Nothing owned by `Engine` is destroyed on exit; `Engine::IsRunning()` is hardcoded to return `true`. RAII in cores/components must not depend on engine-driven destruction order. +- **Two core-update paths.** Engine-owned cores are updated by explicit member calls in a hardcoded order; scene-loaded cores through `UpdateLoadedCores` in map order. Adding an engine-level core means editing the frame loop by hand. +- **`YIKES("Engine::InitGame")`** logs an error-level line on every boot — noise, not an actual error. +- **Fixed-timestep remnants.** `FPS`, `MaxDeltaTime`, the commented gate, and the dead `fmod` suggest frame-rate independence that does not exist; all updates get the raw variable delta. +- **`UICore` is re-added on every scene load** in `Engine::LoadScene`; if you add another engine-owned core that must survive scene loads, it needs the same treatment (or `DestroyOnLoad = false`). +- **Non-editor scene load runs `Simulate()` twice** (once unconditionally, once in the non-editor block) — harmless today but easy to trip over when reasoning about `OnEntityAdded` timing. +- **`Camera::CurrentCamera` static global** is consulted by the resize path and UI sizing every frame; a scene without a main camera skips UI resize silently. +- **Window/UI resize flows through a lambda captured in `Engine::Init`** (`ResizeFunc`) — it fires a `WindowResizedEvent` *and* directly pokes the renderer, UI, and config; resize behavior is split between that lambda and event receivers. +- **`Assets\Config\Engine.cfg`** path is written with backslashes and relies on `Path` normalization; the editor-only first-run copy creates directories on Win64 only. +- The frame-loop label **"Physics" on the loaded-core update block is a lie** — it updates *all* loaded cores (the in-code TODO acknowledges this). + +## Related Docs + +- `Docs/ECS.md` — what `World::Simulate` actually does; core/component machinery +- `Docs/Jobs-and-Events.md` — `SimpleJobSystem`, `EventManager`, threading rules +- `Docs/Rendering-Pipeline.md` — what happens inside `NewRenderer->Render` +- `Docs/Serialization-and-Scenes.md` — `.lvl` files, the `"Cores"` array, prefabs +- `Docs/Build-System.md` — how `DEFINE_ME_*` flags get set per target +- `Docs/State-of-the-Engine.md` — assessment and improvement priorities diff --git a/Docs/Build-System.md b/Docs/Build-System.md new file mode 100644 index 00000000..0dd8fa8c --- /dev/null +++ b/Docs/Build-System.md @@ -0,0 +1,112 @@ +# Build System + +Builds are generated by **Sharpmake** (C# build-description, vendored at `Tools/Sharpmake/`): the game repo's `Game.sharpmake.cs` includes `Engine.sharpmake.cs`, and generation scripts produce Visual Studio solutions, Xcode projects, or GNU makefiles. The signature behavior to understand: **feature flags are set by directory existence** — if a ThirdParty SDK folder is present at generation time, the feature compiles in; if not, it silently compiles out. This doc maps the project graph, the target matrix, the define conditions, and the Linux/Nix dev shell. + +> Verified against engine commit 047f57b8 (+ Linux CI/packaging changes), 2026-07-11. + +## Overview + +Nothing is built without regenerating projects first — adding files, changing defines, or installing an SDK all require re-running the generation script. Generated artifacts (`.sln`, `.vcxproj`, `.make`, `Makefile`, `compile_commands.json`) are gitignored and must never be committed. + +## Key Files + +| Path | Role | +|------|------| +| `Engine.sharpmake.cs` | `Globals` (all SDK paths + `RootDir`), `BaseProject`, `Engine`, `EntryPointGameProject` (+UWP), solution bases | +| `Tools/CommonTarget.sharpmake.cs` | The target matrix (platform × mode × optimization) | +| `Tools/BaseProject.sharpmake.cs` | Per-platform/per-config define + lib wiring (the "why is my feature off" file) | +| `Tools/BaseTool.sharpmake.cs`, `Tools/SharpmakeProject.sharpmake.cs` | Tool-app + sharpmake-project bases | +| `Modules/ScriptCore/ScriptCore.sharpmake.cs` | The C# script assembly (net8.0) | +| `../Game.sharpmake.cs` (game repo) | `SharpGameProject` (game lib), `UserGameScript`, solution — includes the engine file | +| `../Project/GenerateSolution.sh` / `.bat` / `.command` (game repo) | Generation entry points | +| `ThirdParty/GenerateSolutions.sh` / `.bat` / `.command` | One-time third-party project generation (`.sh`: cmake configure only; `--build-bgfx` rebuilds the bgfx archives) | +| `../flake.nix` (game repo; template ships it via `Tools/ProjectTemplate/flake.nix`) | Linux dev shell (all native deps + .NET + env exports) | +| `Tools/NewProjectSetup.sh` / `.bat` / `.command` | New-project bootstrap (clone engine, copy template, generate); `.sh` wraps generation in `nix develop` when nix is present | +| `Tools/PackageLinuxBuild.sh` | Packages a `.build/` folder into a relocatable tar.gz (bundled libs + `run.sh` launcher) | +| `.github/workflows/Linux.yml` (+ `Windows.yml`, `macOS.yml`, `UWP.yml`) | CI: sets up an `EmptyProject` from the template and builds Editor/Game × Debug/Release; Linux builds inside the template's nix dev shell and uploads tar.gz artifacts | + +## How It Works + +### Project graph + +```mermaid +flowchart TD + subgraph Bases + BP["BaseProject (abstract)
defines, per-platform libs"] + end + D["Dementia (Modules/Dementia)"] --> E + ML["Moonlight (Modules/Moonlight)"] --> E + IM["ImGUI module"] --> H + E["Engine (Source/)"] --> H["Havana (editor exe)"] + E --> GL["SharpGameProject
(game lib, game repo)"] + GL --> EP["EntryPointGameProject
Game_EntryPoint exe (+UWP variant)"] + SC["ScriptCore (C# net8.0)"] -.script assembly.-> EP + UGS["UserGameScript (C#)
→ Game.Script.dll"] -.-> EP + BT["BaseTool"] --> SE2["ShaderEditor / HUB apps"] + BP --- E +``` + +Outputs land in `.build/[target.Name]/` at the game-repo root (e.g. `.build/Editor_Debug/Havana`, `.build/Game_linux_Debug/Game_EntryPoint_x64`). Post-build steps copy runtime DLLs (FMOD, Ultralight, nethost, Optick) from `ThirdParty` locations into the output dir. + +### Target matrix (`CommonTarget`) + +- **Platforms**: `win64`, `uwp`, `mac`, `linux` +- **Mode fragment**: `Game` and `Editor` (editor targets add `DEFINE_ME_EDITOR` + `DEFINE_ME_TOOLS`) +- **Optimization**: `Debug`, `Release`, `Retail` — third-party libs map Retail→Release (`GetThirdPartyOptimization`) + +Linux makefile config names follow `__` lowercased, e.g. `make -f Drumsmith.make Havana config=editor_debug`, `Game_EntryPoint config=game_linux_debug`. + +### The define conditions — "why is my feature compiled out" + +From `Tools/BaseProject.sharpmake.cs` (+ `Engine.sharpmake.cs` `Globals`): + +| Define | Condition | +|--------|-----------| +| `DEFINE_ME_PLATFORM_*` | The target platform, always | +| `DEFINE_ME_EDITOR` + `DEFINE_ME_TOOLS` | Editor-mode targets | +| `DEFINE_ME_DEBUG` + `DEFINE_ME_TOOLS` | Debug optimization (tools ride along in debug game builds) | +| `DEFINE_ME_ULTRALIGHT` | `Globals.IsUltralightEnabled` (checks `ThirdParty/UltralightSDK` presence) | +| `DEFINE_ME_FMOD` | `Globals.FMOD__Dir` exists (Win64/UWP: installed SDK path; Linux: SDK dir with `api/core/lib/x86_64`) | +| `DEFINE_ME_DOTNET` | `Globals.DOTNET_Win64_Dir` (Win64/UWP) or `Globals.DOTNET_Linux_Dir` (Linux) exists — **no macOS path** | +| `DEFINE_ME_OPTICK` | Win64 (per-optimization lib copy from `ThirdParty/Lib/Optick/Win64/…`) | +| `DEFINE_ME_RENDERDOC` | RenderDoc integration available | + +Because these are **generation-time filesystem checks**, two machines with different SDKs silently produce different feature sets from identical source. When a feature "doesn't work", check the generation log/defines before debugging code. `Globals.MONO_*_Dir` checks still exist but define nothing — Mono leftovers (with `ThirdParty/Mono.sharpmake.cs` fully vestigial). + +### Generating and building + +1. **Once**: run `ThirdParty/GenerateSolutions.sh` (or `.bat`/`.command`) to generate third-party projects. On Linux this is cmake-configure only (produces `assimp/config.h` etc.); the engine links the prebuilt archives committed under `ThirdParty/Lib/*/linux/{Debug,Release}`. `GenerateSolutions.sh --build-bgfx` rebuilds the bgfx toolchain/archives from source when refreshing `ThirdParty/Lib/BGFX/linux`. +2. **Per change**: run the game repo's `Project/GenerateSolution.sh` (Linux — also runs `bear -- make …` to produce `compile_commands.json` for clangd/CLion), `.bat` (Windows → `.sln`), or `.command` (macOS → Xcode). All three invoke `dotnet Engine/Tools/Sharpmake/Sharpmake.Application.dll /sources('../Game.sharpmake.cs')`. +3. Build in the IDE, or on Linux: `make -f .make config= -j$(nproc)`. + +### ThirdParty inventory + +`ThirdParty/`: `Assimp`, `bgfx` + `bimg` + `bx`, `Bullet`, `FMOD`, `glm`, `ImGui`, `JSON` (nlohmann), `Optick`, `RenderDoc`, `SDL`, `UltralightSDK`, `ChromeTrace`, plus prebuilt outputs under `ThirdParty/Lib/` and runtime binaries under `ThirdParty/Bin/`. Some are source-built (Bullet, bgfx family), some prebuilt SDK drops (FMOD, Ultralight, Optick libs). + +### Tools (`Tools/` at engine root) + +Prebuilt per-platform binaries in `Tools/Win64|macOS|linux/` (**`shaderc`**, `texturec` — used by the asset cook, `Docs/Resources-and-Assets.md`), the vendored **Sharpmake** application, **Optick.exe** (profiler viewer), and standalone tool apps: **ShaderEditor** (node-graph shader authoring feeding `ShaderGraphMaterial`) and **HUB** (MitchHub project launcher), plus `ProjectTemplate`/`NewProjectSetup` scripts for spinning up new game projects. + +### The Linux/Nix dev shell (game repo `../flake.nix`; template copy in `Tools/ProjectTemplate/flake.nix`) + +New projects get a flake (+ lock) from the template — same shell minus the game-specific extras (e.g. Drumsmith's nodejs for the Vue UI). CI (`Linux.yml`) runs generation and make through `nix develop` on this flake. + +`nix develop` provides: gcc/cmake toolchain, SDL, `mesa`/`libglvnd`/`vulkan-loader`, Wayland + the X11 header set, `alsa-lib`, `curl`, `bzip2`, **dotnet-sdk_8** (exports `DOTNET_ROOT`, discovers `DOTNET_LINUX_NATIVE_DIR` by `find`-ing the host pack), `fontconfig` + **gtk3/glib** (Ultralight's runtime deps), and **nodejs_20 + python3 — flagged in-file for the Vue HTML/JS UI**, i.e. the Ultralight replacement direction (`Docs/UI-Ultralight-and-ImGui.md`). The shellHook also sets `LD_LIBRARY_PATH` so bgfx can `dlopen` `libEGL` and Ultralight finds GTK. + +## Caveats & Fragility + +- **Silent feature variance**: directory-existence defines mean a fresh clone without SDKs builds a quietly reduced engine (no FMOD, no scripting, no Ultralight). There's no generation-time report of what got enabled; grep the generated project files for `DEFINE_ME_` to audit. +- **Regeneration is mandatory** after adding/removing source files or SDKs — stale projects fail in confusing ways (missing defines rather than missing files). +- **Prebuilt `ThirdParty/Lib` archives can drift from submodule headers**: the Linux BGFX *Release* archives sat stale for a long time (undefined `bgfx::setViewName`/`createTexture2D` at link) while Debug was current. If a `*_release` config fails with undefined bgfx symbols, refresh via `GenerateSolutions.sh --build-bgfx` and copy the `.a` files from `bgfx/.build/linux64_gcc/bin` into `Lib/BGFX/linux/Release` (only the already-tracked set — the shaderc-only deps like `spirv-opt`/`tint-*` are ~700MB and stay uncommitted). +- **Hardcoded SDK paths on Windows** (e.g. FMOD under Program Files, the .NET host pack version in `Globals.DOTNET_Win64_Dir`) — version bumps of installed SDKs require editing `Engine.sharpmake.cs`. +- **macOS scripting is unwired** (no `DEFINE_ME_DOTNET` path) and Optick is Win64-only — platform feature parity is uneven by construction (see the matrix in `Docs/State-of-the-Engine.md`). +- **The dev shell is load-bearing on Linux**: outside `nix develop`, the .NET native dir, GTK stack, and EGL paths must be assembled by hand. +- **`ScriptCore`/`UserGameScript` sharpmake configs are near-duplicates** (in-code TODO: factor a common base "when there's a third one"). +- **Retail builds still define `ME_TOOLS` in debug**-adjacent paths — the `Debug ⇒ DEFINE_ME_TOOLS` coupling means "game debug" builds carry tool code; only Retail is clean. + +## Related Docs + +- `Docs/Architecture.md` — the feature-flag system these defines feed +- `Docs/Scripting-DotNet.md` — the .NET host dirs in detail +- `Docs/Resources-and-Assets.md` / `Docs/Materials-and-Shaders.md` — the cook tools shipped in `Tools/` +- `Docs/State-of-the-Engine.md` — platform matrix and debt items diff --git a/Docs/Cores-and-Components-Reference.md b/Docs/Cores-and-Components-Reference.md new file mode 100644 index 00000000..e940b346 --- /dev/null +++ b/Docs/Cores-and-Components-Reference.md @@ -0,0 +1,104 @@ +# Cores and Components Reference + +The catalog: every core (system) and component the engine ships, what each core filters on, when it updates, and which components are decorative or orphaned. Deep-dives for Physics (Bullet3D) and Audio (FMOD) live here; Rendering, UI, and Scripting cores have their own docs. + +> Verified against engine commit 047f57b8, 2026-07-10. + +## Overview + +Cores come in two flavors (see `Docs/Architecture.md`): **engine-owned** (created in `Engine::Init`, ticked explicitly by the frame loop) and **scene-loaded** (declared in a `.lvl` file's `"Cores"` array, ticked via `World::UpdateLoadedCores` — *only while the world is started*, i.e. Play mode or game builds). Filters use the DSL from `Docs/ECS.md`. + +## Cores + +| Core | Filter | Flavor | One-liner | +|------|--------|--------|-----------| +| `SceneCore` (`Source/Cores/SceneCore.h`) | `Transform` | engine-owned | Owns the root transform entity and the scene hierarchy | +| `CameraCore` (`Source/Cores/Cameras/CameraCore.h`) | `Camera` + `Transform` | engine-owned | Builds `Moonlight::CameraData` commands; manages `Camera::CurrentCamera` | +| `RenderCore` (`Source/Cores/Rendering/RenderCore.h`) | `Transform` + `Mesh` | engine-owned | Parallel cull + `MeshCommand` fill — see `Docs/Rendering-Pipeline.md` | +| `AudioCore` (`Source/Cores/AudioCore.h`) | `AudioSource` | engine-owned | FMOD playback + path-keyed sound cache | +| `UICore` (`Source/Cores/UI/UICore.h`) | `BasicUIView` | engine-owned | Ultralight HTML views — see `Docs/UI-Ultralight-and-ImGui.md` | +| `PhysicsCore` (`Source/Cores/PhysicsCore.h`) | `Transform` + one of (`Rigidbody`, `CharacterController`) | scene-loaded | Bullet3D world, transform sync, collision events, raycasts | +| `ScriptCore` (`Source/Cores/Scripting/ScriptCore.h`) | `ScriptComponent` | scene-loaded | .NET script lifecycle — see `Docs/Scripting-DotNet.md` | +| `SelfDestructor` (`Source/Cores/Utility/SelfDestructCore.h`) | `SelfDestruct` | scene-loaded | Kills entities when their `Lifetime` expires (note the class name — not "SelfDestructCore") | +| `FlyingCameraCore` (`Source/Cores/Cameras/FlyingCameraCore.h`) | `FlyingCamera` + `Camera` | scene-loaded/editor | WASD+mouse free-fly camera control | +| `EditorCore` (`Modules/Havana/Source/Cores/EditorCore.h`) | — | editor-only | Selection/gizmo state — see `Docs/Editor-Havana.md` | + +### Update phases at a glance + +```mermaid +flowchart TD + A["World::Simulate
(membership churn — ALWAYS runs, even edit mode)"] --> B["UpdateLoadedCores
PhysicsCore · ScriptCore · SelfDestructor · game cores
(gated by World::Start — dormant in edit mode)"] + B --> C["SceneNodes->Update → Game::OnUpdate"] + C --> D["AudioThread->Update(dt) — nonstandard float overload"] + D --> E["ModelRenderer->Update — parallel mesh job"] + E --> F["UI->Update"] + F --> G["LateUpdate block:
LateUpdateLoadedCores → Cameras->Update →
SceneNodes/Cameras/Audio/ModelRenderer/UI LateUpdate"] +``` + +`CameraCore::Update` runs **only inside the LateUpdate block** — camera moves made in `Game::OnUpdate`/scripts apply the same frame; camera *reads* during update see last frame's matrices. + +### PhysicsCore (Bullet3D) — deep dive + +- The Bullet world (`btDiscreteDynamicsWorld` + default dispatcher/broadphase/solver) is built in the **constructor**, not `Init` (which is empty); gravity is hardcoded `(0, -9.8, 0)` at construction. Compiled out entirely without `ME_PHYSICS_3D`. +- `Update`: `PhysicsWorld->stepSimulation( deltaTime, 10 )` — **variable timestep** (in-code comment: "Need a fixed delta probably"); Bullet's internal substepping (max 10) is the only mitigation. +- After stepping, a serial loop (chunked by `Burst::GenerateChunks(size, 11, …)` but the job dispatch is commented out — it runs inline) syncs per entity: + - **Dynamic `Rigidbody`** → Bullet transform is written back to the `Transform` via `SetPosition` + `SetRotation(eulerZYX→degrees)` — every dynamic body dirties its transform subtree every frame, and rotation round-trips through Euler angles. + - **`CharacterController`** → transform rotation is pushed *into* Bullet, `Controller.Update()` runs, then position is pulled back via `SetWorldPosition`. +- `InitRigidbody` is called for every rigidbody **every frame** (lazy-init guard inside). +- Collision events: `PhysicsCore` implements `ICollisionEvents` (`Source/Physics/RigidBodyWithCollisionEvents.h`) — `OnCollisionStart/Continue/Stop` with contact point/normal/impulse, wired through a custom `btRigidBodyWithEvents` and forwarded to the involved `Rigidbody` components. +- `Raycast(position, direction, RaycastHit&)` wraps Bullet's closest-hit ray test (`Source/Physics/RaycastHit.h`). + +### AudioCore (FMOD) — deep dive + +- Gated by `ME_FMOD` (which requires the FMOD SDK present at build time *and* not headless — see `Docs/Build-System.md`). +- **Signature quirk:** `AudioCore::Update(float dt)` is an *overload*, not an override of `BaseCore::Update(const UpdateContext&)` — the engine calls it explicitly (`AudioThread->Update(deltaTime)`). Code iterating cores generically never updates audio. +- Maintains `m_cachedSounds` — a path-keyed map of `SharedPtr` used to preload/reuse sounds; also an `EventReceiver` for `PlayAudioEvent`/`StopAudioEvent` (`Source/Events/AudioEvents.h`), so gameplay can fire-and-forget audio without holding components. +- `OnStart`/`OnStop` manage the FMOD system lifecycle with the world's start/stop. + +## Components + +| Component | File | Purpose | +|-----------|------|---------| +| `Transform` | `Source/Components/Transform.h` | Hierarchy node: position/rotation/scale, parent/children (`SharedPtr` links), name. Dirty-flag cached matrices — see below | +| `Camera` | `Source/Components/Camera.h` | Projection (perspective/ortho), FOV, near/far, clear type (color/skybox/procedural), main-camera flag; statics `Camera::CurrentCamera` / `Camera::EditorCamera` | +| `Mesh` | `Source/Components/Graphics/Mesh.h` | One renderable mesh: `MeshData*`, per-instance material, renderer cache slot `Id` | +| `Model` | `Source/Components/Graphics/Model.h` | Assimp model reference; `Init()` **expands the model's node tree into real child entities** with `Transform` + `Mesh` components | +| `Light` / `DirectionalLight` | `Source/Components/Lighting/Light.h`, `Source/Components/Lighting/DirectionalLight.h` | **Decorative** — no core or renderer path consumes them (see `Docs/Rendering-Pipeline.md`) | +| `Rigidbody` | `Source/Components/Physics/Rigidbody.h` | Bullet body (box/sphere collider shapes), mass/velocity, per-body collision-event hookups | +| `CharacterController` | `Source/Components/Physics/CharacterController.h` | Kinematic capsule driven by `PhysicsCore` (rotation in, position out) | +| `Collider2D` | `Source/Components/Physics/Collider2D.h` | **Orphaned** — no core filters it; physics is 3D-only | +| `AudioSource` | `Source/Components/Audio/AudioSource.h` | FMOD channel wrapper: path, preload/loop flags, play/stop; also declares the `wav`/`mp3` metadata types | +| `ScriptComponent` | `Source/Components/Scripting/ScriptComponent.h` | Script by type name + `m_dotnetHandle` (int) + saved-fields JSON | +| `BasicUIView` | `Source/Components/UI/BasicUIView.h` | Ultralight HTML view + JS bridge | +| `Canvas` | `Source/Components/UI/Canvas.h` | **Empty file** — placeholder | +| `FlyingCamera` | `Source/Components/Cameras/FlyingCamera.h` | Free-fly parameters (speed etc.) for `FlyingCameraCore` | +| `DebugCube` | `Source/Components/Debug/DebugCube.h` | Debug visualization cube | +| `SelfDestruct` | `Source/Cores/Utility/SelfDestructCore.h` | Lifetime in seconds; the core kills the entity when it expires (declared in the core's header, not `Source/Components/`) | + +### Transform dirty-flag semantics + +`Transform` tracks `IsLocalToWorldDirty` / `IsWorldToLocalDirty` separately. `SetDirty(true)`: + +- **early-outs if already dirty** (`if( Dirty && IsLocalToWorldDirty ) return;`) — repeated mutation of the same subtree costs one flag write, and +- **propagates eagerly to children** (recursive), so any descendant's cached matrix is invalidated immediately. + +Matrix recompute is **lazy** — `GetLocalToWorldMatrix()` rebuilds (parent-first) only when dirty. A static scene costs near-zero per frame; the expensive pattern is *wide* mutation (e.g. physics writing every dynamic body's transform each step — see above). World-space setters (`SetWorldPosition`) convert through the parent's `GetWorldToLocalMatrix`. + +## Caveats & Fragility + +- **Physics uses a variable timestep** — simulation behavior is frame-rate-dependent beyond what 10 Bullet substeps mask; the in-code TODO acknowledges it. +- **Rigidbody rotation syncs through Euler ZYX degrees** every frame — susceptible to gimbal/representation drift for bodies tumbling on multiple axes. +- **`AudioCore::Update(float)` doesn't override the base** — don't "fix" a missing update by adding AudioCore to a generic core loop; the engine's explicit call is the contract. +- **`Light`/`DirectionalLight` do nothing**; the only scene light is the procedural sky's sun. Don't debug "why isn't my light working" in components — the plumbing doesn't exist. +- **`Collider2D` and `Canvas` are dead weight** (orphaned / empty file). +- **`Model::Init` creates real entities** as children — deleting a Model component does not delete the entities it spawned, and re-`Init` is guarded only by an in-memory `IsInitialized` flag. +- **`Camera::CurrentCamera`/`EditorCamera` are mutable statics** used by resize, UI sizing, and picking; scenes without a main camera silently skip those paths. +- **Component headers pull editor includes**: several component headers include `imgui.h`/`HavanaUtils.h` unconditionally (e.g. `Source/Cores/Utility/SelfDestructCore.h`) — kept building by ImGui being present in most configs (`ME_IMGUI` covers editor, tools, and profiling builds). +- **`SelfDestructor` vs "SelfDestructCore"** naming mismatch — grep for the class, not the filename. + +## Related Docs + +- `Docs/ECS.md` — filter DSL, registration, core lifecycle hooks +- `Docs/Architecture.md` — which cores tick where in the frame +- `Docs/Rendering-Pipeline.md`, `Docs/UI-Ultralight-and-ImGui.md`, `Docs/Scripting-DotNet.md` — the specialized cores in depth +- `Docs/State-of-the-Engine.md` — verdicts on the orphaned pieces diff --git a/Docs/ECS.md b/Docs/ECS.md new file mode 100644 index 00000000..8604d984 --- /dev/null +++ b/Docs/ECS.md @@ -0,0 +1,200 @@ +# ECS + +MitchEngine's ECS is an **Entity–Component–Core** design: entities are generational IDs into pooled storage, components are heap-allocated data objects attached per entity, and *cores* are the systems — each declares a `ComponentFilter` and receives the entities that match it. `World` owns all of it and reconciles entity↔core membership in `Simulate()` once per frame. This doc covers the machinery and the recipes for adding components and cores. + +> Verified against engine commit 047f57b8, 2026-07-10. + +## Overview + +The design optimizes for authoring convenience, not data locality: components are `shared_ptr` stored per entity, and cores iterate `std::vector` membership lists, fetching components through virtual-free but pointer-chasing lookups. Type identity comes from `ClassTypeId` (a per-base-class monotonic counter), which means **type IDs are assigned in first-touch order and are not stable across runs or builds** — all serialization therefore goes through registry name strings, never type IDs. + +## Key Files + +| Path | Role | +|------|------| +| `Source/ECS/EntityID.h` | 64-bit ID: 48-bit index + 16-bit generation counter, packed by `Value()` | +| `Source/ECS/EntityIdPool.h` / `Source/ECS/EntityIdPool.cpp` | Free-list index recycling; bumps the counter on `Remove` | +| `Source/ECS/Entity.h` / `Source/ECS/Entity.cpp` | Entity value type (`World*` + ID); `AddComponent`, `AddComponentByName` | +| `Source/ECS/EntityHandle.h` | Safe reference: ID + `WeakPtr` | +| `Source/ECS/Component.h` | `BaseComponent` / `Component` CRTP, `ME_REGISTER_COMPONENT` | +| `Source/ECS/ComponentDetail.h` | Name-string → factory `ComponentRegistry` | +| `Source/ECS/ComponentStorage.h` | Per-entity `shared_ptr` array + component-type bitset | +| `Source/ECS/Core.h` / `Source/ECS/Core.cpp` | `BaseCore` / `Core`, `ME_REGISTER_CORE`, `CleanTypeName` demangling | +| `Source/ECS/CoreDetail.h` | Name-string → factory `CoreRegistry` | +| `Source/ECS/ComponentFilter.h` | Requires / RequiresOneOf / Excludes bitset filter | +| `Source/Engine/World.h` / `Source/Engine/World.cpp` | Entity lifecycle, core registry, `Simulate`, prefabs, unload | +| `Modules/Dementia/Source/ClassTypeId.h` | `TypeId` generation (static counter per base class) | + +## How It Works + +### Entity identity + +`EntityID` packs into a `uint64_t` via `Value()`: `(Counter & 0xFFFF) << 48 | (Index & 0xFFFFFFFFFFFF)`. The bit widths come from `MITCH_ENTITY_ID_INDEX_BIT_COUNT` (48) and `MITCH_ENTITY_ID_COUNTER_BIT_COUNT` (16), but the masks in `Value()` are hardcoded — change the macros and they silently drift. Beware a visual trap in the struct: `IntType Index { MITCH_ENTITY_ID_INDEX_BIT_COUNT };` *looks* like a bit-field declaration but is actually a brace default-initializer (value 48) that every constructor immediately overwrites — a fossil of an earlier bit-field layout. + +`EntityIdPool` hands out indices from a free list; `Remove` increments the slot's counter before returning the index to the free list, so a stale `EntityID` held after destruction no longer matches anything: `World::GetEntity`/`EntityExists` look up the **full** (index+counter) ID in the `Alive` map. `World` starts with a pool of 50 (`DEFAULT_ENTITY_POOL_SIZE`) and grows via `CheckForResize` on every `CreateEntity`. + +Prefer `EntityHandle` (ID + `WeakPtr`) over raw `Entity` for anything stored across frames — `Entity` is a bare `World*` + ID with no liveness check of its own. + +### Components + +Components subclass `Component` (CRTP) and pass their display/serialization name up as a string literal, e.g. `Transform() : Component("Transform")`. `BaseComponent`'s constructor strips everything before the first space (handles MSVC's `"class Foo"` `typeid` spelling; literals without spaces pass through). The serialization contract is `OnSerialize(json&)` / `OnDeserialize(const json&)` (private, called by the sealed `Serialize`/`Deserialize`), with `Init()` guaranteed to run **after** `OnDeserialize`. + +Storage (`ComponentStorage`) keeps, per entity index: a `vector>` and a `ComponentTypeArray` bitset of which component types are present. `Entity::AddComponent` **silently returns the existing component** if the entity already has one — it never replaces. + +Registration hooks the type into a name-keyed factory map so scenes/prefabs can construct components from strings: + +```cpp +ME_REGISTER_COMPONENT( Transform ) // registry key "Transform" +ME_REGISTER_COMPONENT_FOLDER( PointLight, "Lighting/" ) // editor "Add Component" grouping +``` + +`Entity::AddComponentByName` looks up that registry and warns (`"Factory not found for component ..."`) on a miss — the scene keeps loading without the component. + +### Cores (systems) + +`BaseCore` lifecycle, in the order the engine drives it: + +| Hook | When | +|------|------| +| ctor | `Core(ComponentFilter&)` — declare the filter here | +| `Init()` | When added to a world (`World::AddCore`), and re-called manually for some engine cores on scene load | +| `OnAddedToWorld()` | Right after `Init` | +| `OnEntityAdded/Removed/Destroyed` | During `World::Simulate` reconciliation | +| `OnStart()` / `OnStop()` | `World::Start` / `World::Stop` — toggles `IsRunning` | +| `Update` / `LateUpdate` | Per frame — but see the `IsRunning` gate below | +| `OnDrawGuizmo(DebugDrawer*)` | Editor gizmo pass | +| `OnEditorInspect()` / `OnSerialize` / `OnDeserialize` | Editor inspector & scene persistence | +| `OnRemovedFromWorld()` | `World::Unload`/`Destroy` for `DestroyOnLoad` cores | + +`Core`'s constructor names the core from `typeid(T).name()`, cleaned by `CleanTypeName` (`Source/ECS/Core.cpp`) — `abi::__cxa_demangle` + namespace strip on GCC/Clang, `"class "` strip on MSVC — so registry keys and serialized `"Type"` names match the plain class name **cross-platform**. + +The filter DSL: `ComponentFilter().Requires().Requires()`, plus `RequiresOneOf()` (at least one of the marked types) and `Excludes()`. + +### World: two core containers, two ownership stories + +- `Cores` — *all* cores, keyed by `TypeId`, held as `unique_ptr` where **`CoreDeleter` deliberately does not delete** (it just nulls the world pointer and clears the entity list). Engine-owned cores are members of `Engine`; name-created cores simply leak until process exit. +- `m_loadedCores` — the subset added with `HandleUpdate = true` (everything created by `World::AddCoreByName`, i.e. cores declared in scene files). Only these are ticked by `UpdateLoadedCores`/`LateUpdateLoadedCores`; engine-owned cores are ticked by name in `Engine::Run` (see `Docs/Architecture.md`). + +**The `IsRunning` gate matters:** `UpdateLoadedCores` skips cores whose `IsRunning` is false, and `IsRunning` only becomes true in `World::Start()` — which runs after scene load in game builds, or when the user presses Play in the editor. Scene-loaded cores (physics, scripts) are therefore **dormant in editor edit-mode**, which is what makes edit-mode "paused". + +### `Simulate()` — entity↔core reconciliation + +```mermaid +flowchart TD + S["World::Simulate()"] --> L{"IsLoading?"} + L -- yes --> X[return] + L -- no --> A["for each entity in Activated queue"] + A --> A1["for each core: PassFilter(entity's component bitset)?"] + A1 -- "passes & not member" --> A2["core.Add(entity) → OnEntityAdded
set membership bit"] + A1 -- "fails & is member" --> A3["core.Remove(entity) → OnEntityRemoved
clear membership bit"] + A2 --> D["for each entity in Deactivated queue:
Remove from every member core"] + A3 --> D + D --> K["for each entity in Killed queue:
DestroyEntity → Remove + OnEntityDestroyed,
RemoveAllComponents, free ID"] + K --> C["clear Activated/Deactivated/Killed"] +``` + +Per-entity core membership is a `std::bitset<64>` (`World::TEntityAttributes::Attribute::Cores`) indexed by core `TypeId` — a hard cap of **64 core types**, unchecked at the high end. Note the loop contains `if( !InCore.second->IsRunning ) { //continue; }` — the body is commented out, so **cores receive `OnEntityAdded`/`OnEntityRemoved` regardless of running state** (only `Update` is gated). + +Membership changes are driven by `Entity::SetActive(true)` (queues into `Activated`) — adding a component does **not** re-evaluate filters until something re-activates the entity. Scene/prefab loading calls `SetActive(true)` after adding all components for exactly this reason. `MarkForDelete` queues into `Killed`; actual destruction happens at the next `Simulate`, so components stay valid for the remainder of the frame. + +### Lifecycle operations + +- `World::Unload()` — destroys entities and loaded cores with `DestroyOnLoad == true` (the default); survivors persist across scene loads. Used by `Engine::LoadScene`. +- `World::Destroy()` — destroys *everything* (editor Stop path). +- `World::CreateFromPrefab(path, parent)` — loads JSON through `ResourceCache::Get` (so repeated spawns reuse the parsed JSON), then `LoadPrefab` recursively: **if the parent already has a child with the prefab's `Name`, that entity is reused/merged instead of created** — components deserialize onto the existing child. + +## How to Extend + +### Add a component + +1. Create a header + cpp pair under `Source/Components/` (or a game-side equivalent): + +```cpp +#pragma once +#include "ECS/Component.h" + +class MyThing final + : public Component +{ +public: + MyThing() + : Component( "MyThing" ) // must match the class name; this is the registry + scene-file key + { + } + + virtual void Init() override; // runs after OnDeserialize + virtual void OnSerialize( json& outJson ) override; // write fields + virtual void OnDeserialize( const json& inJson ) override; // read fields + +#if USING( ME_EDITOR ) + virtual void OnEditorInspect() override; // ImGui inspector +#endif + + float Speed = 1.f; +}; +ME_REGISTER_COMPONENT_FOLDER( MyThing, "Gameplay/" ) +``` + +2. That's it — the macro's static registration makes it constructible from scenes, prefabs, and the editor's Add Component menu. **Renaming the class or the string breaks every scene that serialized it** (see `Docs/Serialization-and-Scenes.md`). + +### Add a core + +1. Create the core with its filter and register it: + +```cpp +#pragma once +#include "ECS/Core.h" +#include "Components/MyThing.h" +#include "Components/Transform.h" + +class MyThingCore final + : public Core +{ +public: + MyThingCore() + : Base( ComponentFilter().Requires().Requires() ) + { + // SetIsSerializable( false ); // only for cores that should never appear in scene files + } + + virtual void Update( const UpdateContext& inUpdateContext ) override + { + for( Entity& ent : GetEntities() ) + { + MyThing& thing = ent.GetComponent(); + // ... + } + } + +private: + virtual void Init() override {} + virtual void OnEntityAdded( Entity& NewEntity ) override {} + virtual void OnEntityRemoved( Entity& InEntity ) override {} +}; +ME_REGISTER_CORE( MyThingCore ) +``` + +2. Get it into a world one of two ways: + - **Scene-loaded** (normal for gameplay): add it to the scene's core list in the editor — it serializes into the `.lvl` `"Cores"` array and `World::AddCoreByName` instantiates it on load. It ticks via `UpdateLoadedCores` **only while the world is started** (Play mode / game builds). + - **Engine-owned** (rare): construct it in `Engine::Init`, `AddCore` it in `Engine::InitGame`, and call its `Update` explicitly in `Engine::Run` — this means editing the engine frame loop. +3. Remember `Serialize` is pure virtual on `BaseCore` in editor builds — `Core` provides the sealed implementation that writes `"Type"` and calls your `OnSerialize`, so overriding `OnSerialize`/`OnDeserialize` is all you need for per-core settings. + +## Caveats & Fragility + +- **64-core cap**: per-entity membership is `bitset<64>` indexed by core `TypeId`; a 65th core type indexes out of range (UB via `bitset::operator[]`, not a checked failure). `DestroyEntity`'s guard is also written `Attr.Cores.size() >= CoreIndex` (always true for valid indices) rather than `>`. +- **TypeIds are first-touch-ordered** — never persist or compare them across processes; use registry names. +- **Filters re-evaluate only on activation**, not on component add/remove. If you add a component to an already-active entity mid-game and expect a core to pick it up, you must `SetActive(true)` again (queues re-reconciliation). +- **`AddComponent` never replaces** — it returns the existing instance silently. +- **Loaded cores don't tick until `World::Start`** — in editor edit-mode only engine-owned cores update. `OnEntityAdded` etc. still fire in edit mode (the `IsRunning` check in `Simulate` is commented out). +- **`CoreDeleter` never frees** — cores created through `AddCoreByName` leak until exit by design; don't put must-run cleanup in core destructors (they may run never, or only at static teardown). +- **Components are `shared_ptr`-boxed** — no contiguous iteration; a core update is a pointer chase per entity per component. Budget accordingly for entity-heavy systems. +- **`World::FindEntityByIDValue` is a linear scan** over all alive entities. +- **`Entity` equality/`operator bool`** checks only the world pointer, not liveness — a copied `Entity` whose target died still converts to `true`. Use `World::EntityExists`/`GetEntity` (full generational check) or `EntityHandle`. +- **Registry misses are soft**: unknown component/core names log a warning and return null; scene loads continue with data silently dropped. + +## Related Docs + +- `Docs/Architecture.md` — when `Simulate` and the core updates run in the frame +- `Docs/Serialization-and-Scenes.md` — how registry names drive `.lvl`/prefab loading +- `Docs/Cores-and-Components-Reference.md` — catalog of every existing core and component +- `Docs/Jobs-and-Events.md` — threading rules when cores fan work out to jobs diff --git a/Docs/Editor-Havana.md b/Docs/Editor-Havana.md new file mode 100644 index 00000000..f605e89e --- /dev/null +++ b/Docs/Editor-Havana.md @@ -0,0 +1,83 @@ +# Havana Editor + +Havana is the ImGui-based editor: an `EditorApp` (itself a `Game` subclass, so it uses the standard engine entry point from `Modules/Havana/Source/main.cpp`) hosting dockable widgets — scene view with gizmos, hierarchy, inspector, asset browser, log — plus an undo/redo command system and GPU-based entity picking. Play-in-editor runs the game **in the live editor world** and restores by reloading the scene file from disk. This doc maps the architecture and the workflow-critical behaviors. + +> Verified against engine commit 047f57b8, 2026-07-10. + +## Overview + +Editor builds are gated by `ME_EDITOR` (Sharpmake "Editor" targets — `Docs/Build-System.md`). The editor renders through the normal pipeline: the editor camera renders at view 1 into its own framebuffer, `SceneViewWidget` displays that texture inside ImGui, and `PickingPass` piggybacks on the editor camera (`Docs/Rendering-Pipeline.md`). A second `Input` instance (`Engine::GetEditorInput`) keeps editor hotkeys working while game input is paused (`Docs/Platform-Window-Input-Config.md`). + +## Key Files + +| Path | Role | +|------|------| +| `Modules/Havana/Source/EditorApp.h` / `Modules/Havana/Source/EditorApp.cpp` | The editor "game": init, play/pause/stop, camera switching | +| `Modules/Havana/Source/Havana.h` / `Modules/Havana/Source/Havana.cpp` | UI container: widget ownership, ImGui frame, game callbacks | +| `Modules/Havana/Source/Widgets/` | `SceneViewWidget` (viewport + ImGuizmo), `SceneHierarchyWidget`, `PropertiesWidget`, `AssetBrowser`, `AssetPreviewWidget`, `LogWidget`, `MainMenuWidget` (toolbar + play controls), `ResourceMonitorWidget`, `Modules/Havana/Source/Widgets/CurveEditor.h` | +| `Modules/Havana/Source/Commands/ICommand.h`, `Modules/Havana/Source/Commands/CommandManager.h`, `Modules/Havana/Source/Commands/EditorCommands.h` | Undo/redo | +| `Modules/Havana/Source/Cores/EditorCore.h` | Editor scene-management core (selection state etc.) | +| `Modules/Moonlight/Source/RenderPasses/PickingPass.cpp` | Entity-ID buffer + CPU readback | + +## How It Works + +### Startup + +`EditorApp::OnInitialize` creates the `Havana` UI and `EditorCore`, wires the play/pause/stop callbacks into `MainMenuWidget`, fires `NewSceneEvent`, adds `EditorCore` to the world, and loads `InitialLevel` — which comes from `EngineConfig`'s `"CurrentScene"` value. Note the header's self-aware wart: `EditorApp.h` includes the **game's** `ComponentRegistry.h` via a relative `../../Game/Source/` path ("I don't like this") — the editor binary is coupled to the game project layout so game components register with the editor. + +### Play-in-editor state machine + +```mermaid +stateDiagram-v2 + [*] --> Editing + Editing --> Playing : Play F5 - World Start wakes loaded cores, swaps to game input + Playing --> Paused : Pause F10 - game input pauses, world keeps ticking + Paused --> Playing : Play + Playing --> Editing : Stop Shift+F5 - World Destroy and Stop, reload scene from disk + Paused --> Editing : Stop +``` + +The important mechanics, straight from `EditorApp::StartGame`/`StopGame`: + +- **Play does not snapshot the world.** It calls `World::Start()` on the live editor world — the same entities you were editing start simulating (that's also what wakes the dormant scene-loaded cores; see `Docs/ECS.md`). +- **Play does not save.** The scene on disk stays as of your last manual save (Ctrl+S / `SaveSceneEvent`). +- **Stop = destroy + reload from disk**: `World::Destroy()`, `World::Stop()`, `NewSceneEvent`, then `Engine::LoadScene(config["CurrentScene"])`. Consequently **any edits made since the last save are lost when you press Stop** — runtime mutations *and* unsaved editor work both vanish. Save before you play. +- **Pause** only pauses *game input* and flips a flag — cores keep updating (pausing gameplay is the game's job via input starvation). +- `EditorApp::UpdateCameras` swaps rendering between `Camera::EditorCamera` and the game's main camera based on play state. + +### Widgets + +All ImGui, all owned by `Havana`. Highlights: + +- **`SceneViewWidget`** — displays the editor camera's framebuffer texture; hosts **ImGuizmo** translate/rotate/scale gizmos with local/world toggle; `MaximizeOnPlay` support. Manipulating a gizmo edits the selected `Transform`. +- **`SceneHierarchyWidget`** — the transform tree (names live on `Transform` — `Docs/Serialization-and-Scenes.md`); selection source. +- **`PropertiesWidget`** — the inspector: per-component `OnEditorInspect()` plus add/remove component (from the component registry, with the folder grouping from `ME_REGISTER_COMPONENT_FOLDER`). +- **`MainMenuWidget`** — menus (save fires `SaveSceneEvent`), toolbar with Play (F5) / Pause (F10) / Stop (Shift+F5). +- **`AssetBrowser`** / **`AssetPreviewWidget`** — asset tree browsing/preview (uses `ResourceCache`, including the recursive `FindByName` — `Docs/Resources-and-Assets.md`). +- **`LogWidget`** — in-editor `CLog` view; **`ResourceMonitorWidget`** — live resource-cache contents. + +### Undo/redo + +`CommandManager` keeps two `vector` stacks (`Items` + `RedoStack`); `ICommand` is a plain `Do()`/`Undo()` pair with a name. Concrete commands live in `EditorCommands.h`. Coverage is **narrow** — gizmo/property operations that were explicitly wrapped in commands; most editor mutations (component add/remove, hierarchy changes, etc.) bypass the stack and are not undoable. Commands are raw-pointer owned by the stacks. + +### Entity picking + +`PickingPass` (editor camera only): every pickable mesh is drawn into a small offscreen ID buffer (`picking_shaded.vert` + `picking_id.frag`, entity ID encoded as color via the `u_id` uniform), the ID target is blitted to a CPU-readable texture (bgfx requires the blit — you can't read render targets directly), and a few frames later the readback is scanned — **the ID with the most pixels under the cursor region wins**. The winning entity lands in `FrameRenderData::RequestedEntityID`, which `Engine::Run` turns into a `PickingEvent` the next frame; `EditorCore` reacts by selecting the entity. Black = clicked nothing. + +## Caveats & Fragility + +- **Stop-reverts-to-last-save is the #1 workflow trap** — there is no save prompt on Play and no world snapshot; Stop discards everything since the last Ctrl+S. +- **Undo coverage is partial** and there's no dirty-scene indicator tied to it; muscle-memory Ctrl+Z will miss many operations. +- **The editor links against game code** (relative-path `ComponentRegistry.h` include) — building the editor for a differently-shaped game project means touching Havana. +- **Picking is asynchronous** (blit + N-frame GPU readback) — selection lags a couple frames; rapid clicks can select stale targets. The pass also has its own hardcoded FOV/near/far (`m_fov`, 0.1–100) independent of the real camera — offset picking at extreme ranges. +- **Pause doesn't pause the world** — timers/audio/scripts keep running; only game input stops. +- **Editor state lives in `EngineConfig`** (`"CurrentScene"`) — external scene renames break the reload-on-stop path until the config updates. +- The play-state flags (`m_isGameRunning`/`m_isGamePaused`) are plain bools on `EditorApp` consulted all over the widgets — no single source of truth with the world's own `IsRunning` core flags. + +## Related Docs + +- `Docs/Architecture.md` — how `EditorApp` slots into `ME_APPLICATION_MAIN` and the frame loop +- `Docs/ECS.md` — `World::Start/Stop/Destroy` semantics behind play-in-editor +- `Docs/Rendering-Pipeline.md` — editor camera view, scene-view texture, picking pass placement +- `Docs/Serialization-and-Scenes.md` — what Save writes and Stop reloads +- `Docs/State-of-the-Engine.md` — editor workflow improvement notes diff --git a/Docs/Jobs-and-Events.md b/Docs/Jobs-and-Events.md new file mode 100644 index 00000000..9f160925 --- /dev/null +++ b/Docs/Jobs-and-Events.md @@ -0,0 +1,148 @@ +# Jobs and Events + +The engine is single-threaded except where work is explicitly fanned out through `SimpleJobSystem`, and engine-wide communication happens through `EventManager` — a synchronous, immediate-dispatch, **not thread-safe** broadcaster. This doc is the threading rulebook: what may run off the main thread, what must not, and the exact semantics (and races) of both systems. + +> Verified against engine commit 047f57b8, 2026-07-10. + +## Overview + +There are two generations of job system in the tree. **`SimpleJobSystem`** (`Modules/Dementia/Source/Work/SimpleJobSystem.h`) is the live one: a mutex+condvar thread pool owned by `Engine`, registered as an `ISystem` so it's reachable via `Engine::GetJobSystem()` or `UpdateContext::GetSystem`. The older **`JobEngine`/`Job`/`JobQueue`/`Pool`/`Worker`** family (same directory) plus `Modules/Dementia/Source/Core/JobSystem.h` are vestigial — their only engine references are `#include`s in `Source/Engine/Engine.h` and a fully commented-out physics-parallelization experiment in `Source/Cores/PhysicsCore.cpp`. Don't build on them. + +Events are typed broadcasts: subclass `Event`, receivers implement `EventReceiver::OnEvent` and register for specific `TypeId`s. `Fire()` walks the receiver list *right now, on the calling thread*. + +## Key Files + +| Path | Role | +|------|------| +| `Modules/Dementia/Source/Work/SimpleJobSystem.h` | The live thread pool (header-only) | +| `Modules/Dementia/Source/Work/Burst.h` / `Modules/Dementia/Source/Work/Burst.cpp` | `GenerateChunks` range splitting; Windows-only physical-core query | +| `Source/Cores/Rendering/RenderCore.cpp` | The canonical job-dispatch usage pattern | +| `Modules/Dementia/Source/Events/EventManager.h` / `Modules/Dementia/Source/Events/EventManager.cpp` | Singleton dispatcher | +| `Modules/Dementia/Source/Events/Event.h` / `Modules/Dementia/Source/Events/EventReceiver.h` | `Event` CRTP + receiver interface | +| `Source/Events/SceneEvents.h`, `Source/Events/PlatformEvents.h`, `Source/Events/AudioEvents.h`, `Source/Events/HavanaEvents.h` | Engine event inventory | +| `Modules/Dementia/Source/Work/JobEngine.h` (+ Job/JobQueue/Pool/Worker) | **Vestigial** legacy job system | + +## How It Works + +### SimpleJobSystem + +- Constructed with `std::thread::hardware_concurrency()` workers (all logical cores — the engine's main thread competes with them). +- `submit(SimpleJob)` (a `std::function`) enqueues and returns a `shared_ptr>` completion flag you can poll. +- `waitForAllJobs(allowMainThreadWork = true)`: + - `true` — the calling thread **steals jobs** from the queue (`workOnJob`) until queue and active count drain, yielding when there's nothing to steal. This is the mode the engine uses. + - `false` — blocks on a condition variable until idle. +- There is no cancellation, no priorities, no job dependencies, and no per-job wait — you either poll the returned flag or drain the whole system. + +```mermaid +sequenceDiagram + participant Main as Main thread (RenderCore::Update) + participant Q as jobQueue + participant W as Worker threads (N = hw_concurrency) + Main->>Main: Burst::GenerateChunks(entityCount, numWorkers, batches) + loop per batch + Main->>Q: submit(meshJob[begin,end)) + Q-->>W: notify_one + end + Main->>Main: waitForAllJobs(true) + par workers execute + W->>Q: pop job + W->>W: run chunk (cull + fill MeshCommand) + and main thread steals + Main->>Q: workOnJob() → pop job + Main->>Main: run chunk + end + Main->>Main: returns when queue empty && activeJobs == 0 +``` + +**Known race — early return from `waitForAllJobs`:** a worker pops the last job (queue now empty) and only *then* increments `activeJobs`. In the window between pop and increment, the waiter can observe `queue empty && activeJobs == 0` and return while that job hasn't run yet. The window is tiny and the main-thread-stealing mode narrows it further (the main thread usually drains the queue itself), but it exists. Corollary: don't treat `waitForAllJobs` returning as a memory-visibility fence for the final job's writes. + +(Cosmetic: `activeJobs` is incremented twice per job — once by the wrapper `submit` builds, once by the executor loop — and decremented twice; balanced, but don't read it as a job count.) + +### Burst + +`Burst::GenerateChunks(size, num, out)` splits `size` items into `num` contiguous `[begin, end)` ranges, distributing the remainder one-per-chunk. If `size <= num` it emits a **single chunk** covering everything — small workloads intentionally don't parallelize. `GetMaxBurstThreads`/`GetPhysicalProcessorCount` exist **only on Windows** (`USING( ME_PLATFORM_WINDOWS )`); portable code should size off `SimpleJobSystem::GetNumWorkers()` like `RenderCore` does. `kMaxBurstThreads` is 32. + +### The canonical pattern (from `RenderCore::Update`) + +```cpp +std::vector> batches; +Burst::GenerateChunks( Renderables.size(), simpleJobSystem.GetNumWorkers(), batches ); +for( auto& batch : batches ) +{ + auto meshJob = [&renderer, &Renderables, &cameras, batchBegin, batchEnd]() { /* ... */ }; + simpleJobSystem.submit( meshJob ); +} +simpleJobSystem.waitForAllJobs( true ); +``` + +The lambdas capture locals **by reference**, which is only safe because `waitForAllJobs` is called before the scope ends. This is the implicit contract for all job dispatch in the engine: **jobs must be joined within the dispatching scope.** Fire-and-forget jobs must capture by value/`shared_ptr` and touch nothing frame-scoped. + +### Events + +`Event` gives each event type a `TypeId` (via `ClassTypeId` — first-touch ordering, see `Docs/ECS.md`). Usage: + +```cpp +// fire +SceneLoadedEvent evt; +evt.LoadedScene = CurrentScene; +evt.Fire(); // synchronous, on the calling thread + +// receive +class Thing : public EventReceiver { + Thing() { + EventManager::GetInstance().RegisterReceiver( this, + { SceneLoadedEvent::GetEventId(), WindowResizedEvent::GetEventId() } ); + } + bool OnEvent( const BaseEvent& evt ) override { + if( evt.GetEventId() == SceneLoadedEvent::GetEventId() ) { + auto& loaded = static_cast( evt ); + // ... + return false; // true would CONSUME the event — later receivers never see it + } + return false; + } +}; +``` + +Semantics to keep in mind: + +- **Dispatch is immediate and re-entrant** — `Fire()` runs every receiver before returning; a receiver may fire further events (e.g. `LoadSceneEvent` → `Engine::LoadScene` does substantial work inside dispatch). +- **Returning `true` from `OnEvent` stops propagation** to receivers registered later. Registration order = dispatch order. +- **The queue path is dead.** `EventManager::QueueEvent`/`FirePendingEvents` exist (and `FirePendingEvents` runs at the top of every frame — see `Docs/Architecture.md`), but `Event::Queue()`'s body is commented out, so nothing ever enqueues. All real traffic is `Fire()`. +- **Receivers must deregister themselves** (`DeRegisterReciever` — note the spelling) before destruction; `EventReceiver` has no auto-deregistering destructor, so a destroyed receiver leaves a dangling pointer in the dispatch lists. + +Event inventory: `Source/Events/SceneEvents.h` (`LoadSceneEvent`, `SceneLoadedEvent`), `Source/Events/PlatformEvents.h` (`WindowResizedEvent`, `WindowMovedEvent`), `Source/Events/AudioEvents.h` (`PlayAudioEvent`, `StopAudioEvent`), `Source/Events/HavanaEvents.h` (editor: `PickingEvent`, `PreviewResourceEvent`, `RequestAssetSelectionEvent`, `SaveSceneEvent`, `NewSceneEvent`), `Modules/Dementia/Source/Events/EditorEvents.h` (`InspectEvent`, `ClearInspectEvent`, `TestEditorEvent`). + +## The Threading Rulebook + +Safe inside a job: + +- Pure computation over the job's own `[begin, end)` slice of a pre-sized container. +- Reading components/transforms **provided nothing mutates them concurrently** (the engine guarantees this by running the mesh job at a fixed point in the frame — nothing else runs during `waitForAllJobs`). +- `CommandCache` operations (`Modules/Moonlight/Source/Utils/CommandCache.h`) — internally mutexed; this is how mesh jobs publish `MeshCommand`s. + +**Not** safe inside a job (main thread only): + +- `Event::Fire` / `EventManager` anything — no locks, receiver lists are plain vectors. +- Entity/component create, destroy, activate — `World`'s caches are unsynchronized. +- `ResourceCache::Get` / `Dump` — the singleton's `std::map` has no locking. +- bgfx calls — the renderer owns submission on the main thread (bgfx encoders are not used). +- ImGui, `CLog` file writes (unsynchronized), config, scripting calls. + +If a job needs any of the above, have the job record intent into its own slice of a results buffer and apply it on the main thread after `waitForAllJobs`. + +## Caveats & Fragility + +- **`waitForAllJobs` early-return race** described above — don't use it as a strict happens-before edge for the last job. +- **Worker count = logical cores**, so the pool oversubscribes against the main thread during steal-mode waits; heavy jobs can starve the OS scheduler on low-core machines. +- **No exception isolation**: a throwing job propagates through `workerThread` and terminates (workers have no try/catch). +- **`shutdown` only in the destructor**: the pool joins in `~SimpleJobSystem` (static-teardown time, since `Engine` is a leaked singleton — see `Docs/Architecture.md`); jobs still queued at exit run or are dropped depending on timing. +- **Event dispatch during iteration**: registering/deregistering receivers from inside `OnEvent` mutates the vector being iterated in `FireEvent` — avoid subscribing/unsubscribing during dispatch. +- **`FirePendingEvents` is a decoy** — it looks like deferred delivery exists; it doesn't. If you need next-frame delivery you currently have to build it (or un-comment and finish `Event::Queue`, which also needs an ownership story since `Queue` would have to copy the event into a `SharedPtr`). + +## Related Docs + +- `Docs/Architecture.md` — where `FirePendingEvents` and the job-consuming updates sit in the frame +- `Docs/Rendering-Pipeline.md` — the mesh job's producer/consumer relationship with the renderer +- `Docs/ECS.md` — `TypeId` generation shared by events and components +- `Docs/State-of-the-Engine.md` — recommendations for the queue path and legacy job systems diff --git a/Docs/Materials-and-Shaders.md b/Docs/Materials-and-Shaders.md new file mode 100644 index 00000000..8c80a021 --- /dev/null +++ b/Docs/Materials-and-Shaders.md @@ -0,0 +1,162 @@ +# Materials and Shaders + +Materials are code-defined `Material` subclasses (a `Resource` specialization) registered by name; each `Mesh` component owns a **unique material instance** created via `CreateInstance()`, serialized inline into the component's JSON. Shaders are bgfx `.sc`-style `.vert`/`.frag` sources compiled **offline** to per-backend binaries by `shaderc`, triggered on demand by the resource-metadata cook (see `Docs/Resources-and-Assets.md`). This doc covers the material contract, the instancing batch key, the shader pipeline, and how to add a material. + +> Verified against engine commit 047f57b8, 2026-07-10. + +## Overview + +There is no data-driven material/shader graph in the runtime path — a material type *is* a C++ class that knows its shader pair, its uniforms, and how to upload them in `Use()`. The `.mat` extension has a registered metadata type but materials are not actually loaded from `.mat` files in practice; they ride inside `Mesh` component serialization. `ShaderGraphMaterial` (fed by the `Tools/ShaderEditor/` node editor) is the half-finished exception. + +## Key Files + +| Path | Role | +|------|------| +| `Modules/Moonlight/Source/Graphics/Material.h` / `Modules/Moonlight/Source/Graphics/Material.cpp` | Base class: render/blend/face modes, textures, batch key, registry macros | +| `Modules/Moonlight/Source/Graphics/MaterialDetail.h` | Name → factory `MaterialRegistry` (same pattern as component/core registries) | +| `Modules/Moonlight/Source/Materials/DiffuseMaterial.h` | The standard material (+ `WhiteMaterial`); the instancing reference | +| `Modules/Moonlight/Source/Shaders/UnlitMaterial.h` | Unlit variant (note: lives under `Shaders/`, not `Materials/`) | +| `Modules/Moonlight/Source/Materials/DynamicSkyMaterial.h` | Procedural sky material | +| `Modules/Moonlight/Source/Materials/ShaderGraphMaterial.h` | Half-finished node-graph material | +| `Modules/Moonlight/Source/Graphics/ShaderCommand.h` | vert+frag → `bgfx::ProgramHandle` wrapper | +| `Modules/Moonlight/Source/Graphics/ShaderFile.h` | Compiled-shader resource + the `shaderc` cook (`ShaderFileMetadata::Export`) | +| `Modules/Moonlight/Source/Utils/BGFXUtils.cpp` | `LoadProgram`, `GetPlatformString` (renderer → profile string) | + +## How It Works + +### Class hierarchy + +```mermaid +classDiagram + Resource <|-- Material + Material <|-- DiffuseMaterial + Material <|-- WhiteMaterial + Material <|-- UnlitMaterial + Material <|-- DynamicSkyMaterial + Material <|-- ShaderGraphMaterial + class Material { + RenderingMode RenderMode + BlendMode AlphaBlendMode + RenderFaceMode FaceMode + bool SupportsInstancing + Vector3 DiffuseColor + Vector2 Tiling + ShaderCommand MeshShader + vector~SharedPtr~Texture~~ Textures + +Init()* + +Use()* + +CreateInstance()* SharedPtr~Material~ + +GetRenderState(state) uint64 + +GetInstanceBatchKey() uint64 + } +``` + +Registered names (what appears in scene JSON and the editor dropdown): `Diffuse`, `White`, `Unlit`, `DynamicSky`, `ShaderGraphMaterial` — via `ME_REGISTER_MATERIAL_NAME(Type, "Name")` (there's also a `_FOLDER` variant for editor grouping). + +### The material contract + +- **`Init()`** — create uniform handles. Convention (see `DiffuseMaterial`): uniforms are `inline static` and guarded with `bgfx::isValid` so all instances share one handle set. +- **`Use()`** — upload per-instance uniform values right before submit. Called by `BindMeshDrawState` after textures are bound (slots 0/1/2 = diffuse/normal/opacity — see `Docs/Rendering-Pipeline.md`). +- **`CreateInstance()`** — clone; `Mesh::OnDeserialize` and model loading call this so **every mesh gets its own material object**. This is why instancing can't key on material pointers. +- **`GetRenderState(state)`** — merges the material's blend mode (transparent only: `Alpha`/`Premultiply`/`Additive`/`Multiply`) and face mode (`Front`→`CULL_CCW`, `Back`→`CULL_CW`, `Both`→no cull) into the renderer's base state bits. + +### The instancing batch key + +`Material::GetInstanceBatchKey()` hashes the GPU-observable state: shader program idx, diffuse/normal/opacity texture idxs, `GetRenderState(0)`, `DiffuseColor` (3 floats, bit-exact), `Tiling` (2 floats). Meshes with `SupportsInstancing == true` whose `(vertexBuffer, indexBuffer, batchKey)` triple matches are drawn as one instanced batch using the *first* command's material as representative. + +**The invariant to preserve:** any state your material subclass reads in `Use()` or contributes to `GetRenderState` **must be mixed into the batch key** (override `GetInstanceBatchKey`, mix your extra fields). If you add a uniform and don't extend the key, two visually different instances hash equal, get batched together, and silently render with the representative's values. Opt in to instancing with `SupportsInstancing = true` (only `DiffuseMaterial`/`WhiteMaterial` do today). + +### Serialization path + +Materials serialize *inside* the `Mesh` component (`Source/Components/Graphics/Mesh.cpp`): `OnSerialize` writes a `"Material"` object with `"Type"` (the registered name) plus base-material fields; `OnDeserialize` recreates by name from the `MaterialRegistry`, falling back to `DiffuseMaterial` when the name is unknown, then calls `Init()` and `OnDeserialize` on the new instance. Texture paths inside materials load through `ResourceCache::Get` during deserialize (synchronous — see `Docs/Resources-and-Assets.md`). + +### Shader pipeline + +Shader sources live in `Assets/Shaders/` (engine) with **three files per program**: `Foo.vert`, `Foo.frag`, and `Foo.var` (the bgfx varying definition — required; the cook passes `--varyingdef`). Compiled binaries land **next to the sources** as `Foo.vert..bin` / `Foo.frag..bin`, where `` = `Moonlight::GetPlatformString()`: `dx11` (D3D11/12), `spirv` (Vulkan), `metal`, `glsl`, `essl`. + +```mermaid +flowchart LR + V["Foo.vert / Foo.frag
(+ Foo.var varyingdef)"] -->|"ResourceCache::Get<ShaderFile>
(ME_TOOLS: cook if stale/missing)"| E["ShaderFileMetadata::Export"] + E -->|"Win64: Engine/Tools/Win64/shaderc.exe → -p s_5_0 --platform windows"| B1["Foo.vert.dx11.bin"] + E -->|"Linux: Engine/Tools/linux/shaderc → -p spirv --platform linux"| B2["Foo.vert.spirv.bin"] + E -->|"macOS: Engine/Tools/macOS/shaderc → -p metal --platform osx"| B3["Foo.vert.metal.bin"] + B1 & B2 & B3 --> SF["ShaderFile ctor:
LoadMemory + bgfx::createShader"] + SF --> SC["ShaderCommand(vert, frag)
→ bgfx::createProgram"] +``` + +Mechanics worth knowing: + +- The cook is a **blocking shell-out** (`PlatformUtils::SystemCall` on Win64, plain `system()` on macOS/Linux) fired from inside `ResourceCache::Get` in tools builds when the sidecar is flagged or the binary is missing. Failures don't propagate — the subsequent `ShaderFile` constructor's `ME_ASSERT_MSG( fullPath.Exists, "Shader doesn't exist." )` is the backstop. +- On macOS/Linux the source/output paths are built as `/../../../` — the cook **assumes the engine lives three directories up from the shaderc binary** (i.e. the standard `Engine/Tools//` layout inside a game project). Both also pass `-i Engine/Assets/Shaders` so engine shader includes (`bgfx_shader.sh` etc.) resolve. +- A material binds its program via `Material::LoadShader`/the `ShaderCommand(vert, frag)` constructor, which pulls both stages through `ResourceCache::Get` and `bgfx::createProgram`s them. `DiffuseMaterial` hardcodes `"Assets/Shaders/Diffuse"`. + +## How to Extend + +### Add a material type + +1. Subclass `Material` (model it on `Modules/Moonlight/Source/Materials/DiffuseMaterial.h`): + +```cpp +#pragma once +#include "Graphics/Material.h" + +class RimlightMaterial + : public Moonlight::Material +{ +public: + RimlightMaterial() + : Moonlight::Material( "RimlightMaterial", "Assets/Shaders/Rimlight" ) // expects Rimlight.vert/.frag/.var + { + SupportsInstancing = true; // only if the shader reads i_data instance attribs + } + + void Init() override + { + if( !bgfx::isValid( s_rimColor ) ) + { + s_rimColor = bgfx::createUniform( "s_rimColor", bgfx::UniformType::Vec4 ); + } + } + + virtual void Use() final + { + bgfx::setUniform( s_rimColor, &RimColor.x ); + } + + SharedPtr CreateInstance() final + { + return MakeShared( *this ); + } + + // REQUIRED if instancing + custom state: fold RimColor into the batch key + virtual uint64_t GetInstanceBatchKey() const override; + + Vector4 RimColor { 1.f, 1.f, 1.f, 1.f }; + +private: + inline static bgfx::UniformHandle s_rimColor = BGFX_INVALID_HANDLE; +}; +ME_REGISTER_MATERIAL_NAME( RimlightMaterial, "Rimlight" ) +``` + +2. Author `Assets/Shaders/Rimlight.vert`, `.frag`, and `.var`. Instanced shaders must read the transform from instance data; compare `Assets/Shaders/Diffuse.vert`. +3. Override `OnSerialize`/`OnDeserialize` if you add fields beyond the base set — the base already handles render/blend/face modes, color, tiling, and textures. +4. First tools-build run cooks the binaries automatically; commit them (runtime/retail builds can't cook). + +## Caveats & Fragility + +- **Batch-key completeness is on you** — the base key covers only base-material state; forgetting to extend it in a subclass causes silent visual mis-batching (worst kind of bug: intermittent, scene-dependent). +- **`ShaderGraphMaterial` is half-finished**: `Use()` binds every graph texture to hardcoded stage **3** (all uniforms overwrite the same slot), `Init` recreates uniforms per instance without the validity guard, and the flow depends on the external `Tools/ShaderEditor/` app. Treat as experimental. +- **`.mat` metadata is vestigial** — `MaterialResourceMetadata::Export` is empty and its compiled-twin check looks for `Foo.mat.mat`; materials actually live inside `Mesh` JSON. +- **Cook failures are silent** until the `ShaderFile` existence assert (debug) or a crash/invalid handle (release). Check the log for the `BRUH`-printed shaderc command line on Linux. +- **Relative-path assumption** in the macOS/Linux cook (`shaderc dir + /../../../`) breaks if `Engine/` is not a direct submodule folder of the working directory the app runs from. +- **Uniform naming is global in bgfx** — two materials declaring the same uniform name with different types collide at the bgfx level; the engine namespaces by convention only (`s_diffuse`, `s_tiling`, …). +- **`UnlitMaterial` lives in `Modules/Moonlight/Source/Shaders/`** rather than `Materials/` — easy to miss when enumerating material types. +- Unknown material names in scenes **silently become `DiffuseMaterial`** (`Mesh::OnDeserialize` fallback) — a renamed material class degrades scenes without errors. + +## Related Docs + +- `Docs/Rendering-Pipeline.md` — where `Use`/`GetRenderState`/batching execute +- `Docs/Resources-and-Assets.md` — the metadata/cook machinery `ShaderFileMetadata` plugs into +- `Docs/Serialization-and-Scenes.md` — the `Mesh` JSON that embeds materials +- `Docs/State-of-the-Engine.md` — ShaderGraph finish-or-delete recommendation diff --git a/Docs/Platform-Window-Input-Config.md b/Docs/Platform-Window-Input-Config.md new file mode 100644 index 00000000..eb2a937b --- /dev/null +++ b/Docs/Platform-Window-Input-Config.md @@ -0,0 +1,74 @@ +# Platform, Window, Input, Config + +The OS boundary: an `IWindow` abstraction implemented by `SDLWindow` (SDL2, on **every** platform including UWP), input as polled SDL state plus window-fired events, and a small JSON config system that persists window geometry and editor state. This is where per-platform branches concentrate. + +> Verified against engine commit 047f57b8, 2026-07-10. + +## Overview + +The window owns the message pump (`ParseMessageQueue`, first thing each frame — `Docs/Architecture.md`), translates SDL events into engine events, and reports resizes through a callback lambda installed by `Engine::Init`. Input is two-layered: `SDLWindow` *fires* `KeyPressEvent`/`MouseScrollEvent`, and `Input` instances *receive* them (as `EventReceiver`s) while also polling SDL keyboard/mouse state directly. + +## Key Files + +| Path | Role | +|------|------| +| `Source/Window/IWindow.h` | The window interface (size/position, fullscreen/maximize, exit, native ptr) | +| `Source/Window/SDLWindow.cpp` / `Source/Window/SDLWindow.h` | The implementation used everywhere; SDL event pump; native-handle extraction | +| `Source/Window/UWPWindow.cpp` | Vestigial dedicated UWP window (commented out in `Engine::Init`; UWP uses `SDLWindow`) | +| `Source/Engine/Input.h` / `Source/Engine/Input.cpp` | Key/mouse state, `KeyState`, `KeyPressEvent`/`MouseScrollEvent` definitions | +| `Source/Events/PlatformEvents.h` | `WindowResizedEvent`, `WindowMovedEvent` | +| `Modules/Dementia/Source/Config.h` | `ConfigFile` base: JSON `Root`, `GetValue`/`SetValue`, `OnSave`/`OnLoadConfig` | +| `Source/Config/EngineConfig.h` / `Source/Config/EngineConfig.cpp` | Window size/position/title + free-form values (`"Title"`, `"CurrentScene"`) | +| `Modules/Dementia/Source/Path.h`, `Modules/Dementia/Source/File.h` | Path normalization + file IO used by everything above | + +## How It Works + +### Window and the event pump + +```mermaid +flowchart LR + SDL["SDL_PollEvent loop
(SDLWindow::ParseMessageQueue)"] --> Q["SDL_QUIT → CloseRequested
(→ Engine::Run breaks, StopGame)"] + SDL --> K["SDL_KEYDOWN/KEYUP →
KeyPressEvent(scancode, Pressed/Held/Released).Fire()"] + SDL --> W["SDL_MOUSEWHEEL → MouseScrollEvent.Fire()"] + SDL --> WE["SDL_WINDOWEVENT → HandleWindowEvent"] + WE --> RS["RESIZED/SIZE_CHANGED → ResizeCB(GetSize())"] + WE --> MV["MOVED → WindowMovedEvent → Engine saves config position"] + K --> I["Input instances (EventReceivers):
game input + editor input"] + W --> I + RS --> R["Engine's ResizeFunc lambda:
renderer, UI, config, WindowResizedEvent"] +``` + +- Key repeat maps to `KeyState::Held`; first press is `Pressed`; key-up is `Released`. Key codes are **SDL scancodes** (physical layout, not layout-mapped keysyms). +- On Linux the window extracts X11 vs Wayland handles via `SDL_SYSWM` and hands bgfx the display pointer + window type (`RendererCreationSettings` — `Docs/Rendering-Pipeline.md`). +- Window events fire **synchronously inside `ParseMessageQueue`**, i.e. before this frame's `Input::Update` and everything else. +- `Engine::Quit()` = `GameWindow->Exit()` → close request → normal shutdown path. + +### Input + +`Input` is a plain class, not a singleton — the engine owns one for the game (`Engine::GetInput()`) and, in editor builds, a second for the editor (`GetEditorInput()`); **both receive the same fired events**, and each polls SDL state in its `Update()` (`SDL_GetKeyboardState`, `SDL_GetMouseState`, global mouse position for ImGui multi-viewport). + +API surface: `IsKeyDown` / `WasKeyPressed` / `WasKeyReleased` (`KeyState` tracked per scancode), mouse buttons/position/scroll, and the flow-control trio `Pause()` / `Resume()` / `Stop()` — which is how the editor implements play/pause: pausing *game* input while editor input keeps running (`Docs/Editor-Havana.md`). `Update()`/`PostUpdate()` bracket the frame (PostUpdate clears per-frame pressed/released edges). + +### Config + +`ConfigFile` (Dementia) wraps a JSON file: `Load` parses into `Root`, `GetValue(key)`/`SetValue` for ad-hoc strings, `Save` calls your `OnSave(json&)` override then writes. `EngineConfig` persists `WindowSize`, `WindowPosition`, `WindowTitle`; other consumers stash free-form keys in the same file — notably the editor's `"CurrentScene"` (`Docs/Editor-Havana.md`) and the window `"Title"`. + +Lifecycle: loaded in `Engine::Init` from `Assets\Config\Engine.cfg`; **saved once at clean exit** (`engineConfig.Save()` after the main loop); window position updates flow in live via `WindowMovedEvent`. Editor builds bootstrap a game-local copy of the engine's default config on first run (directory creation Win64-only — `Docs/Architecture.md`). + +## Caveats & Fragility + +- **A crash loses config changes** — save happens only on clean exit; there's no periodic flush. +- **Scancode-based keys**: bindings are physical positions; non-QWERTY layouts get positional (usually desirable for games, surprising for text-like input). There's no text-input path besides ImGui's. +- **Both Input instances see everything** — gating is by `Pause`/`Stop` state per instance, not by routing; new tooling must remember to check the right instance (game vs editor) or keys will double-trigger. +- **Event-vs-poll duality**: key *events* fire during the pump; polled state updates later in `Input::Update`. Code mixing `OnEvent(KeyPressEvent)` with `IsKeyDown` in the same frame can see them disagree for one frame. +- **No high-DPI handling** — sizes are raw pixels; scale factors aren't queried anywhere. +- **`UWPWindow` is dead code** kept compiling; UWP runs through `SDLWindow` + `SDL_WinRTRunApp` (`Docs/Architecture.md`). +- **`GetKeyCodeName` does an uncached lookup** (in-code TODO "Cache this :/") — fine for tooling, don't call per-frame per-key. +- Resize behavior is split between the `ResizeFunc` lambda (renderer/UI/config pokes) and `WindowResizedEvent` receivers — two mechanisms for one concern; check both when debugging resize issues. + +## Related Docs + +- `Docs/Architecture.md` — where the pump, input updates, and config save sit in the lifecycle +- `Docs/Jobs-and-Events.md` — the event system these window/input events ride on +- `Docs/Editor-Havana.md` — dual-input play/pause mechanics +- `Docs/Build-System.md` — per-platform SDL/bgfx wiring diff --git a/Docs/README.md b/Docs/README.md new file mode 100644 index 00000000..030b0b0d --- /dev/null +++ b/Docs/README.md @@ -0,0 +1,49 @@ +# MitchEngine Documentation + +Technical documentation for MitchEngine — a C++20, ECS-based game engine built on BGFX, SDL2, Bullet3D, FMOD, and .NET 8 scripting, with a visual editor called Havana. The engine lives in this repository and is consumed as a git submodule (`Engine/`) by game projects such as Drumsmith and MitchGame. + +## Doc Map + +| Doc | What it covers | +|-----|----------------| +| [Architecture.md](Architecture.md) | Module layout, `Engine` singleton lifecycle, the verified frame loop, engine-owned vs scene-loaded cores, feature flags | +| [ECS.md](ECS.md) | `EntityID` packing, component storage, `ComponentFilter`, `World` caches and `Simulate()`, registration macros, add-a-component / add-a-core recipes | +| [Jobs-and-Events.md](Jobs-and-Events.md) | `SimpleJobSystem`, `Burst` chunking, main-thread work stealing, `EventManager` — **the threading rulebook** | +| [Rendering-Pipeline.md](Rendering-Pipeline.md) | `RenderCore` parallel command build → `BGFXRenderer` submit, view-ID map (editor vs game), instancing, transparency, lighting reality | +| [Materials-and-Shaders.md](Materials-and-Shaders.md) | Material hierarchy, instance batch keys, offline `shaderc` cooking via the MetaFile system | +| [Resources-and-Assets.md](Resources-and-Assets.md) | `ResourceCache` load flow, `.meta` sidecars, export/cooking, eviction, resource type inventory | +| [Cores-and-Components-Reference.md](Cores-and-Components-Reference.md) | Catalog of every core (incl. Physics/Bullet and Audio/FMOD deep-dives) and every component; orphaned-component list | +| [Serialization-and-Scenes.md](Serialization-and-Scenes.md) | `.lvl` JSON format, prefabs, registry-name instantiation, save/load flow, versioning caveats | +| [Scripting-DotNet.md](Scripting-DotNet.md) | hostfxr bootstrap, `ScriptEngine`, the function-pointer API table, C# side, platform status, add-a-binding recipe | +| [UI-Ultralight-and-ImGui.md](UI-Ultralight-and-ImGui.md) | Ultralight HTML UI integration, GPU driver, view composite — **deprecation status: do not extend** | +| [Editor-Havana.md](Editor-Havana.md) | `EditorApp`/`Havana`, widgets, command/undo system, entity picking, play-in-editor lifecycle | +| [Platform-Window-Input-Config.md](Platform-Window-Input-Config.md) | `IWindow`/`SDLWindow`, dual input contexts, `EngineConfig` persistence — the OS boundary | +| [Build-System.md](Build-System.md) | Sharpmake project graph, target matrix, ThirdParty-existence feature defines, flake.nix, tools | +| [State-of-the-Engine.md](State-of-the-Engine.md) | **Opinions live here**: maturity scorecard, platform matrix, half-finished inventory, improvement themes, priorities | + +**Suggested reading order:** start with [Architecture.md](Architecture.md), then [ECS.md](ECS.md) and [Jobs-and-Events.md](Jobs-and-Events.md) — nearly everything else builds on those three. [State-of-the-Engine.md](State-of-the-Engine.md) is the executive summary of where things stand. + +## Conventions + +These rules apply to every doc in this directory: + +1. **Facts vs opinions.** Docs 2–14 are factual: what the code does today, including its limits and sharp edges (each doc's *Caveats & Fragility* section). All opinionated assessment — what should change, priorities, maturity ratings — lives **only** in `State-of-the-Engine.md`. +2. **File references** are backticked repo-relative paths from the engine root, e.g. `Source/Engine/Engine.cpp`. Files living in the *game* repo (which embeds this engine at `Engine/`) are referenced with a `../` prefix, e.g. `../flake.nix`. A checked reference must contain at least one `/` — bare backticked filenames (`imgui.h`) are just names, not checked references. This makes stale references scriptable to detect: + ```bash + # run from the engine root + grep -rhoE '`[A-Za-z0-9_. -]+(/[A-Za-z0-9_. -]+)+\.(h|cpp|cs|md|json|nix|lvl)`' Docs/ | tr -d '`' | sort -u \ + | while read -r p; do [ -e "$p" ] || echo "MISSING: $p"; done + ``` +3. **Cite symbols, not line numbers.** Behavioral claims name a function, class, or constant (`kClearView`, `World::Simulate`) so they survive edits and stay greppable. +4. **Diagrams** are Mermaid, at most ~2 per doc, restricted to GitHub-supported types (`flowchart`, `sequenceDiagram`, `classDiagram`, `stateDiagram-v2`, `quadrantChart`), no `%%{init}%%` directives. After editing a diagram, validate that every block still renders: + ```bash + # run from the engine root; a parse error prints FAIL for that block + tmp=$(mktemp -d) + awk -v dir="$tmp" '/^```mermaid/{n++; f=sprintf("%s/d%02d.mmd", dir, n); next} /^```$/{f=""} f{print > f}' Docs/*.md + for f in "$tmp"/d*.mmd; do + nix run nixpkgs#mermaid-cli -- -i "$f" -o "${f%.mmd}.svg" --quiet >/dev/null 2>&1 || echo "FAIL: $f" + done + ``` + Known label traps (both hit during validation): `stateDiagram-v2` transition labels cannot contain `::` (write `World Start`, not `World::Start`), and `sequenceDiagram` treats every `;` as a statement separator — including the one terminating an HTML entity like `<` — so keep entities and semicolons out of message text. +5. **Verification stamp.** Each doc opens with `> Verified against engine commit , .` If you change engine behavior a doc describes, **update the doc and its stamp in the same change** — source wins over docs on conflict, but a known-stale doc is worse than none. +6. **Template** (docs 2–14): Summary → Overview → Key Files → How It Works → How to Extend (where applicable) → Caveats & Fragility → Related Docs. diff --git a/Docs/Rendering-Pipeline.md b/Docs/Rendering-Pipeline.md new file mode 100644 index 00000000..5ad30448 --- /dev/null +++ b/Docs/Rendering-Pipeline.md @@ -0,0 +1,129 @@ +# Rendering Pipeline + +Rendering is split into a CPU **producer** — `RenderCore` runs a parallel job that fills POD `MeshCommand`s per visible mesh — and a serial **consumer** — `BGFXRenderer` walks the command cache once per camera view and submits to bgfx. It is a forward renderer: no depth prepass, no shadows, no per-light data; opaque geometry is auto-instanced, transparents are distance-sorted. This doc maps the frame's data flow, the view-ID layout (which differs between editor and game builds), and the sharp edges. + +> Verified against engine commit 047f57b8, 2026-07-10. + +## Overview + +The hot-path design goal is **no virtual calls in the submit loop**: everything the renderer needs per mesh (`BatchKey`, `VertexBufferIdx`, `IndexBufferIdx`, `IsTransparent`, `SupportsInstancing`) is precomputed into the `MeshCommand` by the parallel mesh job. bgfx runs single-threaded (`bgfx::renderFrame()` is called before `bgfx::init` to suppress the render thread), with `ViewMode::Sequential` on camera views — submission order *is* draw order. + +Backend selection: Vulkan is forced on Linux, D3D11 on UWP ("Something is up with using DX12 and my shaders"); other platforms take bgfx's default (D3D11/12 on Windows, Metal on macOS). VSync is always on (`BGFX_RESET_VSYNC`). + +## Key Files + +| Path | Role | +|------|------| +| `Source/Cores/Rendering/RenderCore.cpp` / `Source/Cores/Rendering/RenderCore.h` | Producer: parallel cull + `MeshCommand` fill | +| `Modules/Moonlight/Source/Renderer.cpp` / `Modules/Moonlight/Source/Renderer.h` | Consumer: `BGFXRenderer` — view setup, instancing, submit | +| `Modules/Moonlight/Source/RenderCommands.h` | `MeshCommand`, `DebugColliderCommand`, the stub `LightCommand` | +| `Modules/Moonlight/Source/Utils/CommandCache.h` | Slot-based command storage shared producer↔consumer | +| `Modules/Moonlight/Source/Camera/CameraData.h` | Per-camera view/projection/frustum/output description | +| `Modules/Moonlight/Source/Device/FrameBuffer.h` | Per-camera render target, recreated on resize/reset | +| `Modules/Moonlight/Source/RenderPasses/PickingPass.cpp` | Editor-only entity-ID pass (see `Docs/Editor-Havana.md`) | +| `Modules/Moonlight/Source/Graphics/DynamicSky.cpp` | Procedural sky + the only live "sun" light | + +## How It Works + +### Frame data flow + +```mermaid +flowchart LR + subgraph ECS["ECS (main thread + jobs)"] + T["Transform + Mesh components"] --> RC["RenderCore::Update"] + RC -->|"Burst chunks × SimpleJobSystem"| J["parallel mesh jobs:
frustum-test, fill MeshCommand"] + end + J -->|"MeshCache.Update(slot, cmd)"| MC["CommandCache<MeshCommand>
(slot per Mesh component)"] + subgraph R["BGFXRenderer::Render (main thread, serial)"] + V1["per camera: RenderCameraView(id)"] --> OP["opaque loop:
instanced batches + singles"] + OP --> TR["transparent: sort back-to-front,
depth-write off"] + TR --> UI["view 9: UI composite (main cam)"] + UI --> BL["blit camera buffer → texture"] + end + MC --> V1 + BL --> F["bgfx::frame()"] +``` + +### Command caches and slots + +`CommandCache` (`Modules/Moonlight/Source/Utils/CommandCache.h`) is a `vector` with a free-index queue. `RenderCore::OnEntityAdded` `Push`es an empty `MeshCommand` and stores the returned slot index on the `Mesh` component (`Mesh::Id`); `OnEntityRemoved` `Pop`s it; the per-frame mesh job overwrites the slot via `Update`. The same structure holds `CameraData` (managed by `CameraCore`) and `DebugColliderCommand`s. + +Threading contract: **`Push`/`Clear` lock a mutex; `Update`/`Pop`/`Get` do not.** Concurrent job writes are safe only because every job writes distinct slots and nothing `Push`es (which can reallocate the vector) while jobs run — a scheduling guarantee, not a structural one. Also note both `Pop` and `BGFXRenderer::UpdateMeshMatrix` guard with `Id > size()` instead of `>=` — `Id == size()` walks past the end. + +### The mesh job (producer) + +Per frame, `RenderCore::Update` splits the entity list into `GetNumWorkers()` chunks (`Burst::GenerateChunks`) and submits one job per chunk (pattern details in `Docs/Jobs-and-Events.md`). Each job, per entity: + +1. Reads `Transform::GetLocalToWorldMatrix` (lazy-recomputed, see `Docs/Cores-and-Components-Reference.md`). +2. Culls: tests **only the matrix's translation column** (`meshMatrix[3]`) against each camera's `ViewFrustum` — a *point* test, no bounding volume. Sets `camera.VisibleFlags[entIndex]` per camera (the flag vectors are resized on the main thread before dispatch). Cameras with `ShouldCull == false` accept everything. +3. If visible to anyone, fills the `MeshCommand`: mesh pointer, material `SharedPtr` (refcount bump), transform, entity ID, and the precomputed hot fields — `IsTransparent`, `SupportsInstancing`, `BatchKey` (`Material::GetInstanceBatchKey()`, see `Docs/Materials-and-Shaders.md`), and raw bgfx `VertexBufferIdx`/`IndexBufferIdx`. + +If an entity is *not* visible this frame, its slot keeps last frame's command — harmless because per-camera `VisibleFlags` gate consumption. + +`RenderCore` also pokes `renderer.m_time` (delta + total time) directly each update — flagged in-code with "maybe this is fine? … it's not". + +### View ID layout + +`BGFXRenderer::Render` assigns views differently per build flavor: + +| View | Editor build | Game build | +|------|-------------|------------| +| 0 (`kClearView`) | clear only | **main camera** (renders straight to backbuffer — `setViewFrameBuffer` is skipped for id 0) | +| 1 | editor camera (+ `PickingPass` right after) | first non-main camera | +| 2… | non-main cameras, then **main camera last** | further non-main cameras | +| 9 | UI composite (hardcoded) | UI composite (hardcoded) | +| 11+N | Ultralight GPU driver surfaces (`GPUDriver.h` `kViewId`) | same | +| 255 | ImGui (`Engine::Run` passes viewId 255 to `BeginFrame`) | same (when `ME_IMGUI`) | + +Cameras that `ShouldRender == false` or lack a `Buffer` are skipped. Every camera view except view 0 renders into its `FrameBuffer` and ends with `bgfx::blit` of the buffer into `camera.Buffer->Texture` (that's what the editor's scene-view widget samples). + +### Inside `RenderCameraView` + +1. View setup: name, view/projection from `CameraData`, framebuffer (id > 0), viewport from `OutputSize`, clear color packed from `camera.ClearColor`, `ViewMode::Sequential`. +2. **Sky**: `ClearColorType::Procedural` → `DynamicSky::Draw`; `ClearColorType::Skybox` → the skybox model drawn at scale 10 around the camera position. +3. **Opaque loop** over the whole mesh cache (skipping invisible-for-this-camera and null-material commands): + - Transparent commands are deferred into `TransparentIndicies`. + - `SupportsInstancing` commands accumulate into an `InstanceBatch` keyed `(vertexBuffer, indexBuffer, materialKey)` — found by **linear scan** over active batches. + - Everything else submits immediately via `RenderSingleMesh`. +4. **Instanced flush**: each batch submits through `RenderMeshInstanced` — chunked `bgfx::allocInstanceDataBuffer` loops (64-byte `glm::mat4` stride) with the batch's *representative* command binding textures/uniforms/state for the whole batch. +5. **Transparents**: debug-only `ME_ASSERT_MSG` if count ≥ `kMeshTransparencyTempSize` (60) — release builds just grow the vector; sorted **back-to-front** by squared distance to the camera; drawn with depth-*test* on but depth-*write* off. Instancing-capable transparents still go through `RenderMeshInstanced` with `count == 1`. +6. **Debug draw** (when enabled): the gizmo callback (every core's `OnDrawGuizmo`) plus queued `DebugColliderCommand`s. +7. **UI composite** (main camera with a valid `camera.UITexture` only): a screen-space quad at view 9, orthographic, with blend `BLEND_FUNC_SEPARATE(ONE, INV_SRC_ALPHA, INV_DST_ALPHA, ONE)` — premultiplied-alpha-over, chosen after artifacts with plain alpha (the rejected attempts are commented in place). See `Docs/UI-Ultralight-and-ImGui.md`. + +### Draw state binding (`BindMeshDrawState`) + +Texture slots: 0 = diffuse (`s_texDiffuse`), 1 = normal (`s_texNormal`), 2 = opacity (`s_texAlpha`). Missing normal or opacity textures fall back to `m_defaultOpacityTexture` (`Assets/Textures/DefaultAlpha.png`) — yes, **the opacity default is bound to the normal slot too**. Then `Material::Use()` uploads material uniforms, `Material::GetRenderState(state)` merges blend/cull bits, and the material's `ShaderCommand` program is returned for submit. + +### Lighting reality + +- Global uniforms per frame: `s_sunDirection` and `s_sunDiffuse` come from **`DynamicSky`'s sun model** (direction + XYZ-luminance-derived RGB), `u_time` from `RenderCore`. +- `s_ambient` uploads `m_ambient`, which is constructed with `bx::InitNone` and **never assigned anywhere** — the ambient uniform is uninitialized memory. +- The `Light` / `DirectionalLight` components exist but **nothing reads them** into the renderer; `LightCommand` is an empty stub (`float test`). There is exactly one light in practice: the procedural sky's sun. +- `Modules/Moonlight/Source/RenderPasses/DepthPass.h` exists but is empty — **no shadow mapping**. + +### Resize and reset + +`WindowResized` (from the window's resize callback) recreates the editor camera buffer and any camera buffer that `IsMain || MatchMainBufferSize`. `SetMSAALevel` flips reset flags and sets `NeedsReset`; the next `Render` call performs `bgfx::reset` and recreates every camera buffer. `FrameBuffer::ReCreate` destroys and recreates its textures; its separate `Resize` method is an empty TODO. + +## Caveats & Fragility + +- **Point culling**: visibility tests the transform origin only. Large meshes whose origin exits the frustum disappear while still on screen; there are no bounding volumes to fix this per-mesh. +- **View-ID collisions are possible**: camera views count up from 1 (editor) — with ~8+ active cameras they collide with the hardcoded UI view 9; Ultralight surfaces start at 11 (+ buffer index). Nothing validates. +- **`CommandCache::Update`/`Pop` are unlocked** — safe only under the current frame schedule; any new code that `Push`es meshes while mesh jobs run is a reallocation race. +- **Off-by-one guards** in `CommandCache::Pop` and `UpdateMeshMatrix` (`Id > size()` instead of `>=`). +- **Transparency assert is debug-only** and the sort is per-object distance — intersecting/large transparent geometry sorts wrong (standard limitation, no OIT). +- **Instance batch lookup is a linear scan** per opaque instanced mesh (`getBatch`); fine at current batch counts, quadratic-ish if material/geometry variety explodes. +- **Ambient uniform is uninitialized** (`m_ambient` = `bx::InitNone`, never set); shaders sampling `s_ambient` read garbage — effectively "whatever the driver zeroes or doesn't". +- **Light components are decorative** today; adding lights means building the missing `LightCommand` plumbing. +- **`Engine::LoadScene` → `RenderCore::Init` clears the whole mesh cache** (`ClearMeshes`) — anything caching mesh-cache indices across scene loads holds dangling slots. +- **Logging noise**: `Create` logs `BRUH("renderFrame")` twice and `BRUH("Renderer assets")` at warning level every boot. +- Per-camera `bgfx::blit` of the full render target every frame (including the main camera, whose guard is commented out) — bandwidth cost scales with camera count. + +## Related Docs + +- `Docs/Materials-and-Shaders.md` — batch keys, material state, shader cook +- `Docs/Jobs-and-Events.md` — the job dispatch + threading contract behind the mesh job +- `Docs/Cores-and-Components-Reference.md` — `Camera`, `Mesh`, `Transform` component details +- `Docs/UI-Ultralight-and-ImGui.md` — where `camera.UITexture` comes from +- `Docs/Editor-Havana.md` — `PickingPass` and the scene-view texture +- `Docs/State-of-the-Engine.md` — shadows/multi-light improvement notes diff --git a/Docs/Resources-and-Assets.md b/Docs/Resources-and-Assets.md new file mode 100644 index 00000000..7caaca6b --- /dev/null +++ b/Docs/Resources-and-Assets.md @@ -0,0 +1,148 @@ +# Resources and Assets + +All asset loading funnels through the `ResourceCache` singleton: a string-keyed map of `SharedPtr` with fully **synchronous** loading, `.meta` JSON sidecars per asset, and an editor/tools-only cook step (`Export()`) that compiles sources (`.png`, `.fbx`, `.vert`…) into runtime formats (`.dds`, `.assbin`, `..bin`). Lifetime is reference-counted with an aggressive per-frame sweep. This doc covers the load flow, the metadata/cook system, the resource type inventory, and how to add a new type. + +> Verified against engine commit 047f57b8, 2026-07-10. + +## Overview + +A `Resource` is anything constructed from a `Path` with a `Load()` override. `ResourceCache::Get(path)` is the single entry point — components call it directly during deserialization (`Mesh` materials, `AudioSource` sounds, prefab JSON…), which is why scene loading blocks on asset IO. There is no async loading, no streaming, and no load-time budget; a cold `Get` pays full Assimp import on the calling (main) thread. + +Cooking is driven by metadata, not by a build step: in `ME_TOOLS` builds, `Get` checks whether the asset's compiled twin exists / whether the source changed, and shells out to the appropriate compiler on the spot. Shipped (non-tools) builds only ever read the compiled files. + +## Key Files + +| Path | Role | +|------|------| +| `Modules/Dementia/Source/Resource/ResourceCache.h` | `Get` template — the whole load/cook decision tree | +| `Modules/Dementia/Source/Resource/ResourceCache.cpp` | `Dump`, `TryToDestroy`, `LoadMetadata`, tools-only `FindByName` | +| `Modules/Dementia/Source/Resource/Resource.h` | Base class: `Load`, `Reload`, `Metadata`, `FilePath` | +| `Modules/Dementia/Source/Resource/MetaFile.h` | `MetaBase` — sidecar contract: `Export()`, `GetExtension2()`, `FlaggedForExport` | +| `Modules/Dementia/Source/Resource/MetaRegistry.h` | Extension → metadata factory map, `ME_REGISTER_METADATA` | +| `Modules/Dementia/Source/Resource/AssetMetaCache.h` / `.cpp` | Timestamp cache backing the "was it modified" check | +| `Modules/Moonlight/Source/Graphics/Texture.h` / `Modules/Moonlight/Source/Graphics/Texture.cpp` | Texture resource + `texturec` cook | +| `Modules/Moonlight/Source/Graphics/ModelResource.h` / `Modules/Moonlight/Source/Graphics/ModelResource.cpp` | Assimp model resource + `assbin` cook | +| `Modules/Moonlight/Source/Graphics/ShaderFile.h` | Shader binary resource + `shaderc` cook (see `Docs/Materials-and-Shaders.md`) | +| `Source/Resources/JsonResource.h`, `Source/Resources/SoundResource.h` | Engine-side resource types | + +## How It Works + +### `Get` decision tree + +```mermaid +sequenceDiagram + participant C as Caller (main thread) + participant RC as ResourceCache + participant MR as MetaRegistry + participant Tool as External compiler (shaderc/texturec/assimp) + C->>RC: Get(path) + RC->>RC: m_resourceStack.find(path.FullPath) + alt cache hit + RC-->>C: dynamic_pointer_cast (null if T mismatches!) + else miss + RC->>MR: LoadMetadata(path) — factory by file extension + MR-->>RC: MetaBase subclass (or null if extension unregistered) + RC->>RC: compiledFileExists? (path + "." + GetExtension2()) + opt ME_TOOLS && (FlaggedForExport || !compiledFileExists) + RC->>Tool: metaFile->Export() — shell out, blocking + RC->>RC: metaFile->Save(), AssetMetaCache::Update + end + RC->>RC: construct T(path, args...), SetMetadata, T::Load() + RC->>RC: m_resourceStack[FullPath] = res + RC-->>C: SharedPtr + end +``` + +Details that matter: + +- **Cache hits skip everything** — no metadata check, no export check, and the result is `dynamic_pointer_cast`: calling `Get` on a path already cached as another type returns **null silently**. +- The missing-file paths differ: source missing + compiled missing + not flagged → `YIKES("Failed to load resource: …")` and a null return; source missing but compiled present → logs `"Shit don't exist bro: …"` and **continues** (loads from the compiled file). +- The cache key is the raw `Path::FullPath` string — no normalization/dedup beyond what `Path` itself does. + +### Metadata sidecars + +`LoadMetadata` looks up the file **extension** in the `MetaRegistry` and constructs the registered `MetaBase` subclass. If `.meta` exists it's parsed and deserialized; in **editor builds** a missing `.meta` is created on the spot and the asset is flagged for export. `FlaggedForExport` is also set when `AssetMetaCache` (a JSON timestamp cache, loaded at `ResourceCache` construction and saved at destruction) sees a different `LastModified` than the sidecar — and it defaults to *modified* for assets it has never seen. + +Registered metadata types: + +| Extension | Metadata type | Compiled twin (`GetExtension2`) | Cook tool | +|-----------|---------------|--------------------------------|-----------| +| `png`, `jpg` | `TextureResourceMetadata` (+Jpg) | `dds` | `texturec` (`--as dds`, optional `-m` mips; BC1–BC7/ETC format options) | +| `fbx`, `obj` | `ModelResourceMetadata` (+Obj) | `assbin` | Assimp binary export | +| `vert`, `frag` | `ShaderFileMetadata` / `FragShaderFileMetadata` | `.bin` (e.g. `spirv.bin`, `dx11.bin`, `metal.bin`) | `shaderc` from `Tools//` | +| `wav`, `mp3` | `AudioResourceMetadata` (+Mp3) — declared in `Source/Components/Audio/AudioSource.h` | — | none (pass-through) | +| `mat` | `MaterialResourceMetadata` (declared in `Modules/Moonlight/Source/Graphics/Material.h`) | `mat` | none — note the twin check degenerates to looking for `Foo.mat.mat` | + +Extensions **not** in this table (e.g. `.json`, `.lvl`, `.html`) get **no metadata**: `LoadMetadata` returns null, no cook step runs, and `Get` goes straight to `T::Load()` on the source file. + +### Lifetime: `Dump()` every frame + +`m_resourceStack` holds one owning `SharedPtr` per resource. `ResourceCache::Dump()` — called **once per frame** at the bottom of `Engine::Run` — erases every entry whose `use_count() == 1`, i.e. anything nobody else currently references. Consequences: + +- The cache is *not* an LRU or preload cache. Holding a resource across frames requires holding the `SharedPtr` (components do: `Mesh::MeshMaterial`, `AudioSource`, etc.). +- A `Get` whose result you drop is loaded, then destroyed within a frame — repeated transient `Get`s of a heavy asset thrash disk and GPU uploads. +- `TryToDestroy(Resource*)` is the targeted variant of the same refcount-1 erase. + +`Reload()` exists on `Resource` but is a no-op default; there is no automatic hot-reload — the editor achieves "reimport" by flagging metadata for export and re-running `Get` after eviction. + +### Tools-only path resolution + +`ResourceCache::FindByName(root, filename)` (`ME_TOOLS` only) does a **recursive directory walk** matching by bare filename — convenient for editor asset lookups, `O(entire asset tree)` per call, and returns the *first* match, so duplicate filenames in different folders are ambiguous. + +## How to Extend + +### Add a resource type + +1. Subclass `Resource`: + +```cpp +// Source/Resources/CurveResource.h +#pragma once +#include "Resource/Resource.h" + +class CurveResource + : public Resource +{ +public: + CurveResource( const Path& path ) : Resource( path ) {} + virtual bool Load() override; // parse FilePath (or its compiled twin); return success +private: + // parsed data +}; +``` + +2. (Optional — only if the type needs cooking or import settings) add a `MetaBase` subclass and register it against the extension: + +```cpp +struct CurveMetadata : public MetaBase +{ + CurveMetadata( const Path& p ) : MetaBase( p ) {} + virtual std::string GetExtension2() const override { return "curvebin"; } + virtual void Export() override { /* write FilePath + ".curvebin" */ } + virtual void OnSerialize( json& outJson ) override {} + virtual void OnDeserialize( const json& inJson ) override {} +}; +ME_REGISTER_METADATA( "curve", CurveMetadata ); +``` + +3. Load it anywhere with `ResourceCache::GetInstance().Get( Path( "Assets/Curves/Jump.curve" ) )` and **store the `SharedPtr`** on whatever owns it — otherwise the next `Dump()` evicts it. +4. If the resource wraps GPU/API handles, release them in the destructor — that *is* reliably called on eviction (unlike cores; see `Docs/ECS.md`). + +## Caveats & Fragility + +- **Everything is synchronous on the main thread** — model import, texture upload, shader compile (a shell-out!) all block the frame. First-touch hitches are structural, not incidental. +- **Not thread-safe.** `m_resourceStack` is an unguarded `std::map`; calling `Get` from a job is a data race (see `Docs/Jobs-and-Events.md`). +- **Type-mismatched cache hit returns null silently** (`dynamic_pointer_cast` with no log). Two systems loading the same path as different types is a quiet failure mode. +- **Refcount-1 eviction every frame** means "cache" semantics most engines have (keep-warm, budget-based eviction) don't exist; transient `Get`s are full reloads. +- **Editor builds mutate the asset tree on read**: missing `.meta` files are created, sidecars are rewritten, exports are triggered — running the editor is not read-only with respect to `Assets/`. +- **Cook failures are soft**: `Export()` implementations shell out and don't propagate failure; a failed compile typically surfaces later as a missing/stale compiled twin (`YIKES` on next run) or a broken load. +- **`AssetMetaCache` treats unknown assets as modified** — a fresh checkout re-exports everything it touches on first editor run. +- **Path-string keying**: `Assets/Foo.png` vs an absolute path to the same file are distinct cache entries; consistency of how callers build `Path`s is load-bearing. +- **`FindByName` first-match semantics** with duplicate filenames across folders. + +## Related Docs + +- `Docs/Materials-and-Shaders.md` — the `shaderc` cook in full detail +- `Docs/Jobs-and-Events.md` — why `Get` must stay on the main thread +- `Docs/Serialization-and-Scenes.md` — components resolving asset paths during deserialize +- `Docs/State-of-the-Engine.md` — async-loading and cache-policy improvement notes diff --git a/Docs/Scripting-DotNet.md b/Docs/Scripting-DotNet.md new file mode 100644 index 00000000..c469413c --- /dev/null +++ b/Docs/Scripting-DotNet.md @@ -0,0 +1,123 @@ +# Scripting (.NET 8) + +Game scripts are C# classes implementing `IGameScript`, hosted in-process via **hostfxr** (.NET 8). The C++ side talks to managed code through a hand-maintained function-pointer table in both directions: C++ loads `[UnmanagedCallersOnly]` bridge functions from `ScriptCore.dll`, and hands C# a struct of engine callbacks (`ScriptEngineAPI`). Scripts live in a collectible `AssemblyLoadContext` — the groundwork for hot reload exists, but reload itself is not wired. This doc covers the bootstrap chain, both API surfaces, platform status, and the add-a-binding recipe. + +> Verified against engine commit 047f57b8, 2026-07-10. + +## Overview + +The feature-flag chain is `DEFINE_ME_DOTNET` (set by Sharpmake **only when the .NET host directory exists** — see `Docs/Build-System.md`) → `ME_DOTNET` → `ME_SCRIPTING`. Scripting boots lazily: constructing a `ScriptCore` (a scene-loaded core — `Docs/ECS.md`) calls `ScriptEngine::Init()`. No `ScriptCore` in the scene's `"Cores"` array → no .NET runtime in the process. + +## Key Files + +| Path | Role | +|------|------| +| `Source/Scripting/ScriptHost.h` / `Source/Scripting/ScriptHost.cpp` | RAII hostfxr wrapper: init runtime, `LoadFunction("Namespace.Class, Assembly", method)` | +| `Source/Scripting/ScriptEngine.h` / `Source/Scripting/ScriptEngine.cpp` | Static façade: init, `CreateScript`, per-frame calls, fields JSON | +| `Source/Scripting/Generated/ScriptEngineAPI.generated.h` | The C++→C# callback table (**hand-written** — first line: "not actually auto generated") | +| `Source/Scripting/Bindings/BindingContext.h` / `.cpp` | Script-world pointer + name-keyed component ops (`RegisterComponent`) | +| `Source/Scripting/Bindings/` (`Entity`, `ImGui`, `Components/`, `Systems/`) | Individual binding implementations | +| `Source/Scripting/ScriptCore.runtimeconfig.json` | Runtime config (net8.0) handed to hostfxr | +| `Source/Cores/Scripting/ScriptCore.cpp` | The ECS core driving `ScriptOnUpdate` per entity | +| `Source/Components/Scripting/ScriptComponent.h` | Script name + `m_dotnetHandle` + saved-fields JSON | +| `Modules/ScriptCore/Source/` | The managed side (below) | +| `Modules/ScriptCore/ScriptCore.sharpmake.cs` | Builds `ScriptCore.dll` (net8.0, unsafe) | + +Managed side highlights: `IGameScript.cs` (`OnStart`/`OnUpdate(float)`/`OnDestroy`/`OnEditorInspect`), `Engine.cs` (`EngineAPIBindings` — `[StructLayout(Sequential)]` of `delegate* unmanaged<>` mirroring the C++ struct), `GameScriptALC.cs` (collectible ALC, redirects `ScriptCore` references to the loaded assembly, resolves the rest via `AssemblyDependencyResolver`), `ScriptRegistry.cs` (scans an assembly for `IGameScript` implementors, **keyed by `Type.Name`** — clash TODO in-code), `Inspector.cs` (reflection-driven ImGui field editor), `Script.cs` (base class). + +## How It Works + +### Bootstrap + +```mermaid +sequenceDiagram + participant SC as ScriptCore ctor (scene load) + participant SE as ScriptEngine::Init (C++) + participant H as ScriptHost / hostfxr + participant CS as ScriptCore.dll (C#, "ScriptBridge") + participant G as Game.Script.dll + SC->>SE: Init() + SE->>SE: paths from compile-time macros:
.build/(config)/ScriptCore.dll + Game.Script.dll + SE->>H: Init("ScriptCore.runtimeconfig.json") + H-->>SE: load_assembly_and_get_function_pointer + SE->>CS: LoadFunction ×11 (LoadGameAssembly, SetEngineAPI,
CreateScript, ScriptOnStart/Update/Destroy/EditorInspect,
GetFieldsJson/SetFieldsJson, GetScriptCount/Name) + SE->>SE: fill ScriptEngineAPI struct
(Register_*Bindings) + SE->>CS: SetEngineAPI(&api, sizeof(api)) + Note over CS: size check — mismatch aborts:
"C# rejected our engine API" + CS->>G: LoadGameAssembly → new GameScriptALC
→ ScriptRegistry.Scan + SE-->>SC: ready (script count logged) +``` + +- The dll paths are assembled from compile-time `build_prefix`/`build_platform`/`build_postfix` macros — a TODO admits this should come from Sharpmake/config. `ScriptCore.runtimeconfig.json` is read from the working directory root, not the build dir. +- The **only ABI guard is `sizeof` equality** between `ScriptEngineAPI` (C++) and `EngineAPIBindings` (C#). Same-size mistakes (reordered members, swapped same-width types) are undetectable — order and width in the two files must match exactly. + +### Per-script lifecycle + +`ScriptComponent::Init` (post-deserialize) calls `ScriptEngine::CreateScript(name, entityID)` — C# instantiates the registry type by name and returns an `int` handle stored in `m_dotnetHandle` — then `ScriptOnStart`. `ScriptCore::Update` walks its entities calling `ScriptOnUpdate(handle, dt)` (dormant in editor edit-mode like all loaded cores). `ScriptCore::OnEntityRemoved` fires `ScriptOnDestroy` and invalidates the handle. Public script fields round-trip as JSON (`GetFieldsJson`/`SetFieldsJson`) — that's how the editor inspector persists script data into scenes. + +### Calling the engine from C# + +C# calls flow through the `EngineAPIBindings` function pointers: `Engine.Log`, `Engine.GetTime`, entity ops (`Entity_IsAlive/HasComponent/AddComponent` — name-string keyed through `ScriptBindings::RegisterComponent`), `Transform_Get/SetTranslation/Scale/Rotation`, `Camera_Get/SetClearColor`, `Input_IsKeyDown`, `World_CreateEntity/FindByName`, `BasicUIView_ExecuteJS`, and an ImGui subset for `OnEditorInspect`. ~26 functions total — the API is deliberately small. + +Strings cross the boundary as UTF-8 `uint8_t*`; entities cross as the raw 64-bit `EntityID` value (`Docs/ECS.md`). + +### Platform status + +| Platform | Status | +|----------|--------| +| Win64 | ✅ `DEFINE_ME_DOTNET` when `Globals.DOTNET_Win64_Dir` (the `Microsoft.NETCore.App.Host.win-x64` native pack) exists; `nethost` copied to output | +| Linux | ✅ `Globals.DOTNET_Linux_Dir` in `Tools/BaseProject.sharpmake.cs`; the Nix dev shell (game repo `../flake.nix`) exports `DOTNET_ROOT` and discovers `DOTNET_LINUX_NATIVE_DIR` by `find`-ing the host pack inside the SDK | +| macOS | ❌ no `DEFINE_ME_DOTNET` path — scripting compiles out (the old Mono integration is gone; `ThirdParty/Mono.sharpmake.cs` is a leftover) | +| UWP | ❌ untested/unwired | + +## How to Extend + +### Add a script binding (engine function callable from C#) + +Four places must stay in sync: + +1. **Declare** the function pointer in `Source/Scripting/Generated/ScriptEngineAPI.generated.h` — append to the struct (append, don't reorder): +```cpp +void ( *Transform_LookAt )( EntityID inId, const Vector3* inTarget ); +``` +2. **Implement + register** in the matching binding file (`Source/Scripting/Bindings/Components/Transform.bindings.cpp`), following the `Eng_` static-function pattern, and assign it inside that file's `Register_TransformBindings( ScriptEngineAPI& )`. +3. **Mirror** it in `Modules/ScriptCore/Source/Engine.cs` — add the `delegate* unmanaged<...>` member to `EngineAPIBindings` **at the same position** with matching widths, plus a friendly wrapper on the `Engine` static class. +4. Rebuild both sides. The `sizeof` check will catch added-on-one-side-only; it will *not* catch reordering. + +For a new *component* exposed to `Entity_Has/AddComponent`, call `ScriptBindings::RegisterComponent( "MyComponent" )` during binding registration (`Source/Scripting/Bindings/BindingContext.h`). + +### Add a game script + +```csharp +public class Spinner : Script // or any IGameScript implementor +{ + public float Speed = 90f; // public fields surface in the inspector + serialize + + public override void OnUpdate(float dt) + { + var rot = Engine.Transform.GetRotation(Entity); + rot.Y += Speed * dt; + Engine.Transform.SetRotation(Entity, rot); + } +} +``` + +Build into `Game.Script.dll` (the game's `UserGameScript` Sharpmake project), add a `ScriptComponent` naming `Spinner` to an entity, and make sure the scene loads `ScriptCore`. + +## Caveats & Fragility + +- **The "generated" API isn't generated** — two hand-maintained mirrors with a `sizeof` tripwire. Reordering or same-width type swaps corrupt calls silently. Treat the struct as append-only. +- **Script lookup is `Type.Name`** — two scripts with the same class name in different namespaces clash (in-code TODO). +- **`World_FindByName` is broken by design right now**: the binding only scans the scene root's *direct children* (in-code: "this shit is busted… needs a proper recursive walk"). +- **Hot reload is unfinished**: `GameScriptALC` is collectible and `ReloadGameAssembly` exists on the C# side, but the C++ load of it is commented out — changing scripts means restarting. +- **Handles are bare ints** with no generation — a stale `m_dotnetHandle` after a failed load is `-1`-guarded, but nothing validates live handles against instance identity. +- **Paths are compile-time guesses** (`.build//…`, runtimeconfig in CWD) — running the executable from a different working directory breaks script init with `YIKES` logs. +- **Scripting requires the scene to declare `ScriptCore`** — a `ScriptComponent` without the core silently never runs (component `Init` still creates the instance if the engine initialized scripting earlier in another scene). +- **All script calls are synchronous on the main thread** — a slow `OnUpdate` is a frame hitch; there is no script sandboxing or time budget. + +## Related Docs + +- `Docs/ECS.md` — `ScriptCore` as a scene-loaded core; `EntityID` semantics +- `Docs/Build-System.md` — `DOTNET_*_Dir` detection, `ScriptCore`/`UserGameScript` projects, flake.nix +- `Docs/Editor-Havana.md` — where `OnEditorInspect` renders +- `Docs/State-of-the-Engine.md` — codegen and hot-reload recommendations diff --git a/Docs/Serialization-and-Scenes.md b/Docs/Serialization-and-Scenes.md new file mode 100644 index 00000000..e62fac81 --- /dev/null +++ b/Docs/Serialization-and-Scenes.md @@ -0,0 +1,107 @@ +# Serialization and Scenes + +Scenes are JSON `.lvl` files: a `"Cores"` array naming the systems the scene needs, and a `"Scene"` array of entities — each a `Name`, a `Components` list, and recursive `Children`. Everything is instantiated **by registry name string**; there is no schema version, no migration, and no asset GUIDs. Prefabs are the same entity-JSON shape loaded through `World::CreateFromPrefab`. This doc covers both formats, the load/save flows, and the merge-by-name semantics that make model expansion work. + +> Verified against engine commit 047f57b8, 2026-07-10. + +## Overview + +The serialization contract is defined by the ECS base classes (`Docs/ECS.md`): components implement `OnSerialize(json&)` / `OnDeserialize(const json&)` with `Init()` guaranteed after deserialize; cores implement the same pair, where the sealed `Serialize` writes the `"Type"` name. Scene structure mirrors the **transform hierarchy** — saving walks `Transform` children from the scene root, which has consequences (below). + +## Key Files + +| Path | Role | +|------|------| +| `Source/World/Scene.h` / `Source/World/Scene.cpp` | `.lvl` load/save, `LoadSceneObject`, `SaveSceneRecursively`, `LoadCore` | +| `Source/Engine/World.cpp` | `CreateFromPrefab` / `LoadPrefab` (same shape, JSON via `ResourceCache`) | +| `Source/ECS/ComponentDetail.h` / `Source/ECS/CoreDetail.h` | The name → factory registries everything resolves through | +| `Source/Engine/Engine.cpp` | `Engine::LoadScene` — the orchestration around `Scene::Load` (see `Docs/Architecture.md`) | + +## How It Works + +### The `.lvl` format + +Real example (trimmed from `../Assets/Example.lvl` in the Drumsmith project): + +```json +{ + "Cores": [ + { "Type": "NoteHighwayCore" } + ], + "Scene": [ + { + "Name": "Snare1", + "DestroyOnLoad": true, + "Components": [ + { + "Type": "Transform", + "Position": [-1.0, 0.0, 0.0], + "Rotation": [0.0, -0.0, 0.0], + "Scale": [1.0, 1.0, 1.0] + } + ], + "Children": [ /* same entity shape, recursive */ ] + } + ] +} +``` + +- `"Cores"` entries carry a `"Type"` (registered core name — game cores like `NoteHighwayCore` included) plus whatever the core's `OnSerialize` wrote. Cores flagged `SetIsSerializable(false)` (e.g. `RenderCore`) never appear. +- Entity `"Name"` is stored on the entity's **Transform** — it's assigned via `Transform::SetName` on load and read from `Transform::GetName()` on save. +- Component objects carry `"Type"` + component-specific fields (e.g. `Mesh` embeds a `"Material"` object — see `Docs/Materials-and-Shaders.md`). + +### Load flow + +```mermaid +flowchart TD + A["Scene::Load(world)"] --> B["world.IsLoading = true
(Simulate is suppressed)"] + B --> C["parse JSON"] + C --> D["for each Cores entry:
World::AddCoreByName → core.Deserialize
(miss → YIKES 'Core not registered', skipped)"] + D --> E["for each Scene entry: LoadSceneObject (recursive)"] + E --> F{"parent has child
with this Name?"} + F -- yes --> G["REUSE that entity (merge)"] + F -- no --> H["World::CreateEntity"] + G --> I["for each component:
AddComponentByName → Deserialize → Init"] + H --> I + I --> J["SetActive(true), DestroyOnLoad flag,
recurse into Children"] + J --> K["world.IsLoading = false"] +``` + +Key behaviors: + +- **Merge-by-name**: when loading a child entity, if the parent's transform already has a child with the same name, that entity is **reused** and components deserialize onto it. This is deliberate: `Model::Init` (run during the parent's component loop) expands model files into child entities (`Docs/Cores-and-Components-Reference.md`); when the scene JSON then loads those same children, merge-by-name updates the spawned entities instead of duplicating them. Root-level entities (no parent) never merge. +- Components/cores whose registry name isn't found are **skipped with a log line**, and the rest of the entity keeps loading — a renamed class silently drops its data from every existing scene. +- `AddComponentByName` on a reused entity that already has the component returns the existing one (`AddComponent` semantics), so re-deserialization mutates in place. +- `World::Simulate` returns immediately while `IsLoading` — entity↔core reconciliation happens after load, in the `Simulate()` call inside `Engine::LoadScene`. +- `Scene::Load` returning false (empty/missing file) is an assert unless the scene `IsNewScene()` (empty path). + +### Save flow (`Scene::Save`, editor-only) + +Walks the **transform hierarchy** from the scene root: for each transform child — `Name`, `DestroyOnLoad` (from the entity), every component's `Serialize`, then recursion into transform children. Cores are appended from `World::GetAllCores()`, filtered by `GetIsSerializable()`. Output is pretty-printed JSON (`dump(4)`), and also **echoed to stdout** (`std::cout`) on every save. + +Because traversal is transform-based: + +- **Entities without a `Transform` are never saved.** They exist at runtime only. +- Entity order in the file is child-vector order, and *all* live entities under the root get saved — including runtime-spawned ones (unless the game removes them before save; `DestroyOnLoad` only affects *unloading*, not saving). + +### Prefabs + +`World::CreateFromPrefab(path, parentTransform)` loads the JSON through `ResourceCache::Get` (parsed once, cached — see `Docs/Resources-and-Assets.md`) and runs `LoadPrefab`, which is the same recursive entity-loading logic (including merge-by-name against the target parent). There is no prefab *saving* API and no nested-prefab or override system — a prefab is just an entity subtree in a `.json` file under `Assets/`. + +## Caveats & Fragility + +- **Names are the schema.** Component class names, core class names, and material type names are the only linkage between files and code. Renaming any of them orphans data in every scene/prefab silently (one warning log per instance at load). There is no versioning or migration hook — if you rename, migrate the JSON yourself (`grep` + `sed` over `Assets/`). +- **No asset GUIDs**: components store raw relative paths to assets; moving/renaming an asset breaks references with no editor-assisted fixup. +- **Merge-by-name is also a collision hazard**: two sibling entities with the same name merge into one on load; the second's components overwrite the first's. +- **Save-echo to stdout** and save being editor-only means game builds cannot persist world state through this path (no runtime save-game system). +- **Duplicate component entries** in JSON deserialize onto the same instance sequentially (last one wins per field). +- **`DestroyOnLoad: false` entities survive `World::Unload`** but are still written into whatever scene you save while they're alive — easy to leak persistent singletons into unrelated scene files. +- **Transform is load-bearing**: the `"Name"` and the hierarchy live on it; an entity without one is invisible to save and unparentable at load. + +## Related Docs + +- `Docs/ECS.md` — registries, `AddComponentByName`, `Init`-after-deserialize contract +- `Docs/Architecture.md` — `Engine::LoadScene` orchestration and the double-`Simulate` quirk +- `Docs/Materials-and-Shaders.md` — the embedded material JSON +- `Docs/Editor-Havana.md` — how play-in-editor uses save/load round-trips +- `Docs/State-of-the-Engine.md` — versioning/migration recommendations diff --git a/Docs/State-of-the-Engine.md b/Docs/State-of-the-Engine.md new file mode 100644 index 00000000..8bcd5d7c --- /dev/null +++ b/Docs/State-of-the-Engine.md @@ -0,0 +1,149 @@ +# State of the Engine + +> **This doc is opinion.** Every other doc in `Docs/` is factual; this one rates, prioritizes, and recommends. Never cite it as a description of behavior — cite the subsystem docs. Assessed at engine commit 047f57b8, 2026-07-10. + +MitchEngine is a real, working engine: it ships Drumsmith, runs a full editor on Linux/Windows, hosts .NET 8 scripting, and has genuinely thoughtful hot paths (the zero-virtual render submit, automatic instancing, transform dirty caching). Its weaknesses are the classic solo-engine kind: half-migrations left in place (Mono→.NET, fixed→variable timestep, Ultralight→web-UI), correctness debt that hasn't hurt *yet* (variable-dt physics, name-string schemas, uninitialized ambient), and workflow traps that cost real work (Stop-reverts-to-last-save). The theme of this assessment: **finish or delete the half-things, then invest where the engine already punches above its weight.** + +## 1. Maturity Scorecard + +Ratings: **Solid** (rely on it) · **Usable** (works, know the sharp edges) · **Fragile** (works until it doesn't) · **Experimental** (incomplete by design) · **Abandoned-in-place** (do not extend). + +| Subsystem | Rating | Why (one line) | Doc | +|-----------|--------|----------------|-----| +| Platform/Window/Input/Config | **Solid** | SDL2 everywhere, boring in the good way; DPI + crash-safe config are the gaps | [Platform-Window-Input-Config.md](Platform-Window-Input-Config.md) | +| ECS core | **Usable** | Clean model, working registries; 64-core bitset cap, `shared_ptr` storage, activation-driven filter refresh | [ECS.md](ECS.md) | +| Frame loop & timing | **Fragile** | Variable timestep with dead fixed-step remnants; hardcoded core order; zero teardown | [Architecture.md](Architecture.md) | +| Jobs | **Usable** | Simple pool that does its one job; wait-race + no dependencies/cancellation | [Jobs-and-Events.md](Jobs-and-Events.md) | +| Events | **Fragile** | Immediate-only, not thread-safe, dangling-receiver risk, decoy queue API | [Jobs-and-Events.md](Jobs-and-Events.md) | +| Rendering pipeline | **Usable** | Producer/consumer split and instancing are the engine's best work; point culling and view-ID collisions are the debt | [Rendering-Pipeline.md](Rendering-Pipeline.md) | +| Lighting & shadows | **Experimental** | One procedural sun, uninitialized ambient uniform, dead `Light` components, empty `DepthPass` — lighting is a façade | [Rendering-Pipeline.md](Rendering-Pipeline.md) | +| Materials & shaders | **Usable** | Clear contract + offline cook; batch-key discipline is manual; ShaderGraph half-finished | [Materials-and-Shaders.md](Materials-and-Shaders.md) | +| Resources & assets | **Fragile** | Sync-blocking loads, per-frame refcount eviction, silent type-mismatch nulls; the metadata/cook design itself is sound | [Resources-and-Assets.md](Resources-and-Assets.md) | +| Serialization & scenes | **Fragile** | Name strings are the schema; no versioning/migration; save traverses transforms only | [Serialization-and-Scenes.md](Serialization-and-Scenes.md) | +| Physics | **Usable** | Standard Bullet integration with collision events + raycasts; variable dt and Euler round-trips undermine it | [Cores-and-Components-Reference.md](Cores-and-Components-Reference.md) | +| Audio | **Usable** | FMOD basics + event-driven fire-and-forget; nonstandard update signature; feature-thin (no 3D emitters/mixing story) | [Cores-and-Components-Reference.md](Cores-and-Components-Reference.md) | +| Scripting (.NET 8) | **Experimental** | The hosting chain is genuinely impressive and works on Win64+Linux; hand-mirrored ABI, no hot reload, no macOS | [Scripting-DotNet.md](Scripting-DotNet.md) | +| UI (Ultralight) | **Abandoned-in-place** | 60 fps cap + licensing friction; replacement (web/Vue direction) in progress — do not extend | [UI-Ultralight-and-ImGui.md](UI-Ultralight-and-ImGui.md) | +| Editor (Havana) | **Usable** | Real widget set, GPU picking, gizmos; Stop-discards-unsaved-work is a data-loss trap; undo coverage partial | [Editor-Havana.md](Editor-Havana.md) | +| Build system | **Usable** | Sharpmake graph is coherent; silent directory-existence feature variance bites every fresh machine | [Build-System.md](Build-System.md) | + +## 2. Platform Support Matrix + +| Capability | Win64 | Linux | macOS | UWP | +|------------|-------|-------|-------|-----| +| Build + run game | ✅ primary | ✅ active dev | ⚠️ historically yes, not recently verified | ⚠️ configs exist, untested | +| Havana editor | ✅ | ✅ | ⚠️ unverified | — | +| Scripting (.NET 8) | ✅ | ✅ (Nix shell wiring) | ❌ no host path (Mono era ended) | ❌ | +| Audio (FMOD) | ✅ | ✅ | ✅ (SDK path exists) | ✅ (SDK path exists) | +| UI (Ultralight 1.4) | ✅ | ✅ (GTK3 stack) | ✅ | ❌ | +| Profiling (Optick) | ✅ | ⚠️ engine parses `.opt` captures, but the build define is Win64-only | ❌ | ❌ | +| Graphics backend | D3D11/12 | Vulkan (forced) | Metal | D3D11 (forced; DX12 shader issues) | + +The stated bar (per the game project's conventions) is: Win64/macOS/Linux must compile and run; UWP must not be actively broken. macOS is the platform most at risk of silent rot — no scripting, no CI, no recent verification. + +## 3. Half-Finished & Vestigial Inventory + +| Item | Location | State | Verdict | +|------|----------|-------|---------| +| Uninitialized ambient uniform | `Modules/Moonlight/Source/Renderer.h` (`m_ambient`, `bx::InitNone`) | Uploads garbage every frame | **Fix now** (one line + an editor control) | +| `DepthPass` | `Modules/Moonlight/Source/RenderPasses/DepthPass.h` | Empty shell | **Finish** — it's the natural home for shadow mapping | +| `LightCommand` | `Modules/Moonlight/Source/RenderCommands.h` | `float test;` stub | **Finish** with DepthPass work (per-light data plumbing) | +| `Light` / `DirectionalLight` components | `Source/Components/Lighting/` | Serialized, inspected, never consumed | **Finish or delete** — currently they lie to the user | +| Fixed-timestep remnants | `Source/Engine/Engine.cpp` (`FPS`, `MaxDeltaTime`, dead `fmod`) | Disabled mid-migration | **Decide** — physics wants fixed; either implement an accumulator loop or delete the remnants | +| `EventManager::Queue` path | `Modules/Dementia/Source/Events/Event.h` (body commented) + `FirePendingEvents` decoy | Machinery exists, nothing enqueues | **Finish or delete the decoy** — deferred delivery would also fix event re-entrancy pain | +| Legacy job systems | `Modules/Dementia/Source/Work/` (`Job`, `JobEngine`, `JobQueue`, `Pool`, `Worker`) + `Modules/Dementia/Source/Core/JobSystem.h` | Only referenced by commented-out code + stale includes in `Source/Engine/Engine.h` | **Delete** | +| Mono remnants | `ThirdParty/Mono.sharpmake.cs`, `Globals.MONO_*_Dir` checks | Define nothing | **Delete** | +| `Collider2D` | `Source/Components/Physics/Collider2D.h` | No core consumes it | **Delete** (revive only with a real 2D physics plan) | +| `Canvas` | `Source/Components/UI/Canvas.h` | Empty file | **Delete** | +| `ShaderGraphMaterial` + ShaderEditor | `Modules/Moonlight/Source/Materials/ShaderGraphMaterial.h`, `Tools/ShaderEditor` | Texture-slot-3 bug, per-instance uniform creation, external tool dependency | **Decide** — finish (fix slots, ship the tool) or delete and stay code-material-only | +| Ultralight | `Source/UI/`, `Source/Cores/UI/` | Removal declared in commit history; Vue/web direction visible in `../flake.nix` | **Finish the removal** | +| `ScriptEngineAPI.generated.h` | `Source/Scripting/Generated/` | Hand-written mirror pair with `sizeof` tripwire | **Automate** — generate both sides from one description | +| Script hot reload | `Modules/ScriptCore/Source/GameScriptALC.cs` (collectible ALC) + commented `ReloadGameAssembly` | Groundwork only | **Finish** — the hard part (ALC isolation) is done | +| `World_FindByName` binding | `Source/Scripting/Bindings/Systems/World.bindings.cpp` | Scans root's direct children only (in-code "this shit is busted") | **Fix** (small: recursive walk or name index) | +| `RenderCore::UpdateMesh` | `Source/Cores/Rendering/RenderCore.cpp` | Fully commented out | **Delete** (the per-frame job rewrite made it moot) | +| `UWPWindow` | `Source/Window/UWPWindow.cpp` | Superseded by SDLWindow-on-UWP | **Delete or revive** with a UWP pass | +| `IsRunning` check in `Simulate` | `Source/Engine/World.cpp` (`//continue;`) | Deliberately (?) disabled | **Decide** the intended semantics and either restore or remove the dead check | +| Boot log noise | `YIKES("Engine::InitGame")`, `BRUH("renderFrame")`×2, save-echo to stdout | Error/warn-level noise every session | **Clean** (trivial) | + +## 4. Improvement Themes + +Impact (H/M/L) × Effort (S/M/L). Grouped so related items can share one work session. + +### A. Correctness & data safety +| Item | Impact | Effort | Notes | +|------|--------|--------|-------| +| Editor: snapshot world on Play (or force-save prompt) | **H** | S–M | Kills the #1 data-loss trap (`Editor-Havana.md`); a temp-file save/load on Play is enough | +| Fixed timestep for physics | **H** | M | Accumulator loop feeding `stepSimulation` with fixed dt; the remnants show it was intended | +| Scene versioning + rename migration | **H** | M | Minimal viable: `"Version"` field + a name-alias map consulted by the registries | +| Fix `m_ambient` | M | **S** | Uninitialized GPU uniform; also unlocks actually *having* ambient light | +| Event-system hardening | M | S–M | Auto-deregistering `EventReceiver` destructor + main-thread assert; optionally finish the queue | +| Quaternion transform sync in physics | M | S | Stop round-tripping through Euler ZYX degrees per frame | + +### B. Rendering +| Item | Impact | Effort | Notes | +|------|--------|--------|-------| +| Bounding-volume culling | **H** | M | Point-culling makes large meshes vanish at frustum edges; AABB per `MeshData` + radius test in the mesh job | +| Shadow mapping via DepthPass | **H** | L | The marquee visual feature the engine lacks; brings `LightCommand`/`Light` components to life | +| Multi-light forward loop | M | M | Depends on LightCommand plumbing from the shadow work | +| View-ID allocation scheme | M | S | Replace hardcoded 9/11/255 + counters with a small allocator; removes a whole hazard class | +| ShaderGraph finish-or-delete | M | M/L | Decide before any new material work builds on it | + +### C. Scripting +| Item | Impact | Effort | Notes | +|------|--------|--------|-------| +| Binding codegen (single source of truth) | **H** | M | Generate `ScriptEngineAPI.generated.h` + `EngineAPIBindings` from one manifest; deletes the ABI-drift class of bugs | +| Hot reload | **H** | M | `ReloadGameAssembly` + ALC unload + re-`CreateScript` with fields JSON re-applied | +| macOS .NET host | M | M | Same hostfxr dance with the osx-x64/arm64 host pack; restores platform parity | +| Fix `World_FindByName` | M | **S** | Known-broken API surface | + +### D. Editor & workflow +| Item | Impact | Effort | Notes | +|------|--------|--------|-------| +| Finish Ultralight removal | **H** | L | Unblocks UI work, deletes the GTK3 dependency tail and the 60 fps cap | +| Undo coverage + dirty-scene indicator | M | M | Wrap component add/remove + hierarchy ops in `ICommand`s | +| Generation-time feature report | M | **S** | Print the `DEFINE_ME_*` set per target at Sharpmake time; ends "why is FMOD off" debugging (`Build-System.md`) | +| Async asset import / keep-warm cache | M | M–L | At minimum: stop evicting refcount-1 resources every frame; add an editor preload set | + +### E. Debt removal (one satisfying purge) +Legacy job systems, Mono files, `Collider2D`, `Canvas.h`, `UpdateMesh`, `UWPWindow`, log noise, stale includes in `Source/Engine/Engine.h`. Impact L each but **compounding** — every deleted decoy makes the codebase more honest. Effort: S, mostly deletions. + +```mermaid +quadrantChart + title Improvement candidates (opinion) + x-axis Low Effort --> High Effort + y-axis Low Impact --> High Impact + quadrant-1 Big bets + quadrant-2 Do these first + quadrant-3 When bored + quadrant-4 Question the urge + "Fix m_ambient": [0.08, 0.55] + "FindByName fix": [0.12, 0.45] + "Feature report": [0.15, 0.5] + "Play snapshot": [0.25, 0.9] + "Event hardening": [0.25, 0.5] + "Debt purge": [0.3, 0.35] + "Fixed timestep": [0.45, 0.8] + "Scene versioning": [0.5, 0.75] + "Binding codegen": [0.55, 0.7] + "Hot reload": [0.55, 0.65] + "BV culling": [0.5, 0.6] + "Shadows": [0.85, 0.85] + "Ultralight removal": [0.9, 0.75] +``` + +## 5. Top 10 Priorities + +1. **Snapshot-on-Play** — *why now:* it silently destroys real work today. *First step:* serialize to a temp `.lvl` in `EditorApp::StartGame`, reload it (not the config scene) in `StopGame`. → `Editor-Havana.md` +2. **Fix `m_ambient`** — *why now:* shipping garbage to the GPU; 10-minute fix. *First step:* initialize + expose in `RenderCore::OnEditorInspect`. → `Rendering-Pipeline.md` +3. **Debt purge (theme E)** — *why now:* cheap, and every future task navigates past the corpses. *First step:* delete the legacy `Work/` job files + `Engine.h` includes; build all targets. +4. **Fixed timestep for physics** — *why now:* Drumsmith is a rhythm game; timing determinism is product-critical. *First step:* accumulator in `Engine::Run` driving `PhysicsCore` at fixed dt with interpolation flag. → `Architecture.md` +5. **Scene versioning + rename aliases** — *why now:* every rename risk grows with content volume. *First step:* write `"Version": 1` on save; add alias map to component/core registries. → `Serialization-and-Scenes.md` +6. **Finish Ultralight removal** — *why now:* it's already declared dead; limbo is the worst state. *First step:* land the web-UI spike behind `ME_UI`, delete `Source/UI/Graphics/GPUDriver.*` last. → `UI-Ultralight-and-ImGui.md` +7. **Script binding codegen** — *why now:* before the API grows; every added binding is currently a 4-file ABI hazard. *First step:* a small generator (even a python script) emitting both structs from a manifest. → `Scripting-DotNet.md` +8. **Script hot reload** — *why now:* biggest iteration-speed win available; groundwork exists. *First step:* wire `ReloadGameAssembly`, re-create instances from `ScriptComponent` names + fields JSON. → `Scripting-DotNet.md` +9. **Bounding-volume culling** — *why now:* correctness bug masquerading as an optimization task. *First step:* store an AABB on `MeshData` at import; sphere-test in the mesh job. → `Rendering-Pipeline.md` +10. **Shadow mapping** — *why now:* highest visual payoff; the empty `DepthPass` and light components are waiting. *First step:* single-cascade directional shadow into `DepthPass`, sampled in `Diffuse.frag`. → `Rendering-Pipeline.md` + +## 6. Reassessment Triggers + +Re-score the affected rows when any of these land: Ultralight removal completes (UI row + Linux deps) · shadows/multi-light ship (lighting row) · scripting ships inside a released game build (scripting row) · a macOS build is verified again (platform matrix) · fixed timestep lands (frame loop + physics rows) · scene versioning lands (serialization row). Also re-stamp any subsystem doc whose behavior these changes touch — the freshness contract in [README.md](README.md) applies to this doc too. diff --git a/Docs/UI-Ultralight-and-ImGui.md b/Docs/UI-Ultralight-and-ImGui.md new file mode 100644 index 00000000..7c555890 --- /dev/null +++ b/Docs/UI-Ultralight-and-ImGui.md @@ -0,0 +1,75 @@ +# UI: Ultralight and ImGui + +Two UI systems coexist. **Ultralight** renders HTML/CSS/JS game UI (`BasicUIView` components driven by `UICore`) into a texture the renderer composites over the main camera. **ImGui** renders editor chrome, debug tools, and profiling overlays. Ultralight is **on its way out** — its hard 60 fps cap and licensing friction have the author replacing it (recent commits: "Remaining UI work that WILL be deleted") — so the guidance here is: understand it, ship with it if you must, **don't build new features on it**. + +> Verified against engine commit 047f57b8, 2026-07-10. + +## Overview + +Ultralight is gated by `ME_ULTRALIGHT` → `ME_UI` (only defined when `ThirdParty/UltralightSDK` exists — `Docs/Build-System.md`; currently SDK 1.4). `UICore` is one of the five engine-owned cores and is special-cased in `Engine::LoadScene` (re-added after every scene load — `Docs/Architecture.md`). ImGui is gated by `ME_IMGUI` (editor, tools, or profiling builds) and lives in `Modules/ImGUI/` with the render backend in Moonlight's `ImGuiRenderer`. + +## Key Files + +| Path | Role | +|------|------| +| `Source/Cores/UI/UICore.h` / `Source/Cores/UI/UICore.cpp` | Ultralight platform setup, view lifecycle, per-frame update/render | +| `Source/Components/UI/BasicUIView.h` | The component: HTML path, load listeners, JS bridge | +| `Source/UI/Graphics/GPUDriver.h` / `Source/UI/Graphics/GPUDriver.cpp` | `UIDriver` — Ultralight's GPU backend implemented on bgfx (views 11+N) | +| `Source/UI/Graphics/GPUContext.h` | bgfx device wrapper for Ultralight | +| `Source/UI/FileSystemBasic.h`, `Source/UI/FontLoaderWin.h`, `Source/UI/FontLoaderMac.h`, `Source/UI/FileLogger.h` | Ultralight platform services | +| `Source/UI/JSHelpers.h` | C++ ⇄ JavaScript interop helpers | +| `Modules/Moonlight/Source/Renderer.cpp` | The view-9 composite of `camera.UITexture` (see `Docs/Rendering-Pipeline.md`) | + +## How It Works + +### Ultralight pipeline + +```mermaid +flowchart LR + B["BasicUIView component
(HTML in Assets/UI)"] -->|OnEntityAdded → InitUIView| V["ultralight::View"] + V -->|"UICore::Update →
m_uiRenderer->Update()"| L["layout/JS tick"] + L -->|"UICore::Render →
RefreshDisplay + Render"| D["UIDriver command list
(bgfx views 11+N)"] + D --> RT["view render targets"] + RT -->|composite| FB["UICore m_uiFrameBuffer
→ camera.UITexture"] + FB -->|"BGFXRenderer view 9
premultiplied-alpha over"| Screen +``` + +- Platform setup (`UICore` constructor): filesystem rooted at `Assets/UI` (`FileSystemBasic`), per-platform font loader (custom Win/Mac loaders; platform default elsewhere — on Linux this is what drags in the GTK dependency stack, see the game repo's `../flake.nix`), a `FileLogger`, and the custom `UIDriver` GPU backend. +- `UICore::Update` ticks the Ultralight renderer; `UICore::Render` calls `RefreshDisplay(0)` + `Render()` then flushes `UIDriver`'s accumulated command list into bgfx. Per `BasicUIView`, the view's render target is composited into `UICore`'s `m_uiFrameBuffer`; that texture becomes `camera.UITexture`, which the main renderer draws as a screen-space quad at **view 9** with the premultiplied-alpha blend (`Docs/Rendering-Pipeline.md`). +- `UIDriver` allocates bgfx views starting at `kViewId` = 11 (one per Ultralight render buffer), manages texture/geometry maps keyed by Ultralight IDs, and there's an in-code warning about not sampling a render target while rendering into it. +- Resize flows from the window through `Engine`'s resize lambda → `UICore::OnResize( Camera::CurrentCamera->OutputSize )` — UI resolution follows the main camera's output size, and is also re-checked every frame in the loop. + +### The JS bridge + +`BasicUIView` is an `ultralight::LoadListener`: when the page's window object is ready it binds built-in C++ callbacks into JS — `PlaySound`, `LoadScene`, `Quit`, `AreToolsEnabled` — and calls `OnUILoad`/`OnJSReady`, which subclasses override to bind game-specific functions (see `Source/UI/JSHelpers.h` for the `JSObject`/`JSArgs` plumbing). C++→JS goes through `ExecuteScript(string)` (also exposed to C# scripting as `BasicUIView_ExecuteJS` — `Docs/Scripting-DotNet.md`). + +### ImGui + +- Backend init happens in `Engine::Init` per platform (`ImGui_ImplSDL2_InitForD3D`/`Metal`/`Vulkan`); the render backend is Moonlight's `ImGuiRenderer`, driven by `BGFXRenderer::BeginFrame`/`EndFrame` at **view 255**, with mouse state fed from the engine's input (editor input in editor builds). +- Consumers: the whole Havana editor (`Docs/Editor-Havana.md`), component/core `OnEditorInspect` methods, `DebugTools` in `ME_GAME_TOOLS` builds, and the `ME_BASIC_PROFILER` overlay. +- Multi-viewport (`ImGuiConfigFlags_ViewportsEnable`) is handled for mouse coordinates in the frame loop (global vs window-local mouse position). + +## How to Extend + +Don't — for Ultralight. New UI work should wait for (or be) the replacement. If you must touch an existing screen: + +1. HTML/CSS/JS lives under the game's `Assets/UI`; views load via the `BasicUIView::FilePath`. +2. Game-side C++ hooks go in a `BasicUIView` subclass's `OnUILoad` (bind JS callbacks there), not in `UICore`. +3. For editor/debug UI, prefer ImGui: override `OnEditorInspect` on your component/core (free in editor builds), or extend `DebugTools` for game-tools builds. + +## Caveats & Fragility + +- **Ultralight caps at 60 fps** (`RefreshDisplay` pacing — the library enforces it) — UI animation cadence is decoupled from and slower than the engine's frame rate; this is the headline reason it's being replaced. +- **Deprecation in progress**: expect `UICore`/`BasicUIView` internals to be deleted or rewritten; don't couple new systems to Ultralight types. +- **View-ID budget**: each Ultralight render buffer takes a bgfx view from 11 upward, colliding with camera views in many-camera scenes (`Docs/Rendering-Pipeline.md`). +- **UI follows `Camera::CurrentCamera`**: no main camera → `OnResize` is skipped and the composite doesn't run; UI silently disappears in camera-less scenes. +- **Linux runtime deps are heavy**: the platform font loader path pulls the GTK3 stack — set up via the game repo's `../flake.nix` dev shell, fragile outside it. +- **`UICore` must be re-added after world unloads** (`Engine::LoadScene` does it); a manually constructed world without that step has components but no ticking UI. +- **JS console messages** are forwarded to the engine log (`OnAddConsoleMessage`) — UI script errors land in `Engine.txt`, easy to miss. + +## Related Docs + +- `Docs/Rendering-Pipeline.md` — the view-9 composite and blend mode +- `Docs/Architecture.md` — UICore's place in the frame loop and scene loads +- `Docs/Scripting-DotNet.md` — `ExecuteJS` from C# +- `Docs/State-of-the-Engine.md` — replacement plan status diff --git a/Engine.sharpmake.cs b/Engine.sharpmake.cs index 92229051..6433728b 100644 --- a/Engine.sharpmake.cs +++ b/Engine.sharpmake.cs @@ -154,16 +154,19 @@ public override void ConfigureAll(Project.Configuration conf, CommonTarget targe { conf.IncludePaths.Add(Path.Combine("[project.SharpmakeCsPath]", "ThirdParty/UltralightSDK/include")); - conf.LibraryFiles.Add("Ultralight"); - conf.LibraryFiles.Add("UltralightCore"); - conf.LibraryFiles.Add("WebCore"); + if (target.Platform != Platform.linux) + { + conf.LibraryFiles.Add("Ultralight"); + conf.LibraryFiles.Add("UltralightCore"); + conf.LibraryFiles.Add("WebCore"); + } } conf.LibraryFiles.Add("MitchEngine"); + conf.AddPublicDependency(target); conf.AddPublicDependency(target); conf.AddPublicDependency(target); - conf.AddPublicDependency(target); if (Globals.IsPhysicsEnabled3D) { @@ -172,7 +175,7 @@ public override void ConfigureAll(Project.Configuration conf, CommonTarget targe // #TODO This shouldn't be a sharpmake class //conf.AddPublicDependency(target, DependencySetting.Default | DependencySetting.Defines | DependencySetting.IncludePaths); - if (target.Platform != Platform.mac && (Directory.Exists(Globals.MONO_macOS_Dir) || Directory.Exists(Globals.MONO_Win64_Dir))) + if (target.Platform != Platform.mac && (Directory.Exists(Globals.MONO_macOS_Dir) || Directory.Exists(Globals.MONO_Win64_Dir) || Directory.Exists(Globals.DOTNET_Win64_Dir) || Directory.Exists(Globals.DOTNET_Linux_Dir))) { conf.AddPublicDependency(target); conf.AddPublicDependency(target); @@ -271,6 +274,31 @@ public override void ConfigureWin64(Configuration conf, CommonTarget target) conf.EventPostBuildExe.Add(copyDirBuildStep); } + if (Directory.Exists(Globals.DOTNET_Win64_Dir)) + { + conf.IncludePaths.Add(Globals.DOTNET_Win64_Dir); + conf.LibraryPaths.Add(Globals.DOTNET_Win64_Dir); + conf.LibraryFiles.Add("nethost"); + + { + var copyDirBuildStep = new Configuration.BuildStepCopy( + Globals.DOTNET_Win64_Dir, + Globals.RootDir + "/.build/[target.Name]"); + copyDirBuildStep.IsFileCopy = false; + copyDirBuildStep.CopyPattern = "nethost.dll"; + conf.EventPostBuildExe.Add(copyDirBuildStep); + } + + // hostfxr loads this relative to the working dir (root), so copy it out of source + { + var copyRuntimeConfig = new Configuration.BuildStepCopy( + Path.Combine(Globals.RootDir, "Engine/Source/Scripting/ScriptCore.runtimeconfig.json"), + Path.Combine(Globals.RootDir, "ScriptCore.runtimeconfig.json")); + copyRuntimeConfig.IsFileCopy = true; + conf.EventPostBuildExe.Add(copyRuntimeConfig); + } + } + // #TODO Read path from Globals / Move to own class again if (Directory.Exists(Globals.MONO_Win64_Dir)) { @@ -456,7 +484,7 @@ public override void ConfigureMac(Configuration conf, CommonTarget target) } //?? - conf.XcodeUserFrameworks.Add( "Mono" ); + conf.XcodeUserFrameworks.Add("Mono"); // #TODO Read path from Globals / Move to own class again if (Directory.Exists(Globals.MONO_macOS_Dir)) @@ -489,6 +517,87 @@ public override void ConfigureMac(Configuration conf, CommonTarget target) conf.EventPostBuildExe.Add(copyDirBuildStep); } } + + + public override void ConfigureLinux(Configuration conf, CommonTarget target) + { + base.ConfigureLinux(conf, target); + + if (Directory.Exists(Globals.DOTNET_Linux_Dir)) + { + System.Console.WriteLine("exists"); + conf.IncludePaths.Add(Globals.DOTNET_Linux_Dir); + conf.AdditionalLinkerOptions.Add($"-L{Globals.DOTNET_Linux_Dir}"); + conf.AdditionalLinkerOptions.Add($"-Wl,-rpath,{Globals.DOTNET_Linux_Dir}"); + conf.AdditionalLinkerOptions.Add("-lnethost"); + conf.AdditionalLinkerOptions.Add("-ldl"); + + // hostfxr_initialize_for_runtime_config expects this in the CWD at runtime + var copyRuntimeConfig = new Configuration.BuildStepCopy( + Path.Combine(Globals.RootDir, "Engine/Source/Scripting/ScriptCore.runtimeconfig.json"), + Path.Combine(Globals.RootDir, "ScriptCore.runtimeconfig.json")); + copyRuntimeConfig.IsFileCopy = true; + conf.EventPostBuildExe.Add(copyRuntimeConfig); + } + + if (Directory.Exists(Globals.FMOD_Linux_Dir)) + { + conf.IncludePaths.Add(Path.Combine(Globals.FMOD_Linux_Dir, "api/core/inc")); + conf.LibraryPaths.Add(Path.Combine(Globals.FMOD_Linux_Dir, "api/core/lib/x86_64")); + conf.AdditionalLinkerOptions.Add("-lfmodL"); + } + + if (Globals.IsUltralightEnabled) + { + conf.LibraryPaths.Add(Path.Combine("[project.SharpmakeCsPath]", "ThirdParty/UltralightSDK/lib/linux")); + } + + // potentially use [target.Platform] and move this to ConfigureAll + //conf.LibraryPaths.Add(Path.Combine("[project.SharpmakeCsPath]", $"ThirdParty/Lib/SDL/linux/{CommonTarget.GetThirdPartyOptimization(target.Optimization)}")); + conf.LibraryPaths.Add(Path.Combine("[project.SharpmakeCsPath]", $"ThirdParty/Lib/Assimp/linux/Release")); + + // TODO: Release v debug? + //conf.LibraryFiles.Add("SDL2"); + conf.LibraryFiles.Add("assimp"); + conf.LibraryFiles.Add("zlibstatic"); + // Link against the system-provided copies of the third-party libs we use on Linux. + + // bgfx and SDL pull in the usual GL/X11/pthread stack on Linux. + conf.AdditionalLinkerOptions.Add("-l:libassimp.a"); + conf.AdditionalLinkerOptions.Add("-l:libbgfxDebug.a"); // or Release, match your lib names + conf.AdditionalLinkerOptions.Add("-l:libbimgDebug.a"); + conf.AdditionalLinkerOptions.Add("-l:libbimg_decodeDebug.a"); + conf.AdditionalLinkerOptions.Add("-l:libbxDebug.a"); + conf.AdditionalLinkerOptions.Add("-l:libzlibstatic.a"); + conf.LibraryPaths.Add(Path.Combine( + "[project.SharpmakeCsPath]", + "ThirdParty/Lib/Assimp/linux/Release" + )); + conf.LibraryPaths.Add(Path.Combine( + "[project.SharpmakeCsPath]", + $"ThirdParty/Lib/BGFX/linux/{CommonTarget.GetThirdPartyOptimization(target.Optimization)}" + )); + //conf.LibraryPaths.Add(Path.Combine( + // "[project.SharpmakeCsPath]", + // $"ThirdParty/Lib/SDL/linux/{CommonTarget.GetThirdPartyOptimization(target.Optimization)}" + //)); + conf.LibraryPaths.Add(Path.Combine( + "[project.SharpmakeCsPath]", + $"ThirdParty/Lib/Bullet/linux/{CommonTarget.GetThirdPartyOptimization(target.Optimization)}" + )); + conf.AdditionalLinkerOptions.Add( + "-l:libDementia.a " + + "-l:libImGui.a " + + "-l:libMitchEngine.a " + + "-l:libMoonlight.a " + + "-l:libassimp.a " + + "-l:libbgfxDebug.a " + // Fix this + "-l:libbimgDebug.a " + + "-l:libbimg_decodeDebug.a " + + "-l:libbxDebug.a " + + "-l:libzlibstatic.a " + ); + } } public class BaseGameSolution : Solution @@ -515,6 +624,16 @@ public virtual void ConfigureAll(Solution.Configuration conf, CommonTarget targe { Globals.FMOD_Win64_Dir = Path.Combine(Globals.RootDir, $"Engine/ThirdParty/FMOD"); } + if (!Directory.Exists(Globals.FMOD_Linux_Dir) && Directory.Exists(Path.Combine(Globals.RootDir, "Engine/ThirdParty/FMOD"))) + Globals.FMOD_Linux_Dir = Path.Combine(Globals.RootDir, "Engine/ThirdParty/FMOD"); + if (!Directory.Exists(Globals.FMOD_Linux_Dir) && Directory.Exists(Path.Combine(Globals.RootDir, "Engine/ThirdParty/fmod"))) + Globals.FMOD_Linux_Dir = Path.Combine(Globals.RootDir, "Engine/ThirdParty/fmod"); + + { + string dotnetNativeEnv = System.Environment.GetEnvironmentVariable("DOTNET_LINUX_NATIVE_DIR") ?? string.Empty; + if (!string.IsNullOrEmpty(dotnetNativeEnv) && Directory.Exists(dotnetNativeEnv)) + Globals.DOTNET_Linux_Dir = dotnetNativeEnv; + } conf.AddProject(target); conf.AddProject(target); @@ -545,10 +664,10 @@ public virtual void ConfigureAll(Solution.Configuration conf, CommonTarget targe conf.AddProject(target); // Disabled on mac atm since xcode doesn't have mono support that I know of - if (target.Platform != Platform.mac && (Directory.Exists(Globals.MONO_macOS_Dir) || Directory.Exists(Globals.MONO_Win64_Dir))) + if (target.Platform != Platform.mac && (Directory.Exists(Globals.MONO_macOS_Dir) || Directory.Exists(Globals.MONO_Win64_Dir) || Directory.Exists(Globals.MONO_Linux_Dir))) { - conf.AddProject(target); - conf.AddProject(target); + //conf.AddProject(target); + //conf.AddProject(target); } // #TODO (mitch): Make this actual C# JSON shit, and make it not stop current configs. @@ -576,15 +695,14 @@ public BaseScriptSolution() [Configure] public virtual void ConfigureAll(Solution.Configuration conf, CommonTarget target) { - conf.SolutionPath = Globals.RootDir; + conf.SolutionPath = Path.GetFullPath(Path.Combine(SharpmakeCsPath, "..")); conf.SolutionFileName = "GameScript"; - //Globals.RootDir = Path.GetFullPath("../../"); - // Disabled on mac atm since xcode doesn't have mono support that I know of - if (target.Platform != Platform.mac && (Directory.Exists(Globals.MONO_macOS_Dir) || Directory.Exists(Globals.MONO_Win64_Dir))) + // Disabled on mac atm since I just don't give a shit personally + if (target.Platform != Platform.mac && (Directory.Exists(Globals.MONO_macOS_Dir) || Directory.Exists(Globals.MONO_Linux_Dir))) { - conf.AddProject(target); - conf.AddProject(target); + //conf.AddProject(target); + //conf.AddProject(target); } } } @@ -595,11 +713,16 @@ public class Globals public static string FMOD_Win64_Dir = string.Empty; public static string FMOD_UWP_Dir = string.Empty; public static string FMOD_macOS_Dir = string.Empty; + public static string FMOD_Linux_Dir = string.Empty; public static string ExeName = "Game_EntryPoint"; - public static string MONO_Win64_Dir = "C:/Program Files/Mono/"; - public static string MONO_macOS_Dir = "/Library/Frameworks/Mono.framework/"; + // C# Scripting + public static string MONO_Win64_Dir = string.Empty; //"C:/Program Files/Mono/"; + public static string MONO_macOS_Dir = string.Empty; //"/Library/Frameworks/Mono.framework/"; + public static string MONO_Linux_Dir = string.Empty; //"/usr/lib/mono/"; + public static string DOTNET_Win64_Dir = string.Empty; //C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Host.win-x64\8.0.22\runtimes\win-x64\native + public static string DOTNET_Linux_Dir = string.Empty; // set via DOTNET_LINUX_NATIVE_DIR env var in nix develop public static string UWP_Thumbprint = "2b58614583c74c71d9068804a758d87346f87f40"; public static string UWP_CertificateName = "Game_EntryPoint_UWP_TemporaryKey.pfx"; @@ -615,8 +738,20 @@ public static class Main [Sharpmake.Main] public static void SharpmakeMain(Sharpmake.Arguments arguments) { + if (Util.GetExecutingPlatform() == Platform.linux) + { + // Workaround for the Sharpmake 0.20.0+ regression (commit e3142832): + // Linux Makefiles link through $(CXX), so linker-only arguments must be + // emitted as -Wl,. Without this, the LibGroup flags enabled in + // BaseProject.ConfigureLinux come out bare and ld's left-to-right archive + // ordering breaks the link (undefined assimp/bimg_decode references). + var linuxDescriptor = (Linux.LinuxPlatform)PlatformRegistry.Get(Platform.linux); + linuxDescriptor.IsLinkerInvokedViaCompiler = true; + } + KitsRootPaths.SetUseKitsRootForDevEnv(DevEnv.vs2022, KitsRootEnum.KitsRoot10, Options.Vc.General.WindowsTargetPlatformVersion.v10_0_19041_0); + arguments.Generate(); arguments.Generate(); } -} \ No newline at end of file +} diff --git a/Modules/Dementia/Dementia.sharpmake.cs b/Modules/Dementia/Dementia.sharpmake.cs index 96e2affc..ec9b69f0 100644 --- a/Modules/Dementia/Dementia.sharpmake.cs +++ b/Modules/Dementia/Dementia.sharpmake.cs @@ -1,5 +1,6 @@ using System.IO; using Sharpmake; +using static CommonTarget; [Generate] public class Dementia : BaseProject @@ -20,18 +21,20 @@ public override void ConfigureAll(Project.Configuration conf, CommonTarget targe conf.IncludePaths.Add(Path.Combine("[project.SharpmakeCsPath]", "../../ThirdParty/Bullet/src")); conf.IncludePaths.Add(Path.Combine("[project.SharpmakeCsPath]", "../../ThirdParty/glm")); conf.IncludePaths.Add(Path.Combine("[project.SharpmakeCsPath]", "../../ThirdParty/JSON/include")); - conf.IncludePaths.Add(Path.Combine("[project.SharpmakeCsPath]", "../../ThirdParty/Optick/src")); + if (target.SubPlatform != SubPlatformType.linux) + conf.IncludePaths.Add(Path.Combine("[project.SharpmakeCsPath]", "../../ThirdParty/Optick/src")); conf.IncludePaths.Add(Path.Combine("[project.SharpmakeCsPath]", "../../ThirdParty/ImGui")); conf.IncludePaths.Add("[project.SourceRootPath]"); - conf.LibraryFiles.Add("Dementia"); - conf.LibraryFiles.Add("OptickCore"); + //conf.LibraryFiles.Add("Dementia"); } public override void ConfigureWin64(Configuration conf, CommonTarget target) { base.ConfigureWin64(conf, target); conf.LibraryPaths.Add(Path.Combine("[project.SharpmakeCsPath]", $"../../ThirdParty/Lib/Optick/Win64/{CommonTarget.GetThirdPartyOptimization(target.Optimization)}")); + + conf.LibraryFiles.Add("OptickCore"); } public override void ConfigureUWP(Configuration conf, CommonTarget target) @@ -46,4 +49,10 @@ public override void ConfigureMac(Configuration conf, CommonTarget target) // What the actual fuck lmao v conf.LibraryPaths.Add(Path.Combine("[project.SharpmakeCsPath]", "../../ThirdParty/Lib/Optick/macOS/Debug")); } + + public override void ConfigureLinux(Configuration conf, CommonTarget target) + { + base.ConfigureLinux(conf, target); + conf.IncludePaths.Add(Path.Combine("[project.SharpmakeCsPath]", "../../ThirdParty/ChromeTrace")); + } } \ No newline at end of file diff --git a/Modules/Dementia/Source/CLog.h b/Modules/Dementia/Source/CLog.h index 65737cfd..283d3c25 100644 --- a/Modules/Dementia/Source/CLog.h +++ b/Modules/Dementia/Source/CLog.h @@ -4,6 +4,7 @@ #include #include "Singleton.h" #include +#include /* CLog.h A utility class for creating and managing logs for the engine. You can change the @@ -17,6 +18,9 @@ log file name and priority levels to control what info gets saved and where. ":" + std::to_string(__LINE__) + \ "]\n\t[" + __FUNCTION__ + "]\n\t", \ __VA_ARGS__ ) +#define YIKES_NEW( ... ) CLog::Log( CLog::LogType::Error, \ + std::format("{}\n\t[{}:{}]\n\t[{}]\n\t", \ + CLog::FormatMessage2(__VA_ARGS__), __FILE__, __LINE__, __FUNCTION__) ) /// A Warning #define BRUH(name) CLog::Log(CLog::LogType::Warning, name) #define BRUH_FMT( name, ... ) CLog::LogFmt( CLog::LogType::Warning, \ @@ -39,6 +43,13 @@ log file name and priority levels to control what info gets saved and where. __VA_ARGS__) +#define BRUH_NEW( ... ) CLog::Log( CLog::LogType::Warning, \ + std::format("{}\n\t[{}:{}]\n\t[{}]\n\t", \ + CLog::FormatMessage2(__VA_ARGS__), __FILE__, __LINE__, __FUNCTION__) ) +/// A Debug Message +#define DBG( ... ) CLog::Log( CLog::LogType::Debug, \ + std::format("{}\n\t[{}:{}]\n\t[{}]\n\t", \ + CLog::FormatMessage2(__VA_ARGS__), __FILE__, __LINE__, __FUNCTION__) ) class CLog { public: @@ -72,6 +83,13 @@ class CLog template static bool LogFmt( CLog::LogType priority, const std::string& message, Args&&... args ); + + template + static std::string FormatMessage2( T&& single ); + + template + static std::string FormatMessage2( std::format_string fmt, Args&&... args ); + struct LogEntry { LogType Type = LogType::None; @@ -102,3 +120,15 @@ bool CLog::LogFmt( LogType priority, const std::string& message, Args&&... args std::string formattedString = std::string( buf.data() ); return CLog::GetInstance().LogMessage( priority, formattedString ); } + +template +std::string CLog::FormatMessage2( T&& single ) +{ + return std::format( "{}", std::forward( single ) ); +} + +template +std::string CLog::FormatMessage2( std::format_string fmt, Args&&... args ) +{ + return std::format( fmt, std::forward( args )... ); +} \ No newline at end of file diff --git a/Modules/Dementia/Source/Dementia.h b/Modules/Dementia/Source/Dementia.h index aacb24ea..84c43118 100644 --- a/Modules/Dementia/Source/Dementia.h +++ b/Modules/Dementia/Source/Dementia.h @@ -21,19 +21,19 @@ Class& operator=(Class&&) = delete; #define ME_HARDSTUCK(Class) ME_NONCOPYABLE(Class); ME_NONMOVABLE(Class); #ifndef IN_USE -#define IN_USE && -#endif /* IN USE */ +#define IN_USE 1 +#endif /* IN_USE */ #ifndef NOT_IN_USE -#define NOT_IN_USE &&! +#define NOT_IN_USE 0 #endif /* NOT_IN_USE */ #ifndef USE_IF -#define USE_IF(x) &&((x) ? 1: 0)&& +#define USE_IF(x) ((x) ? 1 : 0) #endif /* USE_IF */ #ifndef USING -#define USING(x) (1 x 1) +#define USING(x) (x) #endif /* USING */ #if defined( _MSC_VER ) @@ -99,6 +99,12 @@ Class& operator=(Class&&) = delete; #define ME_PLATFORM_MACOS NOT_IN_USE #endif +#if defined( DEFINE_ME_PLATFORM_LINUX ) +#define ME_PLATFORM_LINUX IN_USE +#else +#define ME_PLATFORM_LINUX NOT_IN_USE +#endif + #if defined( DEFINE_ME_EDITOR ) #define ME_EDITOR IN_USE #else @@ -135,10 +141,10 @@ Class& operator=(Class&&) = delete; #define ME_RETAIL NOT_IN_USE #endif -#if defined( DEFINE_ME_MONO ) -#define ME_MONO IN_USE +#if defined( DEFINE_ME_DOTNET ) +#define ME_DOTNET IN_USE #else -#define ME_MONO NOT_IN_USE +#define ME_DOTNET NOT_IN_USE #endif #if defined( DEFINE_ME_PHYSICS_3D ) @@ -162,7 +168,7 @@ Class& operator=(Class&&) = delete; #define ME_PLATFORM_WINDOWS USE_IF( USING( ME_PLATFORM_WIN64 ) || USING( ME_PLATFORM_UWP ) ) #define ME_EDITOR_WIN64 USE_IF( USING( ME_EDITOR ) && USING( ME_PLATFORM_WIN64 ) ) #define ME_EDITOR_MACOS USE_IF( USING( ME_EDITOR ) && USING( ME_PLATFORM_MACOS ) ) -#define ME_SCRIPTING USE_IF( USING( ME_MONO ) ) +#define ME_SCRIPTING USE_IF( USING( ME_DOTNET ) ) #define ME_UI USE_IF( USING( ME_ULTRALIGHT ) && !USING( ME_HEADLESS ) ) #define ME_PROFILING USE_IF( USING( ME_DEBUG ) || USING( ME_RELEASE ) ) // I'm currently using some ImGui stuff in debug for profiling, TOOLS needs it even that it's currently bundled with the editor. diff --git a/Modules/Dementia/Source/Events/EditorEvents.h b/Modules/Dementia/Source/Events/EditorEvents.h index 1a972d38..5770cce9 100644 --- a/Modules/Dementia/Source/Events/EditorEvents.h +++ b/Modules/Dementia/Source/Events/EditorEvents.h @@ -11,7 +11,7 @@ class PickingEvent : Event() { } - uint32_t RawEntityID = 0; + uint64_t RawEntityID = 0; }; class PreviewResourceEvent diff --git a/Modules/Dementia/Source/File.h b/Modules/Dementia/Source/File.h index 46fbcd77..09067fd4 100644 --- a/Modules/Dementia/Source/File.h +++ b/Modules/Dementia/Source/File.h @@ -23,6 +23,7 @@ class File if( !FilePath.Exists ) { YIKES_FMT( "[File IO] File does not exist: %s", FilePath.GetLocalPath().data() ); + return Data; } FileStream.open( FilePath.FullPath.c_str(), std::ios::in ); diff --git a/Modules/Dementia/Source/Path.cpp b/Modules/Dementia/Source/Path.cpp index f9f016fd..a11600c0 100644 --- a/Modules/Dementia/Source/Path.cpp +++ b/Modules/Dementia/Source/Path.cpp @@ -48,6 +48,11 @@ Path::Path( const std::string& InFile, bool Raw /*= false*/ ) std::replace( LocalPath.begin(), LocalPath.end(), '\\', '/' ); + if( LocalPath.empty() ) + { + return; + } + auto remove_duplicate_slashes = []( std::string& str ) { std::string::size_type pos = 0; while( ( pos = str.find( "//", pos ) ) != std::string::npos ) { @@ -56,7 +61,7 @@ Path::Path( const std::string& InFile, bool Raw /*= false*/ ) }; remove_duplicate_slashes( LocalPath ); -#if USING( ME_PLATFORM_MACOS ) +#if USING( ME_PLATFORM_MACOS ) || USING( ME_PLATFORM_LINUX ) size_t path = LocalPath[0] == '/' ? 0 : std::string::npos; #else size_t path = LocalPath.find( ':' ); @@ -70,8 +75,8 @@ Path::Path( const std::string& InFile, bool Raw /*= false*/ ) FullPath = ProgramPath + assetPrefix + LocalPath; } - ExtensionPos = (int8_t)LocalPath.rfind( '.' ); - ExtensionPos = (int8_t)( LocalPath.size() - ++ExtensionPos ); + const size_t extensionPos = LocalPath.rfind( '.' ); + ExtensionPos = extensionPos == std::string::npos ? 0 : LocalPath.size() - extensionPos - 1; // yeah don't do this path = LocalPath.rfind( "Assets" ); @@ -80,7 +85,7 @@ Path::Path( const std::string& InFile, bool Raw /*= false*/ ) LocalPath = LocalPath.substr( path, LocalPath.size() ); } -#if USING( ME_EDITOR ) || USING( ME_PLATFORM_MACOS ) || USING( ME_PLATFORM_WIN64 ) +#if USING( ME_EDITOR ) || USING( ME_PLATFORM_MACOS ) || USING( ME_PLATFORM_WIN64 ) || USING( ME_PLATFORM_LINUX ) if( !std::filesystem::exists( FullPath ) ) { if( !Raw ) @@ -127,9 +132,11 @@ Path::Path( const std::string& InFile, bool Raw /*= false*/ ) #endif #endif - LocalPos = static_cast( FullPath.rfind( LocalPath ) ); - DirectoryPos = static_cast( FullPath.find_last_of( "/" ) + 1 ); - DirectoryPos = (int8_t)( FullPath.size() - DirectoryPos ); + const size_t localPos = FullPath.rfind( LocalPath ); + LocalPos = localPos == std::string::npos ? 0 : localPos; + + const size_t directoryEnd = FullPath.find_last_of( "/" ); + DirectoryPos = directoryEnd == std::string::npos ? FullPath.size() : FullPath.size() - directoryEnd - 1; #if USING( ME_PLATFORM_UWP ) //std::replace(LocalPath.begin(), LocalPath.end(), '/', '\\'); @@ -145,11 +152,19 @@ Path::~Path() const char* Path::GetExtension() const { const char* c = FullPath.c_str(); + if( ExtensionPos > FullPath.size() ) + { + return c + FullPath.size(); + } return &c[FullPath.size() - ExtensionPos]; } std::string_view Path::GetDirectory() const { + if( DirectoryPos > FullPath.size() ) + { + return {}; + } return std::string_view( FullPath.c_str(), FullPath.size() - DirectoryPos ); } @@ -160,7 +175,11 @@ std::string Path::GetDirectoryString() const std::string_view Path::GetLocalPath() const { - return std::string_view( FullPath.c_str() + LocalPos ); + if( LocalPos > FullPath.size() ) + { + return {}; + } + return std::string_view( FullPath.c_str() + LocalPos, FullPath.size() - LocalPos ); } std::string Path::GetLocalPathString() const diff --git a/Modules/Dementia/Source/Path.h b/Modules/Dementia/Source/Path.h index 2e1d202e..628a5679 100644 --- a/Modules/Dementia/Source/Path.h +++ b/Modules/Dementia/Source/Path.h @@ -34,8 +34,8 @@ class Path bool IsFile = false; bool IsFolder = false; bool Exists = false; - int8_t ExtensionPos; - int8_t DirectoryPos; - int8_t LocalPos; + size_t ExtensionPos = 0; + size_t DirectoryPos = 0; + size_t LocalPos = 0; std::string FullPath; }; diff --git a/Modules/Dementia/Source/Resource/ResourceCache.h b/Modules/Dementia/Source/Resource/ResourceCache.h index f8adcc8a..cff18137 100644 --- a/Modules/Dementia/Source/Resource/ResourceCache.h +++ b/Modules/Dementia/Source/Resource/ResourceCache.h @@ -68,7 +68,7 @@ SharedPtr ResourceCache::Get( const Path& InFilePath, Args&& ... args ) #if USING( ME_TOOLS ) if( metaFile && ( metaFile->FlaggedForExport || !compiledFileExists ) ) { - YIKES( "Exporting asset: " + InFilePath.FullPath ); + BRUH( "Exporting asset: " + InFilePath.FullPath ); metaFile->Export(); metaFile->Save(); AssetMetaCache::GetInstance().Update( InFilePath, metaFile ); diff --git a/Modules/Dementia/Source/Types/AssetDescriptor.h b/Modules/Dementia/Source/Types/AssetDescriptor.h index 11abecbd..f3689905 100644 --- a/Modules/Dementia/Source/Types/AssetDescriptor.h +++ b/Modules/Dementia/Source/Types/AssetDescriptor.h @@ -6,6 +6,12 @@ struct AssetDescriptor { static constexpr const char* kDragAndDropPayload = "DND_ASSET_BROWSER"; + inline static AssetDescriptor* s_dragged = nullptr; + static AssetDescriptor* GetDragged() + { + return s_dragged; + } + std::string Name; File MetaFile; Path FullPath; diff --git a/Modules/Dementia/Source/Work/Job.h b/Modules/Dementia/Source/Work/Job.h index c79a6dbf..8787d2e5 100644 --- a/Modules/Dementia/Source/Work/Job.h +++ b/Modules/Dementia/Source/Work/Job.h @@ -37,7 +37,7 @@ class Job void ConstructData( Args&&... args ); template - std::enable_if_t::value && ( sizeof( Data ) <= kPaddingSize )> SetData( const Data& InData ) + std::enable_if_t<( std::is_trivially_copyable_v && std::is_trivially_default_constructible_v ) && ( sizeof( Data ) <= kPaddingSize )> SetData( const Data& InData ) { std::memcpy( Padding.data(), &InData, sizeof( Data ) ); } diff --git a/Modules/Dementia/Source/Work/JobEngine.cpp b/Modules/Dementia/Source/Work/JobEngine.cpp index 4dafd2a0..27172e3e 100644 --- a/Modules/Dementia/Source/Work/JobEngine.cpp +++ b/Modules/Dementia/Source/Work/JobEngine.cpp @@ -1,6 +1,5 @@ #include "JobEngine.h" #include -#include JobEngine::JobEngine( std::size_t InNumThreads, std::size_t InJobsPerThread ) : Workers( InNumThreads ) @@ -29,14 +28,17 @@ JobEngine::~JobEngine() Worker* JobEngine::GetRandomWorker() { - std::uniform_int_distribution dist { 0, Workers.CurrentSize() - 1 }; - std::default_random_engine randomEngine { std::random_device()( ) }; + const std::size_t count = Workers.CurrentSize(); + std::uniform_int_distribution dist { 0, count - 1 }; + const std::size_t start = dist( RandomEngine ); - Worker* worker = &Workers[dist( randomEngine )]; - - if( worker->IsRunning() ) + for( std::size_t i = 0; i < count; ++i ) { - return worker; + Worker* worker = &Workers[( start + i ) % count]; + if( worker->IsRunning() ) + { + return worker; + } } return nullptr; diff --git a/Modules/Dementia/Source/Work/JobEngine.h b/Modules/Dementia/Source/Work/JobEngine.h index 3d185343..975f5454 100644 --- a/Modules/Dementia/Source/Work/JobEngine.h +++ b/Modules/Dementia/Source/Work/JobEngine.h @@ -1,6 +1,7 @@ #pragma once #include "Worker.h" #include "StaticVector.h" +#include class JobEngine { @@ -15,6 +16,7 @@ class JobEngine private: StaticVector Workers; + std::mt19937 RandomEngine { std::random_device()() }; Worker* FindThreadWorker( const std::thread::id InThreadId ); }; \ No newline at end of file diff --git a/Modules/Dementia/Source/Work/JobQueue.cpp b/Modules/Dementia/Source/Work/JobQueue.cpp index 561f42e3..28614fb8 100644 --- a/Modules/Dementia/Source/Work/JobQueue.cpp +++ b/Modules/Dementia/Source/Work/JobQueue.cpp @@ -39,7 +39,7 @@ Job* JobQueue::Pop() Bottom.store( bottom, std::memory_order_release ); } - std::atomic_thread_fence( std::memory_order_release ); + std::atomic_thread_fence( std::memory_order_seq_cst ); std::size_t top = Top.load( std::memory_order_acquire ); diff --git a/Modules/Dementia/Source/Work/Pool.cpp b/Modules/Dementia/Source/Work/Pool.cpp index f61c0bfe..16b5a0af 100644 --- a/Modules/Dementia/Source/Work/Pool.cpp +++ b/Modules/Dementia/Source/Work/Pool.cpp @@ -40,7 +40,12 @@ Job* Pool::CreateJob( JobFunc InJobFunc ) Job* Pool::CreateJobAsChild( JobFunc InJobFunc, Job* InParent ) { - + Job* job = Allocate(); + if( job ) + { + new( job ) Job { InJobFunc, InParent }; + return job; + } return nullptr; } diff --git a/Modules/Dementia/Source/Work/Pool.h b/Modules/Dementia/Source/Work/Pool.h index 16e1207d..10b497aa 100644 --- a/Modules/Dementia/Source/Work/Pool.h +++ b/Modules/Dementia/Source/Work/Pool.h @@ -35,14 +35,26 @@ class Pool template Job* Pool::CreateJob( JobFunc InJobFunc, const Data& InData ) { - + Job* job = Allocate(); + if( job ) + { + new( job ) Job { InJobFunc }; + job->SetData( InData ); + return job; + } return nullptr; } template Job* Pool::CreateJobAsChild( JobFunc InJobFunc, const Data& InData, Job* InParent ) { - + Job* job = Allocate(); + if( job ) + { + new( job ) Job { InJobFunc, InParent }; + job->SetData( InData ); + return job; + } return nullptr; } diff --git a/Modules/Dementia/Source/Work/Worker.cpp b/Modules/Dementia/Source/Work/Worker.cpp index d4eac20b..d2815aaa 100644 --- a/Modules/Dementia/Source/Work/Worker.cpp +++ b/Modules/Dementia/Source/Work/Worker.cpp @@ -29,10 +29,10 @@ void Worker::Start() OPTICK_THREAD( "Burst Thread" ); while( IsRunning() ) { - OPTICK_EVENT( "GetJob" ) - Job* job = GetJob(); + Job* job = GetJob(); if( job ) { + OPTICK_EVENT( "RunJob" ) job->Run(); } } @@ -72,24 +72,16 @@ void Worker::Wait( Job* InJob ) { OPTICK_EVENT( "Wait" ) - float failedAttempts = 0; while( !InJob->IsFinished() ) { Job* job = GetJob(); - if( job ) { job->Run(); } else { - // I don't like this - failedAttempts++; - if( failedAttempts > 50 ) - { - InJob->Run(); - break; - } + std::this_thread::yield(); } } } diff --git a/Modules/Havana/Source/EditorApp.cpp b/Modules/Havana/Source/EditorApp.cpp index 77a48fad..50a99e0c 100644 --- a/Modules/Havana/Source/EditorApp.cpp +++ b/Modules/Havana/Source/EditorApp.cpp @@ -23,6 +23,7 @@ #include "Math/Matrix4.h" #include "Math/Frustrum.h" #include "optick.h" +#include #include #include #include "Events/HavanaEvents.h" @@ -68,6 +69,45 @@ void EditorApp::OnUpdate( const UpdateContext& inUpdateContext ) { OPTICK_CATEGORY( "EditorApp::OnUpdate", Optick::Category::GameLogic ); +#if USING( ME_EDITOR ) + { + static int s_startupFramesLeft = 10; + if( s_startupFramesLeft > 0 ) + { + --s_startupFramesLeft; + if( s_startupFramesLeft == 0 ) + { + OPTICK_STOP_CAPTURE(); + OPTICK_SAVE_CAPTURE( "startup.opt" ); + } + } + + static constexpr int kCaptureFrames = 10; + static int s_captureFramesLeft = 0; + Input& editorInput = GetEngine().GetEditorInput(); + if( editorInput.WasKeyPressed( KeyCode::F9 ) && s_captureFramesLeft == 0 ) + { + OPTICK_START_CAPTURE(); + s_captureFramesLeft = kCaptureFrames; + CLog::GetInstance().Log( CLog::LogType::Info, "Optick capture started (10 frames)" ); + } + + if( s_captureFramesLeft > 0 ) + { + --s_captureFramesLeft; + if( s_captureFramesLeft == 0 ) + { + OPTICK_STOP_CAPTURE(); + char filename[64]; + std::time_t t = std::time( nullptr ); + std::strftime( filename, sizeof( filename ), "capture_%Y%m%d_%H%M%S.opt", std::localtime( &t ) ); + OPTICK_SAVE_CAPTURE( filename ); + CLog::GetInstance().Log( CLog::LogType::Info, std::string( "Optick capture saved: " ) + filename ); + } + } + } +#endif + Editor->NewFrame(); Transform* root = GetEngine().SceneNodes->GetRootTransform(); @@ -130,12 +170,19 @@ void EditorApp::OnEnd() void EditorApp::OnInitialize() { + OPTICK_EVENT( "EditorApp::OnInitialize" ); if( !Editor ) { - EditorConfig::GetInstance().Init(); - EditorConfig::GetInstance().Load(); + { + OPTICK_EVENT( "EditorConfig::Load" ); + EditorConfig::GetInstance().Init(); + EditorConfig::GetInstance().Load(); + } InitialLevel = GetEngine().GetConfig().GetValue( "CurrentScene" ); - Editor = MakeUnique( &GetEngine(), this ); + { + OPTICK_EVENT( "Havana::Create" ); + Editor = MakeUnique( &GetEngine(), this ); + } EditorSceneManager = new EditorCore( Editor.get() ); Editor->SetGameCallbacks( [this]() diff --git a/Modules/Havana/Source/Havana.cpp b/Modules/Havana/Source/Havana.cpp index 7375916b..fe9dbb5a 100644 --- a/Modules/Havana/Source/Havana.cpp +++ b/Modules/Havana/Source/Havana.cpp @@ -124,9 +124,11 @@ void Havana::InitUI() //ImGui::LoadIniSettingsFromDisk(EngineConfigFilePath.FullPath.c_str()); io.IniFilename = EngineConfigFilePath.FullPath.c_str(); io.ConfigFlags |= ImGuiConfigFlags_DockingEnable; +#if !USING( ME_PLATFORM_LINUX ) io.ConfigFlags |= ImGuiConfigFlags_ViewportsEnable; io.BackendFlags |= ImGuiBackendFlags_PlatformHasViewports; io.BackendFlags |= ImGuiBackendFlags_RendererHasViewports; +#endif //io.MouseDrawCursor = true; g_imgui_to_sdl_cursor[ImGuiMouseCursor_Arrow] = SDL_CreateSystemCursor( SDL_SYSTEM_CURSOR_ARROW ); diff --git a/Modules/Havana/Source/Widgets/AssetBrowser.cpp b/Modules/Havana/Source/Widgets/AssetBrowser.cpp index 305eb8fb..e00131ef 100644 --- a/Modules/Havana/Source/Widgets/AssetBrowser.cpp +++ b/Modules/Havana/Source/Widgets/AssetBrowser.cpp @@ -46,10 +46,13 @@ void AssetBrowserWidget::ReloadDirectories() AssetDirectory.Directories.clear(); AssetDirectory.Files.clear(); MasterAssetsList.clear(); + FilteredAssetList.clear(); + AssetDescriptor::s_dragged = nullptr; + items_need_filtered = true; for( auto& file : std::filesystem::recursive_directory_iterator( AssetDirectory.FullPath.FullPath ) ) { - Paths[file.path().u8string()] = std::filesystem::last_write_time( file ); + Paths[file.path().string()] = std::filesystem::last_write_time( file ); ProccessDirectory( file, AssetDirectory ); } @@ -501,8 +504,11 @@ void AssetBrowserWidget::DrawAssetTable() } if( sorts_specs && items_need_sort && MasterAssetsList.size() > 1 ) { - s_current_sort_specs = sorts_specs; // Store in variable accessible by the sort function. - qsort( &MasterAssetsList[0], (size_t)MasterAssetsList.size(), sizeof( MasterAssetsList[0] ), CompareWithSortSpecs ); + s_current_sort_specs = sorts_specs; + std::sort( MasterAssetsList.begin(), MasterAssetsList.end(), + []( const AssetDescriptor& a, const AssetDescriptor& b ) { + return CompareWithSortSpecs( &a, &b ) < 0; + } ); s_current_sort_specs = NULL; sorts_specs->SpecsDirty = false; items_need_filtered = true; @@ -611,7 +617,8 @@ void AssetBrowserWidget::DrawAssetTable() if( ImGui::BeginDragDropSource( ImGuiDragDropFlags_None ) ) { - ImGui::SetDragDropPayload( AssetDescriptor::kDragAndDropPayload, item, sizeof( AssetDescriptor ) ); + AssetDescriptor::s_dragged = item; + ImGui::SetDragDropPayload( AssetDescriptor::kDragAndDropPayload, &item->ID, sizeof( int ) ); ImGui::Text( item->Name.c_str() ); ImGui::EndDragDropSource(); } @@ -847,7 +854,8 @@ void AssetBrowserWidget::Recursive( Directory& dir ) if( ImGui::BeginDragDropSource( ImGuiDragDropFlags_None ) ) { //files.FullPath = dir.FullPath; - ImGui::SetDragDropPayload( AssetDescriptor::kDragAndDropPayload, &files, sizeof( AssetDescriptor ) ); + AssetDescriptor::s_dragged = &files; + ImGui::SetDragDropPayload( AssetDescriptor::kDragAndDropPayload, &files.ID, sizeof( int ) ); ImGui::Text( files.Name.c_str() ); ImGui::EndDragDropSource(); } @@ -873,10 +881,10 @@ void AssetBrowserWidget::Recursive( Directory& dir ) void AssetBrowserWidget::ProccessDirectory( const std::filesystem::directory_entry& file, Directory& dirRef ) { std::string& parentDir = dirRef.FullPath.FullPath; - std::size_t t = file.path().u8string().find( parentDir ); + std::size_t t = file.path().string().find( parentDir ); if( t != std::string::npos ) { - std::string dir2 = file.path().u8string().substr( parentDir.size(), file.path().u8string().size() ); + std::string dir2 = file.path().string().substr( parentDir.size(), file.path().string().size() ); ProccessDirectoryRecursive( dir2, dirRef, file ); @@ -973,7 +981,7 @@ bool AssetBrowserWidget::ProccessDirectoryRecursive( std::string& dir, Directory #if USING( ME_PLATFORM_MACOS ) const char slash = '/'; #else - const char slash = '\\'; + const char slash = '/'; #endif std::size_t d = dir.find_first_of( slash ); if( d != std::string::npos ) @@ -1057,9 +1065,9 @@ bool AssetBrowserWidget::ProccessDirectoryRecursive( std::string& dir, Directory } AssetDescriptor desc; - desc.Name = newdir; //desc.MetaFile = File(Path(file.path().string() + ".meta")); - desc.FullPath = Path( file.path().u8string() ); + desc.FullPath = Path( file.path().string() ); + desc.Name = desc.FullPath.GetFileNameString(); desc.Type = type; dirRef.Files.push_back( desc ); //const std::string & data = dirRef.Files.back().MetaFile.Read(); diff --git a/Modules/Havana/Source/Widgets/MainMenuWidget.cpp b/Modules/Havana/Source/Widgets/MainMenuWidget.cpp index 4a27735b..f439f07d 100644 --- a/Modules/Havana/Source/Widgets/MainMenuWidget.cpp +++ b/Modules/Havana/Source/Widgets/MainMenuWidget.cpp @@ -457,19 +457,16 @@ void MainMenuWidget::Render() #endif #if USING( ME_SCRIPTING ) - ImGui::Text( "MONO is set up correctly!\n\n" ); - if( !MONOImage ) + ImGui::Text( "C# is set up correctly! Enjoy!\n\n" ); + if( !DOTNETImage) { - MONOImage = ResourceCache::GetInstance().Get( Path( "Assets/Legal/MONO.png" ) ); + DOTNETImage = ResourceCache::GetInstance().Get( Path( "Assets/Legal/DOTNET.png" ) ); } -#endif - -#if USING( ME_SCRIPTING ) - ImGui::SetCursorPosX( ImGui::GetCursorPos().x + ( ImGui::GetContentRegionAvail().x - ( MONOImage->mWidth / 2 ) ) * 0.5f ); - ImGui::Image( MONOImage->TexHandle, { (float)MONOImage->mWidth / 2, (float)MONOImage->mHeight / 2 } ); + ImGui::SetCursorPosX( ImGui::GetCursorPos().x + ( ImGui::GetContentRegionAvail().x - ( DOTNETImage->mWidth / 2 ) ) * 0.5f ); + ImGui::Image( DOTNETImage->TexHandle, { (float)DOTNETImage->mWidth / 2, (float)DOTNETImage->mHeight / 2 } ); ImGui::Text( "\n" ); #else - ImGui::Text( "MONO is not installed! Please refer to Engine/README.md for instructions." ); + ImGui::Text( "DOTNET is not installed! Please refer to Engine/README.md for instructions." ); #endif ImGui::SetItemDefaultFocus(); diff --git a/Modules/Havana/Source/Widgets/MainMenuWidget.h b/Modules/Havana/Source/Widgets/MainMenuWidget.h index a10ac59b..aa796e8a 100644 --- a/Modules/Havana/Source/Widgets/MainMenuWidget.h +++ b/Modules/Havana/Source/Widgets/MainMenuWidget.h @@ -65,7 +65,7 @@ class MainMenuWidget #endif #if USING( ME_SCRIPTING ) - SharedPtr MONOImage; + SharedPtr DOTNETImage; #endif void BrowseDirectory(const Path& path); diff --git a/Modules/Havana/Source/Widgets/PropertiesWidget.cpp b/Modules/Havana/Source/Widgets/PropertiesWidget.cpp index 99705e58..056138a5 100644 --- a/Modules/Havana/Source/Widgets/PropertiesWidget.cpp +++ b/Modules/Havana/Source/Widgets/PropertiesWidget.cpp @@ -57,8 +57,9 @@ void PropertiesWidget::Render() } ImGui::PushStyleVar(ImGuiStyleVar_WindowPadding, { 0.f, 0.f }); - ImGui::Begin("Properties", &IsOpen); + bool windowOpen = ImGui::Begin("Properties", &IsOpen); ImGui::PopStyleVar(); + if (windowOpen) { EntityHandle entity = SelectedEntity; if (SelectedTransform.lock()) diff --git a/Modules/Havana/Source/Widgets/ResourceMonitorWidget.cpp b/Modules/Havana/Source/Widgets/ResourceMonitorWidget.cpp index 7f54f28b..107f88da 100644 --- a/Modules/Havana/Source/Widgets/ResourceMonitorWidget.cpp +++ b/Modules/Havana/Source/Widgets/ResourceMonitorWidget.cpp @@ -31,7 +31,7 @@ void ResourceMonitorWidget::Render() OPTICK_CATEGORY( "Resource Monitor", Optick::Category::UI ); ImGui::PushStyleVar( ImGuiStyleVar_WindowPadding, ImVec2( 0.f, 0.f ) ); ImGui::PushStyleVar( ImGuiStyleVar_FramePadding, ImVec2( 12.f, ImGui::GetStyle().FramePadding.y ) ); - ImGui::Begin( "Resource Monitor", &IsOpen ); + if( ImGui::Begin( "Resource Monitor", &IsOpen ) ) { ResourceStack& resources = ResourceCache::GetInstance().GetResouceStack(); @@ -115,8 +115,8 @@ void ResourceMonitorWidget::Render() } ImGui::EndTable(); } - ImGui::End(); } + ImGui::End(); ImGui::PopStyleVar( 2 ); } } diff --git a/Modules/Havana/Source/Widgets/SceneHierarchyWidget.cpp b/Modules/Havana/Source/Widgets/SceneHierarchyWidget.cpp index b8e1a899..a6bd1532 100644 --- a/Modules/Havana/Source/Widgets/SceneHierarchyWidget.cpp +++ b/Modules/Havana/Source/Widgets/SceneHierarchyWidget.cpp @@ -56,7 +56,7 @@ bool SceneHierarchyWidget::OnEvent(const BaseEvent& evt) SelectedCore = nullptr; SelectedEntity = handle; - if( SelectedEntity->HasComponent() ) + if( SelectedEntity && SelectedEntity->HasComponent() ) { SelectedTransform = SelectedEntity->GetComponent().GetPtr(); } @@ -95,14 +95,13 @@ void SceneHierarchyWidget::Render() OPTICK_CATEGORY("Havana::UpdateWorld", Optick::Category::GameLogic); ImGui::PushStyleVar(ImGuiStyleVar_WindowPadding, { 0.f, 0.f }); ImGui::PushStyleVar(ImGuiStyleVar_ItemSpacing, { 0.f, 0.f }); - ImGui::Begin(Name.c_str(), 0, ImGuiWindowFlags_MenuBar); - if (!world) + bool windowOpen = ImGui::Begin(Name.c_str(), 0, ImGuiWindowFlags_MenuBar); + ImGui::PopStyleVar(2); + if (!windowOpen || !world) { - ImGui::PopStyleVar(2); ImGui::End(); return; } - ImGui::PopStyleVar(2); ImGui::BeginMenuBar(); if (ImGui::BeginMenu("Create")) @@ -378,8 +377,9 @@ void SceneHierarchyWidget::HandleAssetDragAndDrop(Transform* root) { if (const ImGuiPayload* payload = ImGui::AcceptDragDropPayload(AssetDescriptor::kDragAndDropPayload)) { - IM_ASSERT(payload->DataSize == sizeof(AssetDescriptor)); - AssetDescriptor& payload_n = *(AssetDescriptor*)payload->Data; + AssetDescriptor* _p = AssetDescriptor::GetDragged(); + if (!_p) return; + AssetDescriptor& payload_n = *_p; if (payload_n.Type == AssetType::Model) { diff --git a/Modules/Havana/Source/Widgets/SceneViewWidget.cpp b/Modules/Havana/Source/Widgets/SceneViewWidget.cpp index 9419c616..9dae3118 100644 --- a/Modules/Havana/Source/Widgets/SceneViewWidget.cpp +++ b/Modules/Havana/Source/Widgets/SceneViewWidget.cpp @@ -17,6 +17,7 @@ #include "UI/Colors.h" #include "Components/Physics/Rigidbody.h" #include "Physics/RigidBodyWithCollisionEvents.h" +#include "Utils/HavanaUtils.h" #if USING( ME_EDITOR ) @@ -238,6 +239,12 @@ void SceneViewWidget::Render() } ImGui::SetCursorPosX(ImGui::GetWindowWidth() - 150.f); + static bool testBTN = false; + if( HavanaUtils::ToggleButton("TEST", testBTN)) + { + MaximizeOnPlay = !testBTN; + } + if (ImGui::Button("Toggle Fullscreen", ImVec2(150.f, 20.f))) { MaximizeOnPlay = !MaximizeOnPlay; @@ -350,8 +357,9 @@ void SceneViewWidget::Render() { if (const ImGuiPayload* payload = ImGui::AcceptDragDropPayload(AssetDescriptor::kDragAndDropPayload)) { - IM_ASSERT(payload->DataSize == sizeof(AssetDescriptor)); - AssetDescriptor& payload_n = *(AssetDescriptor*)payload->Data; + AssetDescriptor* _p = AssetDescriptor::GetDragged(); + if (!_p) return; + AssetDescriptor& payload_n = *_p; if (payload_n.Type == AssetType::Prefab) { diff --git a/Modules/Havana/Source/main.cpp b/Modules/Havana/Source/main.cpp index 2912c582..f25c4492 100644 --- a/Modules/Havana/Source/main.cpp +++ b/Modules/Havana/Source/main.cpp @@ -1,6 +1,7 @@ #include "EditorApp.h" #include "Engine/Engine.h" #include +#include "optick.h" int main( int argc, char** argv ) { @@ -20,6 +21,8 @@ int main( int argc, char** argv ) return 0; } } + + OPTICK_START_CAPTURE(); EditorApp app( argc, argv ); GetEngine().Init( &app ); GetEngine().Run(); diff --git a/Modules/ImGUI/ImGui.sharpmake.cs b/Modules/ImGUI/ImGui.sharpmake.cs index eef34d9d..794c4d14 100644 --- a/Modules/ImGUI/ImGui.sharpmake.cs +++ b/Modules/ImGUI/ImGui.sharpmake.cs @@ -47,8 +47,8 @@ public override void ConfigureAll(Project.Configuration conf, CommonTarget targe conf.IncludePaths.Add(Path.Combine("[project.SharpmakeCsPath]", "../../ThirdParty/SDL/include")); conf.IncludePaths.Add(Path.Combine("[project.SharpmakeCsPath]", "../../ThirdParty/ImGui")); conf.IncludePaths.Add("[project.SourceRootPath]"); - conf.AddPublicDependency(target, DependencySetting.Default); - conf.LibraryFiles.Add("ImGui"); + conf.AddPublicDependency(target); + //conf.LibraryFiles.Add("ImGui"); //conf.LibraryPaths.Add(Path.Combine("[project.SharpmakeCsPath]", "../../ThirdParty/Lib/Optick/Win64/[target.Optimization]")); //conf.LibraryFiles.Add("OptickCore.lib"); diff --git a/Modules/ImGUI/Source/Utils/HavanaUtils.cpp b/Modules/ImGUI/Source/Utils/HavanaUtils.cpp index 7748531b..c82c5fc5 100644 --- a/Modules/ImGUI/Source/Utils/HavanaUtils.cpp +++ b/Modules/ImGUI/Source/Utils/HavanaUtils.cpp @@ -143,61 +143,63 @@ bool HavanaUtils::EditableVector3Spring( const std::string& Name, Vector3& Vecto ImGui::PushStyleVar( ImGuiStyleVar_ItemSpacing, { 0.f, 0.f } ); ImGui::PushStyleVar( ImGuiStyleVar_CellPadding, { 2.f, 2.f } ); float paddingX = 0.f;// ImGui::GetStyle().WindowPadding.x; - ImGui::BeginTable( "##vec", 3, 0, { widgetWidth - paddingX, 0.f } ); - ImGui::TableNextRow(); + Vector3 tempVec = Vector; + if( ImGui::BeginTable( "##vec", 3, 0, { widgetWidth - paddingX, 0.f } ) ) + { + ImGui::TableNextRow(); - float lineHeight = GImGui->Font->FontSize + GImGui->Style.FramePadding.y * 2.f; - ImVec2 buttonSize = { lineHeight + 3.f, lineHeight }; + float lineHeight = GImGui->Font->FontSize + GImGui->Style.FramePadding.y * 2.f; + ImVec2 buttonSize = { lineHeight + 3.f, lineHeight }; - float dragWidths = ( widgetWidth - ( buttonSize.x * 3 ) ) / 3.f; + float dragWidths = ( widgetWidth - ( buttonSize.x * 3 ) ) / 3.f; - Vector3 tempVec = Vector; - { - ImGui::TableSetColumnIndex( 0 ); - ImGui::PushStyleColor( ImGuiCol_Button, ImVec4( 1.f, 51.f / 255.f, 82.f / 255.f, .66f ) ); - ImGui::PushStyleColor( ImGuiCol_ButtonHovered, ImVec4( 1.f, 51.f / 255.f, 82.f / 255.f, 1.f ) ); - if( ImGui::Button( "X", buttonSize ) ) { - Vector.x = ResetValue; + ImGui::TableSetColumnIndex( 0 ); + ImGui::PushStyleColor( ImGuiCol_Button, ImVec4( 1.f, 51.f / 255.f, 82.f / 255.f, .66f ) ); + ImGui::PushStyleColor( ImGuiCol_ButtonHovered, ImVec4( 1.f, 51.f / 255.f, 82.f / 255.f, 1.f ) ); + if( ImGui::Button( "X", buttonSize ) ) + { + Vector.x = ResetValue; + } + ImGui::PopStyleColor( 2 ); + ImGui::SameLine(); + ImGui::PushItemWidth( dragWidths ); + ImGui::DragFloat( "##X", &Vector.x, 0.1f ); + ImGui::PopItemWidth(); } - ImGui::PopStyleColor( 2 ); - ImGui::SameLine(); - ImGui::PushItemWidth( dragWidths ); - ImGui::DragFloat( "##X", &Vector.x, 0.1f ); - ImGui::PopItemWidth(); - } - { - ImGui::TableSetColumnIndex( 1 ); - ImGui::PushStyleColor( ImGuiCol_Button, ImVec4( 139.f / 255.f, 220.f / 255.f, 0.f, .66f ) ); - ImGui::PushStyleColor( ImGuiCol_ButtonHovered, ImVec4( 139.f / 255.f, 220.f / 255.f, 0.f, 1.f ) ); - if( ImGui::Button( "Y", buttonSize ) ) { - Vector.y = ResetValue; + ImGui::TableSetColumnIndex( 1 ); + ImGui::PushStyleColor( ImGuiCol_Button, ImVec4( 139.f / 255.f, 220.f / 255.f, 0.f, .66f ) ); + ImGui::PushStyleColor( ImGuiCol_ButtonHovered, ImVec4( 139.f / 255.f, 220.f / 255.f, 0.f, 1.f ) ); + if( ImGui::Button( "Y", buttonSize ) ) + { + Vector.y = ResetValue; + } + ImGui::PopStyleColor( 2 ); + ImGui::SameLine(); + ImGui::PushItemWidth( dragWidths ); + ImGui::DragFloat( "##Y", &Vector.y, 0.1f ); + ImGui::PopItemWidth(); } - ImGui::PopStyleColor( 2 ); - ImGui::SameLine(); - ImGui::PushItemWidth( dragWidths ); - ImGui::DragFloat( "##Y", &Vector.y, 0.1f ); - ImGui::PopItemWidth(); - } - { - ImGui::TableSetColumnIndex( 2 ); - ImGui::PushStyleColor( ImGuiCol_Button, ImVec4( 40.f / 255.f, 143.f / 255.f, 253.f / 255.f, .66f ) ); - ImGui::PushStyleColor( ImGuiCol_ButtonHovered, ImVec4( 40.f / 255.f, 143.f / 255.f, 253.f / 255.f, 1.f ) ); - if( ImGui::Button( "Z", buttonSize ) ) { - Vector.z = ResetValue; + ImGui::TableSetColumnIndex( 2 ); + ImGui::PushStyleColor( ImGuiCol_Button, ImVec4( 40.f / 255.f, 143.f / 255.f, 253.f / 255.f, .66f ) ); + ImGui::PushStyleColor( ImGuiCol_ButtonHovered, ImVec4( 40.f / 255.f, 143.f / 255.f, 253.f / 255.f, 1.f ) ); + if( ImGui::Button( "Z", buttonSize ) ) + { + Vector.z = ResetValue; + } + ImGui::PopStyleColor( 2 ); + ImGui::SameLine(); + ImGui::PushItemWidth( dragWidths ); + ImGui::DragFloat( "##Z", &Vector.z, 0.1f ); + ImGui::PopItemWidth(); } - ImGui::PopStyleColor( 2 ); - ImGui::SameLine(); - ImGui::PushItemWidth( dragWidths ); - ImGui::DragFloat( "##Z", &Vector.z, 0.1f ); - ImGui::PopItemWidth(); - } - ImGui::EndTable(); + ImGui::EndTable(); + } ImGui::PopStyleVar( 2 ); @@ -216,44 +218,46 @@ bool HavanaUtils::EditableVector( const std::string& Name, Vector2& Vector, floa ImGui::PushStyleVar( ImGuiStyleVar_ItemSpacing, { 0.f, 0.f } ); ImGui::PushStyleVar( ImGuiStyleVar_CellPadding, { 2.f, 2.f } ); - ImGui::BeginTable( "##vec", 2, 0, { widgetSize, 0.f } ); - ImGui::TableNextRow(); - - float lineHeight = GImGui->Font->FontSize + GImGui->Style.FramePadding.y * 2.f; - ImVec2 buttonSize = { lineHeight + 3.f, lineHeight }; - Vector2 tempVec = Vector; + if( ImGui::BeginTable( "##vec", 2, 0, { widgetSize, 0.f } ) ) { - ImGui::TableSetColumnIndex( 0 ); - ImGui::PushStyleColor( ImGuiCol_Button, ImVec4( 1.f, 51.f / 255.f, 82.f / 255.f, .66f ) ); - ImGui::PushStyleColor( ImGuiCol_ButtonHovered, ImVec4( 1.f, 51.f / 255.f, 82.f / 255.f, 1.f ) ); - if( ImGui::Button( "X", buttonSize ) ) + ImGui::TableNextRow(); + + float lineHeight = GImGui->Font->FontSize + GImGui->Style.FramePadding.y * 2.f; + ImVec2 buttonSize = { lineHeight + 3.f, lineHeight }; + { - Vector.x = ResetValue; + ImGui::TableSetColumnIndex( 0 ); + ImGui::PushStyleColor( ImGuiCol_Button, ImVec4( 1.f, 51.f / 255.f, 82.f / 255.f, .66f ) ); + ImGui::PushStyleColor( ImGuiCol_ButtonHovered, ImVec4( 1.f, 51.f / 255.f, 82.f / 255.f, 1.f ) ); + if( ImGui::Button( "X", buttonSize ) ) + { + Vector.x = ResetValue; + } + ImGui::PopStyleColor( 2 ); + ImGui::SameLine(); + ImGui::PushItemWidth( -1 ); + ImGui::DragFloat( "##X", &Vector.x, 0.1f ); + ImGui::PopItemWidth(); } - ImGui::PopStyleColor( 2 ); - ImGui::SameLine(); - ImGui::PushItemWidth( -1 ); - ImGui::DragFloat( "##X", &Vector.x, 0.1f ); - ImGui::PopItemWidth(); - } - { - ImGui::TableSetColumnIndex( 1 ); - ImGui::PushStyleColor( ImGuiCol_Button, ImVec4( 139.f / 255.f, 220.f / 255.f, 0.f, .66f ) ); - ImGui::PushStyleColor( ImGuiCol_ButtonHovered, ImVec4( 139.f / 255.f, 220.f / 255.f, 0.f, 1.f ) ); - if( ImGui::Button( "Y", buttonSize ) ) { - Vector.y = ResetValue; + ImGui::TableSetColumnIndex( 1 ); + ImGui::PushStyleColor( ImGuiCol_Button, ImVec4( 139.f / 255.f, 220.f / 255.f, 0.f, .66f ) ); + ImGui::PushStyleColor( ImGuiCol_ButtonHovered, ImVec4( 139.f / 255.f, 220.f / 255.f, 0.f, 1.f ) ); + if( ImGui::Button( "Y", buttonSize ) ) + { + Vector.y = ResetValue; + } + ImGui::PopStyleColor( 2 ); + ImGui::SameLine(); + ImGui::PushItemWidth( -1 ); + ImGui::DragFloat( "##Y", &Vector.y, 0.1f ); + ImGui::PopItemWidth(); } - ImGui::PopStyleColor( 2 ); - ImGui::SameLine(); - ImGui::PushItemWidth( -1 ); - ImGui::DragFloat( "##Y", &Vector.y, 0.1f ); - ImGui::PopItemWidth(); - } - ImGui::EndTable(); + ImGui::EndTable(); + } ImGui::PopStyleVar( 2 ); @@ -435,3 +439,13 @@ void HavanaUtils::ColorButton( const std::string& Name, Vector3& arr ) arr.z = color.z; } + + +bool HavanaUtils::ToggleButton( const std::string& InName, bool& OutPressed ) +{ + if (ImGui::Button("Toggle Fullscreen", ImVec2(150.f, 20.f))) + { + OutPressed = !OutPressed; + } + return false; +} \ No newline at end of file diff --git a/Modules/ImGUI/Source/Utils/HavanaUtils.h b/Modules/ImGUI/Source/Utils/HavanaUtils.h index 5d7f4198..18f220f7 100644 --- a/Modules/ImGUI/Source/Utils/HavanaUtils.h +++ b/Modules/ImGUI/Source/Utils/HavanaUtils.h @@ -29,4 +29,6 @@ class HavanaUtils static bool UInt( const std::string& Name, uint64_t& value ); static void ColorButton( const std::string& Name, Vector3& arr ); + + static bool ToggleButton( const std::string& InName, bool& OutPressed ); }; \ No newline at end of file diff --git a/Modules/Moonlight/Moonlight.sharpmake.cs b/Modules/Moonlight/Moonlight.sharpmake.cs index 109a1b8e..cb03a82f 100644 --- a/Modules/Moonlight/Moonlight.sharpmake.cs +++ b/Modules/Moonlight/Moonlight.sharpmake.cs @@ -59,4 +59,21 @@ public override void ConfigureMac(Configuration conf, CommonTarget target) conf.IncludePaths.Add(Path.Combine("[project.SharpmakeCsPath]", "../../ThirdParty/bx/include/compat/osx/")); } + + public override void ConfigureLinux(Configuration conf, CommonTarget target) + { + base.ConfigureLinux(conf, target); + + //conf.LibraryFiles.Add($"bgfxDebug"); + //conf.LibraryFiles.Add($"bxDebug"); + //conf.LibraryFiles.Add($"bimgDebug"); + //conf.LibraryFiles.Add($"bimg_decodeDebug"); + //conf.AdditionalLinkerOptions.Add("-l:libassimp.a"); + //conf.AdditionalLinkerOptions.Add("-l:libbgfxDebug.a"); // Remove this + //conf.AdditionalLinkerOptions.Add("-l:libbimgDebug.a"); + //conf.AdditionalLinkerOptions.Add("-l:libbimg_decodeDebug.a"); + //conf.AdditionalLinkerOptions.Add("-l:libbxDebug.a"); + //conf.AdditionalLinkerOptions.Add("-l:libzlibstatic.a"); + conf.IncludePaths.Add(Path.Combine("[project.SharpmakeCsPath]", "../../ThirdParty/bx/include/compat/linux/")); + } } \ No newline at end of file diff --git a/Modules/Moonlight/Source/Core/FrameRenderData.h b/Modules/Moonlight/Source/Core/FrameRenderData.h index 7efdab91..23184bec 100644 --- a/Modules/Moonlight/Source/Core/FrameRenderData.h +++ b/Modules/Moonlight/Source/Core/FrameRenderData.h @@ -8,5 +8,5 @@ struct FrameRenderData // so specific atm bool WasLeftPressed = false; - uint32_t RequestedEntityID = 0; + uint64_t RequestedEntityID = 0; }; diff --git a/Modules/Moonlight/Source/Debug/DebugDrawer.cpp b/Modules/Moonlight/Source/Debug/DebugDrawer.cpp index 91f651ae..05928015 100644 --- a/Modules/Moonlight/Source/Debug/DebugDrawer.cpp +++ b/Modules/Moonlight/Source/Debug/DebugDrawer.cpp @@ -1,8 +1,8 @@ #include "DebugDrawer.h" #include #include -#include "vs_debugdraw_lines.bin.hpp" -#include "fs_debugdraw_lines.bin.hpp" +#include "vs_debugdraw_lines.bin.h" +#include "fs_debugdraw_lines.bin.h" #include "bx/bx.h" #include #include @@ -67,6 +67,7 @@ static const uint16_t s_cubeIndices[36] = }; DebugDrawer::DebugDrawer() + : m_state( State::Count ) { DebugShapeVertex::init(); DebugVertex::init(); diff --git a/Modules/Moonlight/Source/Debug/fs_debugdraw_lines.bin.h b/Modules/Moonlight/Source/Debug/fs_debugdraw_lines.bin.h new file mode 100644 index 00000000..f1622540 --- /dev/null +++ b/Modules/Moonlight/Source/Debug/fs_debugdraw_lines.bin.h @@ -0,0 +1,311 @@ +static const uint8_t fs_debugdraw_lines_glsl[87] = +{ + 0x46, 0x53, 0x48, 0x0b, 0xa4, 0x8b, 0xef, 0x49, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x44, 0x00, // FSH....I......D. + 0x00, 0x00, 0x76, 0x61, 0x72, 0x79, 0x69, 0x6e, 0x67, 0x20, 0x76, 0x65, 0x63, 0x34, 0x20, 0x76, // ..varying vec4 v + 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x3b, 0x0a, 0x76, 0x6f, 0x69, 0x64, 0x20, 0x6d, 0x61, // _color0;.void ma + 0x69, 0x6e, 0x20, 0x28, 0x29, 0x0a, 0x7b, 0x0a, 0x20, 0x20, 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, // in ().{. gl_Fra + 0x67, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x20, 0x3d, 0x20, 0x76, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, // gColor = v_color + 0x30, 0x3b, 0x0a, 0x7d, 0x0a, 0x0a, 0x00, // 0;.}... +}; +static const uint8_t fs_debugdraw_lines_essl[93] = +{ + 0x46, 0x53, 0x48, 0x0b, 0xa4, 0x8b, 0xef, 0x49, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x4a, 0x00, // FSH....I......J. + 0x00, 0x00, 0x76, 0x61, 0x72, 0x79, 0x69, 0x6e, 0x67, 0x20, 0x68, 0x69, 0x67, 0x68, 0x70, 0x20, // ..varying highp + 0x76, 0x65, 0x63, 0x34, 0x20, 0x76, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x3b, 0x0a, 0x76, // vec4 v_color0;.v + 0x6f, 0x69, 0x64, 0x20, 0x6d, 0x61, 0x69, 0x6e, 0x20, 0x28, 0x29, 0x0a, 0x7b, 0x0a, 0x20, 0x20, // oid main ().{. + 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x20, 0x3d, 0x20, 0x76, // gl_FragColor = v + 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x3b, 0x0a, 0x7d, 0x0a, 0x0a, 0x00, // _color0;.}... +}; +static const uint8_t fs_debugdraw_lines_spv[406] = +{ + 0x46, 0x53, 0x48, 0x0b, 0xa4, 0x8b, 0xef, 0x49, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x01, // FSH....I........ + 0x00, 0x00, 0x03, 0x02, 0x23, 0x07, 0x00, 0x00, 0x01, 0x00, 0x0b, 0x00, 0x08, 0x00, 0x2e, 0x00, // ....#........... + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x11, 0x00, 0x02, 0x00, 0x01, 0x00, 0x00, 0x00, 0x0b, 0x00, // ................ + 0x06, 0x00, 0x01, 0x00, 0x00, 0x00, 0x47, 0x4c, 0x53, 0x4c, 0x2e, 0x73, 0x74, 0x64, 0x2e, 0x34, // ......GLSL.std.4 + 0x35, 0x30, 0x00, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, // 50.............. + 0x00, 0x00, 0x0f, 0x00, 0x07, 0x00, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x6d, 0x61, // ..............ma + 0x69, 0x6e, 0x00, 0x00, 0x00, 0x00, 0x22, 0x00, 0x00, 0x00, 0x2d, 0x00, 0x00, 0x00, 0x10, 0x00, // in...."...-..... + 0x03, 0x00, 0x04, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x03, 0x00, 0x03, 0x00, 0x05, 0x00, // ................ + 0x00, 0x00, 0xf4, 0x01, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0x04, 0x00, 0x00, 0x00, 0x6d, 0x61, // ..............ma + 0x69, 0x6e, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x05, 0x00, 0x22, 0x00, 0x00, 0x00, 0x76, 0x5f, // in........"...v_ + 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x06, 0x00, 0x2d, 0x00, // color0........-. + 0x00, 0x00, 0x62, 0x67, 0x66, 0x78, 0x5f, 0x46, 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, 0x61, 0x30, // ..bgfx_FragData0 + 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0x22, 0x00, 0x00, 0x00, 0x1e, 0x00, 0x00, 0x00, 0x00, 0x00, // ..G..."......... + 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0x2d, 0x00, 0x00, 0x00, 0x1e, 0x00, 0x00, 0x00, 0x00, 0x00, // ..G...-......... + 0x00, 0x00, 0x13, 0x00, 0x02, 0x00, 0x02, 0x00, 0x00, 0x00, 0x21, 0x00, 0x03, 0x00, 0x03, 0x00, // ..........!..... + 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x16, 0x00, 0x03, 0x00, 0x06, 0x00, 0x00, 0x00, 0x20, 0x00, // .............. . + 0x00, 0x00, 0x17, 0x00, 0x04, 0x00, 0x08, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x04, 0x00, // ................ + 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x1e, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x08, 0x00, // .. ............. + 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x1e, 0x00, 0x00, 0x00, 0x22, 0x00, 0x00, 0x00, 0x01, 0x00, // ..;......."..... + 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x2c, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x08, 0x00, // .. ...,......... + 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x2c, 0x00, 0x00, 0x00, 0x2d, 0x00, 0x00, 0x00, 0x03, 0x00, // ..;...,...-..... + 0x00, 0x00, 0x36, 0x00, 0x05, 0x00, 0x02, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, // ..6............. + 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0xf8, 0x00, 0x02, 0x00, 0x05, 0x00, 0x00, 0x00, 0x3d, 0x00, // ..............=. + 0x04, 0x00, 0x08, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x22, 0x00, 0x00, 0x00, 0x3e, 0x00, // ......#..."...>. + 0x03, 0x00, 0x2d, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0xfd, 0x00, 0x01, 0x00, 0x38, 0x00, // ..-...#.......8. + 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, // ...... +}; +static const uint8_t fs_debugdraw_lines_wgsl[349] = +{ + 0x46, 0x53, 0x48, 0x0b, 0xa4, 0x8b, 0xef, 0x49, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x45, 0x01, // FSH....I......E. + 0x00, 0x00, 0x64, 0x69, 0x61, 0x67, 0x6e, 0x6f, 0x73, 0x74, 0x69, 0x63, 0x28, 0x6f, 0x66, 0x66, // ..diagnostic(off + 0x2c, 0x20, 0x64, 0x65, 0x72, 0x69, 0x76, 0x61, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x75, 0x6e, 0x69, // , derivative_uni + 0x66, 0x6f, 0x72, 0x6d, 0x69, 0x74, 0x79, 0x29, 0x3b, 0x0a, 0x64, 0x69, 0x61, 0x67, 0x6e, 0x6f, // formity);.diagno + 0x73, 0x74, 0x69, 0x63, 0x28, 0x6f, 0x66, 0x66, 0x2c, 0x20, 0x73, 0x75, 0x62, 0x67, 0x72, 0x6f, // stic(off, subgro + 0x75, 0x70, 0x5f, 0x75, 0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, 0x69, 0x74, 0x79, 0x29, 0x3b, 0x0a, // up_uniformity);. + 0x0a, 0x76, 0x61, 0x72, 0x3c, 0x70, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x3e, 0x20, 0x62, 0x67, // .var bg + 0x66, 0x78, 0x5f, 0x46, 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, 0x61, 0x30, 0x20, 0x3a, 0x20, 0x76, // fx_FragData0 : v + 0x65, 0x63, 0x34, 0x3c, 0x66, 0x33, 0x32, 0x3e, 0x3b, 0x0a, 0x0a, 0x66, 0x6e, 0x20, 0x6d, 0x61, // ec4;..fn ma + 0x69, 0x6e, 0x5f, 0x69, 0x6e, 0x6e, 0x65, 0x72, 0x28, 0x76, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, // in_inner(v_color + 0x30, 0x20, 0x3a, 0x20, 0x76, 0x65, 0x63, 0x34, 0x3c, 0x66, 0x33, 0x32, 0x3e, 0x29, 0x20, 0x7b, // 0 : vec4) { + 0x0a, 0x20, 0x20, 0x62, 0x67, 0x66, 0x78, 0x5f, 0x46, 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, 0x61, // . bgfx_FragData + 0x30, 0x20, 0x3d, 0x20, 0x76, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x3b, 0x0a, 0x7d, 0x0a, // 0 = v_color0;.}. + 0x0a, 0x40, 0x66, 0x72, 0x61, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x0a, 0x66, 0x6e, 0x20, 0x6d, 0x61, // .@fragment.fn ma + 0x69, 0x6e, 0x28, 0x40, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x30, 0x75, 0x29, // in(@location(0u) + 0x20, 0x76, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x20, 0x3a, 0x20, 0x76, 0x65, 0x63, 0x34, // v_color0 : vec4 + 0x3c, 0x66, 0x33, 0x32, 0x3e, 0x29, 0x20, 0x2d, 0x3e, 0x20, 0x40, 0x6c, 0x6f, 0x63, 0x61, 0x74, // ) -> @locat + 0x69, 0x6f, 0x6e, 0x28, 0x30, 0x75, 0x29, 0x20, 0x76, 0x65, 0x63, 0x34, 0x3c, 0x66, 0x33, 0x32, // ion(0u) vec4 {. main_inner + 0x28, 0x76, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x72, 0x65, // (v_color0);. re + 0x74, 0x75, 0x72, 0x6e, 0x20, 0x62, 0x67, 0x66, 0x78, 0x5f, 0x46, 0x72, 0x61, 0x67, 0x44, 0x61, // turn bgfx_FragDa + 0x74, 0x61, 0x30, 0x3b, 0x0a, 0x7d, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ta0;.}....... +}; +static const uint8_t fs_debugdraw_lines_dxbc[270] = +{ + 0x46, 0x53, 0x48, 0x0b, 0xa4, 0x8b, 0xef, 0x49, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf8, 0x00, // FSH....I........ + 0x00, 0x00, 0x44, 0x58, 0x42, 0x43, 0x50, 0xef, 0x6d, 0x1a, 0x00, 0x93, 0x06, 0x9c, 0xf0, 0x68, // ..DXBCP.m......h + 0xce, 0x7c, 0xb9, 0x39, 0x12, 0x62, 0x01, 0x00, 0x00, 0x00, 0xf8, 0x00, 0x00, 0x00, 0x03, 0x00, // .|.9.b.......... + 0x00, 0x00, 0x2c, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0xb4, 0x00, 0x00, 0x00, 0x49, 0x53, // ..,...........IS + 0x47, 0x4e, 0x4c, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x38, 0x00, // GNL...........8. + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, // ................ + 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x44, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ......D......... + 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x0f, 0x0f, 0x00, 0x00, 0x53, 0x56, // ..............SV + 0x5f, 0x50, 0x4f, 0x53, 0x49, 0x54, 0x49, 0x4f, 0x4e, 0x00, 0x43, 0x4f, 0x4c, 0x4f, 0x52, 0x00, // _POSITION.COLOR. + 0xab, 0xab, 0x4f, 0x53, 0x47, 0x4e, 0x2c, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x08, 0x00, // ..OSGN,......... + 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, // .. ............. + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x53, 0x56, 0x5f, 0x54, 0x41, 0x52, // ..........SV_TAR + 0x47, 0x45, 0x54, 0x00, 0xab, 0xab, 0x53, 0x48, 0x45, 0x58, 0x3c, 0x00, 0x00, 0x00, 0x50, 0x00, // GET...SHEX<...P. + 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x6a, 0x08, 0x00, 0x01, 0x62, 0x10, 0x00, 0x03, 0xf2, 0x10, // ......j...b..... + 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x03, 0xf2, 0x20, 0x10, 0x00, 0x00, 0x00, // ......e.... .... + 0x00, 0x00, 0x36, 0x00, 0x00, 0x05, 0xf2, 0x20, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x1e, // ..6.... ......F. + 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x3e, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, // ......>....... +}; +static const uint8_t fs_debugdraw_lines_dxil[2970] = +{ + 0x46, 0x53, 0x48, 0x0b, 0xa4, 0x8b, 0xef, 0x49, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x84, 0x0b, // FSH....I........ + 0x00, 0x00, 0x44, 0x58, 0x42, 0x43, 0x1b, 0xea, 0x67, 0xe9, 0x9e, 0xaa, 0xc6, 0x5f, 0xdf, 0xf3, // ..DXBC..g...._.. + 0x7c, 0xf5, 0x9f, 0x4b, 0x67, 0x05, 0x01, 0x00, 0x00, 0x00, 0x84, 0x0b, 0x00, 0x00, 0x07, 0x00, // |..Kg........... + 0x00, 0x00, 0x3c, 0x00, 0x00, 0x00, 0x4c, 0x00, 0x00, 0x00, 0xb0, 0x00, 0x00, 0x00, 0xec, 0x00, // ..<...L......... + 0x00, 0x00, 0x9c, 0x01, 0x00, 0x00, 0x70, 0x06, 0x00, 0x00, 0x8c, 0x06, 0x00, 0x00, 0x53, 0x46, // ......p.......SF + 0x49, 0x30, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x49, 0x53, // I0............IS + 0x47, 0x31, 0x5c, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, // G1.............. + 0x00, 0x00, 0x48, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x03, 0x00, // ..H............. + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ................ + 0x00, 0x00, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, // ..T............. + 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x0f, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x53, 0x56, // ..............SV + 0x5f, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x00, 0x43, 0x4f, 0x4c, 0x4f, 0x52, 0x00, // _Position.COLOR. + 0x00, 0x00, 0x4f, 0x53, 0x47, 0x31, 0x34, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x08, 0x00, // ..OSG14......... + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x28, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, // ......(.......@. + 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, // ................ + 0x00, 0x00, 0x53, 0x56, 0x5f, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x00, 0x00, 0x00, 0x50, 0x53, // ..SV_Target...PS + 0x56, 0x30, 0xa8, 0x00, 0x00, 0x00, 0x34, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // V0....4......... + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, // ................ + 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x02, 0x01, 0x00, 0x02, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, // ................ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, // ................ + 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x43, 0x4f, 0x4c, 0x4f, 0x52, 0x00, 0x6d, 0x61, 0x69, // .......COLOR.mai + 0x6e, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, // n............... + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x44, 0x03, 0x03, 0x04, 0x00, 0x00, 0x01, 0x00, // ........D....... + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x44, 0x00, 0x03, 0x02, 0x00, 0x00, 0x00, 0x00, // ........D....... + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x44, 0x10, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, // ........D....... + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, // ................ + 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x53, 0x54, // ..............ST + 0x41, 0x54, 0xcc, 0x04, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x33, 0x01, 0x00, 0x00, 0x44, 0x58, // AT....`...3...DX + 0x49, 0x4c, 0x00, 0x01, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0xb4, 0x04, 0x00, 0x00, 0x42, 0x43, // IL............BC + 0xc0, 0xde, 0x21, 0x0c, 0x00, 0x00, 0x2a, 0x01, 0x00, 0x00, 0x0b, 0x82, 0x20, 0x00, 0x02, 0x00, // ..!...*..... ... + 0x00, 0x00, 0x13, 0x00, 0x00, 0x00, 0x07, 0x81, 0x23, 0x91, 0x41, 0xc8, 0x04, 0x49, 0x06, 0x10, // ........#.A..I.. + 0x32, 0x39, 0x92, 0x01, 0x84, 0x0c, 0x25, 0x05, 0x08, 0x19, 0x1e, 0x04, 0x8b, 0x62, 0x80, 0x10, // 29....%......b.. + 0x45, 0x02, 0x42, 0x92, 0x0b, 0x42, 0x84, 0x10, 0x32, 0x14, 0x38, 0x08, 0x18, 0x4b, 0x0a, 0x32, // E.B..B..2.8..K.2 + 0x42, 0x88, 0x48, 0x90, 0x14, 0x20, 0x43, 0x46, 0x88, 0xa5, 0x00, 0x19, 0x32, 0x42, 0xe4, 0x48, // B.H.. CF....2B.H + 0x0e, 0x90, 0x11, 0x22, 0xc4, 0x50, 0x41, 0x51, 0x81, 0x8c, 0xe1, 0x83, 0xe5, 0x8a, 0x04, 0x21, // ...".PAQ.......! + 0x46, 0x06, 0x51, 0x18, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x1b, 0x8c, 0xe0, 0xff, 0xff, 0xff, // F.Q............. + 0xff, 0x07, 0x40, 0x02, 0xa8, 0x0d, 0x84, 0xf0, 0xff, 0xff, 0xff, 0xff, 0x03, 0x20, 0x01, 0x00, // ..@.......... .. + 0x00, 0x00, 0x49, 0x18, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x13, 0x82, 0x60, 0x42, 0x20, 0x00, // ..I.........`B . + 0x00, 0x00, 0x89, 0x20, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x32, 0x22, 0x08, 0x09, 0x20, 0x64, // ... ......2".. d + 0x85, 0x04, 0x13, 0x22, 0xa4, 0x84, 0x04, 0x13, 0x22, 0xe3, 0x84, 0xa1, 0x90, 0x14, 0x12, 0x4c, // ..."...."......L + 0x88, 0x8c, 0x0b, 0x84, 0x84, 0x4c, 0x10, 0x30, 0x23, 0x00, 0x25, 0x00, 0x8a, 0x19, 0x80, 0x39, // .....L.0#.%....9 + 0x02, 0x30, 0x98, 0x23, 0x40, 0x8a, 0x31, 0x44, 0x54, 0x44, 0x56, 0x0c, 0x20, 0xa2, 0x1a, 0xc2, // .0.#@.1DTDV. ... + 0x81, 0x80, 0x54, 0x20, 0x00, 0x00, 0x13, 0x14, 0x72, 0xc0, 0x87, 0x74, 0x60, 0x87, 0x36, 0x68, // ..T ....r..t`.6h + 0x87, 0x79, 0x68, 0x03, 0x72, 0xc0, 0x87, 0x0d, 0xaf, 0x50, 0x0e, 0x6d, 0xd0, 0x0e, 0x7a, 0x50, // .yh.r....P.m..zP + 0x0e, 0x6d, 0x00, 0x0f, 0x7a, 0x30, 0x07, 0x72, 0xa0, 0x07, 0x73, 0x20, 0x07, 0x6d, 0x90, 0x0e, // .m..z0.r..s .m.. + 0x71, 0xa0, 0x07, 0x73, 0x20, 0x07, 0x6d, 0x90, 0x0e, 0x78, 0xa0, 0x07, 0x73, 0x20, 0x07, 0x6d, // q..s .m..x..s .m + 0x90, 0x0e, 0x71, 0x60, 0x07, 0x7a, 0x30, 0x07, 0x72, 0xd0, 0x06, 0xe9, 0x30, 0x07, 0x72, 0xa0, // ..q`.z0.r...0.r. + 0x07, 0x73, 0x20, 0x07, 0x6d, 0x90, 0x0e, 0x76, 0x40, 0x07, 0x7a, 0x60, 0x07, 0x74, 0xd0, 0x06, // .s .m..v@.z`.t.. + 0xe6, 0x10, 0x07, 0x76, 0xa0, 0x07, 0x73, 0x20, 0x07, 0x6d, 0x60, 0x0e, 0x73, 0x20, 0x07, 0x7a, // ...v..s .m`.s .z + 0x30, 0x07, 0x72, 0xd0, 0x06, 0xe6, 0x60, 0x07, 0x74, 0xa0, 0x07, 0x76, 0x40, 0x07, 0x6d, 0xe0, // 0.r...`.t..v@.m. + 0x0e, 0x78, 0xa0, 0x07, 0x71, 0x60, 0x07, 0x7a, 0x30, 0x07, 0x72, 0xa0, 0x07, 0x76, 0x40, 0x07, // .x..q`.z0.r..v@. + 0x43, 0x9e, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x86, 0x3c, 0x06, // C.............<. + 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x79, 0x10, 0x20, 0x00, 0x04, // ...........y. .. + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc8, 0x02, 0x01, 0x0d, 0x00, 0x00, 0x00, 0x32, 0x1e, // ..............2. + 0x98, 0x14, 0x19, 0x11, 0x4c, 0x90, 0x8c, 0x09, 0x26, 0x47, 0xc6, 0x04, 0x43, 0xa2, 0x12, 0x18, // ....L...&G..C... + 0x01, 0x28, 0x86, 0x32, 0x28, 0x8f, 0x92, 0x28, 0x04, 0xaa, 0x92, 0x28, 0x83, 0x42, 0x18, 0x01, // .(.2(..(...(.B.. + 0x28, 0x82, 0x02, 0xa1, 0x1d, 0x4b, 0x41, 0x08, 0x00, 0x00, 0x80, 0x40, 0x20, 0x10, 0x00, 0x00, // (....KA....@ ... + 0x00, 0x00, 0x79, 0x18, 0x00, 0x00, 0x5e, 0x00, 0x00, 0x00, 0x1a, 0x03, 0x4c, 0x90, 0x46, 0x02, // ..y...^.....L.F. + 0x13, 0x44, 0x8f, 0x0c, 0x6f, 0xec, 0xed, 0x4d, 0x0c, 0x24, 0xc6, 0x05, 0xc7, 0x45, 0xa6, 0x06, // .D..o..M.$...E.. + 0xa6, 0xc6, 0x65, 0x46, 0x06, 0x04, 0x45, 0x2c, 0x06, 0xc6, 0x26, 0x2c, 0xc7, 0x26, 0x86, 0x2c, // ..eF..E,..&,.&., + 0x65, 0x43, 0x10, 0x4c, 0x10, 0x88, 0x61, 0x82, 0x40, 0x10, 0x1b, 0x84, 0x81, 0xd8, 0x20, 0x10, // eC.L..a.@..... . + 0x04, 0x05, 0xb8, 0xb9, 0x09, 0x02, 0x51, 0x6c, 0x18, 0x0e, 0x84, 0x98, 0x20, 0x08, 0xc0, 0x06, // ......Ql.... ... + 0x60, 0xc3, 0x40, 0x2c, 0xcb, 0x86, 0x80, 0xd9, 0x30, 0x0c, 0x4a, 0x33, 0x41, 0x58, 0xa0, 0x0d, // `.@,....0.J3AX.. + 0xc1, 0x43, 0xa2, 0x2d, 0x2c, 0xcd, 0x8d, 0xcb, 0x94, 0xd5, 0x17, 0xd4, 0xdb, 0x5c, 0x1a, 0x5d, // .C.-,..........] + 0xda, 0x9b, 0xdb, 0x04, 0xa1, 0x50, 0x26, 0x08, 0xc5, 0xb2, 0x21, 0x20, 0x26, 0x08, 0x05, 0x33, // .....P&...! &..3 + 0x41, 0x28, 0x9a, 0x0d, 0x0b, 0x21, 0x4d, 0x54, 0x65, 0x0d, 0x16, 0x71, 0x01, 0x2c, 0x86, 0x9e, // A(...!MTe..q.,.. + 0x98, 0x9e, 0xa4, 0x26, 0x08, 0x85, 0x33, 0x41, 0x20, 0x8c, 0x09, 0x02, 0x71, 0x6c, 0x10, 0x36, // ...&..3A ...ql.6 + 0x6e, 0xc3, 0x32, 0x64, 0xd3, 0x55, 0x69, 0x83, 0x35, 0x5c, 0xdd, 0x06, 0x01, 0xf3, 0x98, 0x4c, // n.2d.Ui.5......L + 0x59, 0x7d, 0x51, 0x85, 0xc9, 0x9d, 0x95, 0xd1, 0x4d, 0x10, 0x8a, 0x67, 0xc3, 0x42, 0x80, 0xc1, // Y}Q.....M..g.B.. + 0x14, 0x06, 0xd5, 0x35, 0x58, 0xc4, 0xd5, 0x6d, 0x08, 0xc4, 0x60, 0xc3, 0xf0, 0x8d, 0x01, 0xb0, // ...5X..m..`..... + 0xa1, 0x50, 0x22, 0x32, 0x00, 0x00, 0x16, 0x69, 0x6e, 0x73, 0x74, 0x73, 0x13, 0x04, 0x02, 0xa1, // .P"2...insts.... + 0x31, 0x97, 0x76, 0xf6, 0xc5, 0x46, 0x36, 0x41, 0x20, 0x12, 0x1a, 0x73, 0x69, 0x67, 0x5f, 0x73, // 1.v..F6A ..sig_s + 0x74, 0x1b, 0x0c, 0x33, 0x38, 0x03, 0x34, 0x48, 0x03, 0x35, 0x48, 0x83, 0x2a, 0x6c, 0x6c, 0x76, // t..38.4H.5H.*llv + 0x6d, 0x2e, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x53, 0x82, 0xa0, 0x0a, 0x19, 0x9e, 0x8b, 0x5d, 0x99, // m.identS......]. + 0xdc, 0x5c, 0xda, 0x9b, 0xdb, 0x94, 0x80, 0x68, 0x42, 0x86, 0xe7, 0x62, 0x17, 0xc6, 0x66, 0x57, // .......hB..b..fW + 0x26, 0x37, 0x25, 0x28, 0xea, 0x90, 0xe1, 0xb9, 0xcc, 0xa1, 0x85, 0x91, 0x95, 0xc9, 0x35, 0xbd, // &7%(..........5. + 0x91, 0x95, 0xb1, 0x4d, 0x09, 0x90, 0x4a, 0x64, 0x78, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x41, 0x6e, // ...M..Jdx.typeAn + 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x53, 0x82, 0xa6, 0x0e, 0x19, 0x9e, 0x8b, // notationsS...... + 0x5d, 0x5a, 0xd9, 0x5d, 0x12, 0xd9, 0x14, 0x5d, 0x18, 0x5d, 0xd9, 0x94, 0xe0, 0xa9, 0x43, 0x86, // ]Z.]...].]....C. + 0xe7, 0x52, 0xe6, 0x46, 0x27, 0x97, 0x07, 0xf5, 0x96, 0xe6, 0x46, 0x37, 0x37, 0x25, 0x20, 0x83, // .R.F'.....F77% . + 0x2e, 0x64, 0x78, 0x2e, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x73, 0x53, 0x02, 0x35, 0x00, // .dx.countersS.5. + 0x00, 0x00, 0x79, 0x18, 0x00, 0x00, 0x4c, 0x00, 0x00, 0x00, 0x33, 0x08, 0x80, 0x1c, 0xc4, 0xe1, // ..y...L...3..... + 0x1c, 0x66, 0x14, 0x01, 0x3d, 0x88, 0x43, 0x38, 0x84, 0xc3, 0x8c, 0x42, 0x80, 0x07, 0x79, 0x78, // .f..=.C8...B..yx + 0x07, 0x73, 0x98, 0x71, 0x0c, 0xe6, 0x00, 0x0f, 0xed, 0x10, 0x0e, 0xf4, 0x80, 0x0e, 0x33, 0x0c, // .s.q..........3. + 0x42, 0x1e, 0xc2, 0xc1, 0x1d, 0xce, 0xa1, 0x1c, 0x66, 0x30, 0x05, 0x3d, 0x88, 0x43, 0x38, 0x84, // B.......f0.=.C8. + 0x83, 0x1b, 0xcc, 0x03, 0x3d, 0xc8, 0x43, 0x3d, 0x8c, 0x03, 0x3d, 0xcc, 0x78, 0x8c, 0x74, 0x70, // ....=.C=..=.x.tp + 0x07, 0x7b, 0x08, 0x07, 0x79, 0x48, 0x87, 0x70, 0x70, 0x07, 0x7a, 0x70, 0x03, 0x76, 0x78, 0x87, // .{..yH.pp.zp.vx. + 0x70, 0x20, 0x87, 0x19, 0xcc, 0x11, 0x0e, 0xec, 0x90, 0x0e, 0xe1, 0x30, 0x0f, 0x6e, 0x30, 0x0f, // p .........0.n0. + 0xe3, 0xf0, 0x0e, 0xf0, 0x50, 0x0e, 0x33, 0x10, 0xc4, 0x1d, 0xde, 0x21, 0x1c, 0xd8, 0x21, 0x1d, // ....P.3....!..!. + 0xc2, 0x61, 0x1e, 0x66, 0x30, 0x89, 0x3b, 0xbc, 0x83, 0x3b, 0xd0, 0x43, 0x39, 0xb4, 0x03, 0x3c, // .a.f0.;..;.C9..< + 0xbc, 0x83, 0x3c, 0x84, 0x03, 0x3b, 0xcc, 0xf0, 0x14, 0x76, 0x60, 0x07, 0x7b, 0x68, 0x07, 0x37, // ..<..;...v`.{h.7 + 0x68, 0x87, 0x72, 0x68, 0x07, 0x37, 0x80, 0x87, 0x70, 0x90, 0x87, 0x70, 0x60, 0x07, 0x76, 0x28, // h.rh.7..p..p`.v( + 0x07, 0x76, 0xf8, 0x05, 0x76, 0x78, 0x87, 0x77, 0x80, 0x87, 0x5f, 0x08, 0x87, 0x71, 0x18, 0x87, // .v..vx.w.._..q.. + 0x72, 0x98, 0x87, 0x79, 0x98, 0x81, 0x2c, 0xee, 0xf0, 0x0e, 0xee, 0xe0, 0x0e, 0xf5, 0xc0, 0x0e, // r..y..,......... + 0xec, 0x30, 0x03, 0x62, 0xc8, 0xa1, 0x1c, 0xe4, 0xa1, 0x1c, 0xcc, 0xa1, 0x1c, 0xe4, 0xa1, 0x1c, // .0.b............ + 0xdc, 0x61, 0x1c, 0xca, 0x21, 0x1c, 0xc4, 0x81, 0x1d, 0xca, 0x61, 0x06, 0xd6, 0x90, 0x43, 0x39, // .a..!.....a...C9 + 0xc8, 0x43, 0x39, 0x98, 0x43, 0x39, 0xc8, 0x43, 0x39, 0xb8, 0xc3, 0x38, 0x94, 0x43, 0x38, 0x88, // .C9.C9.C9..8.C8. + 0x03, 0x3b, 0x94, 0xc3, 0x2f, 0xbc, 0x83, 0x3c, 0xfc, 0x82, 0x3b, 0xd4, 0x03, 0x3b, 0xb0, 0xc3, // .;../..<..;..;.. + 0x0c, 0xc4, 0x21, 0x07, 0x7c, 0x70, 0x03, 0x7a, 0x28, 0x87, 0x76, 0x80, 0x87, 0x19, 0xd1, 0x43, // ..!.|p.z(.v....C + 0x0e, 0xf8, 0xe0, 0x06, 0xe4, 0x20, 0x0e, 0xe7, 0xe0, 0x06, 0xf6, 0x10, 0x0e, 0xf2, 0xc0, 0x0e, // ..... .......... + 0xe1, 0x90, 0x0f, 0xef, 0x50, 0x0f, 0xf4, 0x00, 0x00, 0x00, 0x71, 0x20, 0x00, 0x00, 0x0b, 0x00, // ....P.....q .... + 0x00, 0x00, 0x16, 0x30, 0x0d, 0x97, 0xef, 0x3c, 0xfe, 0xe2, 0x00, 0x83, 0xd8, 0x3c, 0xd4, 0xe4, // ...0...<.....<.. + 0x17, 0xb7, 0x6d, 0x02, 0xd5, 0x70, 0xf9, 0xce, 0xe3, 0x4b, 0x93, 0x13, 0x11, 0x28, 0x35, 0x3d, // ..m..p...K...(5= + 0xd4, 0xe4, 0x17, 0xb7, 0x6d, 0x00, 0x04, 0x03, 0x20, 0x0d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ....m... ....... + 0x00, 0x00, 0x48, 0x41, 0x53, 0x48, 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x19, 0x06, // ..HASH.......... + 0xc4, 0x99, 0x29, 0xf7, 0xbd, 0x54, 0xb1, 0x9e, 0x06, 0x5b, 0xaa, 0xa0, 0xdb, 0x7e, 0x44, 0x58, // ..)..T...[...~DX + 0x49, 0x4c, 0xf0, 0x04, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x3c, 0x01, 0x00, 0x00, 0x44, 0x58, // IL....`...<...DX + 0x49, 0x4c, 0x00, 0x01, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0xd8, 0x04, 0x00, 0x00, 0x42, 0x43, // IL............BC + 0xc0, 0xde, 0x21, 0x0c, 0x00, 0x00, 0x33, 0x01, 0x00, 0x00, 0x0b, 0x82, 0x20, 0x00, 0x02, 0x00, // ..!...3..... ... + 0x00, 0x00, 0x13, 0x00, 0x00, 0x00, 0x07, 0x81, 0x23, 0x91, 0x41, 0xc8, 0x04, 0x49, 0x06, 0x10, // ........#.A..I.. + 0x32, 0x39, 0x92, 0x01, 0x84, 0x0c, 0x25, 0x05, 0x08, 0x19, 0x1e, 0x04, 0x8b, 0x62, 0x80, 0x10, // 29....%......b.. + 0x45, 0x02, 0x42, 0x92, 0x0b, 0x42, 0x84, 0x10, 0x32, 0x14, 0x38, 0x08, 0x18, 0x4b, 0x0a, 0x32, // E.B..B..2.8..K.2 + 0x42, 0x88, 0x48, 0x90, 0x14, 0x20, 0x43, 0x46, 0x88, 0xa5, 0x00, 0x19, 0x32, 0x42, 0xe4, 0x48, // B.H.. CF....2B.H + 0x0e, 0x90, 0x11, 0x22, 0xc4, 0x50, 0x41, 0x51, 0x81, 0x8c, 0xe1, 0x83, 0xe5, 0x8a, 0x04, 0x21, // ...".PAQ.......! + 0x46, 0x06, 0x51, 0x18, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x1b, 0x8c, 0xe0, 0xff, 0xff, 0xff, // F.Q............. + 0xff, 0x07, 0x40, 0x02, 0xa8, 0x0d, 0x84, 0xf0, 0xff, 0xff, 0xff, 0xff, 0x03, 0x20, 0x01, 0x00, // ..@.......... .. + 0x00, 0x00, 0x49, 0x18, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x13, 0x82, 0x60, 0x42, 0x20, 0x00, // ..I.........`B . + 0x00, 0x00, 0x89, 0x20, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x32, 0x22, 0x08, 0x09, 0x20, 0x64, // ... ......2".. d + 0x85, 0x04, 0x13, 0x22, 0xa4, 0x84, 0x04, 0x13, 0x22, 0xe3, 0x84, 0xa1, 0x90, 0x14, 0x12, 0x4c, // ..."...."......L + 0x88, 0x8c, 0x0b, 0x84, 0x84, 0x4c, 0x10, 0x30, 0x23, 0x00, 0x25, 0x00, 0x8a, 0x19, 0x80, 0x39, // .....L.0#.%....9 + 0x02, 0x30, 0x98, 0x23, 0x40, 0x8a, 0x31, 0x44, 0x54, 0x44, 0x56, 0x0c, 0x20, 0xa2, 0x1a, 0xc2, // .0.#@.1DTDV. ... + 0x81, 0x80, 0x54, 0x20, 0x00, 0x00, 0x13, 0x14, 0x72, 0xc0, 0x87, 0x74, 0x60, 0x87, 0x36, 0x68, // ..T ....r..t`.6h + 0x87, 0x79, 0x68, 0x03, 0x72, 0xc0, 0x87, 0x0d, 0xaf, 0x50, 0x0e, 0x6d, 0xd0, 0x0e, 0x7a, 0x50, // .yh.r....P.m..zP + 0x0e, 0x6d, 0x00, 0x0f, 0x7a, 0x30, 0x07, 0x72, 0xa0, 0x07, 0x73, 0x20, 0x07, 0x6d, 0x90, 0x0e, // .m..z0.r..s .m.. + 0x71, 0xa0, 0x07, 0x73, 0x20, 0x07, 0x6d, 0x90, 0x0e, 0x78, 0xa0, 0x07, 0x73, 0x20, 0x07, 0x6d, // q..s .m..x..s .m + 0x90, 0x0e, 0x71, 0x60, 0x07, 0x7a, 0x30, 0x07, 0x72, 0xd0, 0x06, 0xe9, 0x30, 0x07, 0x72, 0xa0, // ..q`.z0.r...0.r. + 0x07, 0x73, 0x20, 0x07, 0x6d, 0x90, 0x0e, 0x76, 0x40, 0x07, 0x7a, 0x60, 0x07, 0x74, 0xd0, 0x06, // .s .m..v@.z`.t.. + 0xe6, 0x10, 0x07, 0x76, 0xa0, 0x07, 0x73, 0x20, 0x07, 0x6d, 0x60, 0x0e, 0x73, 0x20, 0x07, 0x7a, // ...v..s .m`.s .z + 0x30, 0x07, 0x72, 0xd0, 0x06, 0xe6, 0x60, 0x07, 0x74, 0xa0, 0x07, 0x76, 0x40, 0x07, 0x6d, 0xe0, // 0.r...`.t..v@.m. + 0x0e, 0x78, 0xa0, 0x07, 0x71, 0x60, 0x07, 0x7a, 0x30, 0x07, 0x72, 0xa0, 0x07, 0x76, 0x40, 0x07, // .x..q`.z0.r..v@. + 0x43, 0x9e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x86, 0x3c, 0x06, // C.............<. + 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x79, 0x10, 0x20, 0x00, 0x04, // ...........y. .. + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc8, 0x02, 0x01, 0x0c, 0x00, 0x00, 0x00, 0x32, 0x1e, // ..............2. + 0x98, 0x14, 0x19, 0x11, 0x4c, 0x90, 0x8c, 0x09, 0x26, 0x47, 0xc6, 0x04, 0x43, 0xa2, 0x12, 0x18, // ....L...&G..C... + 0x01, 0x28, 0x89, 0x62, 0x28, 0x83, 0xf2, 0xa0, 0x2a, 0x89, 0x32, 0x28, 0x84, 0x11, 0x80, 0x22, // .(.b(...*.2(..." + 0x28, 0x10, 0xda, 0xb1, 0x14, 0x84, 0x00, 0x00, 0x00, 0x08, 0x04, 0x02, 0x01, 0x00, 0x79, 0x18, // (.............y. + 0x00, 0x00, 0x48, 0x00, 0x00, 0x00, 0x1a, 0x03, 0x4c, 0x90, 0x46, 0x02, 0x13, 0x44, 0x8f, 0x0c, // ..H.....L.F..D.. + 0x6f, 0xec, 0xed, 0x4d, 0x0c, 0x24, 0xc6, 0x05, 0xc7, 0x45, 0xa6, 0x06, 0xa6, 0xc6, 0x65, 0x46, // o..M.$...E....eF + 0x06, 0x04, 0x45, 0x2c, 0x06, 0xc6, 0x26, 0x2c, 0xc7, 0x26, 0x86, 0x2c, 0x65, 0x43, 0x10, 0x4c, // ..E,..&,.&.,eC.L + 0x10, 0x88, 0x61, 0x82, 0x40, 0x10, 0x1b, 0x84, 0x81, 0x98, 0x20, 0x10, 0xc5, 0x06, 0x61, 0x30, // ..a.@..... ...a0 + 0x28, 0xc0, 0xcd, 0x4d, 0x10, 0x08, 0x63, 0xc3, 0x80, 0x24, 0xc4, 0x04, 0x61, 0x79, 0x36, 0x04, // (..M..c..$..ay6. + 0xcb, 0x04, 0x41, 0x00, 0x48, 0xb4, 0x85, 0xa5, 0xb9, 0x71, 0x99, 0xb2, 0xfa, 0x82, 0x7a, 0x9b, // ..A.H....q....z. + 0x4b, 0xa3, 0x4b, 0x7b, 0x73, 0x9b, 0x20, 0x14, 0xc9, 0x04, 0xa1, 0x50, 0x36, 0x04, 0xc4, 0x04, // K.K{s. ....P6... + 0xa1, 0x58, 0x26, 0x08, 0x05, 0xb3, 0x61, 0x21, 0x1e, 0x28, 0x92, 0xa6, 0x61, 0x22, 0x28, 0x80, // .X&...a!.(..a"(. + 0xc5, 0xd0, 0x13, 0xd3, 0x93, 0xd4, 0x04, 0xa1, 0x68, 0x26, 0x08, 0xc4, 0x31, 0x41, 0x20, 0x90, // ........h&..1A . + 0x0d, 0x02, 0x96, 0x6d, 0x58, 0x06, 0x0b, 0xa2, 0xa4, 0x6b, 0x98, 0x06, 0x4a, 0xdb, 0x20, 0x54, // ...mX....k..J. T + 0x1b, 0x93, 0x29, 0xab, 0x2f, 0xaa, 0x30, 0xb9, 0xb3, 0x32, 0xba, 0x09, 0x42, 0xe1, 0x6c, 0x58, // ..)./.0..2..B.lX + 0x88, 0x0e, 0xf2, 0x24, 0x6a, 0x98, 0x08, 0x4a, 0xdb, 0x10, 0x7c, 0x1b, 0x06, 0x0e, 0x0c, 0x80, // ...$j..J..|..... + 0x0d, 0x45, 0xe3, 0x84, 0x01, 0x00, 0x54, 0x61, 0x63, 0xb3, 0x6b, 0x73, 0x49, 0x23, 0x2b, 0x73, // .E....Tac.ksI#+s + 0xa3, 0x9b, 0x12, 0x04, 0x55, 0xc8, 0xf0, 0x5c, 0xec, 0xca, 0xe4, 0xe6, 0xd2, 0xde, 0xdc, 0xa6, // ....U........... + 0x04, 0x44, 0x13, 0x32, 0x3c, 0x17, 0xbb, 0x30, 0x36, 0xbb, 0x32, 0xb9, 0x29, 0x81, 0x51, 0x87, // .D.2<..06.2.).Q. + 0x0c, 0xcf, 0x65, 0x0e, 0x2d, 0x8c, 0xac, 0x4c, 0xae, 0xe9, 0x8d, 0xac, 0x8c, 0x6d, 0x4a, 0x90, // ..e.-..L.....mJ. + 0xd4, 0x21, 0xc3, 0x73, 0xb1, 0x4b, 0x2b, 0xbb, 0x4b, 0x22, 0x9b, 0xa2, 0x0b, 0xa3, 0x2b, 0x9b, // .!.s.K+.K"....+. + 0x12, 0x2c, 0x75, 0xc8, 0xf0, 0x5c, 0xca, 0xdc, 0xe8, 0xe4, 0xf2, 0xa0, 0xde, 0xd2, 0xdc, 0xe8, // .,u............. + 0xe6, 0xa6, 0x04, 0x61, 0x00, 0x00, 0x79, 0x18, 0x00, 0x00, 0x4c, 0x00, 0x00, 0x00, 0x33, 0x08, // ...a..y...L...3. + 0x80, 0x1c, 0xc4, 0xe1, 0x1c, 0x66, 0x14, 0x01, 0x3d, 0x88, 0x43, 0x38, 0x84, 0xc3, 0x8c, 0x42, // .....f..=.C8...B + 0x80, 0x07, 0x79, 0x78, 0x07, 0x73, 0x98, 0x71, 0x0c, 0xe6, 0x00, 0x0f, 0xed, 0x10, 0x0e, 0xf4, // ..yx.s.q........ + 0x80, 0x0e, 0x33, 0x0c, 0x42, 0x1e, 0xc2, 0xc1, 0x1d, 0xce, 0xa1, 0x1c, 0x66, 0x30, 0x05, 0x3d, // ..3.B.......f0.= + 0x88, 0x43, 0x38, 0x84, 0x83, 0x1b, 0xcc, 0x03, 0x3d, 0xc8, 0x43, 0x3d, 0x8c, 0x03, 0x3d, 0xcc, // .C8.....=.C=..=. + 0x78, 0x8c, 0x74, 0x70, 0x07, 0x7b, 0x08, 0x07, 0x79, 0x48, 0x87, 0x70, 0x70, 0x07, 0x7a, 0x70, // x.tp.{..yH.pp.zp + 0x03, 0x76, 0x78, 0x87, 0x70, 0x20, 0x87, 0x19, 0xcc, 0x11, 0x0e, 0xec, 0x90, 0x0e, 0xe1, 0x30, // .vx.p .........0 + 0x0f, 0x6e, 0x30, 0x0f, 0xe3, 0xf0, 0x0e, 0xf0, 0x50, 0x0e, 0x33, 0x10, 0xc4, 0x1d, 0xde, 0x21, // .n0.....P.3....! + 0x1c, 0xd8, 0x21, 0x1d, 0xc2, 0x61, 0x1e, 0x66, 0x30, 0x89, 0x3b, 0xbc, 0x83, 0x3b, 0xd0, 0x43, // ..!..a.f0.;..;.C + 0x39, 0xb4, 0x03, 0x3c, 0xbc, 0x83, 0x3c, 0x84, 0x03, 0x3b, 0xcc, 0xf0, 0x14, 0x76, 0x60, 0x07, // 9..<..<..;...v`. + 0x7b, 0x68, 0x07, 0x37, 0x68, 0x87, 0x72, 0x68, 0x07, 0x37, 0x80, 0x87, 0x70, 0x90, 0x87, 0x70, // {h.7h.rh.7..p..p + 0x60, 0x07, 0x76, 0x28, 0x07, 0x76, 0xf8, 0x05, 0x76, 0x78, 0x87, 0x77, 0x80, 0x87, 0x5f, 0x08, // `.v(.v..vx.w.._. + 0x87, 0x71, 0x18, 0x87, 0x72, 0x98, 0x87, 0x79, 0x98, 0x81, 0x2c, 0xee, 0xf0, 0x0e, 0xee, 0xe0, // .q..r..y..,..... + 0x0e, 0xf5, 0xc0, 0x0e, 0xec, 0x30, 0x03, 0x62, 0xc8, 0xa1, 0x1c, 0xe4, 0xa1, 0x1c, 0xcc, 0xa1, // .....0.b........ + 0x1c, 0xe4, 0xa1, 0x1c, 0xdc, 0x61, 0x1c, 0xca, 0x21, 0x1c, 0xc4, 0x81, 0x1d, 0xca, 0x61, 0x06, // .....a..!.....a. + 0xd6, 0x90, 0x43, 0x39, 0xc8, 0x43, 0x39, 0x98, 0x43, 0x39, 0xc8, 0x43, 0x39, 0xb8, 0xc3, 0x38, // ..C9.C9.C9.C9..8 + 0x94, 0x43, 0x38, 0x88, 0x03, 0x3b, 0x94, 0xc3, 0x2f, 0xbc, 0x83, 0x3c, 0xfc, 0x82, 0x3b, 0xd4, // .C8..;../..<..;. + 0x03, 0x3b, 0xb0, 0xc3, 0x0c, 0xc4, 0x21, 0x07, 0x7c, 0x70, 0x03, 0x7a, 0x28, 0x87, 0x76, 0x80, // .;....!.|p.z(.v. + 0x87, 0x19, 0xd1, 0x43, 0x0e, 0xf8, 0xe0, 0x06, 0xe4, 0x20, 0x0e, 0xe7, 0xe0, 0x06, 0xf6, 0x10, // ...C..... ...... + 0x0e, 0xf2, 0xc0, 0x0e, 0xe1, 0x90, 0x0f, 0xef, 0x50, 0x0f, 0xf4, 0x00, 0x00, 0x00, 0x71, 0x20, // ........P.....q + 0x00, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x16, 0x30, 0x0d, 0x97, 0xef, 0x3c, 0xfe, 0xe2, 0x00, 0x83, // .......0...<.... + 0xd8, 0x3c, 0xd4, 0xe4, 0x17, 0xb7, 0x6d, 0x02, 0xd5, 0x70, 0xf9, 0xce, 0xe3, 0x4b, 0x93, 0x13, // .<....m..p...K.. + 0x11, 0x28, 0x35, 0x3d, 0xd4, 0xe4, 0x17, 0xb7, 0x6d, 0x00, 0x04, 0x03, 0x20, 0x0d, 0x00, 0x00, // .(5=....m... ... + 0x00, 0x00, 0x61, 0x20, 0x00, 0x00, 0x1e, 0x00, 0x00, 0x00, 0x13, 0x04, 0x41, 0x2c, 0x10, 0x00, // ..a ........A,.. + 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x44, 0x85, 0x30, 0x03, 0x50, 0x0a, 0x54, 0x25, 0x00, 0x00, // ......D.0.P.T%.. + 0x00, 0x00, 0x23, 0x06, 0x09, 0x00, 0x82, 0x60, 0x60, 0x4c, 0x44, 0x04, 0x21, 0xc3, 0x88, 0x41, // ..#....``LD.!..A + 0x02, 0x80, 0x20, 0x18, 0x18, 0x54, 0x21, 0x45, 0x02, 0x31, 0x62, 0x90, 0x00, 0x20, 0x08, 0x06, // .. ..T!E.1b.. .. + 0x46, 0x65, 0x4c, 0x52, 0x52, 0x8c, 0x18, 0x24, 0x00, 0x08, 0x82, 0x81, 0x61, 0x1d, 0xd4, 0xd4, // FeLRR..$....a... + 0x18, 0x23, 0x06, 0x09, 0x00, 0x82, 0x60, 0x80, 0x58, 0x06, 0x45, 0x31, 0xc4, 0x88, 0x41, 0x02, // .#....`.X.E1..A. + 0x80, 0x20, 0x18, 0x20, 0x96, 0x41, 0x51, 0xc5, 0x30, 0x62, 0x90, 0x00, 0x20, 0x08, 0x06, 0x88, // . . .AQ.0b.. ... + 0x65, 0x50, 0xd4, 0x22, 0x8c, 0x18, 0x24, 0x00, 0x08, 0x82, 0x01, 0x62, 0x19, 0x14, 0xe5, 0x04, // eP."..$....b.... + 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // .......... +}; +static const uint8_t fs_debugdraw_lines_mtl[386] = +{ + 0x46, 0x53, 0x48, 0x0b, 0xa4, 0x8b, 0xef, 0x49, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x6c, 0x01, // FSH....I......l. + 0x00, 0x00, 0x23, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x20, 0x3c, 0x6d, 0x65, 0x74, 0x61, // ..#include .#inclu + 0x64, 0x65, 0x20, 0x3c, 0x73, 0x69, 0x6d, 0x64, 0x2f, 0x73, 0x69, 0x6d, 0x64, 0x2e, 0x68, 0x3e, // de + 0x0a, 0x0a, 0x75, 0x73, 0x69, 0x6e, 0x67, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, // ..using namespac + 0x65, 0x20, 0x6d, 0x65, 0x74, 0x61, 0x6c, 0x3b, 0x0a, 0x0a, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, // e metal;..struct + 0x20, 0x78, 0x6c, 0x61, 0x74, 0x4d, 0x74, 0x6c, 0x4d, 0x61, 0x69, 0x6e, 0x5f, 0x6f, 0x75, 0x74, // xlatMtlMain_out + 0x0a, 0x7b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x34, 0x20, 0x62, 0x67, // .{. float4 bg + 0x66, 0x78, 0x5f, 0x46, 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, 0x61, 0x30, 0x20, 0x5b, 0x5b, 0x63, // fx_FragData0 [[c + 0x6f, 0x6c, 0x6f, 0x72, 0x28, 0x30, 0x29, 0x5d, 0x5d, 0x3b, 0x0a, 0x7d, 0x3b, 0x0a, 0x0a, 0x73, // olor(0)]];.};..s + 0x74, 0x72, 0x75, 0x63, 0x74, 0x20, 0x78, 0x6c, 0x61, 0x74, 0x4d, 0x74, 0x6c, 0x4d, 0x61, 0x69, // truct xlatMtlMai + 0x6e, 0x5f, 0x69, 0x6e, 0x0a, 0x7b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, // n_in.{. float + 0x34, 0x20, 0x76, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x20, 0x5b, 0x5b, 0x75, 0x73, 0x65, // 4 v_color0 [[use + 0x72, 0x28, 0x6c, 0x6f, 0x63, 0x6e, 0x30, 0x29, 0x5d, 0x5d, 0x3b, 0x0a, 0x7d, 0x3b, 0x0a, 0x0a, // r(locn0)]];.};.. + 0x66, 0x72, 0x61, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x20, 0x78, 0x6c, 0x61, 0x74, 0x4d, 0x74, 0x6c, // fragment xlatMtl + 0x4d, 0x61, 0x69, 0x6e, 0x5f, 0x6f, 0x75, 0x74, 0x20, 0x78, 0x6c, 0x61, 0x74, 0x4d, 0x74, 0x6c, // Main_out xlatMtl + 0x4d, 0x61, 0x69, 0x6e, 0x28, 0x78, 0x6c, 0x61, 0x74, 0x4d, 0x74, 0x6c, 0x4d, 0x61, 0x69, 0x6e, // Main(xlatMtlMain + 0x5f, 0x69, 0x6e, 0x20, 0x69, 0x6e, 0x20, 0x5b, 0x5b, 0x73, 0x74, 0x61, 0x67, 0x65, 0x5f, 0x69, // _in in [[stage_i + 0x6e, 0x5d, 0x5d, 0x29, 0x0a, 0x7b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x78, 0x6c, 0x61, 0x74, 0x4d, // n]]).{. xlatM + 0x74, 0x6c, 0x4d, 0x61, 0x69, 0x6e, 0x5f, 0x6f, 0x75, 0x74, 0x20, 0x6f, 0x75, 0x74, 0x20, 0x3d, // tlMain_out out = + 0x20, 0x7b, 0x7d, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x6f, 0x75, 0x74, 0x2e, 0x62, 0x67, 0x66, // {};. out.bgf + 0x78, 0x5f, 0x46, 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, 0x61, 0x30, 0x20, 0x3d, 0x20, 0x69, 0x6e, // x_FragData0 = in + 0x2e, 0x76, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x72, // .v_color0;. r + 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x6f, 0x75, 0x74, 0x3b, 0x0a, 0x7d, 0x0a, 0x0a, 0x00, 0x00, // eturn out;.}.... + 0x00, 0x00, // .. +}; +extern const uint8_t* fs_debugdraw_lines_pssl; +extern const uint32_t fs_debugdraw_lines_pssl_size; diff --git a/Modules/Moonlight/Source/Debug/fs_debugdraw_lines.bin.hpp b/Modules/Moonlight/Source/Debug/fs_debugdraw_lines.bin.hpp deleted file mode 100644 index 96ab0c91..00000000 --- a/Modules/Moonlight/Source/Debug/fs_debugdraw_lines.bin.hpp +++ /dev/null @@ -1,113 +0,0 @@ -static const uint8_t fs_debugdraw_lines_glsl[87] = -{ - 0x46, 0x53, 0x48, 0x0b, 0xa4, 0x8b, 0xef, 0x49, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x44, 0x00, // FSH....I......D. - 0x00, 0x00, 0x76, 0x61, 0x72, 0x79, 0x69, 0x6e, 0x67, 0x20, 0x76, 0x65, 0x63, 0x34, 0x20, 0x76, // ..varying vec4 v - 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x3b, 0x0a, 0x76, 0x6f, 0x69, 0x64, 0x20, 0x6d, 0x61, // _color0;.void ma - 0x69, 0x6e, 0x20, 0x28, 0x29, 0x0a, 0x7b, 0x0a, 0x20, 0x20, 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, // in ().{. gl_Fra - 0x67, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x20, 0x3d, 0x20, 0x76, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, // gColor = v_color - 0x30, 0x3b, 0x0a, 0x7d, 0x0a, 0x0a, 0x00, // 0;.}... -}; -static const uint8_t fs_debugdraw_lines_essl[93] = -{ - 0x46, 0x53, 0x48, 0x0b, 0xa4, 0x8b, 0xef, 0x49, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x4a, 0x00, // FSH....I......J. - 0x00, 0x00, 0x76, 0x61, 0x72, 0x79, 0x69, 0x6e, 0x67, 0x20, 0x68, 0x69, 0x67, 0x68, 0x70, 0x20, // ..varying highp - 0x76, 0x65, 0x63, 0x34, 0x20, 0x76, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x3b, 0x0a, 0x76, // vec4 v_color0;.v - 0x6f, 0x69, 0x64, 0x20, 0x6d, 0x61, 0x69, 0x6e, 0x20, 0x28, 0x29, 0x0a, 0x7b, 0x0a, 0x20, 0x20, // oid main ().{. - 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x20, 0x3d, 0x20, 0x76, // gl_FragColor = v - 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x3b, 0x0a, 0x7d, 0x0a, 0x0a, 0x00, // _color0;.}... -}; -static const uint8_t fs_debugdraw_lines_spv[466] = -{ - 0x46, 0x53, 0x48, 0x0b, 0xa4, 0x8b, 0xef, 0x49, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xbc, 0x01, // FSH....I........ - 0x00, 0x00, 0x03, 0x02, 0x23, 0x07, 0x00, 0x00, 0x01, 0x00, 0x0a, 0x00, 0x08, 0x00, 0x31, 0x00, // ....#.........1. - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x11, 0x00, 0x02, 0x00, 0x01, 0x00, 0x00, 0x00, 0x0b, 0x00, // ................ - 0x06, 0x00, 0x01, 0x00, 0x00, 0x00, 0x47, 0x4c, 0x53, 0x4c, 0x2e, 0x73, 0x74, 0x64, 0x2e, 0x34, // ......GLSL.std.4 - 0x35, 0x30, 0x00, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, // 50.............. - 0x00, 0x00, 0x0f, 0x00, 0x08, 0x00, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x6d, 0x61, // ..............ma - 0x69, 0x6e, 0x00, 0x00, 0x00, 0x00, 0x22, 0x00, 0x00, 0x00, 0x25, 0x00, 0x00, 0x00, 0x30, 0x00, // in...."...%...0. - 0x00, 0x00, 0x10, 0x00, 0x03, 0x00, 0x04, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x03, 0x00, // ................ - 0x03, 0x00, 0x05, 0x00, 0x00, 0x00, 0xf4, 0x01, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0x04, 0x00, // ................ - 0x00, 0x00, 0x6d, 0x61, 0x69, 0x6e, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x06, 0x00, 0x22, 0x00, // ..main........". - 0x00, 0x00, 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, 0x43, 0x6f, 0x6f, 0x72, 0x64, 0x00, 0x00, // ..gl_FragCoord.. - 0x00, 0x00, 0x05, 0x00, 0x05, 0x00, 0x25, 0x00, 0x00, 0x00, 0x76, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, // ......%...v_colo - 0x72, 0x30, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x06, 0x00, 0x30, 0x00, 0x00, 0x00, 0x62, 0x67, // r0........0...bg - 0x66, 0x78, 0x5f, 0x46, 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, 0x61, 0x30, 0x00, 0x00, 0x47, 0x00, // fx_FragData0..G. - 0x04, 0x00, 0x22, 0x00, 0x00, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x47, 0x00, // .."...........G. - 0x04, 0x00, 0x25, 0x00, 0x00, 0x00, 0x1e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0x00, // ..%...........G. - 0x04, 0x00, 0x30, 0x00, 0x00, 0x00, 0x1e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x13, 0x00, // ..0............. - 0x02, 0x00, 0x02, 0x00, 0x00, 0x00, 0x21, 0x00, 0x03, 0x00, 0x03, 0x00, 0x00, 0x00, 0x02, 0x00, // ......!......... - 0x00, 0x00, 0x16, 0x00, 0x03, 0x00, 0x06, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x17, 0x00, // .......... ..... - 0x04, 0x00, 0x08, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x20, 0x00, // .............. . - 0x04, 0x00, 0x21, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x3b, 0x00, // ..!...........;. - 0x04, 0x00, 0x21, 0x00, 0x00, 0x00, 0x22, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x3b, 0x00, // ..!...".......;. - 0x04, 0x00, 0x21, 0x00, 0x00, 0x00, 0x25, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x20, 0x00, // ..!...%....... . - 0x04, 0x00, 0x2f, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x3b, 0x00, // ../...........;. - 0x04, 0x00, 0x2f, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x36, 0x00, // ../...0.......6. - 0x05, 0x00, 0x02, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, // ................ - 0x00, 0x00, 0xf8, 0x00, 0x02, 0x00, 0x05, 0x00, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x08, 0x00, // ..........=..... - 0x00, 0x00, 0x26, 0x00, 0x00, 0x00, 0x25, 0x00, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0x30, 0x00, // ..&...%...>...0. - 0x00, 0x00, 0x26, 0x00, 0x00, 0x00, 0xfd, 0x00, 0x01, 0x00, 0x38, 0x00, 0x01, 0x00, 0x00, 0x00, // ..&.......8..... - 0x00, 0x00, // .. -}; -static const uint8_t fs_debugdraw_lines_dx9[135] = -{ - 0x46, 0x53, 0x48, 0x0b, 0xa4, 0x8b, 0xef, 0x49, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x74, 0x00, // FSH....I......t. - 0x00, 0x00, 0x00, 0x03, 0xff, 0xff, 0xfe, 0xff, 0x14, 0x00, 0x43, 0x54, 0x41, 0x42, 0x1c, 0x00, // ..........CTAB.. - 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x00, 0x03, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ..#............. - 0x00, 0x00, 0x00, 0x91, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x70, 0x73, 0x5f, 0x33, 0x5f, 0x30, // ..........ps_3_0 - 0x00, 0x4d, 0x69, 0x63, 0x72, 0x6f, 0x73, 0x6f, 0x66, 0x74, 0x20, 0x28, 0x52, 0x29, 0x20, 0x48, // .Microsoft (R) H - 0x4c, 0x53, 0x4c, 0x20, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, 0x20, 0x43, 0x6f, 0x6d, 0x70, 0x69, // LSL Shader Compi - 0x6c, 0x65, 0x72, 0x20, 0x31, 0x30, 0x2e, 0x31, 0x00, 0xab, 0x1f, 0x00, 0x00, 0x02, 0x0a, 0x00, // ler 10.1........ - 0x00, 0x80, 0x00, 0x00, 0x0f, 0x90, 0x01, 0x00, 0x00, 0x02, 0x00, 0x08, 0x0f, 0x80, 0x00, 0x00, // ................ - 0xe4, 0x90, 0xff, 0xff, 0x00, 0x00, 0x00, // ....... -}; -static const uint8_t fs_debugdraw_lines_dx11[266] = -{ - 0x46, 0x53, 0x48, 0x0b, 0xa4, 0x8b, 0xef, 0x49, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf4, 0x00, // FSH....I........ - 0x00, 0x00, 0x44, 0x58, 0x42, 0x43, 0xa6, 0x7f, 0x08, 0xe2, 0x95, 0xbd, 0x5f, 0xa3, 0x3f, 0x5b, // ..DXBC......_.?[ - 0x58, 0x8e, 0x54, 0x0f, 0x89, 0x67, 0x01, 0x00, 0x00, 0x00, 0xf4, 0x00, 0x00, 0x00, 0x03, 0x00, // X.T..g.......... - 0x00, 0x00, 0x2c, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0xb4, 0x00, 0x00, 0x00, 0x49, 0x53, // ..,...........IS - 0x47, 0x4e, 0x4c, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x38, 0x00, // GNL...........8. - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, // ................ - 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x44, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ......D......... - 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x0f, 0x0f, 0x00, 0x00, 0x53, 0x56, // ..............SV - 0x5f, 0x50, 0x4f, 0x53, 0x49, 0x54, 0x49, 0x4f, 0x4e, 0x00, 0x43, 0x4f, 0x4c, 0x4f, 0x52, 0x00, // _POSITION.COLOR. - 0xab, 0xab, 0x4f, 0x53, 0x47, 0x4e, 0x2c, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x08, 0x00, // ..OSGN,......... - 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, // .. ............. - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x53, 0x56, 0x5f, 0x54, 0x41, 0x52, // ..........SV_TAR - 0x47, 0x45, 0x54, 0x00, 0xab, 0xab, 0x53, 0x48, 0x44, 0x52, 0x38, 0x00, 0x00, 0x00, 0x40, 0x00, // GET...SHDR8...@. - 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00, 0x62, 0x10, 0x00, 0x03, 0xf2, 0x10, 0x10, 0x00, 0x01, 0x00, // ......b......... - 0x00, 0x00, 0x65, 0x00, 0x00, 0x03, 0xf2, 0x20, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x36, 0x00, // ..e.... ......6. - 0x00, 0x05, 0xf2, 0x20, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x1e, 0x10, 0x00, 0x01, 0x00, // ... ......F..... - 0x00, 0x00, 0x3e, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, // ..>....... -}; -static const uint8_t fs_debugdraw_lines_mtl[386] = -{ - 0x46, 0x53, 0x48, 0x0b, 0xa4, 0x8b, 0xef, 0x49, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x6c, 0x01, // FSH....I......l. - 0x00, 0x00, 0x23, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x20, 0x3c, 0x6d, 0x65, 0x74, 0x61, // ..#include .#inclu - 0x64, 0x65, 0x20, 0x3c, 0x73, 0x69, 0x6d, 0x64, 0x2f, 0x73, 0x69, 0x6d, 0x64, 0x2e, 0x68, 0x3e, // de - 0x0a, 0x0a, 0x75, 0x73, 0x69, 0x6e, 0x67, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, // ..using namespac - 0x65, 0x20, 0x6d, 0x65, 0x74, 0x61, 0x6c, 0x3b, 0x0a, 0x0a, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, // e metal;..struct - 0x20, 0x78, 0x6c, 0x61, 0x74, 0x4d, 0x74, 0x6c, 0x4d, 0x61, 0x69, 0x6e, 0x5f, 0x6f, 0x75, 0x74, // xlatMtlMain_out - 0x0a, 0x7b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x34, 0x20, 0x62, 0x67, // .{. float4 bg - 0x66, 0x78, 0x5f, 0x46, 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, 0x61, 0x30, 0x20, 0x5b, 0x5b, 0x63, // fx_FragData0 [[c - 0x6f, 0x6c, 0x6f, 0x72, 0x28, 0x30, 0x29, 0x5d, 0x5d, 0x3b, 0x0a, 0x7d, 0x3b, 0x0a, 0x0a, 0x73, // olor(0)]];.};..s - 0x74, 0x72, 0x75, 0x63, 0x74, 0x20, 0x78, 0x6c, 0x61, 0x74, 0x4d, 0x74, 0x6c, 0x4d, 0x61, 0x69, // truct xlatMtlMai - 0x6e, 0x5f, 0x69, 0x6e, 0x0a, 0x7b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, // n_in.{. float - 0x34, 0x20, 0x76, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x20, 0x5b, 0x5b, 0x75, 0x73, 0x65, // 4 v_color0 [[use - 0x72, 0x28, 0x6c, 0x6f, 0x63, 0x6e, 0x30, 0x29, 0x5d, 0x5d, 0x3b, 0x0a, 0x7d, 0x3b, 0x0a, 0x0a, // r(locn0)]];.};.. - 0x66, 0x72, 0x61, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x20, 0x78, 0x6c, 0x61, 0x74, 0x4d, 0x74, 0x6c, // fragment xlatMtl - 0x4d, 0x61, 0x69, 0x6e, 0x5f, 0x6f, 0x75, 0x74, 0x20, 0x78, 0x6c, 0x61, 0x74, 0x4d, 0x74, 0x6c, // Main_out xlatMtl - 0x4d, 0x61, 0x69, 0x6e, 0x28, 0x78, 0x6c, 0x61, 0x74, 0x4d, 0x74, 0x6c, 0x4d, 0x61, 0x69, 0x6e, // Main(xlatMtlMain - 0x5f, 0x69, 0x6e, 0x20, 0x69, 0x6e, 0x20, 0x5b, 0x5b, 0x73, 0x74, 0x61, 0x67, 0x65, 0x5f, 0x69, // _in in [[stage_i - 0x6e, 0x5d, 0x5d, 0x29, 0x0a, 0x7b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x78, 0x6c, 0x61, 0x74, 0x4d, // n]]).{. xlatM - 0x74, 0x6c, 0x4d, 0x61, 0x69, 0x6e, 0x5f, 0x6f, 0x75, 0x74, 0x20, 0x6f, 0x75, 0x74, 0x20, 0x3d, // tlMain_out out = - 0x20, 0x7b, 0x7d, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x6f, 0x75, 0x74, 0x2e, 0x62, 0x67, 0x66, // {};. out.bgf - 0x78, 0x5f, 0x46, 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, 0x61, 0x30, 0x20, 0x3d, 0x20, 0x69, 0x6e, // x_FragData0 = in - 0x2e, 0x76, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x72, // .v_color0;. r - 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x6f, 0x75, 0x74, 0x3b, 0x0a, 0x7d, 0x0a, 0x0a, 0x00, 0x00, // eturn out;.}.... - 0x00, 0x00, // .. -}; -extern const uint8_t* fs_debugdraw_lines_pssl; -extern const uint32_t fs_debugdraw_lines_pssl_size; diff --git a/Modules/Moonlight/Source/Debug/vs_debugdraw_lines.bin.h b/Modules/Moonlight/Source/Debug/vs_debugdraw_lines.bin.h new file mode 100644 index 00000000..61526c2b --- /dev/null +++ b/Modules/Moonlight/Source/Debug/vs_debugdraw_lines.bin.h @@ -0,0 +1,417 @@ +static const uint8_t vs_debugdraw_lines_glsl[303] = +{ + 0x56, 0x53, 0x48, 0x0b, 0x00, 0x00, 0x00, 0x00, 0xa4, 0x8b, 0xef, 0x49, 0x01, 0x00, 0x0f, 0x75, // VSH........I...u + 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x56, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x04, 0x01, // _modelViewProj.. + 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x01, 0x00, 0x00, 0x61, 0x74, 0x74, 0x72, // ............attr + 0x69, 0x62, 0x75, 0x74, 0x65, 0x20, 0x76, 0x65, 0x63, 0x34, 0x20, 0x61, 0x5f, 0x63, 0x6f, 0x6c, // ibute vec4 a_col + 0x6f, 0x72, 0x30, 0x3b, 0x0a, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x20, 0x76, // or0;.attribute v + 0x65, 0x63, 0x33, 0x20, 0x61, 0x5f, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x3b, 0x0a, // ec3 a_position;. + 0x76, 0x61, 0x72, 0x79, 0x69, 0x6e, 0x67, 0x20, 0x76, 0x65, 0x63, 0x34, 0x20, 0x76, 0x5f, 0x63, // varying vec4 v_c + 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x3b, 0x0a, 0x75, 0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, 0x20, 0x6d, // olor0;.uniform m + 0x61, 0x74, 0x34, 0x20, 0x75, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x56, 0x69, 0x65, 0x77, 0x50, // at4 u_modelViewP + 0x72, 0x6f, 0x6a, 0x3b, 0x0a, 0x76, 0x6f, 0x69, 0x64, 0x20, 0x6d, 0x61, 0x69, 0x6e, 0x20, 0x28, // roj;.void main ( + 0x29, 0x0a, 0x7b, 0x0a, 0x20, 0x20, 0x76, 0x65, 0x63, 0x34, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, // ).{. vec4 tmpva + 0x72, 0x5f, 0x31, 0x3b, 0x0a, 0x20, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x31, 0x2e, // r_1;. tmpvar_1. + 0x77, 0x20, 0x3d, 0x20, 0x31, 0x2e, 0x30, 0x3b, 0x0a, 0x20, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, // w = 1.0;. tmpva + 0x72, 0x5f, 0x31, 0x2e, 0x78, 0x79, 0x7a, 0x20, 0x3d, 0x20, 0x61, 0x5f, 0x70, 0x6f, 0x73, 0x69, // r_1.xyz = a_posi + 0x74, 0x69, 0x6f, 0x6e, 0x3b, 0x0a, 0x20, 0x20, 0x67, 0x6c, 0x5f, 0x50, 0x6f, 0x73, 0x69, 0x74, // tion;. gl_Posit + 0x69, 0x6f, 0x6e, 0x20, 0x3d, 0x20, 0x28, 0x75, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x56, 0x69, // ion = (u_modelVi + 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x20, 0x2a, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, // ewProj * tmpvar_ + 0x31, 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x76, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x20, 0x3d, // 1);. v_color0 = + 0x20, 0x61, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x3b, 0x0a, 0x7d, 0x0a, 0x0a, 0x00, // a_color0;.}... +}; +static const uint8_t vs_debugdraw_lines_essl[333] = +{ + 0x56, 0x53, 0x48, 0x0b, 0x00, 0x00, 0x00, 0x00, 0xa4, 0x8b, 0xef, 0x49, 0x01, 0x00, 0x0f, 0x75, // VSH........I...u + 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x56, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x04, 0x01, // _modelViewProj.. + 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x01, 0x00, 0x00, 0x61, 0x74, 0x74, 0x72, // ........ ...attr + 0x69, 0x62, 0x75, 0x74, 0x65, 0x20, 0x68, 0x69, 0x67, 0x68, 0x70, 0x20, 0x76, 0x65, 0x63, 0x34, // ibute highp vec4 + 0x20, 0x61, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x3b, 0x0a, 0x61, 0x74, 0x74, 0x72, 0x69, // a_color0;.attri + 0x62, 0x75, 0x74, 0x65, 0x20, 0x68, 0x69, 0x67, 0x68, 0x70, 0x20, 0x76, 0x65, 0x63, 0x33, 0x20, // bute highp vec3 + 0x61, 0x5f, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x3b, 0x0a, 0x76, 0x61, 0x72, 0x79, // a_position;.vary + 0x69, 0x6e, 0x67, 0x20, 0x68, 0x69, 0x67, 0x68, 0x70, 0x20, 0x76, 0x65, 0x63, 0x34, 0x20, 0x76, // ing highp vec4 v + 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x3b, 0x0a, 0x75, 0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, // _color0;.uniform + 0x20, 0x68, 0x69, 0x67, 0x68, 0x70, 0x20, 0x6d, 0x61, 0x74, 0x34, 0x20, 0x75, 0x5f, 0x6d, 0x6f, // highp mat4 u_mo + 0x64, 0x65, 0x6c, 0x56, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x3b, 0x0a, 0x76, 0x6f, 0x69, // delViewProj;.voi + 0x64, 0x20, 0x6d, 0x61, 0x69, 0x6e, 0x20, 0x28, 0x29, 0x0a, 0x7b, 0x0a, 0x20, 0x20, 0x68, 0x69, // d main ().{. hi + 0x67, 0x68, 0x70, 0x20, 0x76, 0x65, 0x63, 0x34, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, // ghp vec4 tmpvar_ + 0x31, 0x3b, 0x0a, 0x20, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x31, 0x2e, 0x77, 0x20, // 1;. tmpvar_1.w + 0x3d, 0x20, 0x31, 0x2e, 0x30, 0x3b, 0x0a, 0x20, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, // = 1.0;. tmpvar_ + 0x31, 0x2e, 0x78, 0x79, 0x7a, 0x20, 0x3d, 0x20, 0x61, 0x5f, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, // 1.xyz = a_positi + 0x6f, 0x6e, 0x3b, 0x0a, 0x20, 0x20, 0x67, 0x6c, 0x5f, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, // on;. gl_Positio + 0x6e, 0x20, 0x3d, 0x20, 0x28, 0x75, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x56, 0x69, 0x65, 0x77, // n = (u_modelView + 0x50, 0x72, 0x6f, 0x6a, 0x20, 0x2a, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x31, 0x29, // Proj * tmpvar_1) + 0x3b, 0x0a, 0x20, 0x20, 0x76, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x20, 0x3d, 0x20, 0x61, // ;. v_color0 = a + 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x3b, 0x0a, 0x7d, 0x0a, 0x0a, 0x00, // _color0;.}... +}; +static const uint8_t vs_debugdraw_lines_spv[1060] = +{ + 0x56, 0x53, 0x48, 0x0b, 0x00, 0x00, 0x00, 0x00, 0xa4, 0x8b, 0xef, 0x49, 0x01, 0x00, 0x0f, 0x75, // VSH........I...u + 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x56, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x04, 0x01, // _modelViewProj.. + 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x03, 0x00, 0x00, 0x03, 0x02, 0x23, 0x07, // ..............#. + 0x00, 0x00, 0x01, 0x00, 0x0b, 0x00, 0x08, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ........`....... + 0x11, 0x00, 0x02, 0x00, 0x01, 0x00, 0x00, 0x00, 0x0b, 0x00, 0x06, 0x00, 0x01, 0x00, 0x00, 0x00, // ................ + 0x47, 0x4c, 0x53, 0x4c, 0x2e, 0x73, 0x74, 0x64, 0x2e, 0x34, 0x35, 0x30, 0x00, 0x00, 0x00, 0x00, // GLSL.std.450.... + 0x0e, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x09, 0x00, // ................ + 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x6d, 0x61, 0x69, 0x6e, 0x00, 0x00, 0x00, 0x00, // ........main.... + 0x2f, 0x00, 0x00, 0x00, 0x33, 0x00, 0x00, 0x00, 0x3c, 0x00, 0x00, 0x00, 0x3f, 0x00, 0x00, 0x00, // /...3...<...?... + 0x03, 0x00, 0x03, 0x00, 0x05, 0x00, 0x00, 0x00, 0xf4, 0x01, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, // ................ + 0x04, 0x00, 0x00, 0x00, 0x6d, 0x61, 0x69, 0x6e, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x06, 0x00, // ....main........ + 0x20, 0x00, 0x00, 0x00, 0x55, 0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, 0x42, 0x6c, 0x6f, 0x63, 0x6b, // ...UniformBlock + 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x07, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ........ ....... + 0x75, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x56, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x00, // u_modelViewProj. + 0x05, 0x00, 0x03, 0x00, 0x22, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x05, 0x00, // ...."........... + 0x2f, 0x00, 0x00, 0x00, 0x61, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x00, 0x00, 0x00, 0x00, // /...a_color0.... + 0x05, 0x00, 0x05, 0x00, 0x33, 0x00, 0x00, 0x00, 0x61, 0x5f, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, // ....3...a_positi + 0x6f, 0x6e, 0x00, 0x00, 0x05, 0x00, 0x0a, 0x00, 0x3c, 0x00, 0x00, 0x00, 0x40, 0x65, 0x6e, 0x74, // on......<...@ent + 0x72, 0x79, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x2e, 0x67, 0x6c, // ryPointOutput.gl + 0x5f, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x00, 0x00, 0x00, 0x05, 0x00, 0x09, 0x00, // _Position....... + 0x3f, 0x00, 0x00, 0x00, 0x40, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x4f, // ?...@entryPointO + 0x75, 0x74, 0x70, 0x75, 0x74, 0x2e, 0x76, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x00, 0x00, // utput.v_color0.. + 0x47, 0x00, 0x03, 0x00, 0x20, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, // G... .......H... + 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, // ...........H... + 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, // ............... + 0x48, 0x00, 0x05, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, // H... .......#... + 0x00, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0x22, 0x00, 0x00, 0x00, 0x21, 0x00, 0x00, 0x00, // ....G..."...!... + 0x00, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0x22, 0x00, 0x00, 0x00, 0x22, 0x00, 0x00, 0x00, // ....G..."..."... + 0x00, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0x2f, 0x00, 0x00, 0x00, 0x1e, 0x00, 0x00, 0x00, // ....G.../....... + 0x00, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0x33, 0x00, 0x00, 0x00, 0x1e, 0x00, 0x00, 0x00, // ....G...3....... + 0x01, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0x3c, 0x00, 0x00, 0x00, 0x0b, 0x00, 0x00, 0x00, // ....G...<....... + 0x00, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0x3f, 0x00, 0x00, 0x00, 0x1e, 0x00, 0x00, 0x00, // ....G...?....... + 0x00, 0x00, 0x00, 0x00, 0x13, 0x00, 0x02, 0x00, 0x02, 0x00, 0x00, 0x00, 0x21, 0x00, 0x03, 0x00, // ............!... + 0x03, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x16, 0x00, 0x03, 0x00, 0x06, 0x00, 0x00, 0x00, // ................ + 0x20, 0x00, 0x00, 0x00, 0x17, 0x00, 0x04, 0x00, 0x07, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, // ............... + 0x04, 0x00, 0x00, 0x00, 0x17, 0x00, 0x04, 0x00, 0x09, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, // ................ + 0x03, 0x00, 0x00, 0x00, 0x15, 0x00, 0x04, 0x00, 0x13, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, // ............ ... + 0x01, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, 0x06, 0x00, 0x00, 0x00, 0x15, 0x00, 0x00, 0x00, // ....+........... + 0x00, 0x00, 0x80, 0x3f, 0x2b, 0x00, 0x04, 0x00, 0x13, 0x00, 0x00, 0x00, 0x19, 0x00, 0x00, 0x00, // ...?+........... + 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x04, 0x00, 0x1f, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, // ................ + 0x04, 0x00, 0x00, 0x00, 0x1e, 0x00, 0x03, 0x00, 0x20, 0x00, 0x00, 0x00, 0x1f, 0x00, 0x00, 0x00, // ........ ....... + 0x20, 0x00, 0x04, 0x00, 0x21, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, // ...!....... ... + 0x3b, 0x00, 0x04, 0x00, 0x21, 0x00, 0x00, 0x00, 0x22, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, // ;...!..."....... + 0x20, 0x00, 0x04, 0x00, 0x23, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x1f, 0x00, 0x00, 0x00, // ...#........... + 0x20, 0x00, 0x04, 0x00, 0x2e, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, // ............... + 0x3b, 0x00, 0x04, 0x00, 0x2e, 0x00, 0x00, 0x00, 0x2f, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, // ;......./....... + 0x20, 0x00, 0x04, 0x00, 0x32, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, // ...2........... + 0x3b, 0x00, 0x04, 0x00, 0x32, 0x00, 0x00, 0x00, 0x33, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, // ;...2...3....... + 0x20, 0x00, 0x04, 0x00, 0x3b, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, // ...;........... + 0x3b, 0x00, 0x04, 0x00, 0x3b, 0x00, 0x00, 0x00, 0x3c, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, // ;...;...<....... + 0x3b, 0x00, 0x04, 0x00, 0x3b, 0x00, 0x00, 0x00, 0x3f, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, // ;...;...?....... + 0x36, 0x00, 0x05, 0x00, 0x02, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 6............... + 0x03, 0x00, 0x00, 0x00, 0xf8, 0x00, 0x02, 0x00, 0x05, 0x00, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, // ............=... + 0x07, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x2f, 0x00, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, // ....0.../...=... + 0x09, 0x00, 0x00, 0x00, 0x34, 0x00, 0x00, 0x00, 0x33, 0x00, 0x00, 0x00, 0x51, 0x00, 0x05, 0x00, // ....4...3...Q... + 0x06, 0x00, 0x00, 0x00, 0x59, 0x00, 0x00, 0x00, 0x34, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ....Y...4....... + 0x51, 0x00, 0x05, 0x00, 0x06, 0x00, 0x00, 0x00, 0x5a, 0x00, 0x00, 0x00, 0x34, 0x00, 0x00, 0x00, // Q.......Z...4... + 0x01, 0x00, 0x00, 0x00, 0x51, 0x00, 0x05, 0x00, 0x06, 0x00, 0x00, 0x00, 0x5b, 0x00, 0x00, 0x00, // ....Q.......[... + 0x34, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x50, 0x00, 0x07, 0x00, 0x07, 0x00, 0x00, 0x00, // 4.......P....... + 0x5c, 0x00, 0x00, 0x00, 0x59, 0x00, 0x00, 0x00, 0x5a, 0x00, 0x00, 0x00, 0x5b, 0x00, 0x00, 0x00, // ....Y...Z...[... + 0x15, 0x00, 0x00, 0x00, 0x41, 0x00, 0x05, 0x00, 0x23, 0x00, 0x00, 0x00, 0x5d, 0x00, 0x00, 0x00, // ....A...#...]... + 0x22, 0x00, 0x00, 0x00, 0x19, 0x00, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x1f, 0x00, 0x00, 0x00, // ".......=....... + 0x5e, 0x00, 0x00, 0x00, 0x5d, 0x00, 0x00, 0x00, 0x90, 0x00, 0x05, 0x00, 0x07, 0x00, 0x00, 0x00, // ^...]........... + 0x5f, 0x00, 0x00, 0x00, 0x5c, 0x00, 0x00, 0x00, 0x5e, 0x00, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, // _.......^...>... + 0x3c, 0x00, 0x00, 0x00, 0x5f, 0x00, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0x3f, 0x00, 0x00, 0x00, // <..._...>...?... + 0x30, 0x00, 0x00, 0x00, 0xfd, 0x00, 0x01, 0x00, 0x38, 0x00, 0x01, 0x00, 0x00, 0x02, 0x05, 0x00, // 0.......8....... + 0x01, 0x00, 0x40, 0x00, // ..@. +}; +static const uint8_t vs_debugdraw_lines_wgsl[763] = +{ + 0x56, 0x53, 0x48, 0x0b, 0x00, 0x00, 0x00, 0x00, 0xa4, 0x8b, 0xef, 0x49, 0x01, 0x00, 0x0f, 0x75, // VSH........I...u + 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x56, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x04, 0x01, // _modelViewProj.. + 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc5, 0x02, 0x00, 0x00, 0x64, 0x69, 0x61, 0x67, // ............diag + 0x6e, 0x6f, 0x73, 0x74, 0x69, 0x63, 0x28, 0x6f, 0x66, 0x66, 0x2c, 0x20, 0x64, 0x65, 0x72, 0x69, // nostic(off, deri + 0x76, 0x61, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x75, 0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, 0x69, 0x74, // vative_uniformit + 0x79, 0x29, 0x3b, 0x0a, 0x64, 0x69, 0x61, 0x67, 0x6e, 0x6f, 0x73, 0x74, 0x69, 0x63, 0x28, 0x6f, // y);.diagnostic(o + 0x66, 0x66, 0x2c, 0x20, 0x73, 0x75, 0x62, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x5f, 0x75, 0x6e, 0x69, // ff, subgroup_uni + 0x66, 0x6f, 0x72, 0x6d, 0x69, 0x74, 0x79, 0x29, 0x3b, 0x0a, 0x0a, 0x73, 0x74, 0x72, 0x75, 0x63, // formity);..struc + 0x74, 0x20, 0x55, 0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x31, // t UniformBlock_1 + 0x5f, 0x31, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x75, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x56, 0x69, // _1 {. u_modelVi + 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x20, 0x3a, 0x20, 0x6d, 0x61, 0x74, 0x34, 0x78, 0x34, 0x3c, // ewProj : mat4x4< + 0x66, 0x33, 0x32, 0x3e, 0x2c, 0x0a, 0x7d, 0x0a, 0x0a, 0x40, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x28, // f32>,.}..@group( + 0x30, 0x75, 0x29, 0x20, 0x40, 0x62, 0x69, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x28, 0x30, 0x75, 0x29, // 0u) @binding(0u) + 0x20, 0x76, 0x61, 0x72, 0x3c, 0x75, 0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, 0x3e, 0x20, 0x76, 0x20, // var v + 0x3a, 0x20, 0x55, 0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x31, // : UniformBlock_1 + 0x5f, 0x31, 0x3b, 0x0a, 0x0a, 0x76, 0x61, 0x72, 0x3c, 0x70, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, // _1;..var v_1 : vec4;..var + 0x20, 0x76, 0x5f, 0x32, 0x20, 0x3a, 0x20, 0x76, 0x65, 0x63, 0x34, 0x3c, 0x66, 0x33, 0x32, 0x3e, // v_2 : vec4 + 0x3b, 0x0a, 0x0a, 0x66, 0x6e, 0x20, 0x6d, 0x61, 0x69, 0x6e, 0x5f, 0x69, 0x6e, 0x6e, 0x65, 0x72, // ;..fn main_inner + 0x28, 0x61, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x20, 0x3a, 0x20, 0x76, 0x65, 0x63, 0x34, // (a_color0 : vec4 + 0x3c, 0x66, 0x33, 0x32, 0x3e, 0x2c, 0x20, 0x61, 0x5f, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, // , a_positio + 0x6e, 0x20, 0x3a, 0x20, 0x76, 0x65, 0x63, 0x33, 0x3c, 0x66, 0x33, 0x32, 0x3e, 0x29, 0x20, 0x7b, // n : vec3) { + 0x0a, 0x20, 0x20, 0x76, 0x5f, 0x31, 0x20, 0x3d, 0x20, 0x28, 0x76, 0x2e, 0x75, 0x5f, 0x6d, 0x6f, // . v_1 = (v.u_mo + 0x64, 0x65, 0x6c, 0x56, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x20, 0x2a, 0x20, 0x76, 0x65, // delViewProj * ve + 0x63, 0x34, 0x3c, 0x66, 0x33, 0x32, 0x3e, 0x28, 0x61, 0x5f, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, // c4(a_positi + 0x6f, 0x6e, 0x2e, 0x78, 0x2c, 0x20, 0x61, 0x5f, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, // on.x, a_position + 0x2e, 0x79, 0x2c, 0x20, 0x61, 0x5f, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x7a, // .y, a_position.z + 0x2c, 0x20, 0x31, 0x2e, 0x30, 0x66, 0x29, 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x76, 0x5f, 0x32, 0x20, // , 1.0f));. v_2 + 0x3d, 0x20, 0x61, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x3b, 0x0a, 0x7d, 0x0a, 0x0a, 0x73, // = a_color0;.}..s + 0x74, 0x72, 0x75, 0x63, 0x74, 0x20, 0x74, 0x69, 0x6e, 0x74, 0x5f, 0x73, 0x79, 0x6d, 0x62, 0x6f, // truct tint_symbo + 0x6c, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x40, 0x62, 0x75, 0x69, 0x6c, 0x74, 0x69, 0x6e, 0x28, 0x70, // l {. @builtin(p + 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x29, 0x0a, 0x20, 0x20, 0x6d, 0x20, 0x3a, 0x20, 0x76, // osition). m : v + 0x65, 0x63, 0x34, 0x3c, 0x66, 0x33, 0x32, 0x3e, 0x2c, 0x0a, 0x20, 0x20, 0x40, 0x6c, 0x6f, 0x63, // ec4,. @loc + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x30, 0x75, 0x29, 0x0a, 0x20, 0x20, 0x6d, 0x5f, 0x31, 0x20, // ation(0u). m_1 + 0x3a, 0x20, 0x76, 0x65, 0x63, 0x34, 0x3c, 0x66, 0x33, 0x32, 0x3e, 0x2c, 0x0a, 0x7d, 0x0a, 0x0a, // : vec4,.}.. + 0x40, 0x76, 0x65, 0x72, 0x74, 0x65, 0x78, 0x0a, 0x66, 0x6e, 0x20, 0x6d, 0x61, 0x69, 0x6e, 0x28, // @vertex.fn main( + 0x40, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x30, 0x75, 0x29, 0x20, 0x61, 0x5f, // @location(0u) a_ + 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x20, 0x3a, 0x20, 0x76, 0x65, 0x63, 0x34, 0x3c, 0x66, 0x33, // color0 : vec4, @location(1u + 0x29, 0x20, 0x61, 0x5f, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x3a, 0x20, 0x76, // ) a_position : v + 0x65, 0x63, 0x33, 0x3c, 0x66, 0x33, 0x32, 0x3e, 0x29, 0x20, 0x2d, 0x3e, 0x20, 0x74, 0x69, 0x6e, // ec3) -> tin + 0x74, 0x5f, 0x73, 0x79, 0x6d, 0x62, 0x6f, 0x6c, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x6d, 0x61, 0x69, // t_symbol {. mai + 0x6e, 0x5f, 0x69, 0x6e, 0x6e, 0x65, 0x72, 0x28, 0x61, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x30, // n_inner(a_color0 + 0x2c, 0x20, 0x61, 0x5f, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x29, 0x3b, 0x0a, 0x20, // , a_position);. + 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x74, 0x69, 0x6e, 0x74, 0x5f, 0x73, 0x79, 0x6d, // return tint_sym + 0x62, 0x6f, 0x6c, 0x28, 0x76, 0x5f, 0x31, 0x2c, 0x20, 0x76, 0x5f, 0x32, 0x29, 0x3b, 0x0a, 0x7d, // bol(v_1, v_2);.} + 0x0a, 0x00, 0x02, 0x05, 0x00, 0x01, 0x00, 0x40, 0x00, 0x40, 0x00, // .......@.@. +}; +static const uint8_t vs_debugdraw_lines_dxbc[524] = +{ + 0x56, 0x53, 0x48, 0x0b, 0x00, 0x00, 0x00, 0x00, 0xa4, 0x8b, 0xef, 0x49, 0x01, 0x00, 0x0f, 0x75, // VSH........I...u + 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x56, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x04, 0x00, // _modelViewProj.. + 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0xd8, 0x01, 0x00, 0x00, 0x44, 0x58, 0x42, 0x43, // ............DXBC + 0x19, 0x40, 0x51, 0x48, 0x64, 0xf0, 0x4f, 0x1e, 0x9e, 0x94, 0x2e, 0xc7, 0x38, 0x04, 0x0f, 0xf4, // .@QHd.O.....8... + 0x01, 0x00, 0x00, 0x00, 0xd8, 0x01, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x2c, 0x00, 0x00, 0x00, // ............,... + 0x7c, 0x00, 0x00, 0x00, 0xd0, 0x00, 0x00, 0x00, 0x49, 0x53, 0x47, 0x4e, 0x48, 0x00, 0x00, 0x00, // |.......ISGNH... + 0x02, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ........8....... + 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x0f, 0x00, 0x00, // ................ + 0x3e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, // >............... + 0x01, 0x00, 0x00, 0x00, 0x07, 0x07, 0x00, 0x00, 0x43, 0x4f, 0x4c, 0x4f, 0x52, 0x00, 0x50, 0x4f, // ........COLOR.PO + 0x53, 0x49, 0x54, 0x49, 0x4f, 0x4e, 0x00, 0xab, 0x4f, 0x53, 0x47, 0x4e, 0x4c, 0x00, 0x00, 0x00, // SITION..OSGNL... + 0x02, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ........8....... + 0x01, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, // ................ + 0x44, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, // D............... + 0x01, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x53, 0x56, 0x5f, 0x50, 0x4f, 0x53, 0x49, 0x54, // ........SV_POSIT + 0x49, 0x4f, 0x4e, 0x00, 0x43, 0x4f, 0x4c, 0x4f, 0x52, 0x00, 0xab, 0xab, 0x53, 0x48, 0x45, 0x58, // ION.COLOR...SHEX + 0x00, 0x01, 0x00, 0x00, 0x50, 0x00, 0x01, 0x00, 0x40, 0x00, 0x00, 0x00, 0x6a, 0x08, 0x00, 0x01, // ....P...@...j... + 0x59, 0x00, 0x00, 0x04, 0x46, 0x8e, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, // Y...F. ......... + 0x5f, 0x00, 0x00, 0x03, 0xf2, 0x10, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5f, 0x00, 0x00, 0x03, // _..........._... + 0x72, 0x10, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x67, 0x00, 0x00, 0x04, 0xf2, 0x20, 0x10, 0x00, // r.......g.... .. + 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x03, 0xf2, 0x20, 0x10, 0x00, // ........e.... .. + 0x01, 0x00, 0x00, 0x00, 0x68, 0x00, 0x00, 0x02, 0x01, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x08, // ....h.......8... + 0xf2, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x56, 0x15, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, // ........V....... + 0x46, 0x8e, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x32, 0x00, 0x00, 0x0a, // F. .........2... + 0xf2, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x8e, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, // ........F. ..... + 0x00, 0x00, 0x00, 0x00, 0x06, 0x10, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x46, 0x0e, 0x10, 0x00, // ............F... + 0x00, 0x00, 0x00, 0x00, 0x32, 0x00, 0x00, 0x0a, 0xf2, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, // ....2........... + 0x46, 0x8e, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0xa6, 0x1a, 0x10, 0x00, // F. ............. + 0x01, 0x00, 0x00, 0x00, 0x46, 0x0e, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, // ....F........... + 0xf2, 0x20, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x0e, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, // . ......F....... + 0x46, 0x8e, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x36, 0x00, 0x00, 0x05, // F. .........6... + 0xf2, 0x20, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x46, 0x1e, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, // . ......F....... + 0x3e, 0x00, 0x00, 0x01, 0x00, 0x02, 0x05, 0x00, 0x01, 0x00, 0x40, 0x00, // >.........@. +}; +static const uint8_t vs_debugdraw_lines_dxil[2552] = +{ + 0x56, 0x53, 0x48, 0x0b, 0x00, 0x00, 0x00, 0x00, 0xa4, 0x8b, 0xef, 0x49, 0x01, 0x00, 0x0f, 0x75, // VSH........I...u + 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x56, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x04, 0x00, // _modelViewProj.. + 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc4, 0x09, 0x00, 0x00, 0x44, 0x58, 0x42, 0x43, // ............DXBC + 0x97, 0x91, 0x5d, 0xa1, 0x9d, 0xb6, 0xbc, 0x8e, 0x7e, 0xbc, 0x45, 0xc7, 0x7f, 0x65, 0x1d, 0x25, // ..].....~.E..e.% + 0x01, 0x00, 0x00, 0x00, 0xc4, 0x09, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x3c, 0x00, 0x00, 0x00, // ............<... + 0x4c, 0x00, 0x00, 0x00, 0xac, 0x00, 0x00, 0x00, 0x10, 0x01, 0x00, 0x00, 0xfc, 0x01, 0x00, 0x00, // L............... + 0x30, 0x02, 0x00, 0x00, 0x4c, 0x02, 0x00, 0x00, 0x53, 0x46, 0x49, 0x30, 0x08, 0x00, 0x00, 0x00, // 0...L...SFI0.... + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x49, 0x53, 0x47, 0x31, 0x58, 0x00, 0x00, 0x00, // ........ISG1X... + 0x02, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x48, 0x00, 0x00, 0x00, // ............H... + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ................ + 0x0f, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x4e, 0x00, 0x00, 0x00, // ............N... + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, // ................ + 0x07, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x43, 0x4f, 0x4c, 0x4f, 0x52, 0x00, 0x50, 0x4f, // ........COLOR.PO + 0x53, 0x49, 0x54, 0x49, 0x4f, 0x4e, 0x00, 0x00, 0x4f, 0x53, 0x47, 0x31, 0x5c, 0x00, 0x00, 0x00, // SITION..OSG1.... + 0x02, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x48, 0x00, 0x00, 0x00, // ............H... + 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ................ + 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0x00, 0x00, 0x00, // ............T... + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, // ................ + 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x53, 0x56, 0x5f, 0x50, 0x6f, 0x73, 0x69, 0x74, // ........SV_Posit + 0x69, 0x6f, 0x6e, 0x00, 0x43, 0x4f, 0x4c, 0x4f, 0x52, 0x00, 0x00, 0x00, 0x50, 0x53, 0x56, 0x30, // ion.COLOR...PSV0 + 0xe4, 0x00, 0x00, 0x00, 0x34, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ....4........... + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, // ................ + 0x01, 0x00, 0x00, 0x00, 0x02, 0x02, 0x00, 0x02, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ................ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x16, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, // ................ + 0x18, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ................ + 0x00, 0x00, 0x00, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, // ................ + 0x00, 0x43, 0x4f, 0x4c, 0x4f, 0x52, 0x00, 0x50, 0x4f, 0x53, 0x49, 0x54, 0x49, 0x4f, 0x4e, 0x00, // .COLOR.POSITION. + 0x43, 0x4f, 0x4c, 0x4f, 0x52, 0x00, 0x6d, 0x61, 0x69, 0x6e, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, // COLOR.main...... + 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ................ + 0x01, 0x00, 0x44, 0x00, 0x03, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ..D............. + 0x01, 0x01, 0x43, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ..C............. + 0x01, 0x00, 0x44, 0x03, 0x03, 0x04, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ..D............. + 0x01, 0x01, 0x44, 0x00, 0x03, 0x02, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, // ..D......... ... + 0x40, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, // @............... + 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x49, 0x4c, 0x44, 0x4e, 0x2c, 0x00, 0x00, 0x00, // ........ILDN,... + 0x00, 0x00, 0x24, 0x00, 0x30, 0x61, 0x36, 0x31, 0x34, 0x31, 0x39, 0x64, 0x34, 0x30, 0x32, 0x32, // ..$.0a61419d4022 + 0x39, 0x34, 0x36, 0x36, 0x39, 0x65, 0x64, 0x63, 0x62, 0x34, 0x66, 0x66, 0x63, 0x65, 0x63, 0x37, // 94669edcb4ffcec7 + 0x36, 0x63, 0x36, 0x39, 0x2e, 0x70, 0x64, 0x62, 0x00, 0x00, 0x00, 0x00, 0x48, 0x41, 0x53, 0x48, // 6c69.pdb....HASH + 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0a, 0x61, 0x41, 0x9d, 0x40, 0x22, 0x94, 0x66, // .........aA.@".f + 0x9e, 0xdc, 0xb4, 0xff, 0xce, 0xc7, 0x6c, 0x69, 0x44, 0x58, 0x49, 0x4c, 0x70, 0x07, 0x00, 0x00, // ......liDXILp... + 0x60, 0x00, 0x01, 0x00, 0xdc, 0x01, 0x00, 0x00, 0x44, 0x58, 0x49, 0x4c, 0x00, 0x01, 0x00, 0x00, // `.......DXIL.... + 0x10, 0x00, 0x00, 0x00, 0x58, 0x07, 0x00, 0x00, 0x42, 0x43, 0xc0, 0xde, 0x21, 0x0c, 0x00, 0x00, // ....X...BC..!... + 0xd3, 0x01, 0x00, 0x00, 0x0b, 0x82, 0x20, 0x00, 0x02, 0x00, 0x00, 0x00, 0x13, 0x00, 0x00, 0x00, // ...... ......... + 0x07, 0x81, 0x23, 0x91, 0x41, 0xc8, 0x04, 0x49, 0x06, 0x10, 0x32, 0x39, 0x92, 0x01, 0x84, 0x0c, // ..#.A..I..29.... + 0x25, 0x05, 0x08, 0x19, 0x1e, 0x04, 0x8b, 0x62, 0x80, 0x14, 0x45, 0x02, 0x42, 0x92, 0x0b, 0x42, // %......b..E.B..B + 0xa4, 0x10, 0x32, 0x14, 0x38, 0x08, 0x18, 0x4b, 0x0a, 0x32, 0x52, 0x88, 0x48, 0x90, 0x14, 0x20, // ..2.8..K.2R.H.. + 0x43, 0x46, 0x88, 0xa5, 0x00, 0x19, 0x32, 0x42, 0xe4, 0x48, 0x0e, 0x90, 0x91, 0x22, 0xc4, 0x50, // CF....2B.H...".P + 0x41, 0x51, 0x81, 0x8c, 0xe1, 0x83, 0xe5, 0x8a, 0x04, 0x29, 0x46, 0x06, 0x51, 0x18, 0x00, 0x00, // AQ.......)F.Q... + 0x08, 0x00, 0x00, 0x00, 0x1b, 0x8c, 0xe0, 0xff, 0xff, 0xff, 0xff, 0x07, 0x40, 0x02, 0xa8, 0x0d, // ............@... + 0x84, 0xf0, 0xff, 0xff, 0xff, 0xff, 0x03, 0x20, 0x6d, 0x30, 0x86, 0xff, 0xff, 0xff, 0xff, 0x1f, // ....... m0...... + 0x00, 0x09, 0xa8, 0x00, 0x49, 0x18, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x13, 0x82, 0x60, 0x42, // ....I.........`B + 0x20, 0x4c, 0x08, 0x06, 0x00, 0x00, 0x00, 0x00, 0x89, 0x20, 0x00, 0x00, 0x27, 0x00, 0x00, 0x00, // L....... ..'... + 0x32, 0x22, 0x48, 0x09, 0x20, 0x64, 0x85, 0x04, 0x93, 0x22, 0xa4, 0x84, 0x04, 0x93, 0x22, 0xe3, // 2"H. d..."....". + 0x84, 0xa1, 0x90, 0x14, 0x12, 0x4c, 0x8a, 0x8c, 0x0b, 0x84, 0xa4, 0x4c, 0x10, 0x68, 0x23, 0x00, // .....L.....L.h#. + 0x25, 0x00, 0x14, 0x66, 0x00, 0xe6, 0x08, 0xc0, 0x60, 0x8e, 0x00, 0x29, 0xc6, 0x20, 0x84, 0x14, // %..f....`..). .. + 0x42, 0xa6, 0x18, 0x80, 0x10, 0x52, 0x06, 0xa1, 0xa3, 0x86, 0xcb, 0x9f, 0xb0, 0x87, 0x90, 0x7c, // B....R.........| + 0x6e, 0xa3, 0x8a, 0x95, 0x98, 0xfc, 0xe2, 0xb6, 0x11, 0x31, 0xc6, 0x18, 0x54, 0xee, 0x19, 0x2e, // n........1..T... + 0x7f, 0xc2, 0x1e, 0x42, 0xf2, 0x43, 0xa0, 0x19, 0x16, 0x02, 0x05, 0xab, 0x10, 0x8a, 0x30, 0x42, // ...B.C........0B + 0xad, 0x14, 0x83, 0x8c, 0x31, 0xe8, 0xcd, 0x11, 0x04, 0xc5, 0x60, 0xa4, 0x10, 0x12, 0x49, 0x0e, // ....1.....`...I. + 0x04, 0x0c, 0x23, 0x10, 0x43, 0x12, 0xd4, 0x99, 0x26, 0x74, 0x78, 0x87, 0x79, 0xa0, 0x07, 0x76, // ..#.C...&tx.y..v + 0x08, 0x87, 0x7c, 0x78, 0x87, 0x7a, 0xa0, 0x07, 0x37, 0x20, 0x83, 0x53, 0x60, 0x87, 0x77, 0x10, // ..|x.z..7 .S`.w. + 0x87, 0x70, 0x60, 0x87, 0x79, 0x40, 0x81, 0xa5, 0x9b, 0x09, 0x04, 0x00, 0x13, 0x14, 0x72, 0xc0, // .p`.y@........r. + 0x87, 0x74, 0x60, 0x87, 0x36, 0x68, 0x87, 0x79, 0x68, 0x03, 0x72, 0xc0, 0x87, 0x0d, 0xaf, 0x50, // .t`.6h.yh.r....P + 0x0e, 0x6d, 0xd0, 0x0e, 0x7a, 0x50, 0x0e, 0x6d, 0x00, 0x0f, 0x7a, 0x30, 0x07, 0x72, 0xa0, 0x07, // .m..zP.m..z0.r.. + 0x73, 0x20, 0x07, 0x6d, 0x90, 0x0e, 0x71, 0xa0, 0x07, 0x73, 0x20, 0x07, 0x6d, 0x90, 0x0e, 0x78, // s .m..q..s .m..x + 0xa0, 0x07, 0x73, 0x20, 0x07, 0x6d, 0x90, 0x0e, 0x71, 0x60, 0x07, 0x7a, 0x30, 0x07, 0x72, 0xd0, // ..s .m..q`.z0.r. + 0x06, 0xe9, 0x30, 0x07, 0x72, 0xa0, 0x07, 0x73, 0x20, 0x07, 0x6d, 0x90, 0x0e, 0x76, 0x40, 0x07, // ..0.r..s .m..v@. + 0x7a, 0x60, 0x07, 0x74, 0xd0, 0x06, 0xe6, 0x10, 0x07, 0x76, 0xa0, 0x07, 0x73, 0x20, 0x07, 0x6d, // z`.t.....v..s .m + 0x60, 0x0e, 0x73, 0x20, 0x07, 0x7a, 0x30, 0x07, 0x72, 0xd0, 0x06, 0xe6, 0x60, 0x07, 0x74, 0xa0, // `.s .z0.r...`.t. + 0x07, 0x76, 0x40, 0x07, 0x6d, 0xe0, 0x0e, 0x78, 0xa0, 0x07, 0x71, 0x60, 0x07, 0x7a, 0x30, 0x07, // .v@.m..x..q`.z0. + 0x72, 0xa0, 0x07, 0x76, 0x40, 0x07, 0x43, 0x9e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // r..v@.C......... + 0x00, 0x00, 0x00, 0x86, 0x3c, 0x06, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ....<........... + 0x0c, 0x79, 0x10, 0x20, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0xf2, 0x34, // .y. ...........4 + 0x40, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0xe4, 0x79, 0x80, 0x00, 0x08, // @.........0.y... + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0xc8, 0x23, 0x01, 0x01, 0x30, 0x00, 0x00, 0x00, // .......`.#..0... + 0x00, 0x00, 0x00, 0x00, 0x40, 0x16, 0x08, 0x00, 0x0e, 0x00, 0x00, 0x00, 0x32, 0x1e, 0x98, 0x14, // ....@.......2... + 0x19, 0x11, 0x4c, 0x90, 0x8c, 0x09, 0x26, 0x47, 0xc6, 0x04, 0x43, 0x22, 0x25, 0x30, 0x02, 0x50, // ..L...&G..C"%0.P + 0x12, 0xc5, 0x50, 0x80, 0x01, 0x65, 0x50, 0x1e, 0xe5, 0x40, 0xa5, 0x24, 0x46, 0x00, 0x0a, 0xa1, // ..P..eP..@.$F... + 0x0c, 0x8a, 0x80, 0xf0, 0x0c, 0x00, 0xe5, 0xb1, 0x92, 0x03, 0x81, 0xc0, 0x00, 0x14, 0x40, 0xe2, // ..............@. + 0x79, 0x1e, 0x00, 0x00, 0x79, 0x18, 0x00, 0x00, 0x57, 0x00, 0x00, 0x00, 0x1a, 0x03, 0x4c, 0x90, // y...y...W.....L. + 0x46, 0x02, 0x13, 0x44, 0x8f, 0x0c, 0x6f, 0xec, 0xed, 0x4d, 0x0c, 0x24, 0xc6, 0x05, 0xc7, 0x45, // F..D..o..M.$...E + 0xa6, 0x06, 0xa6, 0xc6, 0x65, 0x46, 0x06, 0x04, 0x45, 0x2c, 0x06, 0xc6, 0x26, 0x2c, 0xc7, 0x26, // ....eF..E,..&,.& + 0x86, 0x2c, 0x65, 0x43, 0x10, 0x4c, 0x10, 0x08, 0x63, 0x82, 0x40, 0x1c, 0x1b, 0x84, 0x81, 0x98, // .,eC.L..c.@..... + 0x20, 0x10, 0xc8, 0x06, 0x61, 0x30, 0x28, 0xd8, 0xcd, 0x4d, 0x10, 0x88, 0x64, 0xc3, 0x80, 0x24, // ...a0(..M..d..$ + 0xc4, 0x04, 0x01, 0x9b, 0x08, 0x4c, 0x10, 0x08, 0x65, 0x03, 0x42, 0x2c, 0x0c, 0x41, 0x0c, 0x0d, // .....L..e.B,.A.. + 0xb0, 0x21, 0x70, 0x36, 0x10, 0x00, 0xf0, 0x00, 0x13, 0x84, 0x8c, 0xda, 0x10, 0x44, 0x13, 0x04, // .!p6.........D.. + 0x01, 0x20, 0xd1, 0x16, 0x96, 0xe6, 0xc6, 0x62, 0xe8, 0x89, 0xe9, 0x49, 0x6a, 0x82, 0x50, 0x38, // . .....b...Ij.P8 + 0x13, 0x84, 0xe2, 0xd9, 0x10, 0x10, 0x13, 0x84, 0x02, 0x9a, 0x20, 0x10, 0xcb, 0x04, 0x81, 0x60, // .......... ....` + 0x36, 0x08, 0xda, 0xb6, 0x61, 0x21, 0x2a, 0xeb, 0xc2, 0xae, 0x21, 0x23, 0x2e, 0x8e, 0x08, 0xd4, // 6...a!*...!#.... + 0xd3, 0x54, 0x12, 0x55, 0xd2, 0x93, 0xd3, 0x04, 0xa1, 0x88, 0x26, 0x08, 0x44, 0xb3, 0x41, 0xd0, // .T.U......&.D.A. + 0xc0, 0x60, 0xc3, 0x32, 0x78, 0xd6, 0x85, 0x5d, 0xc3, 0x37, 0x5c, 0x61, 0xb0, 0x41, 0xe8, 0xc4, // .`.2x..].7.a.A.. + 0x80, 0xcb, 0x94, 0xd5, 0x17, 0xd4, 0xdb, 0x5c, 0x1a, 0x5d, 0xda, 0x9b, 0xdb, 0x86, 0x85, 0x20, // .........]..... + 0x03, 0xeb, 0xc3, 0xb2, 0x21, 0x23, 0x2e, 0x6e, 0x82, 0x50, 0x48, 0x1b, 0x96, 0xa1, 0xb2, 0x2e, // ....!#.n.PH..... + 0xcc, 0x0c, 0x86, 0x6c, 0xb8, 0xb8, 0x0d, 0x42, 0x19, 0x9c, 0xc1, 0x86, 0x61, 0x0c, 0xd0, 0x00, // ...l...B....a... + 0xd8, 0x50, 0x4c, 0x54, 0x1a, 0x40, 0x40, 0x15, 0x36, 0x36, 0xbb, 0x36, 0x97, 0x34, 0xb2, 0x32, // .PLT.@@.66.6.4.2 + 0x37, 0xba, 0x29, 0x41, 0x50, 0x85, 0x0c, 0xcf, 0xc5, 0xae, 0x4c, 0x6e, 0x2e, 0xed, 0xcd, 0x6d, // 7.)AP.....Ln...m + 0x4a, 0x40, 0x34, 0x21, 0xc3, 0x73, 0xb1, 0x0b, 0x63, 0xb3, 0x2b, 0x93, 0x9b, 0x12, 0x18, 0x75, // J@4!.s..c.+....u + 0xc8, 0xf0, 0x5c, 0xe6, 0xd0, 0xc2, 0xc8, 0xca, 0xe4, 0x9a, 0xde, 0xc8, 0xca, 0xd8, 0xa6, 0x04, // ................ + 0x49, 0x19, 0x32, 0x3c, 0x17, 0xb9, 0xb2, 0xb9, 0xb7, 0x3a, 0xb9, 0xb1, 0xb2, 0xb9, 0x29, 0xc1, // I.2<.....:....). + 0x53, 0x87, 0x0c, 0xcf, 0xc5, 0x2e, 0xad, 0xec, 0x2e, 0x89, 0x6c, 0x8a, 0x2e, 0x8c, 0xae, 0x6c, // S.........l....l + 0x4a, 0x10, 0xd5, 0x21, 0xc3, 0x73, 0x29, 0x73, 0xa3, 0x93, 0xcb, 0x83, 0x7a, 0x4b, 0x73, 0xa3, // J..!.s)s....zKs. + 0x9b, 0x9b, 0x12, 0xa4, 0x01, 0x00, 0x00, 0x00, 0x79, 0x18, 0x00, 0x00, 0x4c, 0x00, 0x00, 0x00, // ........y...L... + 0x33, 0x08, 0x80, 0x1c, 0xc4, 0xe1, 0x1c, 0x66, 0x14, 0x01, 0x3d, 0x88, 0x43, 0x38, 0x84, 0xc3, // 3......f..=.C8.. + 0x8c, 0x42, 0x80, 0x07, 0x79, 0x78, 0x07, 0x73, 0x98, 0x71, 0x0c, 0xe6, 0x00, 0x0f, 0xed, 0x10, // .B..yx.s.q...... + 0x0e, 0xf4, 0x80, 0x0e, 0x33, 0x0c, 0x42, 0x1e, 0xc2, 0xc1, 0x1d, 0xce, 0xa1, 0x1c, 0x66, 0x30, // ....3.B.......f0 + 0x05, 0x3d, 0x88, 0x43, 0x38, 0x84, 0x83, 0x1b, 0xcc, 0x03, 0x3d, 0xc8, 0x43, 0x3d, 0x8c, 0x03, // .=.C8.....=.C=.. + 0x3d, 0xcc, 0x78, 0x8c, 0x74, 0x70, 0x07, 0x7b, 0x08, 0x07, 0x79, 0x48, 0x87, 0x70, 0x70, 0x07, // =.x.tp.{..yH.pp. + 0x7a, 0x70, 0x03, 0x76, 0x78, 0x87, 0x70, 0x20, 0x87, 0x19, 0xcc, 0x11, 0x0e, 0xec, 0x90, 0x0e, // zp.vx.p ........ + 0xe1, 0x30, 0x0f, 0x6e, 0x30, 0x0f, 0xe3, 0xf0, 0x0e, 0xf0, 0x50, 0x0e, 0x33, 0x10, 0xc4, 0x1d, // .0.n0.....P.3... + 0xde, 0x21, 0x1c, 0xd8, 0x21, 0x1d, 0xc2, 0x61, 0x1e, 0x66, 0x30, 0x89, 0x3b, 0xbc, 0x83, 0x3b, // .!..!..a.f0.;..; + 0xd0, 0x43, 0x39, 0xb4, 0x03, 0x3c, 0xbc, 0x83, 0x3c, 0x84, 0x03, 0x3b, 0xcc, 0xf0, 0x14, 0x76, // .C9..<..<..;...v + 0x60, 0x07, 0x7b, 0x68, 0x07, 0x37, 0x68, 0x87, 0x72, 0x68, 0x07, 0x37, 0x80, 0x87, 0x70, 0x90, // `.{h.7h.rh.7..p. + 0x87, 0x70, 0x60, 0x07, 0x76, 0x28, 0x07, 0x76, 0xf8, 0x05, 0x76, 0x78, 0x87, 0x77, 0x80, 0x87, // .p`.v(.v..vx.w.. + 0x5f, 0x08, 0x87, 0x71, 0x18, 0x87, 0x72, 0x98, 0x87, 0x79, 0x98, 0x81, 0x2c, 0xee, 0xf0, 0x0e, // _..q..r..y..,... + 0xee, 0xe0, 0x0e, 0xf5, 0xc0, 0x0e, 0xec, 0x30, 0x03, 0x62, 0xc8, 0xa1, 0x1c, 0xe4, 0xa1, 0x1c, // .......0.b...... + 0xcc, 0xa1, 0x1c, 0xe4, 0xa1, 0x1c, 0xdc, 0x61, 0x1c, 0xca, 0x21, 0x1c, 0xc4, 0x81, 0x1d, 0xca, // .......a..!..... + 0x61, 0x06, 0xd6, 0x90, 0x43, 0x39, 0xc8, 0x43, 0x39, 0x98, 0x43, 0x39, 0xc8, 0x43, 0x39, 0xb8, // a...C9.C9.C9.C9. + 0xc3, 0x38, 0x94, 0x43, 0x38, 0x88, 0x03, 0x3b, 0x94, 0xc3, 0x2f, 0xbc, 0x83, 0x3c, 0xfc, 0x82, // .8.C8..;../..<.. + 0x3b, 0xd4, 0x03, 0x3b, 0xb0, 0xc3, 0x0c, 0xc4, 0x21, 0x07, 0x7c, 0x70, 0x03, 0x7a, 0x28, 0x87, // ;..;....!.|p.z(. + 0x76, 0x80, 0x87, 0x19, 0xd1, 0x43, 0x0e, 0xf8, 0xe0, 0x06, 0xe4, 0x20, 0x0e, 0xe7, 0xe0, 0x06, // v....C..... .... + 0xf6, 0x10, 0x0e, 0xf2, 0xc0, 0x0e, 0xe1, 0x90, 0x0f, 0xef, 0x50, 0x0f, 0xf4, 0x00, 0x00, 0x00, // ..........P..... + 0x71, 0x20, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x36, 0xb0, 0x0d, 0x97, 0xef, 0x3c, 0xbe, 0x10, // q ......6....<.. + 0x50, 0x45, 0x41, 0x44, 0xa5, 0x03, 0x0c, 0x25, 0x61, 0x00, 0x02, 0xe6, 0x17, 0xb7, 0x6d, 0x05, // PEAD...%a.....m. + 0xd2, 0x70, 0xf9, 0xce, 0xe3, 0x0b, 0x11, 0x01, 0x4c, 0x44, 0x08, 0x34, 0xc3, 0x42, 0x58, 0xc0, // .p......LD.4.BX. + 0x34, 0x5c, 0xbe, 0xf3, 0xf8, 0x8b, 0x03, 0x0c, 0x62, 0xf3, 0x50, 0x93, 0x5f, 0xdc, 0xb6, 0x09, // 4.......b.P._... + 0x54, 0xc3, 0xe5, 0x3b, 0x8f, 0x2f, 0x4d, 0x4e, 0x44, 0xa0, 0xd4, 0xf4, 0x50, 0x93, 0x5f, 0xdc, // T..;./MND...P._. + 0xb6, 0x11, 0x48, 0xc3, 0xe5, 0x3b, 0x8f, 0x3f, 0x11, 0xd1, 0x84, 0x00, 0x11, 0xe6, 0x17, 0xb7, // ..H..;.?........ + 0x6d, 0x00, 0x04, 0x03, 0x20, 0x0d, 0x00, 0x00, 0x61, 0x20, 0x00, 0x00, 0x7b, 0x00, 0x00, 0x00, // m... ...a ..{... + 0x13, 0x04, 0x41, 0x2c, 0x10, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x44, 0x8a, 0xab, 0x14, // ..A,........D... + 0x0a, 0x61, 0x06, 0xa0, 0xec, 0x4a, 0xae, 0x08, 0xa8, 0x94, 0x00, 0xc5, 0x11, 0x00, 0x00, 0x00, // .a...J.......... + 0x23, 0x06, 0x09, 0x00, 0x82, 0x60, 0x20, 0x65, 0x04, 0x73, 0x5d, 0xc1, 0x88, 0x41, 0x02, 0x80, // #....` e.s]..A.. + 0x20, 0x18, 0x18, 0x1e, 0x92, 0x61, 0xd0, 0x31, 0x62, 0x90, 0x00, 0x20, 0x08, 0x06, 0xc6, 0x97, // ....a.1b.. .... + 0x68, 0x19, 0x81, 0x8c, 0x18, 0x24, 0x00, 0x08, 0x82, 0x81, 0x01, 0x06, 0xca, 0xa6, 0x3d, 0xc9, // h....$........=. + 0x88, 0x41, 0x02, 0x80, 0x20, 0x18, 0x18, 0x61, 0xb0, 0x6c, 0xdb, 0xa4, 0x8c, 0x18, 0x24, 0x00, // .A.. ..a.l....$. + 0x08, 0x82, 0x81, 0x21, 0x06, 0x0c, 0xc7, 0x1d, 0xcb, 0x88, 0x41, 0x02, 0x80, 0x20, 0x18, 0x18, // ...!......A.. .. + 0x63, 0xd0, 0x74, 0x9d, 0xc4, 0x8c, 0x18, 0x24, 0x00, 0x08, 0x82, 0x81, 0x41, 0x06, 0x8e, 0xe7, // c.t....$....A... + 0x51, 0xcd, 0x88, 0xc1, 0x01, 0x80, 0x20, 0x18, 0x34, 0x63, 0xd0, 0x20, 0xdf, 0x68, 0x42, 0x00, // Q..... .4c. .hB. + 0x8c, 0x26, 0x08, 0xc1, 0x68, 0xc2, 0x20, 0x8c, 0x26, 0x10, 0xc3, 0x88, 0xc1, 0x01, 0x80, 0x20, // .&..h. .&...... + 0x18, 0x34, 0x68, 0x20, 0x35, 0x65, 0x30, 0x9a, 0x10, 0x00, 0xa3, 0x09, 0x42, 0x30, 0x9a, 0x30, // .4h 5e0.....B0.0 + 0x08, 0xa3, 0x09, 0xc4, 0x30, 0x62, 0x70, 0x00, 0x20, 0x08, 0x06, 0x4d, 0x1b, 0x5c, 0x52, 0x35, // ....0bp. ..M..R5 + 0x9a, 0x10, 0x00, 0xa3, 0x09, 0x42, 0x30, 0x9a, 0x30, 0x08, 0xa3, 0x09, 0xc4, 0x30, 0x62, 0x70, // .....B0.0....0bp + 0x00, 0x20, 0x08, 0x06, 0x8d, 0x1c, 0x70, 0x97, 0x1a, 0x8c, 0x26, 0x04, 0xc0, 0x68, 0x82, 0x10, // . ....p...&..h.. + 0x8c, 0x26, 0x0c, 0xc2, 0x68, 0x02, 0x31, 0xd8, 0xb4, 0xc9, 0x67, 0xc4, 0x00, 0x01, 0x40, 0x10, // .&..h.1...g...@. + 0x0c, 0x9e, 0x3b, 0x30, 0x83, 0x67, 0x0b, 0x46, 0x0c, 0x10, 0x00, 0x04, 0xc1, 0xe0, 0xc1, 0x83, // ..;0.g.F........ + 0x33, 0x58, 0xb6, 0xc0, 0x82, 0x03, 0x3a, 0x66, 0x7d, 0xf2, 0x19, 0x31, 0x40, 0x00, 0x10, 0x04, // 3X....:f}..1@... + 0x83, 0x67, 0x0f, 0xd4, 0x40, 0xfa, 0x82, 0x11, 0x03, 0x04, 0x00, 0x41, 0x30, 0x78, 0xf8, 0x60, // .g..@......A0x.` + 0x0d, 0x9c, 0x2f, 0xb0, 0x40, 0x81, 0x8e, 0x65, 0x63, 0x20, 0x9f, 0x11, 0x03, 0x04, 0x00, 0x41, // ../.@..ec .....A + 0x30, 0x78, 0xfe, 0xc0, 0x0d, 0xaa, 0x31, 0x08, 0x46, 0x0c, 0x10, 0x00, 0x04, 0xc1, 0xe0, 0x01, // 0x....1.F....... + 0x85, 0x37, 0x88, 0xc6, 0x20, 0xb0, 0xa0, 0x81, 0x8e, 0x71, 0x67, 0x20, 0x9f, 0x11, 0x03, 0x04, // .7.. ....qg .... + 0x00, 0x41, 0x30, 0x78, 0x46, 0x41, 0x0e, 0xb0, 0x33, 0x08, 0x46, 0x0c, 0x10, 0x00, 0x04, 0xc1, // .A0xFA..3.F..... + 0xe0, 0x21, 0x85, 0x39, 0xa0, 0xce, 0x20, 0xb0, 0x00, 0x82, 0xce, 0x88, 0x41, 0x02, 0x80, 0x20, // .!.9.. .....A.. + 0x18, 0x20, 0xa8, 0x40, 0x07, 0xa3, 0x30, 0x0a, 0x7b, 0xd0, 0x8c, 0x18, 0x24, 0x00, 0x08, 0x82, // . .@..0.{...$... + 0x01, 0x82, 0x0a, 0x74, 0x30, 0x0a, 0xa3, 0xe0, 0x06, 0xc9, 0x88, 0x41, 0x02, 0x80, 0x20, 0x18, // ...t0......A.. . + 0x20, 0xa8, 0x40, 0x07, 0xa3, 0x30, 0x0a, 0x78, 0x50, 0x8c, 0x18, 0x24, 0x00, 0x08, 0x82, 0x01, // .@..0.xP..$.... + 0x82, 0x0a, 0x74, 0x30, 0x0a, 0xa3, 0x90, 0x07, 0xc1, 0x88, 0x41, 0x02, 0x80, 0x20, 0x18, 0x20, // ..t0......A.. . + 0xa8, 0x40, 0x07, 0xa4, 0x30, 0x0a, 0x7b, 0x80, 0x06, 0x23, 0x06, 0x09, 0x00, 0x82, 0x60, 0x80, // .@..0.{..#....`. + 0xa0, 0x02, 0x1d, 0x90, 0xc2, 0x28, 0xb8, 0xc1, 0x19, 0x8c, 0x18, 0x24, 0x00, 0x08, 0x82, 0x01, // .....(.....$.... + 0x82, 0x0a, 0x74, 0x40, 0x0a, 0xa3, 0x80, 0x07, 0x66, 0x30, 0x62, 0x90, 0x00, 0x20, 0x08, 0x06, // ..t@....f0b.. .. + 0x08, 0x2a, 0xd0, 0x01, 0x29, 0x8c, 0x42, 0x1e, 0x94, 0x01, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, // .*..).B......... + 0x00, 0x02, 0x05, 0x00, 0x01, 0x00, 0x40, 0x00, // ......@. +}; +static const uint8_t vs_debugdraw_lines_mtl[733] = +{ + 0x56, 0x53, 0x48, 0x0b, 0x00, 0x00, 0x00, 0x00, 0xa4, 0x8b, 0xef, 0x49, 0x01, 0x00, 0x0f, 0x75, // VSH........I...u + 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x56, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x04, 0x01, // _modelViewProj.. + 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa9, 0x02, 0x00, 0x00, 0x23, 0x69, 0x6e, 0x63, // ............#inc + 0x6c, 0x75, 0x64, 0x65, 0x20, 0x3c, 0x6d, 0x65, 0x74, 0x61, 0x6c, 0x5f, 0x73, 0x74, 0x64, 0x6c, // lude .#include ..usin + 0x67, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x20, 0x6d, 0x65, 0x74, 0x61, // g namespace meta + 0x6c, 0x3b, 0x0a, 0x0a, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x20, 0x5f, 0x47, 0x6c, 0x6f, 0x62, // l;..struct _Glob + 0x61, 0x6c, 0x0a, 0x7b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x34, 0x78, // al.{. float4x + 0x34, 0x20, 0x75, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x56, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, // 4 u_modelViewPro + 0x6a, 0x3b, 0x0a, 0x7d, 0x3b, 0x0a, 0x0a, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x20, 0x78, 0x6c, // j;.};..struct xl + 0x61, 0x74, 0x4d, 0x74, 0x6c, 0x4d, 0x61, 0x69, 0x6e, 0x5f, 0x6f, 0x75, 0x74, 0x0a, 0x7b, 0x0a, // atMtlMain_out.{. + 0x09, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x20, 0x62, 0x67, 0x66, 0x78, 0x5f, 0x6d, 0x65, 0x74, 0x61, // .float bgfx_meta + 0x6c, 0x5f, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x53, 0x69, 0x7a, 0x65, 0x20, 0x5b, 0x5b, 0x70, 0x6f, // l_pointSize [[po + 0x69, 0x6e, 0x74, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x5d, 0x5d, 0x20, 0x3d, 0x20, 0x31, 0x3b, 0x0a, // int_size]] = 1;. + 0x20, 0x20, 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x34, 0x20, 0x5f, 0x65, 0x6e, 0x74, 0x72, // float4 _entr + 0x79, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x5f, 0x76, 0x5f, 0x63, // yPointOutput_v_c + 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x20, 0x5b, 0x5b, 0x75, 0x73, 0x65, 0x72, 0x28, 0x6c, 0x6f, 0x63, // olor0 [[user(loc + 0x6e, 0x30, 0x29, 0x5d, 0x5d, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, // n0)]];. float + 0x34, 0x20, 0x67, 0x6c, 0x5f, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x5b, 0x5b, // 4 gl_Position [[ + 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x5d, 0x5d, 0x3b, 0x0a, 0x7d, 0x3b, 0x0a, 0x0a, // position]];.};.. + 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x20, 0x78, 0x6c, 0x61, 0x74, 0x4d, 0x74, 0x6c, 0x4d, 0x61, // struct xlatMtlMa + 0x69, 0x6e, 0x5f, 0x69, 0x6e, 0x0a, 0x7b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, // in_in.{. floa + 0x74, 0x34, 0x20, 0x61, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x20, 0x5b, 0x5b, 0x61, 0x74, // t4 a_color0 [[at + 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x28, 0x30, 0x29, 0x5d, 0x5d, 0x3b, 0x0a, 0x20, 0x20, // tribute(0)]];. + 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x33, 0x20, 0x61, 0x5f, 0x70, 0x6f, 0x73, 0x69, 0x74, // float3 a_posit + 0x69, 0x6f, 0x6e, 0x20, 0x5b, 0x5b, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x28, // ion [[attribute( + 0x31, 0x29, 0x5d, 0x5d, 0x3b, 0x0a, 0x7d, 0x3b, 0x0a, 0x0a, 0x76, 0x65, 0x72, 0x74, 0x65, 0x78, // 1)]];.};..vertex + 0x20, 0x78, 0x6c, 0x61, 0x74, 0x4d, 0x74, 0x6c, 0x4d, 0x61, 0x69, 0x6e, 0x5f, 0x6f, 0x75, 0x74, // xlatMtlMain_out + 0x20, 0x78, 0x6c, 0x61, 0x74, 0x4d, 0x74, 0x6c, 0x4d, 0x61, 0x69, 0x6e, 0x28, 0x78, 0x6c, 0x61, // xlatMtlMain(xla + 0x74, 0x4d, 0x74, 0x6c, 0x4d, 0x61, 0x69, 0x6e, 0x5f, 0x69, 0x6e, 0x20, 0x69, 0x6e, 0x20, 0x5b, // tMtlMain_in in [ + 0x5b, 0x73, 0x74, 0x61, 0x67, 0x65, 0x5f, 0x69, 0x6e, 0x5d, 0x5d, 0x2c, 0x20, 0x63, 0x6f, 0x6e, // [stage_in]], con + 0x73, 0x74, 0x61, 0x6e, 0x74, 0x20, 0x5f, 0x47, 0x6c, 0x6f, 0x62, 0x61, 0x6c, 0x26, 0x20, 0x5f, // stant _Global& _ + 0x6d, 0x74, 0x6c, 0x5f, 0x75, 0x20, 0x5b, 0x5b, 0x62, 0x75, 0x66, 0x66, 0x65, 0x72, 0x28, 0x30, // mtl_u [[buffer(0 + 0x29, 0x5d, 0x5d, 0x29, 0x0a, 0x7b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x78, 0x6c, 0x61, 0x74, 0x4d, // )]]).{. xlatM + 0x74, 0x6c, 0x4d, 0x61, 0x69, 0x6e, 0x5f, 0x6f, 0x75, 0x74, 0x20, 0x6f, 0x75, 0x74, 0x20, 0x3d, // tlMain_out out = + 0x20, 0x7b, 0x7d, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x6f, 0x75, 0x74, 0x2e, 0x67, 0x6c, 0x5f, // {};. out.gl_ + 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x3d, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, // Position = _mtl_ + 0x75, 0x2e, 0x75, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x56, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, // u.u_modelViewPro + 0x6a, 0x20, 0x2a, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x34, 0x28, 0x69, 0x6e, 0x2e, 0x61, 0x5f, // j * float4(in.a_ + 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x2c, 0x20, 0x31, 0x2e, 0x30, 0x29, 0x3b, 0x0a, // position, 1.0);. + 0x20, 0x20, 0x20, 0x20, 0x6f, 0x75, 0x74, 0x2e, 0x5f, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x50, 0x6f, // out._entryPo + 0x69, 0x6e, 0x74, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x5f, 0x76, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, // intOutput_v_colo + 0x72, 0x30, 0x20, 0x3d, 0x20, 0x69, 0x6e, 0x2e, 0x61, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x30, // r0 = in.a_color0 + 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x6f, 0x75, 0x74, // ;. return out + 0x3b, 0x0a, 0x7d, 0x0a, 0x0a, 0x00, 0x02, 0x05, 0x00, 0x01, 0x00, 0x40, 0x00, // ;.}........@. +}; +extern const uint8_t* vs_debugdraw_lines_pssl; +extern const uint32_t vs_debugdraw_lines_pssl_size; diff --git a/Modules/Moonlight/Source/Debug/vs_debugdraw_lines.bin.hpp b/Modules/Moonlight/Source/Debug/vs_debugdraw_lines.bin.hpp deleted file mode 100644 index 6cddc0b7..00000000 --- a/Modules/Moonlight/Source/Debug/vs_debugdraw_lines.bin.hpp +++ /dev/null @@ -1,224 +0,0 @@ -static const uint8_t vs_debugdraw_lines_glsl[303] = -{ - 0x56, 0x53, 0x48, 0x0b, 0x00, 0x00, 0x00, 0x00, 0xa4, 0x8b, 0xef, 0x49, 0x01, 0x00, 0x0f, 0x75, // VSH........I...u - 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x56, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x04, 0x01, // _modelViewProj.. - 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x01, 0x00, 0x00, 0x61, 0x74, 0x74, 0x72, // ............attr - 0x69, 0x62, 0x75, 0x74, 0x65, 0x20, 0x76, 0x65, 0x63, 0x34, 0x20, 0x61, 0x5f, 0x63, 0x6f, 0x6c, // ibute vec4 a_col - 0x6f, 0x72, 0x30, 0x3b, 0x0a, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x20, 0x76, // or0;.attribute v - 0x65, 0x63, 0x33, 0x20, 0x61, 0x5f, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x3b, 0x0a, // ec3 a_position;. - 0x76, 0x61, 0x72, 0x79, 0x69, 0x6e, 0x67, 0x20, 0x76, 0x65, 0x63, 0x34, 0x20, 0x76, 0x5f, 0x63, // varying vec4 v_c - 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x3b, 0x0a, 0x75, 0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, 0x20, 0x6d, // olor0;.uniform m - 0x61, 0x74, 0x34, 0x20, 0x75, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x56, 0x69, 0x65, 0x77, 0x50, // at4 u_modelViewP - 0x72, 0x6f, 0x6a, 0x3b, 0x0a, 0x76, 0x6f, 0x69, 0x64, 0x20, 0x6d, 0x61, 0x69, 0x6e, 0x20, 0x28, // roj;.void main ( - 0x29, 0x0a, 0x7b, 0x0a, 0x20, 0x20, 0x76, 0x65, 0x63, 0x34, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, // ).{. vec4 tmpva - 0x72, 0x5f, 0x31, 0x3b, 0x0a, 0x20, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x31, 0x2e, // r_1;. tmpvar_1. - 0x77, 0x20, 0x3d, 0x20, 0x31, 0x2e, 0x30, 0x3b, 0x0a, 0x20, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, // w = 1.0;. tmpva - 0x72, 0x5f, 0x31, 0x2e, 0x78, 0x79, 0x7a, 0x20, 0x3d, 0x20, 0x61, 0x5f, 0x70, 0x6f, 0x73, 0x69, // r_1.xyz = a_posi - 0x74, 0x69, 0x6f, 0x6e, 0x3b, 0x0a, 0x20, 0x20, 0x67, 0x6c, 0x5f, 0x50, 0x6f, 0x73, 0x69, 0x74, // tion;. gl_Posit - 0x69, 0x6f, 0x6e, 0x20, 0x3d, 0x20, 0x28, 0x75, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x56, 0x69, // ion = (u_modelVi - 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x20, 0x2a, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, // ewProj * tmpvar_ - 0x31, 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x76, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x20, 0x3d, // 1);. v_color0 = - 0x20, 0x61, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x3b, 0x0a, 0x7d, 0x0a, 0x0a, 0x00, // a_color0;.}... -}; -static const uint8_t vs_debugdraw_lines_essl[333] = -{ - 0x56, 0x53, 0x48, 0x0b, 0x00, 0x00, 0x00, 0x00, 0xa4, 0x8b, 0xef, 0x49, 0x01, 0x00, 0x0f, 0x75, // VSH........I...u - 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x56, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x04, 0x01, // _modelViewProj.. - 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x01, 0x00, 0x00, 0x61, 0x74, 0x74, 0x72, // ........ ...attr - 0x69, 0x62, 0x75, 0x74, 0x65, 0x20, 0x68, 0x69, 0x67, 0x68, 0x70, 0x20, 0x76, 0x65, 0x63, 0x34, // ibute highp vec4 - 0x20, 0x61, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x3b, 0x0a, 0x61, 0x74, 0x74, 0x72, 0x69, // a_color0;.attri - 0x62, 0x75, 0x74, 0x65, 0x20, 0x68, 0x69, 0x67, 0x68, 0x70, 0x20, 0x76, 0x65, 0x63, 0x33, 0x20, // bute highp vec3 - 0x61, 0x5f, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x3b, 0x0a, 0x76, 0x61, 0x72, 0x79, // a_position;.vary - 0x69, 0x6e, 0x67, 0x20, 0x68, 0x69, 0x67, 0x68, 0x70, 0x20, 0x76, 0x65, 0x63, 0x34, 0x20, 0x76, // ing highp vec4 v - 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x3b, 0x0a, 0x75, 0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, // _color0;.uniform - 0x20, 0x68, 0x69, 0x67, 0x68, 0x70, 0x20, 0x6d, 0x61, 0x74, 0x34, 0x20, 0x75, 0x5f, 0x6d, 0x6f, // highp mat4 u_mo - 0x64, 0x65, 0x6c, 0x56, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x3b, 0x0a, 0x76, 0x6f, 0x69, // delViewProj;.voi - 0x64, 0x20, 0x6d, 0x61, 0x69, 0x6e, 0x20, 0x28, 0x29, 0x0a, 0x7b, 0x0a, 0x20, 0x20, 0x68, 0x69, // d main ().{. hi - 0x67, 0x68, 0x70, 0x20, 0x76, 0x65, 0x63, 0x34, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, // ghp vec4 tmpvar_ - 0x31, 0x3b, 0x0a, 0x20, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x31, 0x2e, 0x77, 0x20, // 1;. tmpvar_1.w - 0x3d, 0x20, 0x31, 0x2e, 0x30, 0x3b, 0x0a, 0x20, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, // = 1.0;. tmpvar_ - 0x31, 0x2e, 0x78, 0x79, 0x7a, 0x20, 0x3d, 0x20, 0x61, 0x5f, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, // 1.xyz = a_positi - 0x6f, 0x6e, 0x3b, 0x0a, 0x20, 0x20, 0x67, 0x6c, 0x5f, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, // on;. gl_Positio - 0x6e, 0x20, 0x3d, 0x20, 0x28, 0x75, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x56, 0x69, 0x65, 0x77, // n = (u_modelView - 0x50, 0x72, 0x6f, 0x6a, 0x20, 0x2a, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x31, 0x29, // Proj * tmpvar_1) - 0x3b, 0x0a, 0x20, 0x20, 0x76, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x20, 0x3d, 0x20, 0x61, // ;. v_color0 = a - 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x3b, 0x0a, 0x7d, 0x0a, 0x0a, 0x00, // _color0;.}... -}; -static const uint8_t vs_debugdraw_lines_spv[1060] = -{ - 0x56, 0x53, 0x48, 0x0b, 0x00, 0x00, 0x00, 0x00, 0xa4, 0x8b, 0xef, 0x49, 0x01, 0x00, 0x0f, 0x75, // VSH........I...u - 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x56, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x04, 0x00, // _modelViewProj.. - 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x03, 0x00, 0x00, 0x03, 0x02, 0x23, 0x07, // ..............#. - 0x00, 0x00, 0x01, 0x00, 0x0a, 0x00, 0x08, 0x00, 0x5f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ........_....... - 0x11, 0x00, 0x02, 0x00, 0x01, 0x00, 0x00, 0x00, 0x0b, 0x00, 0x06, 0x00, 0x01, 0x00, 0x00, 0x00, // ................ - 0x47, 0x4c, 0x53, 0x4c, 0x2e, 0x73, 0x74, 0x64, 0x2e, 0x34, 0x35, 0x30, 0x00, 0x00, 0x00, 0x00, // GLSL.std.450.... - 0x0e, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x09, 0x00, // ................ - 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x6d, 0x61, 0x69, 0x6e, 0x00, 0x00, 0x00, 0x00, // ........main.... - 0x2f, 0x00, 0x00, 0x00, 0x33, 0x00, 0x00, 0x00, 0x3c, 0x00, 0x00, 0x00, 0x3f, 0x00, 0x00, 0x00, // /...3...<...?... - 0x03, 0x00, 0x03, 0x00, 0x05, 0x00, 0x00, 0x00, 0xf4, 0x01, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, // ................ - 0x04, 0x00, 0x00, 0x00, 0x6d, 0x61, 0x69, 0x6e, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x06, 0x00, // ....main........ - 0x20, 0x00, 0x00, 0x00, 0x55, 0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, 0x42, 0x6c, 0x6f, 0x63, 0x6b, // ...UniformBlock - 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x07, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ........ ....... - 0x75, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x56, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x00, // u_modelViewProj. - 0x05, 0x00, 0x03, 0x00, 0x22, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x05, 0x00, // ...."........... - 0x2f, 0x00, 0x00, 0x00, 0x61, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x00, 0x00, 0x00, 0x00, // /...a_color0.... - 0x05, 0x00, 0x05, 0x00, 0x33, 0x00, 0x00, 0x00, 0x61, 0x5f, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, // ....3...a_positi - 0x6f, 0x6e, 0x00, 0x00, 0x05, 0x00, 0x0a, 0x00, 0x3c, 0x00, 0x00, 0x00, 0x40, 0x65, 0x6e, 0x74, // on......<...@ent - 0x72, 0x79, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x2e, 0x67, 0x6c, // ryPointOutput.gl - 0x5f, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x00, 0x00, 0x00, 0x05, 0x00, 0x09, 0x00, // _Position....... - 0x3f, 0x00, 0x00, 0x00, 0x40, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x4f, // ?...@entryPointO - 0x75, 0x74, 0x70, 0x75, 0x74, 0x2e, 0x76, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x00, 0x00, // utput.v_color0.. - 0x48, 0x00, 0x04, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, // H... ........... - 0x48, 0x00, 0x05, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, // H... .......#... - 0x00, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ....H... ....... - 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x47, 0x00, 0x03, 0x00, 0x20, 0x00, 0x00, 0x00, // ........G... ... - 0x02, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0x22, 0x00, 0x00, 0x00, 0x22, 0x00, 0x00, 0x00, // ....G..."..."... - 0x00, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0x22, 0x00, 0x00, 0x00, 0x21, 0x00, 0x00, 0x00, // ....G..."...!... - 0x00, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0x2f, 0x00, 0x00, 0x00, 0x1e, 0x00, 0x00, 0x00, // ....G.../....... - 0x00, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0x33, 0x00, 0x00, 0x00, 0x1e, 0x00, 0x00, 0x00, // ....G...3....... - 0x01, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0x3c, 0x00, 0x00, 0x00, 0x0b, 0x00, 0x00, 0x00, // ....G...<....... - 0x00, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0x3f, 0x00, 0x00, 0x00, 0x1e, 0x00, 0x00, 0x00, // ....G...?....... - 0x00, 0x00, 0x00, 0x00, 0x13, 0x00, 0x02, 0x00, 0x02, 0x00, 0x00, 0x00, 0x21, 0x00, 0x03, 0x00, // ............!... - 0x03, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x16, 0x00, 0x03, 0x00, 0x06, 0x00, 0x00, 0x00, // ................ - 0x20, 0x00, 0x00, 0x00, 0x17, 0x00, 0x04, 0x00, 0x07, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, // ............... - 0x04, 0x00, 0x00, 0x00, 0x17, 0x00, 0x04, 0x00, 0x09, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, // ................ - 0x03, 0x00, 0x00, 0x00, 0x15, 0x00, 0x04, 0x00, 0x13, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, // ............ ... - 0x01, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, 0x06, 0x00, 0x00, 0x00, 0x15, 0x00, 0x00, 0x00, // ....+........... - 0x00, 0x00, 0x80, 0x3f, 0x2b, 0x00, 0x04, 0x00, 0x13, 0x00, 0x00, 0x00, 0x19, 0x00, 0x00, 0x00, // ...?+........... - 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x04, 0x00, 0x1f, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, // ................ - 0x04, 0x00, 0x00, 0x00, 0x1e, 0x00, 0x03, 0x00, 0x20, 0x00, 0x00, 0x00, 0x1f, 0x00, 0x00, 0x00, // ........ ....... - 0x20, 0x00, 0x04, 0x00, 0x21, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, // ...!....... ... - 0x3b, 0x00, 0x04, 0x00, 0x21, 0x00, 0x00, 0x00, 0x22, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, // ;...!..."....... - 0x20, 0x00, 0x04, 0x00, 0x23, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x1f, 0x00, 0x00, 0x00, // ...#........... - 0x20, 0x00, 0x04, 0x00, 0x2e, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, // ............... - 0x3b, 0x00, 0x04, 0x00, 0x2e, 0x00, 0x00, 0x00, 0x2f, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, // ;......./....... - 0x20, 0x00, 0x04, 0x00, 0x32, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, // ...2........... - 0x3b, 0x00, 0x04, 0x00, 0x32, 0x00, 0x00, 0x00, 0x33, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, // ;...2...3....... - 0x20, 0x00, 0x04, 0x00, 0x3b, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, // ...;........... - 0x3b, 0x00, 0x04, 0x00, 0x3b, 0x00, 0x00, 0x00, 0x3c, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, // ;...;...<....... - 0x3b, 0x00, 0x04, 0x00, 0x3b, 0x00, 0x00, 0x00, 0x3f, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, // ;...;...?....... - 0x36, 0x00, 0x05, 0x00, 0x02, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 6............... - 0x03, 0x00, 0x00, 0x00, 0xf8, 0x00, 0x02, 0x00, 0x05, 0x00, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, // ............=... - 0x07, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x2f, 0x00, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, // ....0.../...=... - 0x09, 0x00, 0x00, 0x00, 0x34, 0x00, 0x00, 0x00, 0x33, 0x00, 0x00, 0x00, 0x51, 0x00, 0x05, 0x00, // ....4...3...Q... - 0x06, 0x00, 0x00, 0x00, 0x58, 0x00, 0x00, 0x00, 0x34, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ....X...4....... - 0x51, 0x00, 0x05, 0x00, 0x06, 0x00, 0x00, 0x00, 0x59, 0x00, 0x00, 0x00, 0x34, 0x00, 0x00, 0x00, // Q.......Y...4... - 0x01, 0x00, 0x00, 0x00, 0x51, 0x00, 0x05, 0x00, 0x06, 0x00, 0x00, 0x00, 0x5a, 0x00, 0x00, 0x00, // ....Q.......Z... - 0x34, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x50, 0x00, 0x07, 0x00, 0x07, 0x00, 0x00, 0x00, // 4.......P....... - 0x5b, 0x00, 0x00, 0x00, 0x58, 0x00, 0x00, 0x00, 0x59, 0x00, 0x00, 0x00, 0x5a, 0x00, 0x00, 0x00, // [...X...Y...Z... - 0x15, 0x00, 0x00, 0x00, 0x41, 0x00, 0x05, 0x00, 0x23, 0x00, 0x00, 0x00, 0x5c, 0x00, 0x00, 0x00, // ....A...#....... - 0x22, 0x00, 0x00, 0x00, 0x19, 0x00, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x1f, 0x00, 0x00, 0x00, // ".......=....... - 0x5d, 0x00, 0x00, 0x00, 0x5c, 0x00, 0x00, 0x00, 0x90, 0x00, 0x05, 0x00, 0x07, 0x00, 0x00, 0x00, // ]............... - 0x5e, 0x00, 0x00, 0x00, 0x5b, 0x00, 0x00, 0x00, 0x5d, 0x00, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, // ^...[...]...>... - 0x3c, 0x00, 0x00, 0x00, 0x5e, 0x00, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0x3f, 0x00, 0x00, 0x00, // <...^...>...?... - 0x30, 0x00, 0x00, 0x00, 0xfd, 0x00, 0x01, 0x00, 0x38, 0x00, 0x01, 0x00, 0x00, 0x02, 0x05, 0x00, // 0.......8....... - 0x01, 0x00, 0x40, 0x00, // ..@. -}; -static const uint8_t vs_debugdraw_lines_dx9[321] = -{ - 0x56, 0x53, 0x48, 0x0b, 0x00, 0x00, 0x00, 0x00, 0xa4, 0x8b, 0xef, 0x49, 0x01, 0x00, 0x0f, 0x75, // VSH........I...u - 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x56, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x04, 0x01, // _modelViewProj.. - 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x14, 0x01, 0x00, 0x00, 0x00, 0x03, 0xfe, 0xff, // ................ - 0xfe, 0xff, 0x21, 0x00, 0x43, 0x54, 0x41, 0x42, 0x1c, 0x00, 0x00, 0x00, 0x57, 0x00, 0x00, 0x00, // ..!.CTAB....W... - 0x00, 0x03, 0xfe, 0xff, 0x01, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x91, 0x00, 0x00, // ................ - 0x50, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, // P...0........... - 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x56, // @.......u_modelV - 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x00, 0x03, 0x00, 0x03, 0x00, 0x04, 0x00, 0x04, 0x00, // iewProj......... - 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x76, 0x73, 0x5f, 0x33, 0x5f, 0x30, 0x00, 0x4d, // ........vs_3_0.M - 0x69, 0x63, 0x72, 0x6f, 0x73, 0x6f, 0x66, 0x74, 0x20, 0x28, 0x52, 0x29, 0x20, 0x48, 0x4c, 0x53, // icrosoft (R) HLS - 0x4c, 0x20, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, 0x20, 0x43, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, // L Shader Compile - 0x72, 0x20, 0x31, 0x30, 0x2e, 0x31, 0x00, 0xab, 0x1f, 0x00, 0x00, 0x02, 0x0a, 0x00, 0x00, 0x80, // r 10.1.......... - 0x00, 0x00, 0x0f, 0x90, 0x1f, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x80, 0x01, 0x00, 0x0f, 0x90, // ................ - 0x1f, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x0f, 0xe0, 0x1f, 0x00, 0x00, 0x02, // ................ - 0x0a, 0x00, 0x00, 0x80, 0x01, 0x00, 0x0f, 0xe0, 0x05, 0x00, 0x00, 0x03, 0x00, 0x00, 0x0f, 0x80, // ................ - 0x01, 0x00, 0xe4, 0xa0, 0x01, 0x00, 0x55, 0x90, 0x04, 0x00, 0x00, 0x04, 0x00, 0x00, 0x0f, 0x80, // ......U......... - 0x00, 0x00, 0xe4, 0xa0, 0x01, 0x00, 0x00, 0x90, 0x00, 0x00, 0xe4, 0x80, 0x04, 0x00, 0x00, 0x04, // ................ - 0x00, 0x00, 0x0f, 0x80, 0x02, 0x00, 0xe4, 0xa0, 0x01, 0x00, 0xaa, 0x90, 0x00, 0x00, 0xe4, 0x80, // ................ - 0x02, 0x00, 0x00, 0x03, 0x00, 0x00, 0x0f, 0xe0, 0x00, 0x00, 0xe4, 0x80, 0x03, 0x00, 0xe4, 0xa0, // ................ - 0x01, 0x00, 0x00, 0x02, 0x01, 0x00, 0x0f, 0xe0, 0x00, 0x00, 0xe4, 0x90, 0xff, 0xff, 0x00, 0x00, // ................ - 0x00, // . -}; -static const uint8_t vs_debugdraw_lines_dx11[520] = -{ - 0x56, 0x53, 0x48, 0x0b, 0x00, 0x00, 0x00, 0x00, 0xa4, 0x8b, 0xef, 0x49, 0x01, 0x00, 0x0f, 0x75, // VSH........I...u - 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x56, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x04, 0x00, // _modelViewProj.. - 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0xd4, 0x01, 0x00, 0x00, 0x44, 0x58, 0x42, 0x43, // ............DXBC - 0x32, 0x9b, 0xdd, 0xb5, 0xa9, 0xb7, 0x22, 0xf0, 0xcf, 0x5e, 0x34, 0x2c, 0x72, 0xf0, 0x87, 0x00, // 2....."..^4,r... - 0x01, 0x00, 0x00, 0x00, 0xd4, 0x01, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x2c, 0x00, 0x00, 0x00, // ............,... - 0x7c, 0x00, 0x00, 0x00, 0xd0, 0x00, 0x00, 0x00, 0x49, 0x53, 0x47, 0x4e, 0x48, 0x00, 0x00, 0x00, // |.......ISGNH... - 0x02, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ........8....... - 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x0f, 0x00, 0x00, // ................ - 0x3e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, // >............... - 0x01, 0x00, 0x00, 0x00, 0x07, 0x07, 0x00, 0x00, 0x43, 0x4f, 0x4c, 0x4f, 0x52, 0x00, 0x50, 0x4f, // ........COLOR.PO - 0x53, 0x49, 0x54, 0x49, 0x4f, 0x4e, 0x00, 0xab, 0x4f, 0x53, 0x47, 0x4e, 0x4c, 0x00, 0x00, 0x00, // SITION..OSGNL... - 0x02, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ........8....... - 0x01, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, // ................ - 0x44, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, // D............... - 0x01, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x53, 0x56, 0x5f, 0x50, 0x4f, 0x53, 0x49, 0x54, // ........SV_POSIT - 0x49, 0x4f, 0x4e, 0x00, 0x43, 0x4f, 0x4c, 0x4f, 0x52, 0x00, 0xab, 0xab, 0x53, 0x48, 0x44, 0x52, // ION.COLOR...SHDR - 0xfc, 0x00, 0x00, 0x00, 0x40, 0x00, 0x01, 0x00, 0x3f, 0x00, 0x00, 0x00, 0x59, 0x00, 0x00, 0x04, // ....@...?...Y... - 0x46, 0x8e, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x5f, 0x00, 0x00, 0x03, // F. ........._... - 0xf2, 0x10, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5f, 0x00, 0x00, 0x03, 0x72, 0x10, 0x10, 0x00, // ........_...r... - 0x01, 0x00, 0x00, 0x00, 0x67, 0x00, 0x00, 0x04, 0xf2, 0x20, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, // ....g.... ...... - 0x01, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x03, 0xf2, 0x20, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, // ....e.... ...... - 0x68, 0x00, 0x00, 0x02, 0x01, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x08, 0xf2, 0x00, 0x10, 0x00, // h.......8....... - 0x00, 0x00, 0x00, 0x00, 0x56, 0x15, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x46, 0x8e, 0x20, 0x00, // ....V.......F. . - 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x32, 0x00, 0x00, 0x0a, 0xf2, 0x00, 0x10, 0x00, // ........2....... - 0x00, 0x00, 0x00, 0x00, 0x46, 0x8e, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ....F. ......... - 0x06, 0x10, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x46, 0x0e, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, // ........F....... - 0x32, 0x00, 0x00, 0x0a, 0xf2, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x8e, 0x20, 0x00, // 2...........F. . - 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0xa6, 0x1a, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, // ................ - 0x46, 0x0e, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0xf2, 0x20, 0x10, 0x00, // F............ .. - 0x00, 0x00, 0x00, 0x00, 0x46, 0x0e, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x8e, 0x20, 0x00, // ....F.......F. . - 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x36, 0x00, 0x00, 0x05, 0xf2, 0x20, 0x10, 0x00, // ........6.... .. - 0x01, 0x00, 0x00, 0x00, 0x46, 0x1e, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3e, 0x00, 0x00, 0x01, // ....F.......>... - 0x00, 0x02, 0x05, 0x00, 0x01, 0x00, 0x40, 0x00, // ......@. -}; -static const uint8_t vs_debugdraw_lines_mtl[685] = -{ - 0x56, 0x53, 0x48, 0x0b, 0x00, 0x00, 0x00, 0x00, 0xa4, 0x8b, 0xef, 0x49, 0x01, 0x00, 0x0f, 0x75, // VSH........I...u - 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x56, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x04, 0x01, // _modelViewProj.. - 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x79, 0x02, 0x00, 0x00, 0x23, 0x69, 0x6e, 0x63, // ........y...#inc - 0x6c, 0x75, 0x64, 0x65, 0x20, 0x3c, 0x6d, 0x65, 0x74, 0x61, 0x6c, 0x5f, 0x73, 0x74, 0x64, 0x6c, // lude .#include ..usin - 0x67, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x20, 0x6d, 0x65, 0x74, 0x61, // g namespace meta - 0x6c, 0x3b, 0x0a, 0x0a, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x20, 0x5f, 0x47, 0x6c, 0x6f, 0x62, // l;..struct _Glob - 0x61, 0x6c, 0x0a, 0x7b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x34, 0x78, // al.{. float4x - 0x34, 0x20, 0x75, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x56, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, // 4 u_modelViewPro - 0x6a, 0x3b, 0x0a, 0x7d, 0x3b, 0x0a, 0x0a, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x20, 0x78, 0x6c, // j;.};..struct xl - 0x61, 0x74, 0x4d, 0x74, 0x6c, 0x4d, 0x61, 0x69, 0x6e, 0x5f, 0x6f, 0x75, 0x74, 0x0a, 0x7b, 0x0a, // atMtlMain_out.{. - 0x20, 0x20, 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x34, 0x20, 0x5f, 0x65, 0x6e, 0x74, 0x72, // float4 _entr - 0x79, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x5f, 0x76, 0x5f, 0x63, // yPointOutput_v_c - 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x20, 0x5b, 0x5b, 0x75, 0x73, 0x65, 0x72, 0x28, 0x6c, 0x6f, 0x63, // olor0 [[user(loc - 0x6e, 0x30, 0x29, 0x5d, 0x5d, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, // n0)]];. float - 0x34, 0x20, 0x67, 0x6c, 0x5f, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x5b, 0x5b, // 4 gl_Position [[ - 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x5d, 0x5d, 0x3b, 0x0a, 0x7d, 0x3b, 0x0a, 0x0a, // position]];.};.. - 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x20, 0x78, 0x6c, 0x61, 0x74, 0x4d, 0x74, 0x6c, 0x4d, 0x61, // struct xlatMtlMa - 0x69, 0x6e, 0x5f, 0x69, 0x6e, 0x0a, 0x7b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, // in_in.{. floa - 0x74, 0x34, 0x20, 0x61, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x20, 0x5b, 0x5b, 0x61, 0x74, // t4 a_color0 [[at - 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x28, 0x30, 0x29, 0x5d, 0x5d, 0x3b, 0x0a, 0x20, 0x20, // tribute(0)]];. - 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x33, 0x20, 0x61, 0x5f, 0x70, 0x6f, 0x73, 0x69, 0x74, // float3 a_posit - 0x69, 0x6f, 0x6e, 0x20, 0x5b, 0x5b, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x28, // ion [[attribute( - 0x31, 0x29, 0x5d, 0x5d, 0x3b, 0x0a, 0x7d, 0x3b, 0x0a, 0x0a, 0x76, 0x65, 0x72, 0x74, 0x65, 0x78, // 1)]];.};..vertex - 0x20, 0x78, 0x6c, 0x61, 0x74, 0x4d, 0x74, 0x6c, 0x4d, 0x61, 0x69, 0x6e, 0x5f, 0x6f, 0x75, 0x74, // xlatMtlMain_out - 0x20, 0x78, 0x6c, 0x61, 0x74, 0x4d, 0x74, 0x6c, 0x4d, 0x61, 0x69, 0x6e, 0x28, 0x78, 0x6c, 0x61, // xlatMtlMain(xla - 0x74, 0x4d, 0x74, 0x6c, 0x4d, 0x61, 0x69, 0x6e, 0x5f, 0x69, 0x6e, 0x20, 0x69, 0x6e, 0x20, 0x5b, // tMtlMain_in in [ - 0x5b, 0x73, 0x74, 0x61, 0x67, 0x65, 0x5f, 0x69, 0x6e, 0x5d, 0x5d, 0x2c, 0x20, 0x63, 0x6f, 0x6e, // [stage_in]], con - 0x73, 0x74, 0x61, 0x6e, 0x74, 0x20, 0x5f, 0x47, 0x6c, 0x6f, 0x62, 0x61, 0x6c, 0x26, 0x20, 0x5f, // stant _Global& _ - 0x6d, 0x74, 0x6c, 0x5f, 0x75, 0x20, 0x5b, 0x5b, 0x62, 0x75, 0x66, 0x66, 0x65, 0x72, 0x28, 0x30, // mtl_u [[buffer(0 - 0x29, 0x5d, 0x5d, 0x29, 0x0a, 0x7b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x78, 0x6c, 0x61, 0x74, 0x4d, // )]]).{. xlatM - 0x74, 0x6c, 0x4d, 0x61, 0x69, 0x6e, 0x5f, 0x6f, 0x75, 0x74, 0x20, 0x6f, 0x75, 0x74, 0x20, 0x3d, // tlMain_out out = - 0x20, 0x7b, 0x7d, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x6f, 0x75, 0x74, 0x2e, 0x67, 0x6c, 0x5f, // {};. out.gl_ - 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x3d, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, // Position = _mtl_ - 0x75, 0x2e, 0x75, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x56, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, // u.u_modelViewPro - 0x6a, 0x20, 0x2a, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x34, 0x28, 0x69, 0x6e, 0x2e, 0x61, 0x5f, // j * float4(in.a_ - 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x2c, 0x20, 0x31, 0x2e, 0x30, 0x29, 0x3b, 0x0a, // position, 1.0);. - 0x20, 0x20, 0x20, 0x20, 0x6f, 0x75, 0x74, 0x2e, 0x5f, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x50, 0x6f, // out._entryPo - 0x69, 0x6e, 0x74, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x5f, 0x76, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, // intOutput_v_colo - 0x72, 0x30, 0x20, 0x3d, 0x20, 0x69, 0x6e, 0x2e, 0x61, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x30, // r0 = in.a_color0 - 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x6f, 0x75, 0x74, // ;. return out - 0x3b, 0x0a, 0x7d, 0x0a, 0x0a, 0x00, 0x02, 0x05, 0x00, 0x01, 0x00, 0x40, 0x00, // ;.}........@. -}; -extern const uint8_t* vs_debugdraw_lines_pssl; -extern const uint32_t vs_debugdraw_lines_pssl_size; diff --git a/Modules/Moonlight/Source/Graphics/Cubemap.cpp b/Modules/Moonlight/Source/Graphics/Cubemap.cpp index c8f84b7e..84461f4b 100644 --- a/Modules/Moonlight/Source/Graphics/Cubemap.cpp +++ b/Modules/Moonlight/Source/Graphics/Cubemap.cpp @@ -10,5 +10,4 @@ Cubemap::Cubemap( const Path& InFilePath ) Cubemap::~Cubemap() { - // TODO: Unload Cubemaps } \ No newline at end of file diff --git a/Modules/Moonlight/Source/Graphics/DynamicSky.cpp b/Modules/Moonlight/Source/Graphics/DynamicSky.cpp index bc207747..3f1efb5f 100644 --- a/Modules/Moonlight/Source/Graphics/DynamicSky.cpp +++ b/Modules/Moonlight/Source/Graphics/DynamicSky.cpp @@ -240,7 +240,7 @@ namespace Moonlight void SunController::CalculateSunOrbit() { - float day = 30.0f * m_month + 15.0f; + float day = 30.0f * static_cast( m_month ) + 15.0f; float lambda = 280.46f + 0.9856474f * day; lambda = bx::toRad( lambda ); m_delta = bx::asin( bx::sin( m_eclipticObliquity ) * bx::sin( lambda ) ); diff --git a/Modules/Moonlight/Source/Graphics/Material.cpp b/Modules/Moonlight/Source/Graphics/Material.cpp index d3dbbad4..932432c7 100644 --- a/Modules/Moonlight/Source/Graphics/Material.cpp +++ b/Modules/Moonlight/Source/Graphics/Material.cpp @@ -336,8 +336,9 @@ namespace Moonlight { if( const ImGuiPayload* payload = ImGui::AcceptDragDropPayload( AssetDescriptor::kDragAndDropPayload ) ) { - IM_ASSERT( payload->DataSize == sizeof( AssetDescriptor ) ); - AssetDescriptor& payload_n = *(AssetDescriptor*)payload->Data; + AssetDescriptor* _p = AssetDescriptor::GetDragged(); + if( !_p ) return; + AssetDescriptor& payload_n = *_p; if( payload_n.Type == AssetType::Texture ) { diff --git a/Modules/Moonlight/Source/Graphics/Material.h b/Modules/Moonlight/Source/Graphics/Material.h index eff3f3f5..f76bacbe 100644 --- a/Modules/Moonlight/Source/Graphics/Material.h +++ b/Modules/Moonlight/Source/Graphics/Material.h @@ -2,6 +2,7 @@ #include "Texture.h" #include #include +#include #include "Math/Vector3.h" #include "Math/Vector2.h" @@ -142,6 +143,7 @@ namespace Moonlight const Texture* GetTexture( const TextureType& type ) const; std::vector>& GetTextures(); RenderingMode RenderMode = RenderingMode::Opaque; + bool SupportsInstancing = false; Vector3 DiffuseColor; Vector2 Tiling; std::string ShaderName; @@ -166,6 +168,35 @@ namespace Moonlight std::string TypeName; public: virtual uint64_t GetRenderState( uint64_t state ) const; + + virtual uint64_t GetInstanceBatchKey() const + { + auto mix = []( uint64_t h, uint64_t v ) { + return ( h ^ ( v + 0x9e3779b97f4a7c15ULL + ( h << 6 ) + ( h >> 2 ) ) ); + }; + auto texId = [this]( const TextureType& type ) -> uint64_t { + const Texture* tex = GetTexture( type ); + return ( tex && bgfx::isValid( tex->TexHandle ) ) ? tex->TexHandle.idx : 0xFFFFu; + }; + auto floatBits = []( float f ) -> uint64_t { + uint32_t bits = 0u; + std::memcpy( &bits, &f, sizeof( bits ) ); + return bits; + }; + + uint64_t h = 1469598103934665603ULL; + h = mix( h, MeshShader.GetProgram().idx ); + h = mix( h, texId( TextureType::Diffuse ) ); + h = mix( h, texId( TextureType::Normal ) ); + h = mix( h, texId( TextureType::Opacity ) ); + h = mix( h, GetRenderState( 0 ) ); + h = mix( h, floatBits( DiffuseColor.x ) ); + h = mix( h, floatBits( DiffuseColor.y ) ); + h = mix( h, floatBits( DiffuseColor.z ) ); + h = mix( h, floatBits( Tiling.x ) ); + h = mix( h, floatBits( Tiling.y ) ); + return h; + } }; diff --git a/Modules/Moonlight/Source/Graphics/ModelResource.cpp b/Modules/Moonlight/Source/Graphics/ModelResource.cpp index 6d8cce35..965c765a 100644 --- a/Modules/Moonlight/Source/Graphics/ModelResource.cpp +++ b/Modules/Moonlight/Source/Graphics/ModelResource.cpp @@ -125,7 +125,7 @@ bool ModelResource::Load() Path newPath = Path( FilePath.FullPath ); ME_ASSERT_MSG( newPath.Exists, "Exported Model Doesn't Exist" ); - scene = importer.ReadFile( FilePath.FullPath.c_str(), aiProcess_Triangulate | aiProcess_CalcTangentSpace | aiProcess_GlobalScale | aiProcess_ConvertToLeftHanded ); + scene = importer.ReadFile( FilePath.FullPath.c_str(), aiProcess_Triangulate | aiProcess_CalcTangentSpace | aiProcess_ConvertToLeftHanded ); if( !scene || scene->mFlags & AI_SCENE_FLAGS_INCOMPLETE || !scene->mRootNode ) { std::cout << "ERROR::ASSIMP:: " << importer.GetErrorString() << std::endl; @@ -371,6 +371,7 @@ Moonlight::MeshData* ModelResource::ProcessMesh( aiMesh* mesh, Moonlight::Node& { // use AI_MATKEY_SHADING_MODEL to pick a different material? newMaterial = RootNode.MaterialCache[mesh->mMaterialIndex] = MakeShared(); + newMaterial->Init(); aiMaterial* material = scene->mMaterials[mesh->mMaterialIndex]; @@ -539,7 +540,7 @@ void ScaleSceneMeshes( const aiScene* scene, float scale ) void ModelResourceMetadata::Export() { Assimp::Importer importer; - const aiScene* scene = importer.ReadFile( FilePath.FullPath.c_str(), aiProcess_Triangulate | aiProcess_CalcTangentSpace | aiProcess_GlobalScale | aiProcess_ConvertToLeftHanded ); + const aiScene* scene = importer.ReadFile( FilePath.FullPath.c_str(), aiProcess_Triangulate | aiProcess_CalcTangentSpace | aiProcess_ConvertToLeftHanded ); if( !scene || scene->mFlags & AI_SCENE_FLAGS_INCOMPLETE || !scene->mRootNode ) { std::cout << "ERROR::ASSIMP:: " << importer.GetErrorString() << std::endl; diff --git a/Modules/Moonlight/Source/Graphics/ShaderFile.h b/Modules/Moonlight/Source/Graphics/ShaderFile.h index f96883eb..ab17c63a 100644 --- a/Modules/Moonlight/Source/Graphics/ShaderFile.h +++ b/Modules/Moonlight/Source/Graphics/ShaderFile.h @@ -127,6 +127,44 @@ struct ShaderFileMetadata //"\"/Users/mitchellandrews/Projects/stack-new/Engine/Tools/macOS/shaderc\" -f ../../Engine/Assets/Shaders/UI.vert -o ../../Engine/Assets/Shaders/UI.vert.metal.bin --varyingdef ../../Engine/Assets/Shaders/UI.var --platform osx -p metal --depends -disasm --type vertex" // texturec -f $in -o $out -t bc2 -m system( progArgs.c_str() ); +#elif USING( ME_PLATFORM_LINUX ) + Path shadercPath = Path( "Engine/Tools/linux/shaderc" ); + + std::string exportType; + std::string ext = FilePath.GetExtension(); + if( ext == "frag" ) + { + exportType = "fragment"; + } + else if( ext == "vert" ) + { + exportType = "vertex"; + } + + std::string fileName = FilePath.GetLocalPathString().substr( + FilePath.GetLocalPathString().rfind( "/" ) + 1 + ); + std::string localFolder = FilePath.GetLocalPathString().substr( + 0, + FilePath.GetLocalPathString().rfind( "/" ) + 1 + ); + + std::string nameNoExt = fileName.substr( 0, fileName.rfind( "." ) ); + + const std::string platformStr = Moonlight::GetPlatformString(); + const std::string shaderProfile = ( platformStr == "spirv" ) ? "spirv" : "150"; + + std::string progArgs; + progArgs = "\"" + shadercPath.FullPath + "\""; + progArgs += " -f " + shadercPath.GetDirectoryString() + "/../../../" + localFolder + fileName; + progArgs += " -o " + shadercPath.GetDirectoryString() + "/../../../" + localFolder + fileName + "." + GetExtension2(); + progArgs += " --varyingdef " + shadercPath.GetDirectoryString() + "/../../../" + localFolder + nameNoExt + ".var"; + progArgs += " --platform linux -p " + shaderProfile; + progArgs += " --depends --type " + exportType; + progArgs += " -i \"" + Path( "Engine/Assets/Shaders" ).FullPath + "\""; + + BRUH( progArgs ); + system( progArgs.c_str() ); #endif } #if USING( ME_EDITOR ) diff --git a/Modules/Moonlight/Source/Graphics/SkyBox.cpp b/Modules/Moonlight/Source/Graphics/SkyBox.cpp index b5dc614d..29437c8b 100644 --- a/Modules/Moonlight/Source/Graphics/SkyBox.cpp +++ b/Modules/Moonlight/Source/Graphics/SkyBox.cpp @@ -16,6 +16,7 @@ namespace Moonlight SkyMap = ResourceCache::GetInstance().Get( SystemPath ); SkyModel = ResourceCache::GetInstance().Get( Path( "Assets/Skybox/Skybox.fbx" ) ); SkyMaterial = MakeShared(); + SkyMaterial->Init(); SkyMaterial->SetTexture( TextureType::Diffuse, SkyMap ); } diff --git a/Modules/Moonlight/Source/Graphics/Texture.cpp b/Modules/Moonlight/Source/Graphics/Texture.cpp index b585141d..8ce50e9b 100644 --- a/Modules/Moonlight/Source/Graphics/Texture.cpp +++ b/Modules/Moonlight/Source/Graphics/Texture.cpp @@ -11,20 +11,6 @@ #include #include -static void imageReleaseCb( void* _ptr, void* _userData ) -{ - BX_UNUSED( _ptr ); - bimg::ImageContainer* imageContainer = (bimg::ImageContainer*)_userData; - bimg::imageFree( imageContainer ); -} - -void unload( bx::AllocatorI* _allocator, void* _ptr ) -{ - if( _ptr ) - { - bx::free(_allocator, _ptr); - } -} namespace Moonlight { @@ -43,7 +29,6 @@ namespace Moonlight Texture::~Texture() { - // TODO: Unload textures if( bgfx::isValid( TexHandle ) ) { bgfx::destroy( TexHandle ); @@ -439,15 +424,25 @@ void TextureResourceMetadata::Export() // ./shaderc -f ../../../Assets/Shaders/vs_cubes.shader -o ../../../Assets/Shaders/dummy.bin --varyingdef ./varying.def.sc --platform windows -p vs_5_0 --type vertex CLog::GetInstance().Log( CLog::LogType::Info, progArgs ); PlatformUtils::SystemCall( texturecPath, progArgs ); -#else +#elif USING( ME_PLATFORM_MACOS ) + + Path texturecPath = Path( "Engine/Tools/macOS/texturec" ); + + std::string progArgs = "-f \""; + progArgs += FilePath.FullPath; + progArgs += "\" -o \"" + FilePath.FullPath + ".dds\"" + exportType; + CLog::GetInstance().Log( CLog::LogType::Info, progArgs ); + PlatformUtils::SystemCall( texturecPath, progArgs ); - Path optickPath = Path( "Engine/Tools/macOS/texturec" ); +#elif USING( ME_PLATFORM_LINUX ) - // texturec -f $in -o $out -t bc2 -m - std::string progArgs = "\"" + optickPath.FullPath + "\" -f "+optickPath.GetDirectoryString()+"/../../../"; - progArgs += FilePath.GetLocalPathString(); - progArgs += " -o \""+optickPath.GetDirectoryString()+"/../../../" + FilePath.GetLocalPathString() + ".dds\"" + exportType; - system( progArgs.c_str() ); + Path texturecPath = Path( "Engine/Tools/linux/texturec" ); + + std::string progArgs = "-f \""; + progArgs += FilePath.FullPath; + progArgs += "\" -o \"" + FilePath.FullPath + ".dds\"" + exportType; + CLog::GetInstance().Log( CLog::LogType::Info, progArgs ); + PlatformUtils::SystemCall( texturecPath, progArgs ); #endif } diff --git a/Modules/Moonlight/Source/ImGui/ImGuiRenderer.cpp b/Modules/Moonlight/Source/ImGui/ImGuiRenderer.cpp index 3e2772db..53fe32d3 100644 --- a/Modules/Moonlight/Source/ImGui/ImGuiRenderer.cpp +++ b/Modules/Moonlight/Source/ImGui/ImGuiRenderer.cpp @@ -31,10 +31,14 @@ static const bgfx::EmbeddedShader s_embeddedShaders[] = void ImGuiRenderer::Create() { + OPTICK_EVENT( "ImGuiRenderer::Create" ); ViewId = 255; IMGUI_CHECKVERSION(); - Context = ImGui::CreateContext(); + { + OPTICK_EVENT( "ImGui::CreateContext" ); + Context = ImGui::CreateContext(); + } ImGuiIO& io = ImGui::GetIO(); @@ -67,7 +71,10 @@ void ImGuiRenderer::Create() uint8_t* data; int32_t width; int32_t height; - io.Fonts->GetTexDataAsRGBA32( &data, &width, &height ); + { + OPTICK_EVENT( "ImGui::FontAtlasBuild" ); + io.Fonts->GetTexDataAsRGBA32( &data, &width, &height ); + } mTexture = bgfx::createTexture2D( (uint16_t)width diff --git a/Modules/Moonlight/Source/ImGui/Resources/fs_imgui_image.bin.hpp b/Modules/Moonlight/Source/ImGui/Resources/fs_imgui_image.bin.hpp index bd579e32..a3b256e3 100644 --- a/Modules/Moonlight/Source/ImGui/Resources/fs_imgui_image.bin.hpp +++ b/Modules/Moonlight/Source/ImGui/Resources/fs_imgui_image.bin.hpp @@ -1,261 +1,446 @@ static const uint8_t fs_imgui_image_glsl[352] = { - 0x46, 0x53, 0x48, 0x0b, 0x6f, 0x1e, 0x3e, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x11, 0x75, // FSH.o.><.......u - 0x5f, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x4c, 0x6f, 0x64, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, // _imageLodEnabled - 0x02, 0x01, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0a, 0x73, 0x5f, 0x74, 0x65, 0x78, // ...........s_tex - 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x00, 0x01, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1c, // Color........... - 0x01, 0x00, 0x00, 0x76, 0x61, 0x72, 0x79, 0x69, 0x6e, 0x67, 0x20, 0x76, 0x65, 0x63, 0x32, 0x20, // ...varying vec2 - 0x76, 0x5f, 0x74, 0x65, 0x78, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x30, 0x3b, 0x0a, 0x75, 0x6e, 0x69, // v_texcoord0;.uni - 0x66, 0x6f, 0x72, 0x6d, 0x20, 0x76, 0x65, 0x63, 0x34, 0x20, 0x75, 0x5f, 0x69, 0x6d, 0x61, 0x67, // form vec4 u_imag - 0x65, 0x4c, 0x6f, 0x64, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x3b, 0x0a, 0x75, 0x6e, 0x69, // eLodEnabled;.uni - 0x66, 0x6f, 0x72, 0x6d, 0x20, 0x73, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x72, 0x32, 0x44, 0x20, 0x73, // form sampler2D s - 0x5f, 0x74, 0x65, 0x78, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x3b, 0x0a, 0x76, 0x6f, 0x69, 0x64, 0x20, // _texColor;.void - 0x6d, 0x61, 0x69, 0x6e, 0x20, 0x28, 0x29, 0x0a, 0x7b, 0x0a, 0x20, 0x20, 0x76, 0x65, 0x63, 0x34, // main ().{. vec4 - 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x31, 0x3b, 0x0a, 0x20, 0x20, 0x74, 0x6d, 0x70, // tmpvar_1;. tmp - 0x76, 0x61, 0x72, 0x5f, 0x31, 0x2e, 0x78, 0x79, 0x7a, 0x20, 0x3d, 0x20, 0x74, 0x65, 0x78, 0x74, // var_1.xyz = text - 0x75, 0x72, 0x65, 0x32, 0x44, 0x4c, 0x6f, 0x64, 0x20, 0x28, 0x73, 0x5f, 0x74, 0x65, 0x78, 0x43, // ure2DLod (s_texC - 0x6f, 0x6c, 0x6f, 0x72, 0x2c, 0x20, 0x76, 0x5f, 0x74, 0x65, 0x78, 0x63, 0x6f, 0x6f, 0x72, 0x64, // olor, v_texcoord - 0x30, 0x2c, 0x20, 0x75, 0x5f, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x4c, 0x6f, 0x64, 0x45, 0x6e, 0x61, // 0, u_imageLodEna - 0x62, 0x6c, 0x65, 0x64, 0x2e, 0x78, 0x29, 0x2e, 0x78, 0x79, 0x7a, 0x3b, 0x0a, 0x20, 0x20, 0x74, // bled.x).xyz;. t - 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x31, 0x2e, 0x77, 0x20, 0x3d, 0x20, 0x28, 0x30, 0x2e, 0x32, // mpvar_1.w = (0.2 - 0x20, 0x2b, 0x20, 0x28, 0x30, 0x2e, 0x38, 0x20, 0x2a, 0x20, 0x75, 0x5f, 0x69, 0x6d, 0x61, 0x67, // + (0.8 * u_imag - 0x65, 0x4c, 0x6f, 0x64, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x2e, 0x79, 0x29, 0x29, 0x3b, // eLodEnabled.y)); - 0x0a, 0x20, 0x20, 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x20, // . gl_FragColor - 0x3d, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x31, 0x3b, 0x0a, 0x7d, 0x0a, 0x0a, 0x00, // = tmpvar_1;.}... + 0x46, 0x53, 0x48, 0x0b, 0x6f, 0x1e, 0x3e, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x11, 0x75, // FSH.o.><.......u + 0x5f, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x4c, 0x6f, 0x64, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, // _imageLodEnabled + 0x02, 0x01, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0a, 0x73, 0x5f, 0x74, 0x65, 0x78, // ...........s_tex + 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x00, 0x01, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1c, // Color........... + 0x01, 0x00, 0x00, 0x76, 0x61, 0x72, 0x79, 0x69, 0x6e, 0x67, 0x20, 0x76, 0x65, 0x63, 0x32, 0x20, // ...varying vec2 + 0x76, 0x5f, 0x74, 0x65, 0x78, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x30, 0x3b, 0x0a, 0x75, 0x6e, 0x69, // v_texcoord0;.uni + 0x66, 0x6f, 0x72, 0x6d, 0x20, 0x76, 0x65, 0x63, 0x34, 0x20, 0x75, 0x5f, 0x69, 0x6d, 0x61, 0x67, // form vec4 u_imag + 0x65, 0x4c, 0x6f, 0x64, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x3b, 0x0a, 0x75, 0x6e, 0x69, // eLodEnabled;.uni + 0x66, 0x6f, 0x72, 0x6d, 0x20, 0x73, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x72, 0x32, 0x44, 0x20, 0x73, // form sampler2D s + 0x5f, 0x74, 0x65, 0x78, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x3b, 0x0a, 0x76, 0x6f, 0x69, 0x64, 0x20, // _texColor;.void + 0x6d, 0x61, 0x69, 0x6e, 0x20, 0x28, 0x29, 0x0a, 0x7b, 0x0a, 0x20, 0x20, 0x76, 0x65, 0x63, 0x34, // main ().{. vec4 + 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x31, 0x3b, 0x0a, 0x20, 0x20, 0x74, 0x6d, 0x70, // tmpvar_1;. tmp + 0x76, 0x61, 0x72, 0x5f, 0x31, 0x2e, 0x78, 0x79, 0x7a, 0x20, 0x3d, 0x20, 0x74, 0x65, 0x78, 0x74, // var_1.xyz = text + 0x75, 0x72, 0x65, 0x32, 0x44, 0x4c, 0x6f, 0x64, 0x20, 0x28, 0x73, 0x5f, 0x74, 0x65, 0x78, 0x43, // ure2DLod (s_texC + 0x6f, 0x6c, 0x6f, 0x72, 0x2c, 0x20, 0x76, 0x5f, 0x74, 0x65, 0x78, 0x63, 0x6f, 0x6f, 0x72, 0x64, // olor, v_texcoord + 0x30, 0x2c, 0x20, 0x75, 0x5f, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x4c, 0x6f, 0x64, 0x45, 0x6e, 0x61, // 0, u_imageLodEna + 0x62, 0x6c, 0x65, 0x64, 0x2e, 0x78, 0x29, 0x2e, 0x78, 0x79, 0x7a, 0x3b, 0x0a, 0x20, 0x20, 0x74, // bled.x).xyz;. t + 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x31, 0x2e, 0x77, 0x20, 0x3d, 0x20, 0x28, 0x30, 0x2e, 0x32, // mpvar_1.w = (0.2 + 0x20, 0x2b, 0x20, 0x28, 0x30, 0x2e, 0x38, 0x20, 0x2a, 0x20, 0x75, 0x5f, 0x69, 0x6d, 0x61, 0x67, // + (0.8 * u_imag + 0x65, 0x4c, 0x6f, 0x64, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x2e, 0x79, 0x29, 0x29, 0x3b, // eLodEnabled.y)); + 0x0a, 0x20, 0x20, 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x20, // . gl_FragColor + 0x3d, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x31, 0x3b, 0x0a, 0x7d, 0x0a, 0x0a, 0x00, // = tmpvar_1;.}... }; static const uint8_t fs_imgui_image_essl[372] = { - 0x46, 0x53, 0x48, 0x0b, 0x6f, 0x1e, 0x3e, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x11, 0x75, // FSH.o.><.......u - 0x5f, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x4c, 0x6f, 0x64, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, // _imageLodEnabled - 0x02, 0x01, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0a, 0x73, 0x5f, 0x74, 0x65, 0x78, // ...........s_tex - 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x00, 0x01, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, // Color..........0 - 0x01, 0x00, 0x00, 0x76, 0x61, 0x72, 0x79, 0x69, 0x6e, 0x67, 0x20, 0x68, 0x69, 0x67, 0x68, 0x70, // ...varying highp - 0x20, 0x76, 0x65, 0x63, 0x32, 0x20, 0x76, 0x5f, 0x74, 0x65, 0x78, 0x63, 0x6f, 0x6f, 0x72, 0x64, // vec2 v_texcoord - 0x30, 0x3b, 0x0a, 0x75, 0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, 0x20, 0x68, 0x69, 0x67, 0x68, 0x70, // 0;.uniform highp - 0x20, 0x76, 0x65, 0x63, 0x34, 0x20, 0x75, 0x5f, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x4c, 0x6f, 0x64, // vec4 u_imageLod - 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x3b, 0x0a, 0x75, 0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, // Enabled;.uniform - 0x20, 0x73, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x72, 0x32, 0x44, 0x20, 0x73, 0x5f, 0x74, 0x65, 0x78, // sampler2D s_tex - 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x3b, 0x0a, 0x76, 0x6f, 0x69, 0x64, 0x20, 0x6d, 0x61, 0x69, 0x6e, // Color;.void main - 0x20, 0x28, 0x29, 0x0a, 0x7b, 0x0a, 0x20, 0x20, 0x6c, 0x6f, 0x77, 0x70, 0x20, 0x76, 0x65, 0x63, // ().{. lowp vec - 0x34, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x31, 0x3b, 0x0a, 0x20, 0x20, 0x74, 0x6d, // 4 tmpvar_1;. tm - 0x70, 0x76, 0x61, 0x72, 0x5f, 0x31, 0x2e, 0x78, 0x79, 0x7a, 0x20, 0x3d, 0x20, 0x74, 0x65, 0x78, // pvar_1.xyz = tex - 0x74, 0x75, 0x72, 0x65, 0x32, 0x44, 0x4c, 0x6f, 0x64, 0x20, 0x20, 0x20, 0x20, 0x28, 0x73, 0x5f, // ture2DLod (s_ - 0x74, 0x65, 0x78, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x2c, 0x20, 0x76, 0x5f, 0x74, 0x65, 0x78, 0x63, // texColor, v_texc - 0x6f, 0x6f, 0x72, 0x64, 0x30, 0x2c, 0x20, 0x75, 0x5f, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x4c, 0x6f, // oord0, u_imageLo - 0x64, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x2e, 0x78, 0x29, 0x2e, 0x78, 0x79, 0x7a, 0x3b, // dEnabled.x).xyz; - 0x0a, 0x20, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x31, 0x2e, 0x77, 0x20, 0x3d, 0x20, // . tmpvar_1.w = - 0x28, 0x30, 0x2e, 0x32, 0x20, 0x2b, 0x20, 0x28, 0x30, 0x2e, 0x38, 0x20, 0x2a, 0x20, 0x75, 0x5f, // (0.2 + (0.8 * u_ - 0x69, 0x6d, 0x61, 0x67, 0x65, 0x4c, 0x6f, 0x64, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x2e, // imageLodEnabled. - 0x79, 0x29, 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, 0x43, 0x6f, // y));. gl_FragCo - 0x6c, 0x6f, 0x72, 0x20, 0x3d, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x31, 0x3b, 0x0a, // lor = tmpvar_1;. - 0x7d, 0x0a, 0x0a, 0x00, // }... + 0x46, 0x53, 0x48, 0x0b, 0x6f, 0x1e, 0x3e, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x11, 0x75, // FSH.o.><.......u + 0x5f, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x4c, 0x6f, 0x64, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, // _imageLodEnabled + 0x02, 0x01, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0a, 0x73, 0x5f, 0x74, 0x65, 0x78, // ...........s_tex + 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x00, 0x01, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, // Color..........0 + 0x01, 0x00, 0x00, 0x76, 0x61, 0x72, 0x79, 0x69, 0x6e, 0x67, 0x20, 0x68, 0x69, 0x67, 0x68, 0x70, // ...varying highp + 0x20, 0x76, 0x65, 0x63, 0x32, 0x20, 0x76, 0x5f, 0x74, 0x65, 0x78, 0x63, 0x6f, 0x6f, 0x72, 0x64, // vec2 v_texcoord + 0x30, 0x3b, 0x0a, 0x75, 0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, 0x20, 0x68, 0x69, 0x67, 0x68, 0x70, // 0;.uniform highp + 0x20, 0x76, 0x65, 0x63, 0x34, 0x20, 0x75, 0x5f, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x4c, 0x6f, 0x64, // vec4 u_imageLod + 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x3b, 0x0a, 0x75, 0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, // Enabled;.uniform + 0x20, 0x73, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x72, 0x32, 0x44, 0x20, 0x73, 0x5f, 0x74, 0x65, 0x78, // sampler2D s_tex + 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x3b, 0x0a, 0x76, 0x6f, 0x69, 0x64, 0x20, 0x6d, 0x61, 0x69, 0x6e, // Color;.void main + 0x20, 0x28, 0x29, 0x0a, 0x7b, 0x0a, 0x20, 0x20, 0x6c, 0x6f, 0x77, 0x70, 0x20, 0x76, 0x65, 0x63, // ().{. lowp vec + 0x34, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x31, 0x3b, 0x0a, 0x20, 0x20, 0x74, 0x6d, // 4 tmpvar_1;. tm + 0x70, 0x76, 0x61, 0x72, 0x5f, 0x31, 0x2e, 0x78, 0x79, 0x7a, 0x20, 0x3d, 0x20, 0x74, 0x65, 0x78, // pvar_1.xyz = tex + 0x74, 0x75, 0x72, 0x65, 0x32, 0x44, 0x4c, 0x6f, 0x64, 0x20, 0x20, 0x20, 0x20, 0x28, 0x73, 0x5f, // ture2DLod (s_ + 0x74, 0x65, 0x78, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x2c, 0x20, 0x76, 0x5f, 0x74, 0x65, 0x78, 0x63, // texColor, v_texc + 0x6f, 0x6f, 0x72, 0x64, 0x30, 0x2c, 0x20, 0x75, 0x5f, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x4c, 0x6f, // oord0, u_imageLo + 0x64, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x2e, 0x78, 0x29, 0x2e, 0x78, 0x79, 0x7a, 0x3b, // dEnabled.x).xyz; + 0x0a, 0x20, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x31, 0x2e, 0x77, 0x20, 0x3d, 0x20, // . tmpvar_1.w = + 0x28, 0x30, 0x2e, 0x32, 0x20, 0x2b, 0x20, 0x28, 0x30, 0x2e, 0x38, 0x20, 0x2a, 0x20, 0x75, 0x5f, // (0.2 + (0.8 * u_ + 0x69, 0x6d, 0x61, 0x67, 0x65, 0x4c, 0x6f, 0x64, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x2e, // imageLodEnabled. + 0x79, 0x29, 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, 0x43, 0x6f, // y));. gl_FragCo + 0x6c, 0x6f, 0x72, 0x20, 0x3d, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x31, 0x3b, 0x0a, // lor = tmpvar_1;. + 0x7d, 0x0a, 0x0a, 0x00, // }... }; -static const uint8_t fs_imgui_image_spv[1379] = +static const uint8_t fs_imgui_image_spv[1303] = { - 0x46, 0x53, 0x48, 0x0b, 0x6f, 0x1e, 0x3e, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x11, 0x75, // FSH.o.><.......u - 0x5f, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x4c, 0x6f, 0x64, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, // _imageLodEnabled - 0x12, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0xfd, 0x7f, 0x0a, 0x73, 0x5f, 0x74, 0x65, 0x78, // ...........s_tex - 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x02, 0x1a, 0x00, 0x1c, // Color0.......... - 0x05, 0x00, 0x00, 0x03, 0x02, 0x23, 0x07, 0x00, 0x00, 0x01, 0x00, 0x0a, 0x00, 0x08, 0x00, 0xb3, // .....#.......... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x11, 0x00, 0x02, 0x00, 0x01, 0x00, 0x00, 0x00, 0x0b, // ................ - 0x00, 0x06, 0x00, 0x01, 0x00, 0x00, 0x00, 0x47, 0x4c, 0x53, 0x4c, 0x2e, 0x73, 0x74, 0x64, 0x2e, // .......GLSL.std. - 0x34, 0x35, 0x30, 0x00, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, // 450............. - 0x00, 0x00, 0x00, 0x0f, 0x00, 0x08, 0x00, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x6d, // ...............m - 0x61, 0x69, 0x6e, 0x00, 0x00, 0x00, 0x00, 0x66, 0x00, 0x00, 0x00, 0x6a, 0x00, 0x00, 0x00, 0x75, // ain....f...j...u - 0x00, 0x00, 0x00, 0x10, 0x00, 0x03, 0x00, 0x04, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x03, // ................ - 0x00, 0x03, 0x00, 0x05, 0x00, 0x00, 0x00, 0xf4, 0x01, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0x04, // ................ - 0x00, 0x00, 0x00, 0x6d, 0x61, 0x69, 0x6e, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x07, 0x00, 0x23, // ...main........# - 0x00, 0x00, 0x00, 0x73, 0x5f, 0x74, 0x65, 0x78, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x53, 0x61, 0x6d, // ...s_texColorSam - 0x70, 0x6c, 0x65, 0x72, 0x00, 0x00, 0x00, 0x05, 0x00, 0x07, 0x00, 0x26, 0x00, 0x00, 0x00, 0x73, // pler.......&...s - 0x5f, 0x74, 0x65, 0x78, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x54, 0x65, 0x78, 0x74, 0x75, 0x72, 0x65, // _texColorTexture - 0x00, 0x00, 0x00, 0x05, 0x00, 0x06, 0x00, 0x47, 0x00, 0x00, 0x00, 0x55, 0x6e, 0x69, 0x66, 0x6f, // .......G...Unifo - 0x72, 0x6d, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x08, 0x00, 0x47, // rmBlock........G - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x4c, 0x6f, // .......u_imageLo - 0x64, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x00, 0x00, 0x00, 0x05, 0x00, 0x03, 0x00, 0x49, // dEnabled.......I - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x06, 0x00, 0x66, 0x00, 0x00, 0x00, 0x67, // ...........f...g - 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, 0x43, 0x6f, 0x6f, 0x72, 0x64, 0x00, 0x00, 0x00, 0x00, 0x05, // l_FragCoord..... - 0x00, 0x05, 0x00, 0x6a, 0x00, 0x00, 0x00, 0x76, 0x5f, 0x74, 0x65, 0x78, 0x63, 0x6f, 0x6f, 0x72, // ...j...v_texcoor - 0x64, 0x30, 0x00, 0x05, 0x00, 0x06, 0x00, 0x75, 0x00, 0x00, 0x00, 0x62, 0x67, 0x66, 0x78, 0x5f, // d0.....u...bgfx_ - 0x46, 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, 0x61, 0x30, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0x23, // FragData0..G...# - 0x00, 0x00, 0x00, 0x22, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0x23, // ...".......G...# - 0x00, 0x00, 0x00, 0x21, 0x00, 0x00, 0x00, 0x12, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0x26, // ...!.......G...& - 0x00, 0x00, 0x00, 0x22, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0x26, // ...".......G...& - 0x00, 0x00, 0x00, 0x21, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x47, // ...!.......H...G - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, // .......#.......G - 0x00, 0x03, 0x00, 0x47, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0x49, // ...G.......G...I - 0x00, 0x00, 0x00, 0x22, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0x49, // ...".......G...I - 0x00, 0x00, 0x00, 0x21, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0x66, // ...!.......G...f - 0x00, 0x00, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0x6a, // ...........G...j - 0x00, 0x00, 0x00, 0x1e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0x75, // ...........G...u - 0x00, 0x00, 0x00, 0x1e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x13, 0x00, 0x02, 0x00, 0x02, // ................ - 0x00, 0x00, 0x00, 0x21, 0x00, 0x03, 0x00, 0x03, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x1a, // ...!............ - 0x00, 0x02, 0x00, 0x06, 0x00, 0x00, 0x00, 0x16, 0x00, 0x03, 0x00, 0x07, 0x00, 0x00, 0x00, 0x20, // ............... - 0x00, 0x00, 0x00, 0x19, 0x00, 0x09, 0x00, 0x08, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x01, // ................ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, // ................ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x17, 0x00, 0x04, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x07, // ................ - 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x17, 0x00, 0x04, 0x00, 0x0e, 0x00, 0x00, 0x00, 0x07, // ................ - 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x22, 0x00, 0x00, 0x00, 0x00, // ....... ...".... - 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x22, 0x00, 0x00, 0x00, 0x23, // .......;..."...# - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x25, 0x00, 0x00, 0x00, 0x00, // ....... ...%.... - 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x25, 0x00, 0x00, 0x00, 0x26, // .......;...%...& - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x15, 0x00, 0x04, 0x00, 0x29, 0x00, 0x00, 0x00, 0x20, // ...........)... - 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, 0x29, 0x00, 0x00, 0x00, 0x2e, // .......+...).... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1b, 0x00, 0x03, 0x00, 0x32, 0x00, 0x00, 0x00, 0x08, // ...........2.... - 0x00, 0x00, 0x00, 0x1e, 0x00, 0x03, 0x00, 0x47, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00, 0x20, // .......G....... - 0x00, 0x04, 0x00, 0x48, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x47, 0x00, 0x00, 0x00, 0x3b, // ...H.......G...; - 0x00, 0x04, 0x00, 0x48, 0x00, 0x00, 0x00, 0x49, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x15, // ...H...I........ - 0x00, 0x04, 0x00, 0x4f, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2b, // ...O... .......+ - 0x00, 0x04, 0x00, 0x4f, 0x00, 0x00, 0x00, 0x50, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, // ...O...P....... - 0x00, 0x04, 0x00, 0x51, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x2b, // ...Q...........+ - 0x00, 0x04, 0x00, 0x07, 0x00, 0x00, 0x00, 0x57, 0x00, 0x00, 0x00, 0xcd, 0xcc, 0x4c, 0x3e, 0x2b, // .......W.....L>+ - 0x00, 0x04, 0x00, 0x07, 0x00, 0x00, 0x00, 0x58, 0x00, 0x00, 0x00, 0xcd, 0xcc, 0x4c, 0x3f, 0x2b, // .......X.....L?+ - 0x00, 0x04, 0x00, 0x4f, 0x00, 0x00, 0x00, 0x59, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x20, // ...O...Y....... - 0x00, 0x04, 0x00, 0x65, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00, 0x3b, // ...e...........; - 0x00, 0x04, 0x00, 0x65, 0x00, 0x00, 0x00, 0x66, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x20, // ...e...f....... - 0x00, 0x04, 0x00, 0x69, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x3b, // ...i...........; - 0x00, 0x04, 0x00, 0x69, 0x00, 0x00, 0x00, 0x6a, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x20, // ...i...j....... - 0x00, 0x04, 0x00, 0x74, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00, 0x3b, // ...t...........; - 0x00, 0x04, 0x00, 0x74, 0x00, 0x00, 0x00, 0x75, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x36, // ...t...u.......6 - 0x00, 0x05, 0x00, 0x02, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, // ................ - 0x00, 0x00, 0x00, 0xf8, 0x00, 0x02, 0x00, 0x05, 0x00, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x06, // ...........=.... - 0x00, 0x00, 0x00, 0x24, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x08, // ...$...#...=.... - 0x00, 0x00, 0x00, 0x27, 0x00, 0x00, 0x00, 0x26, 0x00, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x0b, // ...'...&...=.... - 0x00, 0x00, 0x00, 0x6b, 0x00, 0x00, 0x00, 0x6a, 0x00, 0x00, 0x00, 0x41, 0x00, 0x06, 0x00, 0x51, // ...k...j...A...Q - 0x00, 0x00, 0x00, 0x94, 0x00, 0x00, 0x00, 0x49, 0x00, 0x00, 0x00, 0x2e, 0x00, 0x00, 0x00, 0x50, // .......I.......P - 0x00, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x07, 0x00, 0x00, 0x00, 0x95, 0x00, 0x00, 0x00, 0x94, // ...=............ - 0x00, 0x00, 0x00, 0x56, 0x00, 0x05, 0x00, 0x32, 0x00, 0x00, 0x00, 0xaf, 0x00, 0x00, 0x00, 0x27, // ...V...2.......' - 0x00, 0x00, 0x00, 0x24, 0x00, 0x00, 0x00, 0x58, 0x00, 0x07, 0x00, 0x0e, 0x00, 0x00, 0x00, 0xb2, // ...$...X........ - 0x00, 0x00, 0x00, 0xaf, 0x00, 0x00, 0x00, 0x6b, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x95, // .......k........ - 0x00, 0x00, 0x00, 0x41, 0x00, 0x06, 0x00, 0x51, 0x00, 0x00, 0x00, 0x98, 0x00, 0x00, 0x00, 0x49, // ...A...Q.......I - 0x00, 0x00, 0x00, 0x2e, 0x00, 0x00, 0x00, 0x59, 0x00, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x07, // .......Y...=.... - 0x00, 0x00, 0x00, 0x99, 0x00, 0x00, 0x00, 0x98, 0x00, 0x00, 0x00, 0x85, 0x00, 0x05, 0x00, 0x07, // ................ - 0x00, 0x00, 0x00, 0x9a, 0x00, 0x00, 0x00, 0x58, 0x00, 0x00, 0x00, 0x99, 0x00, 0x00, 0x00, 0x81, // .......X........ - 0x00, 0x05, 0x00, 0x07, 0x00, 0x00, 0x00, 0x9b, 0x00, 0x00, 0x00, 0x57, 0x00, 0x00, 0x00, 0x9a, // ...........W.... - 0x00, 0x00, 0x00, 0x51, 0x00, 0x05, 0x00, 0x07, 0x00, 0x00, 0x00, 0x9e, 0x00, 0x00, 0x00, 0xb2, // ...Q............ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x51, 0x00, 0x05, 0x00, 0x07, 0x00, 0x00, 0x00, 0x9f, // .......Q........ - 0x00, 0x00, 0x00, 0xb2, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x51, 0x00, 0x05, 0x00, 0x07, // ...........Q.... - 0x00, 0x00, 0x00, 0xa0, 0x00, 0x00, 0x00, 0xb2, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x50, // ...............P - 0x00, 0x07, 0x00, 0x0e, 0x00, 0x00, 0x00, 0xa1, 0x00, 0x00, 0x00, 0x9e, 0x00, 0x00, 0x00, 0x9f, // ................ - 0x00, 0x00, 0x00, 0xa0, 0x00, 0x00, 0x00, 0x9b, 0x00, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0x75, // ...........>...u - 0x00, 0x00, 0x00, 0xa1, 0x00, 0x00, 0x00, 0xfd, 0x00, 0x01, 0x00, 0x38, 0x00, 0x01, 0x00, 0x00, // ...........8.... - 0x00, 0x10, 0x00, // ... + 0x46, 0x53, 0x48, 0x0b, 0x6f, 0x1e, 0x3e, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x11, 0x75, // FSH.o.><.......u + 0x5f, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x4c, 0x6f, 0x64, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, // _imageLodEnabled + 0x12, 0x01, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0a, 0x73, 0x5f, 0x74, 0x65, 0x78, // ...........s_tex + 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x02, 0x26, 0x00, 0xd0, // Color0.......&.. + 0x04, 0x00, 0x00, 0x03, 0x02, 0x23, 0x07, 0x00, 0x00, 0x01, 0x00, 0x0b, 0x00, 0x08, 0x00, 0xad, // .....#.......... + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x11, 0x00, 0x02, 0x00, 0x01, 0x00, 0x00, 0x00, 0x0b, // ................ + 0x00, 0x06, 0x00, 0x01, 0x00, 0x00, 0x00, 0x47, 0x4c, 0x53, 0x4c, 0x2e, 0x73, 0x74, 0x64, 0x2e, // .......GLSL.std. + 0x34, 0x35, 0x30, 0x00, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, // 450............. + 0x00, 0x00, 0x00, 0x0f, 0x00, 0x07, 0x00, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x6d, // ...............m + 0x61, 0x69, 0x6e, 0x00, 0x00, 0x00, 0x00, 0x67, 0x00, 0x00, 0x00, 0x72, 0x00, 0x00, 0x00, 0x10, // ain....g...r.... + 0x00, 0x03, 0x00, 0x04, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x03, 0x00, 0x03, 0x00, 0x05, // ................ + 0x00, 0x00, 0x00, 0xf4, 0x01, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0x04, 0x00, 0x00, 0x00, 0x6d, // ...............m + 0x61, 0x69, 0x6e, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x07, 0x00, 0x23, 0x00, 0x00, 0x00, 0x73, // ain........#...s + 0x5f, 0x74, 0x65, 0x78, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x53, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x72, // _texColorSampler + 0x00, 0x00, 0x00, 0x05, 0x00, 0x07, 0x00, 0x26, 0x00, 0x00, 0x00, 0x73, 0x5f, 0x74, 0x65, 0x78, // .......&...s_tex + 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x54, 0x65, 0x78, 0x74, 0x75, 0x72, 0x65, 0x00, 0x00, 0x00, 0x05, // ColorTexture.... + 0x00, 0x06, 0x00, 0x44, 0x00, 0x00, 0x00, 0x55, 0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, 0x42, 0x6c, // ...D...UniformBl + 0x6f, 0x63, 0x6b, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x08, 0x00, 0x44, 0x00, 0x00, 0x00, 0x00, // ock........D.... + 0x00, 0x00, 0x00, 0x75, 0x5f, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x4c, 0x6f, 0x64, 0x45, 0x6e, 0x61, // ...u_imageLodEna + 0x62, 0x6c, 0x65, 0x64, 0x00, 0x00, 0x00, 0x05, 0x00, 0x03, 0x00, 0x46, 0x00, 0x00, 0x00, 0x00, // bled.......F.... + 0x00, 0x00, 0x00, 0x05, 0x00, 0x05, 0x00, 0x67, 0x00, 0x00, 0x00, 0x76, 0x5f, 0x74, 0x65, 0x78, // .......g...v_tex + 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x30, 0x00, 0x05, 0x00, 0x06, 0x00, 0x72, 0x00, 0x00, 0x00, 0x62, // coord0.....r...b + 0x67, 0x66, 0x78, 0x5f, 0x46, 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, 0x61, 0x30, 0x00, 0x00, 0x47, // gfx_FragData0..G + 0x00, 0x04, 0x00, 0x23, 0x00, 0x00, 0x00, 0x21, 0x00, 0x00, 0x00, 0x12, 0x00, 0x00, 0x00, 0x47, // ...#...!.......G + 0x00, 0x04, 0x00, 0x23, 0x00, 0x00, 0x00, 0x22, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, // ...#...".......G + 0x00, 0x04, 0x00, 0x26, 0x00, 0x00, 0x00, 0x21, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x47, // ...&...!.......G + 0x00, 0x04, 0x00, 0x26, 0x00, 0x00, 0x00, 0x22, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, // ...&...".......G + 0x00, 0x03, 0x00, 0x44, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x44, // ...D.......H...D + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, // .......#.......G + 0x00, 0x04, 0x00, 0x46, 0x00, 0x00, 0x00, 0x21, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x47, // ...F...!.......G + 0x00, 0x04, 0x00, 0x46, 0x00, 0x00, 0x00, 0x22, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, // ...F...".......G + 0x00, 0x04, 0x00, 0x67, 0x00, 0x00, 0x00, 0x1e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, // ...g...........G + 0x00, 0x04, 0x00, 0x72, 0x00, 0x00, 0x00, 0x1e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x13, // ...r............ + 0x00, 0x02, 0x00, 0x02, 0x00, 0x00, 0x00, 0x21, 0x00, 0x03, 0x00, 0x03, 0x00, 0x00, 0x00, 0x02, // .......!........ + 0x00, 0x00, 0x00, 0x1a, 0x00, 0x02, 0x00, 0x06, 0x00, 0x00, 0x00, 0x16, 0x00, 0x03, 0x00, 0x07, // ................ + 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x19, 0x00, 0x09, 0x00, 0x08, 0x00, 0x00, 0x00, 0x07, // ... ............ + 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ................ + 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x17, 0x00, 0x04, 0x00, 0x0b, // ................ + 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x17, 0x00, 0x04, 0x00, 0x0e, // ................ + 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x22, // ........... ..." + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x22, // ...........;..." + 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x25, // ...#....... ...% + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x25, // ...........;...% + 0x00, 0x00, 0x00, 0x26, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x15, 0x00, 0x04, 0x00, 0x29, // ...&...........) + 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, 0x29, // ... .......+...) + 0x00, 0x00, 0x00, 0x2e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1b, 0x00, 0x03, 0x00, 0x32, // ...............2 + 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x1e, 0x00, 0x03, 0x00, 0x44, 0x00, 0x00, 0x00, 0x0e, // ...........D.... + 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x45, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x44, // ... ...E.......D + 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x45, 0x00, 0x00, 0x00, 0x46, 0x00, 0x00, 0x00, 0x02, // ...;...E...F.... + 0x00, 0x00, 0x00, 0x15, 0x00, 0x04, 0x00, 0x4c, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, // .......L... .... + 0x00, 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, 0x4c, 0x00, 0x00, 0x00, 0x4d, 0x00, 0x00, 0x00, 0x00, // ...+...L...M.... + 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x4e, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x07, // ... ...N........ + 0x00, 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, 0x07, 0x00, 0x00, 0x00, 0x54, 0x00, 0x00, 0x00, 0xcd, // ...+.......T.... + 0xcc, 0x4c, 0x3e, 0x2b, 0x00, 0x04, 0x00, 0x07, 0x00, 0x00, 0x00, 0x55, 0x00, 0x00, 0x00, 0xcd, // .L>+.......U.... + 0xcc, 0x4c, 0x3f, 0x2b, 0x00, 0x04, 0x00, 0x4c, 0x00, 0x00, 0x00, 0x56, 0x00, 0x00, 0x00, 0x01, // .L?+...L...V.... + 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x66, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x0b, // ... ...f........ + 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x66, 0x00, 0x00, 0x00, 0x67, 0x00, 0x00, 0x00, 0x01, // ...;...f...g.... + 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x71, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x0e, // ... ...q........ + 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x71, 0x00, 0x00, 0x00, 0x72, 0x00, 0x00, 0x00, 0x03, // ...;...q...r.... + 0x00, 0x00, 0x00, 0x36, 0x00, 0x05, 0x00, 0x02, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, // ...6............ + 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0xf8, 0x00, 0x02, 0x00, 0x05, 0x00, 0x00, 0x00, 0x3d, // ...............= + 0x00, 0x04, 0x00, 0x06, 0x00, 0x00, 0x00, 0x24, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x3d, // .......$...#...= + 0x00, 0x04, 0x00, 0x08, 0x00, 0x00, 0x00, 0x27, 0x00, 0x00, 0x00, 0x26, 0x00, 0x00, 0x00, 0x3d, // .......'...&...= + 0x00, 0x04, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x68, 0x00, 0x00, 0x00, 0x67, 0x00, 0x00, 0x00, 0x41, // .......h...g...A + 0x00, 0x06, 0x00, 0x4e, 0x00, 0x00, 0x00, 0x91, 0x00, 0x00, 0x00, 0x46, 0x00, 0x00, 0x00, 0x2e, // ...N.......F.... + 0x00, 0x00, 0x00, 0x4d, 0x00, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x07, 0x00, 0x00, 0x00, 0x92, // ...M...=........ + 0x00, 0x00, 0x00, 0x91, 0x00, 0x00, 0x00, 0x56, 0x00, 0x05, 0x00, 0x32, 0x00, 0x00, 0x00, 0xa9, // .......V...2.... + 0x00, 0x00, 0x00, 0x27, 0x00, 0x00, 0x00, 0x24, 0x00, 0x00, 0x00, 0x58, 0x00, 0x07, 0x00, 0x0e, // ...'...$...X.... + 0x00, 0x00, 0x00, 0xac, 0x00, 0x00, 0x00, 0xa9, 0x00, 0x00, 0x00, 0x68, 0x00, 0x00, 0x00, 0x02, // ...........h.... + 0x00, 0x00, 0x00, 0x92, 0x00, 0x00, 0x00, 0x41, 0x00, 0x06, 0x00, 0x4e, 0x00, 0x00, 0x00, 0x95, // .......A...N.... + 0x00, 0x00, 0x00, 0x46, 0x00, 0x00, 0x00, 0x2e, 0x00, 0x00, 0x00, 0x56, 0x00, 0x00, 0x00, 0x3d, // ...F.......V...= + 0x00, 0x04, 0x00, 0x07, 0x00, 0x00, 0x00, 0x96, 0x00, 0x00, 0x00, 0x95, 0x00, 0x00, 0x00, 0x85, // ................ + 0x00, 0x05, 0x00, 0x07, 0x00, 0x00, 0x00, 0x97, 0x00, 0x00, 0x00, 0x55, 0x00, 0x00, 0x00, 0x96, // ...........U.... + 0x00, 0x00, 0x00, 0x81, 0x00, 0x05, 0x00, 0x07, 0x00, 0x00, 0x00, 0x98, 0x00, 0x00, 0x00, 0x54, // ...............T + 0x00, 0x00, 0x00, 0x97, 0x00, 0x00, 0x00, 0x51, 0x00, 0x05, 0x00, 0x07, 0x00, 0x00, 0x00, 0x9b, // .......Q........ + 0x00, 0x00, 0x00, 0xac, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x51, 0x00, 0x05, 0x00, 0x07, // ...........Q.... + 0x00, 0x00, 0x00, 0x9c, 0x00, 0x00, 0x00, 0xac, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x51, // ...............Q + 0x00, 0x05, 0x00, 0x07, 0x00, 0x00, 0x00, 0x9d, 0x00, 0x00, 0x00, 0xac, 0x00, 0x00, 0x00, 0x02, // ................ + 0x00, 0x00, 0x00, 0x50, 0x00, 0x07, 0x00, 0x0e, 0x00, 0x00, 0x00, 0x9e, 0x00, 0x00, 0x00, 0x9b, // ...P............ + 0x00, 0x00, 0x00, 0x9c, 0x00, 0x00, 0x00, 0x9d, 0x00, 0x00, 0x00, 0x98, 0x00, 0x00, 0x00, 0x3e, // ...............> + 0x00, 0x03, 0x00, 0x72, 0x00, 0x00, 0x00, 0x9e, 0x00, 0x00, 0x00, 0xfd, 0x00, 0x01, 0x00, 0x38, // ...r...........8 + 0x00, 0x01, 0x00, 0x00, 0x00, 0x10, 0x00, // ....... }; -static const uint8_t fs_imgui_image_dx9[400] = +static const uint8_t fs_imgui_image_wgsl[853] = { - 0x46, 0x53, 0x48, 0x0b, 0x6f, 0x1e, 0x3e, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x0a, 0x73, // FSH.o.><.......s - 0x5f, 0x74, 0x65, 0x78, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x01, 0x00, 0x00, 0x01, 0x00, 0x00, // _texColor0...... - 0x00, 0x00, 0x00, 0x11, 0x75, 0x5f, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x4c, 0x6f, 0x64, 0x45, 0x6e, // ....u_imageLodEn - 0x61, 0x62, 0x6c, 0x65, 0x64, 0x12, 0x01, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x4c, // abled..........L - 0x01, 0x00, 0x00, 0x00, 0x03, 0xff, 0xff, 0xfe, 0xff, 0x2e, 0x00, 0x43, 0x54, 0x41, 0x42, 0x1c, // ...........CTAB. - 0x00, 0x00, 0x00, 0x8b, 0x00, 0x00, 0x00, 0x00, 0x03, 0xff, 0xff, 0x02, 0x00, 0x00, 0x00, 0x1c, // ................ - 0x00, 0x00, 0x00, 0x00, 0x91, 0x00, 0x00, 0x84, 0x00, 0x00, 0x00, 0x44, 0x00, 0x00, 0x00, 0x03, // ...........D.... - 0x00, 0x00, 0x00, 0x01, 0x00, 0x02, 0x00, 0x50, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, // .......P.......` - 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x74, 0x00, 0x00, 0x00, 0x00, // ...........t.... - 0x00, 0x00, 0x00, 0x73, 0x5f, 0x74, 0x65, 0x78, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x00, 0xab, 0x04, // ...s_texColor... - 0x00, 0x0c, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x75, // ...............u - 0x5f, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x4c, 0x6f, 0x64, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, // _imageLodEnabled - 0x00, 0xab, 0xab, 0x01, 0x00, 0x03, 0x00, 0x01, 0x00, 0x04, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, // ................ - 0x00, 0x00, 0x00, 0x70, 0x73, 0x5f, 0x33, 0x5f, 0x30, 0x00, 0x4d, 0x69, 0x63, 0x72, 0x6f, 0x73, // ...ps_3_0.Micros - 0x6f, 0x66, 0x74, 0x20, 0x28, 0x52, 0x29, 0x20, 0x48, 0x4c, 0x53, 0x4c, 0x20, 0x53, 0x68, 0x61, // oft (R) HLSL Sha - 0x64, 0x65, 0x72, 0x20, 0x43, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x72, 0x20, 0x31, 0x30, 0x2e, // der Compiler 10. - 0x31, 0x00, 0xab, 0x51, 0x00, 0x00, 0x05, 0x01, 0x00, 0x0f, 0xa0, 0x00, 0x00, 0x80, 0x3f, 0x00, // 1..Q..........?. - 0x00, 0x00, 0x00, 0xcd, 0xcc, 0x4c, 0x3f, 0xcd, 0xcc, 0x4c, 0x3e, 0x1f, 0x00, 0x00, 0x02, 0x05, // .....L?..L>..... - 0x00, 0x00, 0x80, 0x00, 0x00, 0x03, 0x90, 0x1f, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x90, 0x00, // ................ - 0x08, 0x0f, 0xa0, 0x05, 0x00, 0x00, 0x03, 0x00, 0x00, 0x07, 0x80, 0x01, 0x00, 0xd0, 0xa0, 0x00, // ................ - 0x00, 0xc4, 0x90, 0x01, 0x00, 0x00, 0x02, 0x00, 0x00, 0x08, 0x80, 0x00, 0x00, 0x00, 0xa0, 0x5f, // ..............._ - 0x00, 0x00, 0x03, 0x00, 0x00, 0x0f, 0x80, 0x00, 0x00, 0xe4, 0x80, 0x00, 0x08, 0xe4, 0xa0, 0x01, // ................ - 0x00, 0x00, 0x02, 0x00, 0x08, 0x07, 0x80, 0x00, 0x00, 0xe4, 0x80, 0x01, 0x00, 0x00, 0x02, 0x00, // ................ - 0x00, 0x0c, 0x80, 0x01, 0x00, 0xe4, 0xa0, 0x04, 0x00, 0x00, 0x04, 0x00, 0x08, 0x08, 0x80, 0x00, // ................ - 0x00, 0x55, 0xa0, 0x00, 0x00, 0xaa, 0x80, 0x00, 0x00, 0xff, 0x80, 0xff, 0xff, 0x00, 0x00, 0x00, // .U.............. + 0x46, 0x53, 0x48, 0x0b, 0x6f, 0x1e, 0x3e, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x11, 0x75, // FSH.o.><.......u + 0x5f, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x4c, 0x6f, 0x64, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, // _imageLodEnabled + 0x12, 0x01, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0a, 0x73, 0x5f, 0x74, 0x65, 0x78, // ...........s_tex + 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x02, 0x26, 0x00, 0x0c, // Color0.......&.. + 0x03, 0x00, 0x00, 0x64, 0x69, 0x61, 0x67, 0x6e, 0x6f, 0x73, 0x74, 0x69, 0x63, 0x28, 0x6f, 0x66, // ...diagnostic(of + 0x66, 0x2c, 0x20, 0x64, 0x65, 0x72, 0x69, 0x76, 0x61, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x75, 0x6e, // f, derivative_un + 0x69, 0x66, 0x6f, 0x72, 0x6d, 0x69, 0x74, 0x79, 0x29, 0x3b, 0x0a, 0x64, 0x69, 0x61, 0x67, 0x6e, // iformity);.diagn + 0x6f, 0x73, 0x74, 0x69, 0x63, 0x28, 0x6f, 0x66, 0x66, 0x2c, 0x20, 0x73, 0x75, 0x62, 0x67, 0x72, // ostic(off, subgr + 0x6f, 0x75, 0x70, 0x5f, 0x75, 0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, 0x69, 0x74, 0x79, 0x29, 0x3b, // oup_uniformity); + 0x0a, 0x0a, 0x40, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x28, 0x30, 0x75, 0x29, 0x20, 0x40, 0x62, 0x69, // ..@group(0u) @bi + 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x28, 0x31, 0x38, 0x75, 0x29, 0x20, 0x76, 0x61, 0x72, 0x20, 0x73, // nding(18u) var s + 0x5f, 0x74, 0x65, 0x78, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x53, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x72, // _texColorSampler + 0x20, 0x3a, 0x20, 0x73, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x72, 0x3b, 0x0a, 0x0a, 0x40, 0x67, 0x72, // : sampler;..@gr + 0x6f, 0x75, 0x70, 0x28, 0x30, 0x75, 0x29, 0x20, 0x40, 0x62, 0x69, 0x6e, 0x64, 0x69, 0x6e, 0x67, // oup(0u) @binding + 0x28, 0x32, 0x75, 0x29, 0x20, 0x76, 0x61, 0x72, 0x20, 0x73, 0x5f, 0x74, 0x65, 0x78, 0x43, 0x6f, // (2u) var s_texCo + 0x6c, 0x6f, 0x72, 0x54, 0x65, 0x78, 0x74, 0x75, 0x72, 0x65, 0x20, 0x3a, 0x20, 0x74, 0x65, 0x78, // lorTexture : tex + 0x74, 0x75, 0x72, 0x65, 0x5f, 0x32, 0x64, 0x3c, 0x66, 0x33, 0x32, 0x3e, 0x3b, 0x0a, 0x0a, 0x73, // ture_2d;..s + 0x74, 0x72, 0x75, 0x63, 0x74, 0x20, 0x55, 0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, 0x42, 0x6c, 0x6f, // truct UniformBlo + 0x63, 0x6b, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x75, 0x5f, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x4c, 0x6f, // ck {. u_imageLo + 0x64, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x20, 0x3a, 0x20, 0x76, 0x65, 0x63, 0x34, 0x3c, // dEnabled : vec4< + 0x66, 0x33, 0x32, 0x3e, 0x2c, 0x0a, 0x7d, 0x0a, 0x0a, 0x40, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x28, // f32>,.}..@group( + 0x30, 0x75, 0x29, 0x20, 0x40, 0x62, 0x69, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x28, 0x31, 0x75, 0x29, // 0u) @binding(1u) + 0x20, 0x76, 0x61, 0x72, 0x3c, 0x75, 0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, 0x3e, 0x20, 0x76, 0x20, // var v + 0x3a, 0x20, 0x55, 0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x3b, 0x0a, // : UniformBlock;. + 0x0a, 0x76, 0x61, 0x72, 0x3c, 0x70, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x3e, 0x20, 0x62, 0x67, // .var bg + 0x66, 0x78, 0x5f, 0x46, 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, 0x61, 0x30, 0x20, 0x3a, 0x20, 0x76, // fx_FragData0 : v + 0x65, 0x63, 0x34, 0x3c, 0x66, 0x33, 0x32, 0x3e, 0x3b, 0x0a, 0x0a, 0x66, 0x6e, 0x20, 0x6d, 0x61, // ec4;..fn ma + 0x69, 0x6e, 0x5f, 0x69, 0x6e, 0x6e, 0x65, 0x72, 0x28, 0x76, 0x5f, 0x74, 0x65, 0x78, 0x63, 0x6f, // in_inner(v_texco + 0x6f, 0x72, 0x64, 0x30, 0x20, 0x3a, 0x20, 0x76, 0x65, 0x63, 0x32, 0x3c, 0x66, 0x33, 0x32, 0x3e, // ord0 : vec2 + 0x29, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x6c, 0x65, 0x74, 0x20, 0x76, 0x5f, 0x31, 0x20, 0x3d, 0x20, // ) {. let v_1 = + 0x74, 0x65, 0x78, 0x74, 0x75, 0x72, 0x65, 0x53, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x4c, 0x65, 0x76, // textureSampleLev + 0x65, 0x6c, 0x28, 0x73, 0x5f, 0x74, 0x65, 0x78, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x54, 0x65, 0x78, // el(s_texColorTex + 0x74, 0x75, 0x72, 0x65, 0x2c, 0x20, 0x73, 0x5f, 0x74, 0x65, 0x78, 0x43, 0x6f, 0x6c, 0x6f, 0x72, // ture, s_texColor + 0x53, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x72, 0x2c, 0x20, 0x76, 0x5f, 0x74, 0x65, 0x78, 0x63, 0x6f, // Sampler, v_texco + 0x6f, 0x72, 0x64, 0x30, 0x2c, 0x20, 0x76, 0x2e, 0x75, 0x5f, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x4c, // ord0, v.u_imageL + 0x6f, 0x64, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x2e, 0x78, 0x29, 0x3b, 0x0a, 0x20, 0x20, // odEnabled.x);. + 0x62, 0x67, 0x66, 0x78, 0x5f, 0x46, 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, 0x61, 0x30, 0x20, 0x3d, // bgfx_FragData0 = + 0x20, 0x76, 0x65, 0x63, 0x34, 0x3c, 0x66, 0x33, 0x32, 0x3e, 0x28, 0x76, 0x5f, 0x31, 0x2e, 0x78, // vec4(v_1.x + 0x2c, 0x20, 0x76, 0x5f, 0x31, 0x2e, 0x79, 0x2c, 0x20, 0x76, 0x5f, 0x31, 0x2e, 0x7a, 0x2c, 0x20, // , v_1.y, v_1.z, + 0x28, 0x30, 0x2e, 0x32, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x32, 0x39, 0x38, 0x30, 0x32, // (0.2000000029802 + 0x33, 0x32, 0x32, 0x33, 0x38, 0x37, 0x37, 0x66, 0x20, 0x2b, 0x20, 0x28, 0x30, 0x2e, 0x38, 0x30, // 3223877f + (0.80 + 0x30, 0x30, 0x30, 0x30, 0x30, 0x31, 0x31, 0x39, 0x32, 0x30, 0x39, 0x32, 0x38, 0x39, 0x35, 0x35, // 0000011920928955 + 0x30, 0x38, 0x66, 0x20, 0x2a, 0x20, 0x76, 0x2e, 0x75, 0x5f, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x4c, // 08f * v.u_imageL + 0x6f, 0x64, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x2e, 0x79, 0x29, 0x29, 0x29, 0x3b, 0x0a, // odEnabled.y)));. + 0x7d, 0x0a, 0x0a, 0x40, 0x66, 0x72, 0x61, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x0a, 0x66, 0x6e, 0x20, // }..@fragment.fn + 0x6d, 0x61, 0x69, 0x6e, 0x28, 0x40, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x30, // main(@location(0 + 0x75, 0x29, 0x20, 0x76, 0x5f, 0x74, 0x65, 0x78, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x30, 0x20, 0x3a, // u) v_texcoord0 : + 0x20, 0x76, 0x65, 0x63, 0x32, 0x3c, 0x66, 0x33, 0x32, 0x3e, 0x29, 0x20, 0x2d, 0x3e, 0x20, 0x40, // vec2) -> @ + 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x30, 0x75, 0x29, 0x20, 0x76, 0x65, 0x63, // location(0u) vec + 0x34, 0x3c, 0x66, 0x33, 0x32, 0x3e, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x6d, 0x61, 0x69, 0x6e, 0x5f, // 4 {. main_ + 0x69, 0x6e, 0x6e, 0x65, 0x72, 0x28, 0x76, 0x5f, 0x74, 0x65, 0x78, 0x63, 0x6f, 0x6f, 0x72, 0x64, // inner(v_texcoord + 0x30, 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x62, 0x67, 0x66, // 0);. return bgf + 0x78, 0x5f, 0x46, 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, 0x61, 0x30, 0x3b, 0x0a, 0x7d, 0x0a, 0x00, // x_FragData0;.}.. + 0x00, 0x10, 0x00, 0x10, 0x00, // ..... }; -static const uint8_t fs_imgui_image_dx11[480] = +static const uint8_t fs_imgui_image_dxbc[471] = { - 0x46, 0x53, 0x48, 0x0b, 0x6f, 0x1e, 0x3e, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x11, 0x75, // FSH.o.><.......u - 0x5f, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x4c, 0x6f, 0x64, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, // _imageLodEnabled - 0x12, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0a, 0x73, 0x5f, 0x74, 0x65, 0x78, // ...........s_tex - 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x01, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0a, // Color0.......... - 0x73, 0x5f, 0x74, 0x65, 0x78, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x01, 0x00, 0x00, 0x01, 0x00, // s_texColor0..... - 0x00, 0x00, 0x00, 0x00, 0x84, 0x01, 0x00, 0x00, 0x44, 0x58, 0x42, 0x43, 0x60, 0x83, 0xa2, 0x5c, // ........DXBC`... - 0x77, 0x3d, 0xcc, 0x9b, 0xb9, 0x73, 0xdf, 0x41, 0x6b, 0x18, 0x8f, 0x0e, 0x01, 0x00, 0x00, 0x00, // w=...s.Ak....... - 0x84, 0x01, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x2c, 0x00, 0x00, 0x00, 0x84, 0x00, 0x00, 0x00, // ........,....... - 0xb8, 0x00, 0x00, 0x00, 0x49, 0x53, 0x47, 0x4e, 0x50, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, // ....ISGNP....... - 0x08, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, // ....8........... - 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x44, 0x00, 0x00, 0x00, // ............D... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, // ................ - 0x03, 0x03, 0x00, 0x00, 0x53, 0x56, 0x5f, 0x50, 0x4f, 0x53, 0x49, 0x54, 0x49, 0x4f, 0x4e, 0x00, // ....SV_POSITION. - 0x54, 0x45, 0x58, 0x43, 0x4f, 0x4f, 0x52, 0x44, 0x00, 0xab, 0xab, 0xab, 0x4f, 0x53, 0x47, 0x4e, // TEXCOORD....OSGN - 0x2c, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, // ,........... ... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ................ - 0x0f, 0x00, 0x00, 0x00, 0x53, 0x56, 0x5f, 0x54, 0x41, 0x52, 0x47, 0x45, 0x54, 0x00, 0xab, 0xab, // ....SV_TARGET... - 0x53, 0x48, 0x44, 0x52, 0xc4, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x31, 0x00, 0x00, 0x00, // SHDR....@...1... - 0x59, 0x00, 0x00, 0x04, 0x46, 0x8e, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, // Y...F. ......... - 0x5a, 0x00, 0x00, 0x03, 0x00, 0x60, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x58, 0x18, 0x00, 0x04, // Z....`......X... - 0x00, 0x70, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x55, 0x55, 0x00, 0x00, 0x62, 0x10, 0x00, 0x03, // .p......UU..b... - 0x32, 0x10, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x03, 0xf2, 0x20, 0x10, 0x00, // 2.......e.... .. - 0x00, 0x00, 0x00, 0x00, 0x68, 0x00, 0x00, 0x02, 0x01, 0x00, 0x00, 0x00, 0x48, 0x00, 0x00, 0x0c, // ....h.......H... - 0xf2, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x10, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, // ........F....... - 0x46, 0x7e, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, // F~.......`...... - 0x0a, 0x80, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x36, 0x00, 0x00, 0x05, // .. .........6... - 0x72, 0x20, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x02, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, // r ......F....... - 0x32, 0x00, 0x00, 0x0a, 0x82, 0x20, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1a, 0x80, 0x20, 0x00, // 2.... ........ . - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x40, 0x00, 0x00, 0xcd, 0xcc, 0x4c, 0x3f, // .........@....L? - 0x01, 0x40, 0x00, 0x00, 0xcd, 0xcc, 0x4c, 0x3e, 0x3e, 0x00, 0x00, 0x01, 0x00, 0x00, 0x10, 0x00, // .@....L>>....... + 0x46, 0x53, 0x48, 0x0b, 0x6f, 0x1e, 0x3e, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x11, 0x75, // FSH.o.><.......u + 0x5f, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x4c, 0x6f, 0x64, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, // _imageLodEnabled + 0x12, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0a, 0x73, 0x5f, 0x74, 0x65, 0x78, // ...........s_tex + 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x01, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x90, // Color0.......... + 0x01, 0x00, 0x00, 0x44, 0x58, 0x42, 0x43, 0x93, 0x1f, 0x8d, 0x42, 0xd8, 0x6d, 0xd1, 0x2f, 0x7c, // ...DXBC...B.m./| + 0x9d, 0x3a, 0xc5, 0x21, 0x8c, 0xa9, 0x66, 0x01, 0x00, 0x00, 0x00, 0x90, 0x01, 0x00, 0x00, 0x03, // .:.!..f......... + 0x00, 0x00, 0x00, 0x2c, 0x00, 0x00, 0x00, 0x84, 0x00, 0x00, 0x00, 0xb8, 0x00, 0x00, 0x00, 0x49, // ...,...........I + 0x53, 0x47, 0x4e, 0x50, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x38, // SGNP...........8 + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, // ................ + 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x44, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // .......D........ + 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x03, 0x03, 0x00, 0x00, 0x53, // ...............S + 0x56, 0x5f, 0x50, 0x4f, 0x53, 0x49, 0x54, 0x49, 0x4f, 0x4e, 0x00, 0x54, 0x45, 0x58, 0x43, 0x4f, // V_POSITION.TEXCO + 0x4f, 0x52, 0x44, 0x00, 0xab, 0xab, 0xab, 0x4f, 0x53, 0x47, 0x4e, 0x2c, 0x00, 0x00, 0x00, 0x01, // ORD....OSGN,.... + 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ....... ........ + 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x53, // ...............S + 0x56, 0x5f, 0x54, 0x41, 0x52, 0x47, 0x45, 0x54, 0x00, 0xab, 0xab, 0x53, 0x48, 0x45, 0x58, 0xd0, // V_TARGET...SHEX. + 0x00, 0x00, 0x00, 0x50, 0x00, 0x00, 0x00, 0x34, 0x00, 0x00, 0x00, 0x6a, 0x08, 0x00, 0x01, 0x59, // ...P...4...j...Y + 0x00, 0x00, 0x04, 0x46, 0x8e, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x5a, // ...F. .........Z + 0x00, 0x00, 0x03, 0x00, 0x60, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x58, 0x18, 0x00, 0x04, 0x00, // ....`......X.... + 0x70, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x55, 0x55, 0x00, 0x00, 0x62, 0x10, 0x00, 0x03, 0x32, // p......UU..b...2 + 0x10, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x03, 0xf2, 0x20, 0x10, 0x00, 0x00, // .......e.... ... + 0x00, 0x00, 0x00, 0x68, 0x00, 0x00, 0x02, 0x01, 0x00, 0x00, 0x00, 0x48, 0x00, 0x00, 0x8e, 0xc2, // ...h.......H.... + 0x00, 0x00, 0x80, 0x43, 0x55, 0x15, 0x00, 0x72, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, // ...CU..r.......F + 0x10, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x46, 0x7e, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // .......F~....... + 0x60, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0a, 0x80, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // `........ ...... + 0x00, 0x00, 0x00, 0x36, 0x00, 0x00, 0x05, 0x72, 0x20, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, // ...6...r ......F + 0x02, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x32, 0x00, 0x00, 0x0a, 0x82, 0x20, 0x10, 0x00, 0x00, // .......2.... ... + 0x00, 0x00, 0x00, 0x1a, 0x80, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, // ..... .......... + 0x40, 0x00, 0x00, 0xcd, 0xcc, 0x4c, 0x3f, 0x01, 0x40, 0x00, 0x00, 0xcd, 0xcc, 0x4c, 0x3e, 0x3e, // @....L?.@....L>> + 0x00, 0x00, 0x01, 0x00, 0x00, 0x10, 0x00, // ....... }; -static const uint8_t fs_imgui_image_mtl[833] = +static const uint8_t fs_imgui_image_dxil[2499] = { - 0x46, 0x53, 0x48, 0x0b, 0x6f, 0x1e, 0x3e, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x11, 0x73, // FSH.o.><.......s - 0x5f, 0x74, 0x65, 0x78, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x53, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x72, // _texColorSampler - 0x11, 0x01, 0xff, 0xff, 0x01, 0x00, 0x00, 0x00, 0x39, 0x01, 0x11, 0x73, 0x5f, 0x74, 0x65, 0x78, // ........9..s_tex - 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x54, 0x65, 0x78, 0x74, 0x75, 0x72, 0x65, 0x11, 0x01, 0xff, 0xff, // ColorTexture.... - 0x01, 0x00, 0x00, 0x00, 0x39, 0x01, 0x11, 0x75, 0x5f, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x4c, 0x6f, // ....9..u_imageLo - 0x64, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x12, 0x01, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, // dEnabled........ - 0x39, 0x01, 0x0a, 0x73, 0x5f, 0x74, 0x65, 0x78, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x10, 0x00, 0x00, // 9..s_texColor... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x39, 0x01, 0xc2, 0x02, 0x00, 0x00, 0x23, 0x69, 0x6e, 0x63, 0x6c, // .....9.....#incl - 0x75, 0x64, 0x65, 0x20, 0x3c, 0x6d, 0x65, 0x74, 0x61, 0x6c, 0x5f, 0x73, 0x74, 0x64, 0x6c, 0x69, // ude .#include ..using - 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x20, 0x6d, 0x65, 0x74, 0x61, 0x6c, // namespace metal - 0x3b, 0x0a, 0x0a, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x20, 0x5f, 0x47, 0x6c, 0x6f, 0x62, 0x61, // ;..struct _Globa - 0x6c, 0x0a, 0x7b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x34, 0x20, 0x75, // l.{. float4 u - 0x5f, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x4c, 0x6f, 0x64, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, // _imageLodEnabled - 0x3b, 0x0a, 0x7d, 0x3b, 0x0a, 0x0a, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x20, 0x78, 0x6c, 0x61, // ;.};..struct xla - 0x74, 0x4d, 0x74, 0x6c, 0x4d, 0x61, 0x69, 0x6e, 0x5f, 0x6f, 0x75, 0x74, 0x0a, 0x7b, 0x0a, 0x20, // tMtlMain_out.{. - 0x20, 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x34, 0x20, 0x62, 0x67, 0x66, 0x78, 0x5f, 0x46, // float4 bgfx_F - 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, 0x61, 0x30, 0x20, 0x5b, 0x5b, 0x63, 0x6f, 0x6c, 0x6f, 0x72, // ragData0 [[color - 0x28, 0x30, 0x29, 0x5d, 0x5d, 0x3b, 0x0a, 0x7d, 0x3b, 0x0a, 0x0a, 0x73, 0x74, 0x72, 0x75, 0x63, // (0)]];.};..struc - 0x74, 0x20, 0x78, 0x6c, 0x61, 0x74, 0x4d, 0x74, 0x6c, 0x4d, 0x61, 0x69, 0x6e, 0x5f, 0x69, 0x6e, // t xlatMtlMain_in - 0x0a, 0x7b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x32, 0x20, 0x76, 0x5f, // .{. float2 v_ - 0x74, 0x65, 0x78, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x30, 0x20, 0x5b, 0x5b, 0x75, 0x73, 0x65, 0x72, // texcoord0 [[user - 0x28, 0x6c, 0x6f, 0x63, 0x6e, 0x30, 0x29, 0x5d, 0x5d, 0x3b, 0x0a, 0x7d, 0x3b, 0x0a, 0x0a, 0x66, // (locn0)]];.};..f - 0x72, 0x61, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x20, 0x78, 0x6c, 0x61, 0x74, 0x4d, 0x74, 0x6c, 0x4d, // ragment xlatMtlM - 0x61, 0x69, 0x6e, 0x5f, 0x6f, 0x75, 0x74, 0x20, 0x78, 0x6c, 0x61, 0x74, 0x4d, 0x74, 0x6c, 0x4d, // ain_out xlatMtlM - 0x61, 0x69, 0x6e, 0x28, 0x78, 0x6c, 0x61, 0x74, 0x4d, 0x74, 0x6c, 0x4d, 0x61, 0x69, 0x6e, 0x5f, // ain(xlatMtlMain_ - 0x69, 0x6e, 0x20, 0x69, 0x6e, 0x20, 0x5b, 0x5b, 0x73, 0x74, 0x61, 0x67, 0x65, 0x5f, 0x69, 0x6e, // in in [[stage_in - 0x5d, 0x5d, 0x2c, 0x20, 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x74, 0x20, 0x5f, 0x47, 0x6c, // ]], constant _Gl - 0x6f, 0x62, 0x61, 0x6c, 0x26, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x75, 0x20, 0x5b, 0x5b, 0x62, // obal& _mtl_u [[b - 0x75, 0x66, 0x66, 0x65, 0x72, 0x28, 0x30, 0x29, 0x5d, 0x5d, 0x2c, 0x20, 0x74, 0x65, 0x78, 0x74, // uffer(0)]], text - 0x75, 0x72, 0x65, 0x32, 0x64, 0x3c, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x3e, 0x20, 0x73, 0x5f, 0x74, // ure2d s_t - 0x65, 0x78, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x20, 0x5b, 0x5b, 0x74, 0x65, 0x78, 0x74, 0x75, 0x72, // exColor [[textur - 0x65, 0x28, 0x30, 0x29, 0x5d, 0x5d, 0x2c, 0x20, 0x73, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x72, 0x20, // e(0)]], sampler - 0x73, 0x5f, 0x74, 0x65, 0x78, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x53, 0x61, 0x6d, 0x70, 0x6c, 0x65, // s_texColorSample - 0x72, 0x20, 0x5b, 0x5b, 0x73, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x72, 0x28, 0x30, 0x29, 0x5d, 0x5d, // r [[sampler(0)]] - 0x29, 0x0a, 0x7b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x78, 0x6c, 0x61, 0x74, 0x4d, 0x74, 0x6c, 0x4d, // ).{. xlatMtlM - 0x61, 0x69, 0x6e, 0x5f, 0x6f, 0x75, 0x74, 0x20, 0x6f, 0x75, 0x74, 0x20, 0x3d, 0x20, 0x7b, 0x7d, // ain_out out = {} - 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x6f, 0x75, 0x74, 0x2e, 0x62, 0x67, 0x66, 0x78, 0x5f, 0x46, // ;. out.bgfx_F - 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, 0x61, 0x30, 0x20, 0x3d, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, // ragData0 = float - 0x34, 0x28, 0x73, 0x5f, 0x74, 0x65, 0x78, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x2e, 0x73, 0x61, 0x6d, // 4(s_texColor.sam - 0x70, 0x6c, 0x65, 0x28, 0x73, 0x5f, 0x74, 0x65, 0x78, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x53, 0x61, // ple(s_texColorSa - 0x6d, 0x70, 0x6c, 0x65, 0x72, 0x2c, 0x20, 0x69, 0x6e, 0x2e, 0x76, 0x5f, 0x74, 0x65, 0x78, 0x63, // mpler, in.v_texc - 0x6f, 0x6f, 0x72, 0x64, 0x30, 0x2c, 0x20, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x28, 0x5f, 0x6d, 0x74, // oord0, level(_mt - 0x6c, 0x5f, 0x75, 0x2e, 0x75, 0x5f, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x4c, 0x6f, 0x64, 0x45, 0x6e, // l_u.u_imageLodEn - 0x61, 0x62, 0x6c, 0x65, 0x64, 0x2e, 0x78, 0x29, 0x29, 0x2e, 0x78, 0x79, 0x7a, 0x2c, 0x20, 0x30, // abled.x)).xyz, 0 - 0x2e, 0x32, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x32, 0x39, 0x38, 0x30, 0x32, 0x33, 0x32, // .200000002980232 - 0x32, 0x34, 0x20, 0x2b, 0x20, 0x28, 0x30, 0x2e, 0x38, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x31, // 24 + (0.80000001 - 0x31, 0x39, 0x32, 0x30, 0x39, 0x32, 0x38, 0x39, 0x36, 0x20, 0x2a, 0x20, 0x5f, 0x6d, 0x74, 0x6c, // 192092896 * _mtl - 0x5f, 0x75, 0x2e, 0x75, 0x5f, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x4c, 0x6f, 0x64, 0x45, 0x6e, 0x61, // _u.u_imageLodEna - 0x62, 0x6c, 0x65, 0x64, 0x2e, 0x79, 0x29, 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x72, 0x65, // bled.y));. re - 0x74, 0x75, 0x72, 0x6e, 0x20, 0x6f, 0x75, 0x74, 0x3b, 0x0a, 0x7d, 0x0a, 0x0a, 0x00, 0x00, 0x30, // turn out;.}....0 - 0x00, // . + 0x46, 0x53, 0x48, 0x0b, 0x6f, 0x1e, 0x3e, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x11, 0x75, // FSH.o.><.......u + 0x5f, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x4c, 0x6f, 0x64, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, // _imageLodEnabled + 0x12, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0a, 0x73, 0x5f, 0x74, 0x65, 0x78, // ...........s_tex + 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x01, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7c, // Color0.........| + 0x09, 0x00, 0x00, 0x44, 0x58, 0x42, 0x43, 0x17, 0x38, 0x93, 0xc2, 0x4b, 0x73, 0x04, 0x2f, 0xc7, // ...DXBC.8..Ks./. + 0x88, 0x79, 0xd3, 0x52, 0x62, 0x9d, 0x4d, 0x01, 0x00, 0x00, 0x00, 0x7c, 0x09, 0x00, 0x00, 0x07, // .y.Rb.M....|.... + 0x00, 0x00, 0x00, 0x3c, 0x00, 0x00, 0x00, 0x4c, 0x00, 0x00, 0x00, 0xb4, 0x00, 0x00, 0x00, 0xf0, // ...<...L........ + 0x00, 0x00, 0x00, 0xf0, 0x01, 0x00, 0x00, 0x24, 0x02, 0x00, 0x00, 0x40, 0x02, 0x00, 0x00, 0x53, // .......$...@...S + 0x46, 0x49, 0x30, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x49, // FI0............I + 0x53, 0x47, 0x31, 0x60, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, // SG1`............ + 0x00, 0x00, 0x00, 0x48, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x03, // ...H............ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ................ + 0x00, 0x00, 0x00, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, // ...T............ + 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x03, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x53, // ...............S + 0x56, 0x5f, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x00, 0x54, 0x45, 0x58, 0x43, 0x4f, // V_Position.TEXCO + 0x4f, 0x52, 0x44, 0x00, 0x00, 0x00, 0x00, 0x4f, 0x53, 0x47, 0x31, 0x34, 0x00, 0x00, 0x00, 0x01, // ORD....OSG14.... + 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x28, 0x00, 0x00, 0x00, 0x00, // ...........(.... + 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, // ...@............ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x53, 0x56, 0x5f, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, // .......SV_Target + 0x00, 0x00, 0x00, 0x50, 0x53, 0x56, 0x30, 0xf8, 0x00, 0x00, 0x00, 0x34, 0x00, 0x00, 0x00, 0x00, // ...PSV0....4.... + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ................ + 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x02, 0x01, 0x00, 0x02, 0x01, // ................ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0a, // ................ + 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, // ................ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x00, // ................ + 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ................ + 0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, // ................ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, // ................ + 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x54, 0x45, 0x58, 0x43, 0x4f, 0x4f, 0x52, 0x44, // ........TEXCOORD + 0x00, 0x6d, 0x61, 0x69, 0x6e, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, // .main........... + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x44, 0x03, 0x03, // .............D.. + 0x04, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x42, 0x00, 0x03, // .............B.. + 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x44, 0x10, 0x03, // .............D.. + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ................ + 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ................ + 0x00, 0x00, 0x00, 0x49, 0x4c, 0x44, 0x4e, 0x2c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x24, 0x00, 0x33, // ...ILDN,.....$.3 + 0x32, 0x64, 0x64, 0x63, 0x61, 0x35, 0x33, 0x65, 0x61, 0x30, 0x37, 0x36, 0x37, 0x32, 0x33, 0x62, // 2ddca53ea076723b + 0x65, 0x64, 0x65, 0x30, 0x65, 0x61, 0x32, 0x31, 0x37, 0x30, 0x62, 0x35, 0x38, 0x63, 0x33, 0x2e, // ede0ea2170b58c3. + 0x70, 0x64, 0x62, 0x00, 0x00, 0x00, 0x00, 0x48, 0x41, 0x53, 0x48, 0x14, 0x00, 0x00, 0x00, 0x00, // pdb....HASH..... + 0x00, 0x00, 0x00, 0x32, 0xdd, 0xca, 0x53, 0xea, 0x07, 0x67, 0x23, 0xbe, 0xde, 0x0e, 0xa2, 0x17, // ...2..S..g#..... + 0x0b, 0x58, 0xc3, 0x44, 0x58, 0x49, 0x4c, 0x34, 0x07, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0xcd, // .X.DXIL4...`.... + 0x01, 0x00, 0x00, 0x44, 0x58, 0x49, 0x4c, 0x00, 0x01, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x1c, // ...DXIL......... + 0x07, 0x00, 0x00, 0x42, 0x43, 0xc0, 0xde, 0x21, 0x0c, 0x00, 0x00, 0xc4, 0x01, 0x00, 0x00, 0x0b, // ...BC..!........ + 0x82, 0x20, 0x00, 0x02, 0x00, 0x00, 0x00, 0x13, 0x00, 0x00, 0x00, 0x07, 0x81, 0x23, 0x91, 0x41, // . ...........#.A + 0xc8, 0x04, 0x49, 0x06, 0x10, 0x32, 0x39, 0x92, 0x01, 0x84, 0x0c, 0x25, 0x05, 0x08, 0x19, 0x1e, // ..I..29....%.... + 0x04, 0x8b, 0x62, 0x80, 0x14, 0x45, 0x02, 0x42, 0x92, 0x0b, 0x42, 0xa4, 0x10, 0x32, 0x14, 0x38, // ..b..E.B..B..2.8 + 0x08, 0x18, 0x4b, 0x0a, 0x32, 0x52, 0x88, 0x48, 0x90, 0x14, 0x20, 0x43, 0x46, 0x88, 0xa5, 0x00, // ..K.2R.H.. CF... + 0x19, 0x32, 0x42, 0xe4, 0x48, 0x0e, 0x90, 0x91, 0x22, 0xc4, 0x50, 0x41, 0x51, 0x81, 0x8c, 0xe1, // .2B.H...".PAQ... + 0x83, 0xe5, 0x8a, 0x04, 0x29, 0x46, 0x06, 0x51, 0x18, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x1b, // ....)F.Q........ + 0x8c, 0xe0, 0xff, 0xff, 0xff, 0xff, 0x07, 0x40, 0x02, 0xa8, 0x0d, 0x84, 0xf0, 0xff, 0xff, 0xff, // .......@........ + 0xff, 0x03, 0x20, 0x6d, 0x30, 0x86, 0xff, 0xff, 0xff, 0xff, 0x1f, 0x00, 0x09, 0xa8, 0x00, 0x49, // .. m0..........I + 0x18, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x13, 0x82, 0x60, 0x42, 0x20, 0x4c, 0x08, 0x06, 0x00, // .........`B L... + 0x00, 0x00, 0x00, 0x89, 0x20, 0x00, 0x00, 0x4e, 0x00, 0x00, 0x00, 0x32, 0x22, 0x48, 0x09, 0x20, // .... ..N...2"H. + 0x64, 0x85, 0x04, 0x93, 0x22, 0xa4, 0x84, 0x04, 0x93, 0x22, 0xe3, 0x84, 0xa1, 0x90, 0x14, 0x12, // d..."...."...... + 0x4c, 0x8a, 0x8c, 0x0b, 0x84, 0xa4, 0x4c, 0x10, 0x7c, 0x23, 0x00, 0x25, 0x00, 0x14, 0x66, 0x00, // L.....L.|#.%..f. + 0xe6, 0x08, 0xc0, 0x60, 0x8e, 0x00, 0x29, 0xc6, 0x20, 0x84, 0x14, 0x42, 0xa6, 0x18, 0x80, 0x10, // ...`..). ..B.... + 0x52, 0x06, 0xa1, 0x9b, 0x86, 0xcb, 0x9f, 0xb0, 0x87, 0x90, 0xfc, 0x95, 0x90, 0x56, 0x62, 0xf2, // R............Vb. + 0x8b, 0xdb, 0x46, 0xc5, 0x18, 0x63, 0x10, 0x2a, 0xf7, 0x0c, 0x97, 0x3f, 0x61, 0x0f, 0x21, 0xf9, // ..F..c.*...?a.!. + 0x21, 0xd0, 0x0c, 0x0b, 0x81, 0x82, 0x55, 0x18, 0x45, 0x18, 0x1b, 0x63, 0x0c, 0x42, 0xc8, 0xa0, // !.....U.E..c.B.. + 0x76, 0xd4, 0x70, 0xf9, 0x13, 0xf6, 0x10, 0x92, 0xcf, 0x6d, 0x54, 0xb1, 0x12, 0x93, 0x5f, 0xdc, // v.p......mT..._. + 0x36, 0x22, 0xc6, 0x18, 0xa3, 0x10, 0x8f, 0x30, 0x42, 0x70, 0x8e, 0x20, 0x28, 0x06, 0x23, 0x85, // 6".....0Bp. (.#. + 0x10, 0x49, 0x73, 0x20, 0x60, 0x18, 0x81, 0x18, 0x66, 0x6a, 0x83, 0x71, 0x60, 0x87, 0x70, 0x98, // .Is `...fj.q`.p. + 0x87, 0x79, 0x70, 0x03, 0x5a, 0x28, 0x07, 0x7c, 0xa0, 0x87, 0x7a, 0x90, 0x87, 0x72, 0x90, 0x03, // .yp.Z(.|..z..r.. + 0x52, 0xe0, 0x03, 0x7b, 0x28, 0x87, 0x71, 0xa0, 0x87, 0x77, 0x90, 0x07, 0x3e, 0x30, 0x07, 0x76, // R..{(.q..w..>0.v + 0x78, 0x87, 0x70, 0xa0, 0x07, 0x36, 0x00, 0x03, 0x3a, 0xf0, 0x03, 0x30, 0xf0, 0x03, 0x3d, 0xd0, // x.p..6..:..0..=. + 0x83, 0x76, 0x48, 0x07, 0x78, 0x98, 0x87, 0x5f, 0xa0, 0x87, 0x7c, 0x80, 0x87, 0x72, 0x40, 0x01, // .vH.x.._..|..r@. + 0x99, 0x49, 0x0c, 0xc6, 0x81, 0x1d, 0xc2, 0x61, 0x1e, 0xe6, 0xc1, 0x0d, 0x68, 0xa1, 0x1c, 0xf0, // .I.....a....h... + 0x81, 0x1e, 0xea, 0x41, 0x1e, 0xca, 0x41, 0x0e, 0x48, 0x81, 0x0f, 0xec, 0xa1, 0x1c, 0xc6, 0x81, // ...A..A.H....... + 0x1e, 0xde, 0x41, 0x1e, 0xf8, 0xc0, 0x1c, 0xd8, 0xe1, 0x1d, 0xc2, 0x81, 0x1e, 0xd8, 0x00, 0x0c, // ..A............. + 0xe8, 0xc0, 0x0f, 0xc0, 0xc0, 0x0f, 0x90, 0x60, 0x2f, 0xe1, 0x99, 0x10, 0x32, 0x38, 0x05, 0x76, // .......`/...28.v + 0x78, 0x07, 0x71, 0x08, 0x07, 0x76, 0x98, 0x07, 0x14, 0x58, 0xd2, 0x37, 0x49, 0x53, 0x44, 0x09, // x.q..v...X.7ISD. + 0x93, 0xcf, 0x02, 0xcc, 0xb3, 0x10, 0x11, 0x3b, 0x01, 0x13, 0x81, 0x02, 0x42, 0x3c, 0x11, 0x08, // .......;....B<.. + 0x00, 0x00, 0x00, 0x13, 0x14, 0x72, 0xc0, 0x87, 0x74, 0x60, 0x87, 0x36, 0x68, 0x87, 0x79, 0x68, // .....r..t`.6h.yh + 0x03, 0x72, 0xc0, 0x87, 0x0d, 0xaf, 0x50, 0x0e, 0x6d, 0xd0, 0x0e, 0x7a, 0x50, 0x0e, 0x6d, 0x00, // .r....P.m..zP.m. + 0x0f, 0x7a, 0x30, 0x07, 0x72, 0xa0, 0x07, 0x73, 0x20, 0x07, 0x6d, 0x90, 0x0e, 0x71, 0xa0, 0x07, // .z0.r..s .m..q.. + 0x73, 0x20, 0x07, 0x6d, 0x90, 0x0e, 0x78, 0xa0, 0x07, 0x73, 0x20, 0x07, 0x6d, 0x90, 0x0e, 0x71, // s .m..x..s .m..q + 0x60, 0x07, 0x7a, 0x30, 0x07, 0x72, 0xd0, 0x06, 0xe9, 0x30, 0x07, 0x72, 0xa0, 0x07, 0x73, 0x20, // `.z0.r...0.r..s + 0x07, 0x6d, 0x90, 0x0e, 0x76, 0x40, 0x07, 0x7a, 0x60, 0x07, 0x74, 0xd0, 0x06, 0xe6, 0x10, 0x07, // .m..v@.z`.t..... + 0x76, 0xa0, 0x07, 0x73, 0x20, 0x07, 0x6d, 0x60, 0x0e, 0x73, 0x20, 0x07, 0x7a, 0x30, 0x07, 0x72, // v..s .m`.s .z0.r + 0xd0, 0x06, 0xe6, 0x60, 0x07, 0x74, 0xa0, 0x07, 0x76, 0x40, 0x07, 0x6d, 0xe0, 0x0e, 0x78, 0xa0, // ...`.t..v@.m..x. + 0x07, 0x71, 0x60, 0x07, 0x7a, 0x30, 0x07, 0x72, 0xa0, 0x07, 0x76, 0x40, 0x07, 0x43, 0x9e, 0x00, // .q`.z0.r..v@.C.. + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x86, 0x3c, 0x06, 0x10, 0x00, 0x01, // ...........<.... + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x79, 0x10, 0x20, 0x00, 0x04, 0x00, 0x00, 0x00, // ........y. ..... + 0x00, 0x00, 0x00, 0x00, 0x18, 0xf2, 0x34, 0x40, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ......4@........ + 0x00, 0x30, 0xe4, 0x81, 0x80, 0x00, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0xc8, // .0............`. + 0x33, 0x01, 0x01, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x16, 0x08, 0x00, 0x0f, // 3..0.......@.... + 0x00, 0x00, 0x00, 0x32, 0x1e, 0x98, 0x14, 0x19, 0x11, 0x4c, 0x90, 0x8c, 0x09, 0x26, 0x47, 0xc6, // ...2.....L...&G. + 0x04, 0x43, 0x22, 0x25, 0x30, 0x02, 0x50, 0x12, 0xc5, 0x50, 0x04, 0x05, 0x52, 0x06, 0xe5, 0x41, // .C"%0.P..P..R..A + 0xa5, 0x24, 0xca, 0xa0, 0x10, 0x46, 0x00, 0x8a, 0xa0, 0x40, 0x28, 0xcf, 0x00, 0xd0, 0x9e, 0x01, // .$...F...@(..... + 0xa0, 0x3e, 0x03, 0x40, 0x7e, 0x2c, 0xc4, 0x20, 0x00, 0x00, 0x00, 0x8e, 0x03, 0x00, 0x00, 0x79, // .>.@~,. .......y + 0x18, 0x00, 0x00, 0x61, 0x00, 0x00, 0x00, 0x1a, 0x03, 0x4c, 0x90, 0x46, 0x02, 0x13, 0x44, 0x8f, // ...a.....L.F..D. + 0x0c, 0x6f, 0xec, 0xed, 0x4d, 0x0c, 0x24, 0xc6, 0x05, 0xc7, 0x45, 0xa6, 0x06, 0xa6, 0xc6, 0x65, // .o..M.$...E....e + 0x46, 0x06, 0x04, 0x45, 0x2c, 0x06, 0xc6, 0x26, 0x2c, 0xc7, 0x26, 0x86, 0x2c, 0x65, 0x43, 0x10, // F..E,..&,.&.,eC. + 0x4c, 0x10, 0x08, 0x63, 0x82, 0x40, 0x1c, 0x1b, 0x84, 0x81, 0x98, 0x20, 0x10, 0xc8, 0x06, 0x61, // L..c.@..... ...a + 0x30, 0x28, 0xc0, 0xcd, 0x4d, 0x10, 0x88, 0x64, 0xc3, 0x80, 0x24, 0xc4, 0x04, 0x21, 0xa3, 0x08, // 0(..M..d..$..!.. + 0x4c, 0x10, 0x08, 0x65, 0x83, 0x40, 0x18, 0x1b, 0x12, 0x62, 0x61, 0x08, 0x62, 0x68, 0x08, 0x67, // L..e.@...ba.bh.g + 0x43, 0xf0, 0x4c, 0x10, 0xb6, 0x6a, 0x82, 0x40, 0x2c, 0x1b, 0x10, 0x22, 0x62, 0x08, 0x62, 0x90, // C.L..j.@,.."b.b. + 0x80, 0x0d, 0xc1, 0x34, 0x41, 0xe8, 0xac, 0x0d, 0x08, 0x51, 0x31, 0x04, 0x31, 0x10, 0xc0, 0x86, // ...4A....Q1.1... + 0xc0, 0xda, 0x40, 0x40, 0x00, 0x75, 0x4d, 0x10, 0xbc, 0x6b, 0x43, 0x90, 0x4d, 0x10, 0x04, 0x80, // ..@@.uM..kC.M... + 0x44, 0x5b, 0x58, 0x9a, 0x1b, 0x97, 0x29, 0xab, 0x2f, 0xa8, 0xb7, 0xb9, 0x34, 0xba, 0xb4, 0x37, // D[X...)./...4..7 + 0xb7, 0x09, 0x42, 0xe1, 0x4c, 0x10, 0x8a, 0x67, 0x43, 0x40, 0x4c, 0x10, 0x0a, 0x68, 0x82, 0x50, // ..B.L..gC@L..h.P + 0x44, 0x1b, 0x16, 0xa2, 0xf3, 0x3e, 0x30, 0x08, 0x83, 0x21, 0x0c, 0x08, 0x31, 0x00, 0x88, 0x50, // D....>0..!..1..P + 0x15, 0x61, 0x0d, 0x3d, 0x3d, 0x49, 0x11, 0x4d, 0x10, 0x0a, 0x69, 0x82, 0x40, 0x30, 0x1b, 0x04, // .a.==I.M..i.@0.. + 0x33, 0x30, 0x83, 0x0d, 0xcb, 0x40, 0x06, 0x9e, 0x18, 0x80, 0x41, 0x19, 0x0c, 0x65, 0x30, 0x88, // 30...@....A..e0. + 0xc1, 0x19, 0x6c, 0x10, 0xc6, 0x00, 0x0d, 0x98, 0x4c, 0x59, 0x7d, 0x51, 0x85, 0xc9, 0x9d, 0x95, // ..l.....LY}Q.... + 0xd1, 0x4d, 0x10, 0x8a, 0x69, 0x82, 0x40, 0x34, 0x1b, 0x04, 0x33, 0x60, 0x83, 0x0d, 0x0b, 0xa1, // .M..i.@4..3`.... + 0x06, 0xde, 0x1a, 0x80, 0x81, 0x18, 0x0c, 0x61, 0x40, 0x88, 0x41, 0x1b, 0x6c, 0x08, 0xdc, 0x60, // .......a@.A.l..` + 0xc3, 0x90, 0x06, 0x6f, 0x00, 0x6c, 0x28, 0x36, 0x0e, 0x0e, 0x30, 0xa0, 0x0a, 0x1b, 0x9b, 0x5d, // ...o.l(6..0....] + 0x9b, 0x4b, 0x1a, 0x59, 0x99, 0x1b, 0xdd, 0x94, 0x20, 0xa8, 0x42, 0x86, 0xe7, 0x62, 0x57, 0x26, // .K.Y.... .B..bW& + 0x37, 0x97, 0xf6, 0xe6, 0x36, 0x25, 0x20, 0x9a, 0x90, 0xe1, 0xb9, 0xd8, 0x85, 0xb1, 0xd9, 0x95, // 7...6% ......... + 0xc9, 0x4d, 0x09, 0x8c, 0x3a, 0x64, 0x78, 0x2e, 0x73, 0x68, 0x61, 0x64, 0x65, 0x72, 0x4d, 0x6f, // .M..:dx.shaderMo + 0x64, 0x65, 0x6c, 0x53, 0x82, 0xa4, 0x0c, 0x19, 0x9e, 0x8b, 0x5c, 0xd9, 0xdc, 0x5b, 0x9d, 0xdc, // delS.........[.. + 0x58, 0xd9, 0xdc, 0x94, 0xe0, 0xaa, 0x43, 0x86, 0xe7, 0x62, 0x97, 0x56, 0x76, 0x97, 0x44, 0x36, // X.....C..b.Vv.D6 + 0x45, 0x17, 0x46, 0x57, 0x36, 0x25, 0xc8, 0xea, 0x90, 0xe1, 0xb9, 0x94, 0xb9, 0xd1, 0xc9, 0xe5, // E.FW6%.......... + 0x41, 0xbd, 0xa5, 0xb9, 0xd1, 0xcd, 0x4d, 0x09, 0xe0, 0x00, 0x00, 0x79, 0x18, 0x00, 0x00, 0x4c, // A.....M....y...L + 0x00, 0x00, 0x00, 0x33, 0x08, 0x80, 0x1c, 0xc4, 0xe1, 0x1c, 0x66, 0x14, 0x01, 0x3d, 0x88, 0x43, // ...3......f..=.C + 0x38, 0x84, 0xc3, 0x8c, 0x42, 0x80, 0x07, 0x79, 0x78, 0x07, 0x73, 0x98, 0x71, 0x0c, 0xe6, 0x00, // 8...B..yx.s.q... + 0x0f, 0xed, 0x10, 0x0e, 0xf4, 0x80, 0x0e, 0x33, 0x0c, 0x42, 0x1e, 0xc2, 0xc1, 0x1d, 0xce, 0xa1, // .......3.B...... + 0x1c, 0x66, 0x30, 0x05, 0x3d, 0x88, 0x43, 0x38, 0x84, 0x83, 0x1b, 0xcc, 0x03, 0x3d, 0xc8, 0x43, // .f0.=.C8.....=.C + 0x3d, 0x8c, 0x03, 0x3d, 0xcc, 0x78, 0x8c, 0x74, 0x70, 0x07, 0x7b, 0x08, 0x07, 0x79, 0x48, 0x87, // =..=.x.tp.{..yH. + 0x70, 0x70, 0x07, 0x7a, 0x70, 0x03, 0x76, 0x78, 0x87, 0x70, 0x20, 0x87, 0x19, 0xcc, 0x11, 0x0e, // pp.zp.vx.p ..... + 0xec, 0x90, 0x0e, 0xe1, 0x30, 0x0f, 0x6e, 0x30, 0x0f, 0xe3, 0xf0, 0x0e, 0xf0, 0x50, 0x0e, 0x33, // ....0.n0.....P.3 + 0x10, 0xc4, 0x1d, 0xde, 0x21, 0x1c, 0xd8, 0x21, 0x1d, 0xc2, 0x61, 0x1e, 0x66, 0x30, 0x89, 0x3b, // ....!..!..a.f0.; + 0xbc, 0x83, 0x3b, 0xd0, 0x43, 0x39, 0xb4, 0x03, 0x3c, 0xbc, 0x83, 0x3c, 0x84, 0x03, 0x3b, 0xcc, // ..;.C9..<..<..;. + 0xf0, 0x14, 0x76, 0x60, 0x07, 0x7b, 0x68, 0x07, 0x37, 0x68, 0x87, 0x72, 0x68, 0x07, 0x37, 0x80, // ..v`.{h.7h.rh.7. + 0x87, 0x70, 0x90, 0x87, 0x70, 0x60, 0x07, 0x76, 0x28, 0x07, 0x76, 0xf8, 0x05, 0x76, 0x78, 0x87, // .p..p`.v(.v..vx. + 0x77, 0x80, 0x87, 0x5f, 0x08, 0x87, 0x71, 0x18, 0x87, 0x72, 0x98, 0x87, 0x79, 0x98, 0x81, 0x2c, // w.._..q..r..y.., + 0xee, 0xf0, 0x0e, 0xee, 0xe0, 0x0e, 0xf5, 0xc0, 0x0e, 0xec, 0x30, 0x03, 0x62, 0xc8, 0xa1, 0x1c, // ..........0.b... + 0xe4, 0xa1, 0x1c, 0xcc, 0xa1, 0x1c, 0xe4, 0xa1, 0x1c, 0xdc, 0x61, 0x1c, 0xca, 0x21, 0x1c, 0xc4, // ..........a..!.. + 0x81, 0x1d, 0xca, 0x61, 0x06, 0xd6, 0x90, 0x43, 0x39, 0xc8, 0x43, 0x39, 0x98, 0x43, 0x39, 0xc8, // ...a...C9.C9.C9. + 0x43, 0x39, 0xb8, 0xc3, 0x38, 0x94, 0x43, 0x38, 0x88, 0x03, 0x3b, 0x94, 0xc3, 0x2f, 0xbc, 0x83, // C9..8.C8..;../.. + 0x3c, 0xfc, 0x82, 0x3b, 0xd4, 0x03, 0x3b, 0xb0, 0xc3, 0x0c, 0xc4, 0x21, 0x07, 0x7c, 0x70, 0x03, // <..;..;....!.|p. + 0x7a, 0x28, 0x87, 0x76, 0x80, 0x87, 0x19, 0xd1, 0x43, 0x0e, 0xf8, 0xe0, 0x06, 0xe4, 0x20, 0x0e, // z(.v....C..... . + 0xe7, 0xe0, 0x06, 0xf6, 0x10, 0x0e, 0xf2, 0xc0, 0x0e, 0xe1, 0x90, 0x0f, 0xef, 0x50, 0x0f, 0xf4, // .............P.. + 0x00, 0x00, 0x00, 0x71, 0x20, 0x00, 0x00, 0x19, 0x00, 0x00, 0x00, 0x46, 0xb0, 0x0d, 0x97, 0xef, // ...q ......F.... + 0x3c, 0xbe, 0x10, 0x50, 0x45, 0x41, 0x44, 0xa5, 0x03, 0x0c, 0x25, 0x61, 0x00, 0x02, 0xe6, 0x17, // <..PEAD...%a.... + 0xb7, 0x6d, 0x05, 0xd2, 0x70, 0xf9, 0xce, 0xe3, 0x0b, 0x11, 0x01, 0x4c, 0x44, 0x08, 0x34, 0xc3, // .m..p......LD.4. + 0x42, 0x58, 0xc0, 0x34, 0x5c, 0xbe, 0xf3, 0xf8, 0x8b, 0x03, 0x0c, 0x62, 0xf3, 0x50, 0x93, 0x5f, // BX.4.......b.P._ + 0xdc, 0xb6, 0x0d, 0x54, 0xc3, 0xe5, 0x3b, 0x8f, 0x2f, 0x01, 0xcc, 0xb3, 0x10, 0x25, 0x51, 0x11, // ...T..;./....%Q. + 0x8b, 0x5f, 0xdc, 0xb6, 0x09, 0x54, 0xc3, 0xe5, 0x3b, 0x8f, 0x2f, 0x4d, 0x4e, 0x44, 0xa0, 0xd4, // ._...T..;./MND.. + 0xf4, 0x50, 0x93, 0x5f, 0xdc, 0xb6, 0x01, 0x10, 0x0c, 0x80, 0x34, 0x00, 0x00, 0x00, 0x00, 0x61, // .P._......4....a + 0x20, 0x00, 0x00, 0x39, 0x00, 0x00, 0x00, 0x13, 0x04, 0x41, 0x2c, 0x10, 0x00, 0x00, 0x00, 0x09, // ..9.....A,..... + 0x00, 0x00, 0x00, 0x24, 0x47, 0x00, 0xa8, 0x94, 0x00, 0x91, 0xe2, 0x2b, 0x85, 0x92, 0x9b, 0x01, // ...$G......+.... + 0x28, 0x84, 0xb2, 0xa3, 0x31, 0x46, 0xd0, 0x9a, 0x73, 0x4e, 0x7e, 0x63, 0x04, 0xad, 0x39, 0xe7, // (...1F..sN~c..9. + 0xf4, 0x37, 0x03, 0x00, 0x00, 0x00, 0x00, 0x23, 0x06, 0x09, 0x00, 0x82, 0x60, 0x30, 0x79, 0x87, // .7.....#....`0y. + 0xc4, 0x71, 0xcb, 0x88, 0x41, 0x02, 0x80, 0x20, 0x18, 0x4c, 0x1f, 0x52, 0x75, 0x1d, 0x33, 0x62, // .q..A.. .L.Ru.3b + 0x90, 0x00, 0x20, 0x08, 0x06, 0x13, 0x18, 0x24, 0x93, 0xe7, 0x35, 0x23, 0x06, 0x09, 0x00, 0x82, // .. ....$..5#.... + 0x60, 0x60, 0x94, 0x01, 0x02, 0x06, 0x5f, 0x95, 0x8c, 0x18, 0x24, 0x00, 0x08, 0x82, 0x81, 0x61, // ``...._...$....a + 0x06, 0x49, 0x18, 0x80, 0x81, 0xa3, 0x8c, 0x18, 0x1c, 0x00, 0x08, 0x82, 0x01, 0x44, 0x06, 0xc9, // .I...........D.. + 0x10, 0x06, 0xa3, 0x09, 0x01, 0x30, 0x62, 0xf0, 0x00, 0x20, 0x08, 0x06, 0xcd, 0x19, 0x40, 0x87, // .....0b.. ....@. + 0x41, 0x0c, 0x08, 0x32, 0x06, 0x63, 0xd0, 0x04, 0xa3, 0x09, 0x01, 0x30, 0x9a, 0x20, 0x04, 0xa3, // A..2.c.....0. .. + 0x09, 0x83, 0x30, 0x9a, 0x60, 0x04, 0x16, 0x38, 0xf2, 0xb1, 0x00, 0x82, 0xcf, 0x88, 0x41, 0x02, // ..0.`..8......A. + 0x80, 0x20, 0x18, 0x20, 0x6f, 0x60, 0xa9, 0x81, 0x1a, 0x80, 0x81, 0x31, 0x62, 0x90, 0x00, 0x20, // . . o`.....1b.. + 0x08, 0x06, 0xc8, 0x1b, 0x58, 0x6a, 0xa0, 0x06, 0x58, 0x31, 0x62, 0x90, 0x00, 0x20, 0x08, 0x06, // ....Xj..X1b.. .. + 0xc8, 0x1b, 0x58, 0x6a, 0xa0, 0x06, 0x1f, 0x31, 0x62, 0x90, 0x00, 0x20, 0x08, 0x06, 0xc8, 0x1b, // ..Xj...1b.. .... + 0x58, 0x6a, 0xa0, 0x06, 0x62, 0x10, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Xj..b. ......... + 0x00, 0x10, 0x00, // ... +}; +static const uint8_t fs_imgui_image_mtl[849] = +{ + 0x46, 0x53, 0x48, 0x0b, 0x6f, 0x1e, 0x3e, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x11, 0x73, // FSH.o.><.......s + 0x5f, 0x74, 0x65, 0x78, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x53, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x72, // _texColorSampler + 0x11, 0x01, 0xff, 0xff, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x11, 0x73, 0x5f, 0x74, 0x65, 0x78, // ...........s_tex + 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x54, 0x65, 0x78, 0x74, 0x75, 0x72, 0x65, 0x11, 0x01, 0xff, 0xff, // ColorTexture.... + 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x11, 0x75, 0x5f, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x4c, 0x6f, // .......u_imageLo + 0x64, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x12, 0x01, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, // dEnabled........ + 0x00, 0x00, 0x0a, 0x73, 0x5f, 0x74, 0x65, 0x78, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x10, 0x00, 0x00, // ...s_texColor... + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xd2, 0x02, 0x00, 0x00, 0x23, 0x69, 0x6e, 0x63, 0x6c, // ...........#incl + 0x75, 0x64, 0x65, 0x20, 0x3c, 0x6d, 0x65, 0x74, 0x61, 0x6c, 0x5f, 0x73, 0x74, 0x64, 0x6c, 0x69, // ude .#include ..using + 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x20, 0x6d, 0x65, 0x74, 0x61, 0x6c, // namespace metal + 0x3b, 0x0a, 0x0a, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x20, 0x5f, 0x47, 0x6c, 0x6f, 0x62, 0x61, // ;..struct _Globa + 0x6c, 0x0a, 0x7b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x34, 0x20, 0x75, // l.{. float4 u + 0x5f, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x4c, 0x6f, 0x64, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, // _imageLodEnabled + 0x3b, 0x0a, 0x7d, 0x3b, 0x0a, 0x0a, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x20, 0x78, 0x6c, 0x61, // ;.};..struct xla + 0x74, 0x4d, 0x74, 0x6c, 0x4d, 0x61, 0x69, 0x6e, 0x5f, 0x6f, 0x75, 0x74, 0x0a, 0x7b, 0x0a, 0x20, // tMtlMain_out.{. + 0x20, 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x34, 0x20, 0x62, 0x67, 0x66, 0x78, 0x5f, 0x46, // float4 bgfx_F + 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, 0x61, 0x30, 0x20, 0x5b, 0x5b, 0x63, 0x6f, 0x6c, 0x6f, 0x72, // ragData0 [[color + 0x28, 0x30, 0x29, 0x5d, 0x5d, 0x3b, 0x0a, 0x7d, 0x3b, 0x0a, 0x0a, 0x73, 0x74, 0x72, 0x75, 0x63, // (0)]];.};..struc + 0x74, 0x20, 0x78, 0x6c, 0x61, 0x74, 0x4d, 0x74, 0x6c, 0x4d, 0x61, 0x69, 0x6e, 0x5f, 0x69, 0x6e, // t xlatMtlMain_in + 0x0a, 0x7b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x32, 0x20, 0x76, 0x5f, // .{. float2 v_ + 0x74, 0x65, 0x78, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x30, 0x20, 0x5b, 0x5b, 0x75, 0x73, 0x65, 0x72, // texcoord0 [[user + 0x28, 0x6c, 0x6f, 0x63, 0x6e, 0x30, 0x29, 0x5d, 0x5d, 0x3b, 0x0a, 0x7d, 0x3b, 0x0a, 0x0a, 0x66, // (locn0)]];.};..f + 0x72, 0x61, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x20, 0x78, 0x6c, 0x61, 0x74, 0x4d, 0x74, 0x6c, 0x4d, // ragment xlatMtlM + 0x61, 0x69, 0x6e, 0x5f, 0x6f, 0x75, 0x74, 0x20, 0x78, 0x6c, 0x61, 0x74, 0x4d, 0x74, 0x6c, 0x4d, // ain_out xlatMtlM + 0x61, 0x69, 0x6e, 0x28, 0x78, 0x6c, 0x61, 0x74, 0x4d, 0x74, 0x6c, 0x4d, 0x61, 0x69, 0x6e, 0x5f, // ain(xlatMtlMain_ + 0x69, 0x6e, 0x20, 0x69, 0x6e, 0x20, 0x5b, 0x5b, 0x73, 0x74, 0x61, 0x67, 0x65, 0x5f, 0x69, 0x6e, // in in [[stage_in + 0x5d, 0x5d, 0x2c, 0x20, 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x74, 0x20, 0x5f, 0x47, 0x6c, // ]], constant _Gl + 0x6f, 0x62, 0x61, 0x6c, 0x26, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x75, 0x20, 0x5b, 0x5b, 0x62, // obal& _mtl_u [[b + 0x75, 0x66, 0x66, 0x65, 0x72, 0x28, 0x30, 0x29, 0x5d, 0x5d, 0x2c, 0x20, 0x74, 0x65, 0x78, 0x74, // uffer(0)]], text + 0x75, 0x72, 0x65, 0x32, 0x64, 0x3c, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x3e, 0x20, 0x73, 0x5f, 0x74, // ure2d s_t + 0x65, 0x78, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x20, 0x5b, 0x5b, 0x74, 0x65, 0x78, 0x74, 0x75, 0x72, // exColor [[textur + 0x65, 0x28, 0x30, 0x29, 0x5d, 0x5d, 0x2c, 0x20, 0x73, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x72, 0x20, // e(0)]], sampler + 0x73, 0x5f, 0x74, 0x65, 0x78, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x53, 0x61, 0x6d, 0x70, 0x6c, 0x65, // s_texColorSample + 0x72, 0x20, 0x5b, 0x5b, 0x73, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x72, 0x28, 0x30, 0x29, 0x5d, 0x5d, // r [[sampler(0)]] + 0x29, 0x0a, 0x7b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x78, 0x6c, 0x61, 0x74, 0x4d, 0x74, 0x6c, 0x4d, // ).{. xlatMtlM + 0x61, 0x69, 0x6e, 0x5f, 0x6f, 0x75, 0x74, 0x20, 0x6f, 0x75, 0x74, 0x20, 0x3d, 0x20, 0x7b, 0x7d, // ain_out out = {} + 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x6f, 0x75, 0x74, 0x2e, 0x62, 0x67, 0x66, 0x78, 0x5f, 0x46, // ;. out.bgfx_F + 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, 0x61, 0x30, 0x20, 0x3d, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, // ragData0 = float + 0x34, 0x28, 0x73, 0x5f, 0x74, 0x65, 0x78, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x2e, 0x73, 0x61, 0x6d, // 4(s_texColor.sam + 0x70, 0x6c, 0x65, 0x28, 0x73, 0x5f, 0x74, 0x65, 0x78, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x53, 0x61, // ple(s_texColorSa + 0x6d, 0x70, 0x6c, 0x65, 0x72, 0x2c, 0x20, 0x69, 0x6e, 0x2e, 0x76, 0x5f, 0x74, 0x65, 0x78, 0x63, // mpler, in.v_texc + 0x6f, 0x6f, 0x72, 0x64, 0x30, 0x2c, 0x20, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x28, 0x5f, 0x6d, 0x74, // oord0, level(_mt + 0x6c, 0x5f, 0x75, 0x2e, 0x75, 0x5f, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x4c, 0x6f, 0x64, 0x45, 0x6e, // l_u.u_imageLodEn + 0x61, 0x62, 0x6c, 0x65, 0x64, 0x2e, 0x78, 0x29, 0x29, 0x2e, 0x78, 0x79, 0x7a, 0x2c, 0x20, 0x30, // abled.x)).xyz, 0 + 0x2e, 0x32, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x32, 0x39, 0x38, 0x30, 0x32, 0x33, 0x32, // .200000002980232 + 0x32, 0x33, 0x38, 0x37, 0x36, 0x39, 0x35, 0x33, 0x31, 0x32, 0x35, 0x20, 0x2b, 0x20, 0x28, 0x30, // 23876953125 + (0 + 0x2e, 0x38, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x31, 0x31, 0x39, 0x32, 0x30, 0x39, 0x32, 0x38, // .800000011920928 + 0x39, 0x35, 0x35, 0x30, 0x37, 0x38, 0x31, 0x32, 0x35, 0x20, 0x2a, 0x20, 0x5f, 0x6d, 0x74, 0x6c, // 955078125 * _mtl + 0x5f, 0x75, 0x2e, 0x75, 0x5f, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x4c, 0x6f, 0x64, 0x45, 0x6e, 0x61, // _u.u_imageLodEna + 0x62, 0x6c, 0x65, 0x64, 0x2e, 0x79, 0x29, 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x72, 0x65, // bled.y));. re + 0x74, 0x75, 0x72, 0x6e, 0x20, 0x6f, 0x75, 0x74, 0x3b, 0x0a, 0x7d, 0x0a, 0x0a, 0x00, 0x00, 0x30, // turn out;.}....0 + 0x00, // . }; extern const uint8_t* fs_imgui_image_pssl; extern const uint32_t fs_imgui_image_pssl_size; diff --git a/Modules/Moonlight/Source/ImGui/Resources/fs_ocornut_imgui.bin.hpp b/Modules/Moonlight/Source/ImGui/Resources/fs_ocornut_imgui.bin.hpp index 314cf935..6e2210dd 100644 --- a/Modules/Moonlight/Source/ImGui/Resources/fs_ocornut_imgui.bin.hpp +++ b/Modules/Moonlight/Source/ImGui/Resources/fs_ocornut_imgui.bin.hpp @@ -1,186 +1,464 @@ static const uint8_t fs_ocornut_imgui_glsl[189] = { - 0x46, 0x53, 0x48, 0x0b, 0x01, 0x83, 0xf2, 0xe1, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x05, 0x73, // FSH............s - 0x5f, 0x74, 0x65, 0x78, 0x00, 0x01, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x9a, 0x00, // _tex............ - 0x00, 0x00, 0x76, 0x61, 0x72, 0x79, 0x69, 0x6e, 0x67, 0x20, 0x76, 0x65, 0x63, 0x34, 0x20, 0x76, // ..varying vec4 v - 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x3b, 0x0a, 0x76, 0x61, 0x72, 0x79, 0x69, 0x6e, 0x67, // _color0;.varying - 0x20, 0x76, 0x65, 0x63, 0x32, 0x20, 0x76, 0x5f, 0x74, 0x65, 0x78, 0x63, 0x6f, 0x6f, 0x72, 0x64, // vec2 v_texcoord - 0x30, 0x3b, 0x0a, 0x75, 0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, 0x20, 0x73, 0x61, 0x6d, 0x70, 0x6c, // 0;.uniform sampl - 0x65, 0x72, 0x32, 0x44, 0x20, 0x73, 0x5f, 0x74, 0x65, 0x78, 0x3b, 0x0a, 0x76, 0x6f, 0x69, 0x64, // er2D s_tex;.void - 0x20, 0x6d, 0x61, 0x69, 0x6e, 0x20, 0x28, 0x29, 0x0a, 0x7b, 0x0a, 0x20, 0x20, 0x67, 0x6c, 0x5f, // main ().{. gl_ - 0x46, 0x72, 0x61, 0x67, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x20, 0x3d, 0x20, 0x28, 0x74, 0x65, 0x78, // FragColor = (tex - 0x74, 0x75, 0x72, 0x65, 0x32, 0x44, 0x20, 0x28, 0x73, 0x5f, 0x74, 0x65, 0x78, 0x2c, 0x20, 0x76, // ture2D (s_tex, v - 0x5f, 0x74, 0x65, 0x78, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x30, 0x29, 0x20, 0x2a, 0x20, 0x76, 0x5f, // _texcoord0) * v_ - 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x29, 0x3b, 0x0a, 0x7d, 0x0a, 0x0a, 0x00, // color0);.}... + 0x46, 0x53, 0x48, 0x0b, 0x01, 0x83, 0xf2, 0xe1, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x05, 0x73, // FSH............s + 0x5f, 0x74, 0x65, 0x78, 0x00, 0x01, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x9a, 0x00, // _tex............ + 0x00, 0x00, 0x76, 0x61, 0x72, 0x79, 0x69, 0x6e, 0x67, 0x20, 0x76, 0x65, 0x63, 0x34, 0x20, 0x76, // ..varying vec4 v + 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x3b, 0x0a, 0x76, 0x61, 0x72, 0x79, 0x69, 0x6e, 0x67, // _color0;.varying + 0x20, 0x76, 0x65, 0x63, 0x32, 0x20, 0x76, 0x5f, 0x74, 0x65, 0x78, 0x63, 0x6f, 0x6f, 0x72, 0x64, // vec2 v_texcoord + 0x30, 0x3b, 0x0a, 0x75, 0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, 0x20, 0x73, 0x61, 0x6d, 0x70, 0x6c, // 0;.uniform sampl + 0x65, 0x72, 0x32, 0x44, 0x20, 0x73, 0x5f, 0x74, 0x65, 0x78, 0x3b, 0x0a, 0x76, 0x6f, 0x69, 0x64, // er2D s_tex;.void + 0x20, 0x6d, 0x61, 0x69, 0x6e, 0x20, 0x28, 0x29, 0x0a, 0x7b, 0x0a, 0x20, 0x20, 0x67, 0x6c, 0x5f, // main ().{. gl_ + 0x46, 0x72, 0x61, 0x67, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x20, 0x3d, 0x20, 0x28, 0x74, 0x65, 0x78, // FragColor = (tex + 0x74, 0x75, 0x72, 0x65, 0x32, 0x44, 0x20, 0x28, 0x73, 0x5f, 0x74, 0x65, 0x78, 0x2c, 0x20, 0x76, // ture2D (s_tex, v + 0x5f, 0x74, 0x65, 0x78, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x30, 0x29, 0x20, 0x2a, 0x20, 0x76, 0x5f, // _texcoord0) * v_ + 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x29, 0x3b, 0x0a, 0x7d, 0x0a, 0x0a, 0x00, // color0);.}... }; static const uint8_t fs_ocornut_imgui_essl[246] = { - 0x46, 0x53, 0x48, 0x0b, 0x01, 0x83, 0xf2, 0xe1, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x05, 0x73, // FSH............s - 0x5f, 0x74, 0x65, 0x78, 0x00, 0x01, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0xd3, 0x00, // _tex............ - 0x00, 0x00, 0x76, 0x61, 0x72, 0x79, 0x69, 0x6e, 0x67, 0x20, 0x68, 0x69, 0x67, 0x68, 0x70, 0x20, // ..varying highp - 0x76, 0x65, 0x63, 0x34, 0x20, 0x76, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x3b, 0x0a, 0x76, // vec4 v_color0;.v - 0x61, 0x72, 0x79, 0x69, 0x6e, 0x67, 0x20, 0x68, 0x69, 0x67, 0x68, 0x70, 0x20, 0x76, 0x65, 0x63, // arying highp vec - 0x32, 0x20, 0x76, 0x5f, 0x74, 0x65, 0x78, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x30, 0x3b, 0x0a, 0x75, // 2 v_texcoord0;.u - 0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, 0x20, 0x73, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x72, 0x32, 0x44, // niform sampler2D - 0x20, 0x73, 0x5f, 0x74, 0x65, 0x78, 0x3b, 0x0a, 0x76, 0x6f, 0x69, 0x64, 0x20, 0x6d, 0x61, 0x69, // s_tex;.void mai - 0x6e, 0x20, 0x28, 0x29, 0x0a, 0x7b, 0x0a, 0x20, 0x20, 0x6c, 0x6f, 0x77, 0x70, 0x20, 0x76, 0x65, // n ().{. lowp ve - 0x63, 0x34, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x31, 0x3b, 0x0a, 0x20, 0x20, 0x74, // c4 tmpvar_1;. t - 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x31, 0x20, 0x3d, 0x20, 0x74, 0x65, 0x78, 0x74, 0x75, 0x72, // mpvar_1 = textur - 0x65, 0x32, 0x44, 0x20, 0x28, 0x73, 0x5f, 0x74, 0x65, 0x78, 0x2c, 0x20, 0x76, 0x5f, 0x74, 0x65, // e2D (s_tex, v_te - 0x78, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x30, 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x67, 0x6c, 0x5f, 0x46, // xcoord0);. gl_F - 0x72, 0x61, 0x67, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x20, 0x3d, 0x20, 0x28, 0x74, 0x6d, 0x70, 0x76, // ragColor = (tmpv - 0x61, 0x72, 0x5f, 0x31, 0x20, 0x2a, 0x20, 0x76, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x29, // ar_1 * v_color0) - 0x3b, 0x0a, 0x7d, 0x0a, 0x0a, 0x00, // ;.}... + 0x46, 0x53, 0x48, 0x0b, 0x01, 0x83, 0xf2, 0xe1, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x05, 0x73, // FSH............s + 0x5f, 0x74, 0x65, 0x78, 0x00, 0x01, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0xd3, 0x00, // _tex............ + 0x00, 0x00, 0x76, 0x61, 0x72, 0x79, 0x69, 0x6e, 0x67, 0x20, 0x68, 0x69, 0x67, 0x68, 0x70, 0x20, // ..varying highp + 0x76, 0x65, 0x63, 0x34, 0x20, 0x76, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x3b, 0x0a, 0x76, // vec4 v_color0;.v + 0x61, 0x72, 0x79, 0x69, 0x6e, 0x67, 0x20, 0x68, 0x69, 0x67, 0x68, 0x70, 0x20, 0x76, 0x65, 0x63, // arying highp vec + 0x32, 0x20, 0x76, 0x5f, 0x74, 0x65, 0x78, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x30, 0x3b, 0x0a, 0x75, // 2 v_texcoord0;.u + 0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, 0x20, 0x73, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x72, 0x32, 0x44, // niform sampler2D + 0x20, 0x73, 0x5f, 0x74, 0x65, 0x78, 0x3b, 0x0a, 0x76, 0x6f, 0x69, 0x64, 0x20, 0x6d, 0x61, 0x69, // s_tex;.void mai + 0x6e, 0x20, 0x28, 0x29, 0x0a, 0x7b, 0x0a, 0x20, 0x20, 0x6c, 0x6f, 0x77, 0x70, 0x20, 0x76, 0x65, // n ().{. lowp ve + 0x63, 0x34, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x31, 0x3b, 0x0a, 0x20, 0x20, 0x74, // c4 tmpvar_1;. t + 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x31, 0x20, 0x3d, 0x20, 0x74, 0x65, 0x78, 0x74, 0x75, 0x72, // mpvar_1 = textur + 0x65, 0x32, 0x44, 0x20, 0x28, 0x73, 0x5f, 0x74, 0x65, 0x78, 0x2c, 0x20, 0x76, 0x5f, 0x74, 0x65, // e2D (s_tex, v_te + 0x78, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x30, 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x67, 0x6c, 0x5f, 0x46, // xcoord0);. gl_F + 0x72, 0x61, 0x67, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x20, 0x3d, 0x20, 0x28, 0x74, 0x6d, 0x70, 0x76, // ragColor = (tmpv + 0x61, 0x72, 0x5f, 0x31, 0x20, 0x2a, 0x20, 0x76, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x29, // ar_1 * v_color0) + 0x3b, 0x0a, 0x7d, 0x0a, 0x0a, 0x00, // ;.}... }; -static const uint8_t fs_ocornut_imgui_spv[910] = +static const uint8_t fs_ocornut_imgui_spv[850] = { - 0x46, 0x53, 0x48, 0x0b, 0x01, 0x83, 0xf2, 0xe1, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x05, 0x73, // FSH............s - 0x5f, 0x74, 0x65, 0x78, 0x30, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x02, 0x1a, 0x00, 0x68, 0x03, // _tex0.........h. - 0x00, 0x00, 0x03, 0x02, 0x23, 0x07, 0x00, 0x00, 0x01, 0x00, 0x0a, 0x00, 0x08, 0x00, 0x97, 0x00, // ....#........... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x11, 0x00, 0x02, 0x00, 0x01, 0x00, 0x00, 0x00, 0x0b, 0x00, // ................ - 0x06, 0x00, 0x01, 0x00, 0x00, 0x00, 0x47, 0x4c, 0x53, 0x4c, 0x2e, 0x73, 0x74, 0x64, 0x2e, 0x34, // ......GLSL.std.4 - 0x35, 0x30, 0x00, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, // 50.............. - 0x00, 0x00, 0x0f, 0x00, 0x09, 0x00, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x6d, 0x61, // ..............ma - 0x69, 0x6e, 0x00, 0x00, 0x00, 0x00, 0x4e, 0x00, 0x00, 0x00, 0x51, 0x00, 0x00, 0x00, 0x55, 0x00, // in....N...Q...U. - 0x00, 0x00, 0x62, 0x00, 0x00, 0x00, 0x10, 0x00, 0x03, 0x00, 0x04, 0x00, 0x00, 0x00, 0x07, 0x00, // ..b............. - 0x00, 0x00, 0x03, 0x00, 0x03, 0x00, 0x05, 0x00, 0x00, 0x00, 0xf4, 0x01, 0x00, 0x00, 0x05, 0x00, // ................ - 0x04, 0x00, 0x04, 0x00, 0x00, 0x00, 0x6d, 0x61, 0x69, 0x6e, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, // ......main...... - 0x06, 0x00, 0x23, 0x00, 0x00, 0x00, 0x73, 0x5f, 0x74, 0x65, 0x78, 0x53, 0x61, 0x6d, 0x70, 0x6c, // ..#...s_texSampl - 0x65, 0x72, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x06, 0x00, 0x26, 0x00, 0x00, 0x00, 0x73, 0x5f, // er........&...s_ - 0x74, 0x65, 0x78, 0x54, 0x65, 0x78, 0x74, 0x75, 0x72, 0x65, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, // texTexture...... - 0x06, 0x00, 0x4e, 0x00, 0x00, 0x00, 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, 0x43, 0x6f, 0x6f, // ..N...gl_FragCoo - 0x72, 0x64, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x05, 0x00, 0x51, 0x00, 0x00, 0x00, 0x76, 0x5f, // rd........Q...v_ - 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x05, 0x00, 0x55, 0x00, // color0........U. - 0x00, 0x00, 0x76, 0x5f, 0x74, 0x65, 0x78, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x30, 0x00, 0x05, 0x00, // ..v_texcoord0... - 0x06, 0x00, 0x62, 0x00, 0x00, 0x00, 0x62, 0x67, 0x66, 0x78, 0x5f, 0x46, 0x72, 0x61, 0x67, 0x44, // ..b...bgfx_FragD - 0x61, 0x74, 0x61, 0x30, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0x23, 0x00, 0x00, 0x00, 0x22, 0x00, // ata0..G...#...". - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0x23, 0x00, 0x00, 0x00, 0x21, 0x00, // ......G...#...!. - 0x00, 0x00, 0x12, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0x26, 0x00, 0x00, 0x00, 0x22, 0x00, // ......G...&...". - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0x26, 0x00, 0x00, 0x00, 0x21, 0x00, // ......G...&...!. - 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0x4e, 0x00, 0x00, 0x00, 0x0b, 0x00, // ......G...N..... - 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0x51, 0x00, 0x00, 0x00, 0x1e, 0x00, // ......G...Q..... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0x55, 0x00, 0x00, 0x00, 0x1e, 0x00, // ......G...U..... - 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0x62, 0x00, 0x00, 0x00, 0x1e, 0x00, // ......G...b..... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x13, 0x00, 0x02, 0x00, 0x02, 0x00, 0x00, 0x00, 0x21, 0x00, // ..............!. - 0x03, 0x00, 0x03, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x1a, 0x00, 0x02, 0x00, 0x06, 0x00, // ................ - 0x00, 0x00, 0x16, 0x00, 0x03, 0x00, 0x07, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x19, 0x00, // .......... ..... - 0x09, 0x00, 0x08, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, // ................ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, // ................ - 0x00, 0x00, 0x17, 0x00, 0x04, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x02, 0x00, // ................ - 0x00, 0x00, 0x17, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x04, 0x00, // ................ - 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x22, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, // .. ..."......... - 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x22, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x00, 0x00, // ..;..."...#..... - 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x25, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, // .. ...%......... - 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x25, 0x00, 0x00, 0x00, 0x26, 0x00, 0x00, 0x00, 0x00, 0x00, // ..;...%...&..... - 0x00, 0x00, 0x1b, 0x00, 0x03, 0x00, 0x32, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x20, 0x00, // ......2....... . - 0x04, 0x00, 0x4d, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x3b, 0x00, // ..M...........;. - 0x04, 0x00, 0x4d, 0x00, 0x00, 0x00, 0x4e, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x3b, 0x00, // ..M...N.......;. - 0x04, 0x00, 0x4d, 0x00, 0x00, 0x00, 0x51, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x20, 0x00, // ..M...Q....... . - 0x04, 0x00, 0x54, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x3b, 0x00, // ..T...........;. - 0x04, 0x00, 0x54, 0x00, 0x00, 0x00, 0x55, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x20, 0x00, // ..T...U....... . - 0x04, 0x00, 0x61, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x3b, 0x00, // ..a...........;. - 0x04, 0x00, 0x61, 0x00, 0x00, 0x00, 0x62, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x36, 0x00, // ..a...b.......6. - 0x05, 0x00, 0x02, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, // ................ - 0x00, 0x00, 0xf8, 0x00, 0x02, 0x00, 0x05, 0x00, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x06, 0x00, // ..........=..... - 0x00, 0x00, 0x24, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x08, 0x00, // ..$...#...=..... - 0x00, 0x00, 0x27, 0x00, 0x00, 0x00, 0x26, 0x00, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x0d, 0x00, // ..'...&...=..... - 0x00, 0x00, 0x52, 0x00, 0x00, 0x00, 0x51, 0x00, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x0b, 0x00, // ..R...Q...=..... - 0x00, 0x00, 0x56, 0x00, 0x00, 0x00, 0x55, 0x00, 0x00, 0x00, 0x56, 0x00, 0x05, 0x00, 0x32, 0x00, // ..V...U...V...2. - 0x00, 0x00, 0x94, 0x00, 0x00, 0x00, 0x27, 0x00, 0x00, 0x00, 0x24, 0x00, 0x00, 0x00, 0x57, 0x00, // ......'...$...W. - 0x05, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x96, 0x00, 0x00, 0x00, 0x94, 0x00, 0x00, 0x00, 0x56, 0x00, // ..............V. - 0x00, 0x00, 0x85, 0x00, 0x05, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x86, 0x00, 0x00, 0x00, 0x96, 0x00, // ................ - 0x00, 0x00, 0x52, 0x00, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0x62, 0x00, 0x00, 0x00, 0x86, 0x00, // ..R...>...b..... - 0x00, 0x00, 0xfd, 0x00, 0x01, 0x00, 0x38, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, // ......8....... + 0x46, 0x53, 0x48, 0x0b, 0x01, 0x83, 0xf2, 0xe1, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x05, 0x73, // FSH............s + 0x5f, 0x74, 0x65, 0x78, 0x30, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x02, 0x26, 0x00, 0x2c, 0x03, // _tex0.......&.,. + 0x00, 0x00, 0x03, 0x02, 0x23, 0x07, 0x00, 0x00, 0x01, 0x00, 0x0b, 0x00, 0x08, 0x00, 0x92, 0x00, // ....#........... + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x11, 0x00, 0x02, 0x00, 0x01, 0x00, 0x00, 0x00, 0x0b, 0x00, // ................ + 0x06, 0x00, 0x01, 0x00, 0x00, 0x00, 0x47, 0x4c, 0x53, 0x4c, 0x2e, 0x73, 0x74, 0x64, 0x2e, 0x34, // ......GLSL.std.4 + 0x35, 0x30, 0x00, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, // 50.............. + 0x00, 0x00, 0x0f, 0x00, 0x08, 0x00, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x6d, 0x61, // ..............ma + 0x69, 0x6e, 0x00, 0x00, 0x00, 0x00, 0x4e, 0x00, 0x00, 0x00, 0x52, 0x00, 0x00, 0x00, 0x5f, 0x00, // in....N...R..._. + 0x00, 0x00, 0x10, 0x00, 0x03, 0x00, 0x04, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x03, 0x00, // ................ + 0x03, 0x00, 0x05, 0x00, 0x00, 0x00, 0xf4, 0x01, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0x04, 0x00, // ................ + 0x00, 0x00, 0x6d, 0x61, 0x69, 0x6e, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x06, 0x00, 0x23, 0x00, // ..main........#. + 0x00, 0x00, 0x73, 0x5f, 0x74, 0x65, 0x78, 0x53, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x72, 0x00, 0x00, // ..s_texSampler.. + 0x00, 0x00, 0x05, 0x00, 0x06, 0x00, 0x26, 0x00, 0x00, 0x00, 0x73, 0x5f, 0x74, 0x65, 0x78, 0x54, // ......&...s_texT + 0x65, 0x78, 0x74, 0x75, 0x72, 0x65, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x05, 0x00, 0x4e, 0x00, // exture........N. + 0x00, 0x00, 0x76, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, // ..v_color0...... + 0x05, 0x00, 0x52, 0x00, 0x00, 0x00, 0x76, 0x5f, 0x74, 0x65, 0x78, 0x63, 0x6f, 0x6f, 0x72, 0x64, // ..R...v_texcoord + 0x30, 0x00, 0x05, 0x00, 0x06, 0x00, 0x5f, 0x00, 0x00, 0x00, 0x62, 0x67, 0x66, 0x78, 0x5f, 0x46, // 0....._...bgfx_F + 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, 0x61, 0x30, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0x23, 0x00, // ragData0..G...#. + 0x00, 0x00, 0x21, 0x00, 0x00, 0x00, 0x12, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0x23, 0x00, // ..!.......G...#. + 0x00, 0x00, 0x22, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0x26, 0x00, // ..".......G...&. + 0x00, 0x00, 0x21, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0x26, 0x00, // ..!.......G...&. + 0x00, 0x00, 0x22, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0x4e, 0x00, // ..".......G...N. + 0x00, 0x00, 0x1e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0x52, 0x00, // ..........G...R. + 0x00, 0x00, 0x1e, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0x5f, 0x00, // ..........G..._. + 0x00, 0x00, 0x1e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x13, 0x00, 0x02, 0x00, 0x02, 0x00, // ................ + 0x00, 0x00, 0x21, 0x00, 0x03, 0x00, 0x03, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x1a, 0x00, // ..!............. + 0x02, 0x00, 0x06, 0x00, 0x00, 0x00, 0x16, 0x00, 0x03, 0x00, 0x07, 0x00, 0x00, 0x00, 0x20, 0x00, // .............. . + 0x00, 0x00, 0x19, 0x00, 0x09, 0x00, 0x08, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x01, 0x00, // ................ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, // ................ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x17, 0x00, 0x04, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x07, 0x00, // ................ + 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x17, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x07, 0x00, // ................ + 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x22, 0x00, 0x00, 0x00, 0x00, 0x00, // ...... ..."..... + 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x22, 0x00, 0x00, 0x00, 0x23, 0x00, // ......;..."...#. + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x25, 0x00, 0x00, 0x00, 0x00, 0x00, // ...... ...%..... + 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x25, 0x00, 0x00, 0x00, 0x26, 0x00, // ......;...%...&. + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1b, 0x00, 0x03, 0x00, 0x32, 0x00, 0x00, 0x00, 0x08, 0x00, // ..........2..... + 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x4a, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x0d, 0x00, // .. ...J......... + 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x4a, 0x00, 0x00, 0x00, 0x4e, 0x00, 0x00, 0x00, 0x01, 0x00, // ..;...J...N..... + 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x51, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x0b, 0x00, // .. ...Q......... + 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x51, 0x00, 0x00, 0x00, 0x52, 0x00, 0x00, 0x00, 0x01, 0x00, // ..;...Q...R..... + 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x5e, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x0d, 0x00, // .. ...^......... + 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x5e, 0x00, 0x00, 0x00, 0x5f, 0x00, 0x00, 0x00, 0x03, 0x00, // ..;...^..._..... + 0x00, 0x00, 0x36, 0x00, 0x05, 0x00, 0x02, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, // ..6............. + 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0xf8, 0x00, 0x02, 0x00, 0x05, 0x00, 0x00, 0x00, 0x3d, 0x00, // ..............=. + 0x04, 0x00, 0x06, 0x00, 0x00, 0x00, 0x24, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x3d, 0x00, // ......$...#...=. + 0x04, 0x00, 0x08, 0x00, 0x00, 0x00, 0x27, 0x00, 0x00, 0x00, 0x26, 0x00, 0x00, 0x00, 0x3d, 0x00, // ......'...&...=. + 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x4f, 0x00, 0x00, 0x00, 0x4e, 0x00, 0x00, 0x00, 0x3d, 0x00, // ......O...N...=. + 0x04, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x53, 0x00, 0x00, 0x00, 0x52, 0x00, 0x00, 0x00, 0x56, 0x00, // ......S...R...V. + 0x05, 0x00, 0x32, 0x00, 0x00, 0x00, 0x8f, 0x00, 0x00, 0x00, 0x27, 0x00, 0x00, 0x00, 0x24, 0x00, // ..2.......'...$. + 0x00, 0x00, 0x57, 0x00, 0x05, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x91, 0x00, 0x00, 0x00, 0x8f, 0x00, // ..W............. + 0x00, 0x00, 0x53, 0x00, 0x00, 0x00, 0x85, 0x00, 0x05, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x84, 0x00, // ..S............. + 0x00, 0x00, 0x91, 0x00, 0x00, 0x00, 0x4f, 0x00, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0x5f, 0x00, // ......O...>..._. + 0x00, 0x00, 0x84, 0x00, 0x00, 0x00, 0xfd, 0x00, 0x01, 0x00, 0x38, 0x00, 0x01, 0x00, 0x00, 0x00, // ..........8..... + 0x00, 0x00, // .. }; -static const uint8_t fs_ocornut_imgui_dx9[239] = +static const uint8_t fs_ocornut_imgui_wgsl[616] = { - 0x46, 0x53, 0x48, 0x0b, 0x01, 0x83, 0xf2, 0xe1, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x05, 0x73, // FSH............s - 0x5f, 0x74, 0x65, 0x78, 0x30, 0x01, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0xcc, 0x00, // _tex0........... - 0x00, 0x00, 0x00, 0x03, 0xff, 0xff, 0xfe, 0xff, 0x1f, 0x00, 0x43, 0x54, 0x41, 0x42, 0x1c, 0x00, // ..........CTAB.. - 0x00, 0x00, 0x4f, 0x00, 0x00, 0x00, 0x00, 0x03, 0xff, 0xff, 0x01, 0x00, 0x00, 0x00, 0x1c, 0x00, // ..O............. - 0x00, 0x00, 0x00, 0x91, 0x00, 0x00, 0x48, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x03, 0x00, // ......H...0..... - 0x00, 0x00, 0x01, 0x00, 0x02, 0x00, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x73, 0x5f, // ......8.......s_ - 0x74, 0x65, 0x78, 0x00, 0xab, 0xab, 0x04, 0x00, 0x0c, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, // tex............. - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x73, 0x5f, 0x33, 0x5f, 0x30, 0x00, 0x4d, 0x69, 0x63, // ......ps_3_0.Mic - 0x72, 0x6f, 0x73, 0x6f, 0x66, 0x74, 0x20, 0x28, 0x52, 0x29, 0x20, 0x48, 0x4c, 0x53, 0x4c, 0x20, // rosoft (R) HLSL - 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, 0x20, 0x43, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x72, 0x20, // Shader Compiler - 0x31, 0x30, 0x2e, 0x31, 0x00, 0xab, 0x1f, 0x00, 0x00, 0x02, 0x0a, 0x00, 0x00, 0x80, 0x00, 0x00, // 10.1............ - 0x0f, 0x90, 0x1f, 0x00, 0x00, 0x02, 0x05, 0x00, 0x00, 0x80, 0x01, 0x00, 0x03, 0x90, 0x1f, 0x00, // ................ - 0x00, 0x02, 0x00, 0x00, 0x00, 0x90, 0x00, 0x08, 0x0f, 0xa0, 0x42, 0x00, 0x00, 0x03, 0x00, 0x00, // ..........B..... - 0x0f, 0x80, 0x01, 0x00, 0xe4, 0x90, 0x00, 0x08, 0xe4, 0xa0, 0x05, 0x00, 0x00, 0x03, 0x00, 0x08, // ................ - 0x0f, 0x80, 0x00, 0x00, 0xe4, 0x80, 0x00, 0x00, 0xe4, 0x90, 0xff, 0xff, 0x00, 0x00, 0x00, // ............... + 0x46, 0x53, 0x48, 0x0b, 0x01, 0x83, 0xf2, 0xe1, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x05, 0x73, // FSH............s + 0x5f, 0x74, 0x65, 0x78, 0x30, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x02, 0x26, 0x00, 0x40, 0x02, // _tex0.......&.@. + 0x00, 0x00, 0x64, 0x69, 0x61, 0x67, 0x6e, 0x6f, 0x73, 0x74, 0x69, 0x63, 0x28, 0x6f, 0x66, 0x66, // ..diagnostic(off + 0x2c, 0x20, 0x64, 0x65, 0x72, 0x69, 0x76, 0x61, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x75, 0x6e, 0x69, // , derivative_uni + 0x66, 0x6f, 0x72, 0x6d, 0x69, 0x74, 0x79, 0x29, 0x3b, 0x0a, 0x64, 0x69, 0x61, 0x67, 0x6e, 0x6f, // formity);.diagno + 0x73, 0x74, 0x69, 0x63, 0x28, 0x6f, 0x66, 0x66, 0x2c, 0x20, 0x73, 0x75, 0x62, 0x67, 0x72, 0x6f, // stic(off, subgro + 0x75, 0x70, 0x5f, 0x75, 0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, 0x69, 0x74, 0x79, 0x29, 0x3b, 0x0a, // up_uniformity);. + 0x0a, 0x40, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x28, 0x30, 0x75, 0x29, 0x20, 0x40, 0x62, 0x69, 0x6e, // .@group(0u) @bin + 0x64, 0x69, 0x6e, 0x67, 0x28, 0x31, 0x38, 0x75, 0x29, 0x20, 0x76, 0x61, 0x72, 0x20, 0x73, 0x5f, // ding(18u) var s_ + 0x74, 0x65, 0x78, 0x53, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x72, 0x20, 0x3a, 0x20, 0x73, 0x61, 0x6d, // texSampler : sam + 0x70, 0x6c, 0x65, 0x72, 0x3b, 0x0a, 0x0a, 0x40, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x28, 0x30, 0x75, // pler;..@group(0u + 0x29, 0x20, 0x40, 0x62, 0x69, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x28, 0x32, 0x75, 0x29, 0x20, 0x76, // ) @binding(2u) v + 0x61, 0x72, 0x20, 0x73, 0x5f, 0x74, 0x65, 0x78, 0x54, 0x65, 0x78, 0x74, 0x75, 0x72, 0x65, 0x20, // ar s_texTexture + 0x3a, 0x20, 0x74, 0x65, 0x78, 0x74, 0x75, 0x72, 0x65, 0x5f, 0x32, 0x64, 0x3c, 0x66, 0x33, 0x32, // : texture_2d;..var + 0x20, 0x62, 0x67, 0x66, 0x78, 0x5f, 0x46, 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, 0x61, 0x30, 0x20, // bgfx_FragData0 + 0x3a, 0x20, 0x76, 0x65, 0x63, 0x34, 0x3c, 0x66, 0x33, 0x32, 0x3e, 0x3b, 0x0a, 0x0a, 0x66, 0x6e, // : vec4;..fn + 0x20, 0x6d, 0x61, 0x69, 0x6e, 0x5f, 0x69, 0x6e, 0x6e, 0x65, 0x72, 0x28, 0x76, 0x5f, 0x63, 0x6f, // main_inner(v_co + 0x6c, 0x6f, 0x72, 0x30, 0x20, 0x3a, 0x20, 0x76, 0x65, 0x63, 0x34, 0x3c, 0x66, 0x33, 0x32, 0x3e, // lor0 : vec4 + 0x2c, 0x20, 0x76, 0x5f, 0x74, 0x65, 0x78, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x30, 0x20, 0x3a, 0x20, // , v_texcoord0 : + 0x76, 0x65, 0x63, 0x32, 0x3c, 0x66, 0x33, 0x32, 0x3e, 0x29, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x62, // vec2) {. b + 0x67, 0x66, 0x78, 0x5f, 0x46, 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, 0x61, 0x30, 0x20, 0x3d, 0x20, // gfx_FragData0 = + 0x28, 0x74, 0x65, 0x78, 0x74, 0x75, 0x72, 0x65, 0x53, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x28, 0x73, // (textureSample(s + 0x5f, 0x74, 0x65, 0x78, 0x54, 0x65, 0x78, 0x74, 0x75, 0x72, 0x65, 0x2c, 0x20, 0x73, 0x5f, 0x74, // _texTexture, s_t + 0x65, 0x78, 0x53, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x72, 0x2c, 0x20, 0x76, 0x5f, 0x74, 0x65, 0x78, // exSampler, v_tex + 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x30, 0x29, 0x20, 0x2a, 0x20, 0x76, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, // coord0) * v_colo + 0x72, 0x30, 0x29, 0x3b, 0x0a, 0x7d, 0x0a, 0x0a, 0x40, 0x66, 0x72, 0x61, 0x67, 0x6d, 0x65, 0x6e, // r0);.}..@fragmen + 0x74, 0x0a, 0x66, 0x6e, 0x20, 0x6d, 0x61, 0x69, 0x6e, 0x28, 0x40, 0x6c, 0x6f, 0x63, 0x61, 0x74, // t.fn main(@locat + 0x69, 0x6f, 0x6e, 0x28, 0x30, 0x75, 0x29, 0x20, 0x76, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x30, // ion(0u) v_color0 + 0x20, 0x3a, 0x20, 0x76, 0x65, 0x63, 0x34, 0x3c, 0x66, 0x33, 0x32, 0x3e, 0x2c, 0x20, 0x40, 0x6c, // : vec4, @l + 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x31, 0x75, 0x29, 0x20, 0x76, 0x5f, 0x74, 0x65, // ocation(1u) v_te + 0x78, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x30, 0x20, 0x3a, 0x20, 0x76, 0x65, 0x63, 0x32, 0x3c, 0x66, // xcoord0 : vec2) -> @locatio + 0x6e, 0x28, 0x30, 0x75, 0x29, 0x20, 0x76, 0x65, 0x63, 0x34, 0x3c, 0x66, 0x33, 0x32, 0x3e, 0x20, // n(0u) vec4 + 0x7b, 0x0a, 0x20, 0x20, 0x6d, 0x61, 0x69, 0x6e, 0x5f, 0x69, 0x6e, 0x6e, 0x65, 0x72, 0x28, 0x76, // {. main_inner(v + 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x2c, 0x20, 0x76, 0x5f, 0x74, 0x65, 0x78, 0x63, 0x6f, // _color0, v_texco + 0x6f, 0x72, 0x64, 0x30, 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, // ord0);. return + 0x62, 0x67, 0x66, 0x78, 0x5f, 0x46, 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, 0x61, 0x30, 0x3b, 0x0a, // bgfx_FragData0;. + 0x7d, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // }....... }; -static const uint8_t fs_ocornut_imgui_dx11[422] = +static const uint8_t fs_ocornut_imgui_dxbc[418] = { - 0x46, 0x53, 0x48, 0x0b, 0x01, 0x83, 0xf2, 0xe1, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x05, 0x73, // FSH............s - 0x5f, 0x74, 0x65, 0x78, 0x30, 0x01, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x73, // _tex0..........s - 0x5f, 0x74, 0x65, 0x78, 0x30, 0x01, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x01, // _tex0.........p. - 0x00, 0x00, 0x44, 0x58, 0x42, 0x43, 0xbe, 0x78, 0xe7, 0xa5, 0x19, 0x0c, 0x70, 0xeb, 0x4c, 0xb1, // ..DXBC.x....p.L. - 0xac, 0x1f, 0x16, 0x84, 0xe9, 0x97, 0x01, 0x00, 0x00, 0x00, 0x70, 0x01, 0x00, 0x00, 0x03, 0x00, // ..........p..... - 0x00, 0x00, 0x2c, 0x00, 0x00, 0x00, 0xa0, 0x00, 0x00, 0x00, 0xd4, 0x00, 0x00, 0x00, 0x49, 0x53, // ..,...........IS - 0x47, 0x4e, 0x6c, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x50, 0x00, // GNl...........P. - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, // ................ - 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x5c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ................ - 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x0f, 0x0f, 0x00, 0x00, 0x62, 0x00, // ..............b. - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x02, 0x00, // ................ - 0x00, 0x00, 0x03, 0x03, 0x00, 0x00, 0x53, 0x56, 0x5f, 0x50, 0x4f, 0x53, 0x49, 0x54, 0x49, 0x4f, // ......SV_POSITIO - 0x4e, 0x00, 0x43, 0x4f, 0x4c, 0x4f, 0x52, 0x00, 0x54, 0x45, 0x58, 0x43, 0x4f, 0x4f, 0x52, 0x44, // N.COLOR.TEXCOORD - 0x00, 0xab, 0x4f, 0x53, 0x47, 0x4e, 0x2c, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x08, 0x00, // ..OSGN,......... - 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, // .. ............. - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x53, 0x56, 0x5f, 0x54, 0x41, 0x52, // ..........SV_TAR - 0x47, 0x45, 0x54, 0x00, 0xab, 0xab, 0x53, 0x48, 0x44, 0x52, 0x94, 0x00, 0x00, 0x00, 0x40, 0x00, // GET...SHDR....@. - 0x00, 0x00, 0x25, 0x00, 0x00, 0x00, 0x5a, 0x00, 0x00, 0x03, 0x00, 0x60, 0x10, 0x00, 0x00, 0x00, // ..%...Z....`.... - 0x00, 0x00, 0x58, 0x18, 0x00, 0x04, 0x00, 0x70, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x55, 0x55, // ..X....p......UU - 0x00, 0x00, 0x62, 0x10, 0x00, 0x03, 0xf2, 0x10, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x62, 0x10, // ..b...........b. - 0x00, 0x03, 0x32, 0x10, 0x10, 0x00, 0x02, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x03, 0xf2, 0x20, // ..2.......e.... - 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x68, 0x00, 0x00, 0x02, 0x01, 0x00, 0x00, 0x00, 0x45, 0x00, // ......h.......E. - 0x00, 0x09, 0xf2, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x10, 0x10, 0x00, 0x02, 0x00, // ..........F..... - 0x00, 0x00, 0x46, 0x7e, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x10, 0x00, 0x00, 0x00, // ..F~.......`.... - 0x00, 0x00, 0x38, 0x00, 0x00, 0x07, 0xf2, 0x20, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x0e, // ..8.... ......F. - 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x1e, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x3e, 0x00, // ......F.......>. - 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, // ...... + 0x46, 0x53, 0x48, 0x0b, 0x01, 0x83, 0xf2, 0xe1, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x05, 0x73, // FSH............s + 0x5f, 0x74, 0x65, 0x78, 0x30, 0x01, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7c, 0x01, // _tex0.........|. + 0x00, 0x00, 0x44, 0x58, 0x42, 0x43, 0x9f, 0xc3, 0xdd, 0xee, 0xdf, 0xe0, 0xb0, 0x54, 0xaa, 0x51, // ..DXBC.......T.Q + 0xec, 0xb4, 0x2a, 0xf6, 0x8e, 0x43, 0x01, 0x00, 0x00, 0x00, 0x7c, 0x01, 0x00, 0x00, 0x03, 0x00, // ..*..C....|..... + 0x00, 0x00, 0x2c, 0x00, 0x00, 0x00, 0xa0, 0x00, 0x00, 0x00, 0xd4, 0x00, 0x00, 0x00, 0x49, 0x53, // ..,...........IS + 0x47, 0x4e, 0x6c, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x50, 0x00, // GNl...........P. + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, // ................ + 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x5c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ................ + 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x0f, 0x0f, 0x00, 0x00, 0x62, 0x00, // ..............b. + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x02, 0x00, // ................ + 0x00, 0x00, 0x03, 0x03, 0x00, 0x00, 0x53, 0x56, 0x5f, 0x50, 0x4f, 0x53, 0x49, 0x54, 0x49, 0x4f, // ......SV_POSITIO + 0x4e, 0x00, 0x43, 0x4f, 0x4c, 0x4f, 0x52, 0x00, 0x54, 0x45, 0x58, 0x43, 0x4f, 0x4f, 0x52, 0x44, // N.COLOR.TEXCOORD + 0x00, 0xab, 0x4f, 0x53, 0x47, 0x4e, 0x2c, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x08, 0x00, // ..OSGN,......... + 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, // .. ............. + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x53, 0x56, 0x5f, 0x54, 0x41, 0x52, // ..........SV_TAR + 0x47, 0x45, 0x54, 0x00, 0xab, 0xab, 0x53, 0x48, 0x45, 0x58, 0xa0, 0x00, 0x00, 0x00, 0x50, 0x00, // GET...SHEX....P. + 0x00, 0x00, 0x28, 0x00, 0x00, 0x00, 0x6a, 0x08, 0x00, 0x01, 0x5a, 0x00, 0x00, 0x03, 0x00, 0x60, // ..(...j...Z....` + 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x58, 0x18, 0x00, 0x04, 0x00, 0x70, 0x10, 0x00, 0x00, 0x00, // ......X....p.... + 0x00, 0x00, 0x55, 0x55, 0x00, 0x00, 0x62, 0x10, 0x00, 0x03, 0xf2, 0x10, 0x10, 0x00, 0x01, 0x00, // ..UU..b......... + 0x00, 0x00, 0x62, 0x10, 0x00, 0x03, 0x32, 0x10, 0x10, 0x00, 0x02, 0x00, 0x00, 0x00, 0x65, 0x00, // ..b...2.......e. + 0x00, 0x03, 0xf2, 0x20, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x68, 0x00, 0x00, 0x02, 0x01, 0x00, // ... ......h..... + 0x00, 0x00, 0x45, 0x00, 0x00, 0x8b, 0xc2, 0x00, 0x00, 0x80, 0x43, 0x55, 0x15, 0x00, 0xf2, 0x00, // ..E.......CU.... + 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x10, 0x10, 0x00, 0x02, 0x00, 0x00, 0x00, 0x46, 0x7e, // ......F.......F~ + 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0x00, // .......`......8. + 0x00, 0x07, 0xf2, 0x20, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x0e, 0x10, 0x00, 0x00, 0x00, // ... ......F..... + 0x00, 0x00, 0x46, 0x1e, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x3e, 0x00, 0x00, 0x01, 0x00, 0x00, // ..F.......>..... + 0x00, 0x00, // .. +}; +static const uint8_t fs_ocornut_imgui_dxil[4054] = +{ + 0x46, 0x53, 0x48, 0x0b, 0x01, 0x83, 0xf2, 0xe1, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x05, 0x73, // FSH............s + 0x5f, 0x74, 0x65, 0x78, 0x30, 0x01, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0xb0, 0x0f, // _tex0........... + 0x00, 0x00, 0x44, 0x58, 0x42, 0x43, 0x70, 0x73, 0x25, 0xbe, 0xad, 0xba, 0xe7, 0xc3, 0x44, 0x86, // ..DXBCps%.....D. + 0xe3, 0x2b, 0x38, 0xc9, 0x1b, 0x42, 0x01, 0x00, 0x00, 0x00, 0xb0, 0x0f, 0x00, 0x00, 0x07, 0x00, // .+8..B.......... + 0x00, 0x00, 0x3c, 0x00, 0x00, 0x00, 0x4c, 0x00, 0x00, 0x00, 0xd8, 0x00, 0x00, 0x00, 0x14, 0x01, // ..<...L......... + 0x00, 0x00, 0x24, 0x02, 0x00, 0x00, 0xac, 0x08, 0x00, 0x00, 0xc8, 0x08, 0x00, 0x00, 0x53, 0x46, // ..$...........SF + 0x49, 0x30, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x49, 0x53, // I0............IS + 0x47, 0x31, 0x84, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, // G1.............. + 0x00, 0x00, 0x68, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x03, 0x00, // ..h............. + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ................ + 0x00, 0x00, 0x74, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, // ..t............. + 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x0f, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ................ + 0x00, 0x00, 0x7a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, // ..z............. + 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x03, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x53, 0x56, // ..............SV + 0x5f, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x00, 0x43, 0x4f, 0x4c, 0x4f, 0x52, 0x00, // _Position.COLOR. + 0x54, 0x45, 0x58, 0x43, 0x4f, 0x4f, 0x52, 0x44, 0x00, 0x00, 0x4f, 0x53, 0x47, 0x31, 0x34, 0x00, // TEXCOORD..OSG14. + 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x28, 0x00, // ..............(. + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, // ......@......... + 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x53, 0x56, 0x5f, 0x54, 0x61, 0x72, // ..........SV_Tar + 0x67, 0x65, 0x74, 0x00, 0x00, 0x00, 0x50, 0x53, 0x56, 0x30, 0x08, 0x01, 0x00, 0x00, 0x34, 0x00, // get...PSV0....4. + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ................ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x03, 0x01, // ................ + 0x00, 0x03, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ................ + 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x01, 0x00, // ................ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0e, 0x00, // ................ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ................ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, // ................ + 0x00, 0x00, 0x00, 0x43, 0x4f, 0x4c, 0x4f, 0x52, 0x00, 0x54, 0x45, 0x58, 0x43, 0x4f, 0x4f, 0x52, // ...COLOR.TEXCOOR + 0x44, 0x00, 0x6d, 0x61, 0x69, 0x6e, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, // D.main.......... + 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, // ................ + 0x44, 0x03, 0x03, 0x04, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, // D............... + 0x44, 0x00, 0x03, 0x02, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, // D............... + 0x42, 0x00, 0x03, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, // B............... + 0x44, 0x10, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // D............... + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x04, 0x00, // ................ + 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, // ................ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x53, 0x54, 0x41, 0x54, 0x80, 0x06, 0x00, 0x00, 0x60, 0x00, // ......STAT....`. + 0x00, 0x00, 0xa0, 0x01, 0x00, 0x00, 0x44, 0x58, 0x49, 0x4c, 0x00, 0x01, 0x00, 0x00, 0x10, 0x00, // ......DXIL...... + 0x00, 0x00, 0x68, 0x06, 0x00, 0x00, 0x42, 0x43, 0xc0, 0xde, 0x21, 0x0c, 0x00, 0x00, 0x97, 0x01, // ..h...BC..!..... + 0x00, 0x00, 0x0b, 0x82, 0x20, 0x00, 0x02, 0x00, 0x00, 0x00, 0x13, 0x00, 0x00, 0x00, 0x07, 0x81, // .... ........... + 0x23, 0x91, 0x41, 0xc8, 0x04, 0x49, 0x06, 0x10, 0x32, 0x39, 0x92, 0x01, 0x84, 0x0c, 0x25, 0x05, // #.A..I..29....%. + 0x08, 0x19, 0x1e, 0x04, 0x8b, 0x62, 0x80, 0x14, 0x45, 0x02, 0x42, 0x92, 0x0b, 0x42, 0xa4, 0x10, // .....b..E.B..B.. + 0x32, 0x14, 0x38, 0x08, 0x18, 0x4b, 0x0a, 0x32, 0x52, 0x88, 0x48, 0x90, 0x14, 0x20, 0x43, 0x46, // 2.8..K.2R.H.. CF + 0x88, 0xa5, 0x00, 0x19, 0x32, 0x42, 0xe4, 0x48, 0x0e, 0x90, 0x91, 0x22, 0xc4, 0x50, 0x41, 0x51, // ....2B.H...".PAQ + 0x81, 0x8c, 0xe1, 0x83, 0xe5, 0x8a, 0x04, 0x29, 0x46, 0x06, 0x51, 0x18, 0x00, 0x00, 0x08, 0x00, // .......)F.Q..... + 0x00, 0x00, 0x1b, 0x8c, 0xe0, 0xff, 0xff, 0xff, 0xff, 0x07, 0x40, 0x02, 0xa8, 0x0d, 0x84, 0xf0, // ..........@..... + 0xff, 0xff, 0xff, 0xff, 0x03, 0x20, 0x6d, 0x30, 0x86, 0xff, 0xff, 0xff, 0xff, 0x1f, 0x00, 0x09, // ..... m0........ + 0xa8, 0x00, 0x49, 0x18, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x13, 0x82, 0x60, 0x42, 0x20, 0x4c, // ..I.........`B L + 0x08, 0x06, 0x00, 0x00, 0x00, 0x00, 0x89, 0x20, 0x00, 0x00, 0x43, 0x00, 0x00, 0x00, 0x32, 0x22, // ....... ..C...2" + 0x48, 0x09, 0x20, 0x64, 0x85, 0x04, 0x93, 0x22, 0xa4, 0x84, 0x04, 0x93, 0x22, 0xe3, 0x84, 0xa1, // H. d..."...."... + 0x90, 0x14, 0x12, 0x4c, 0x8a, 0x8c, 0x0b, 0x84, 0xa4, 0x4c, 0x10, 0x68, 0x23, 0x00, 0x25, 0x00, // ...L.....L.h#.%. + 0x14, 0x66, 0x00, 0xe6, 0x08, 0xc0, 0x60, 0x8e, 0x00, 0x29, 0xc6, 0x20, 0x84, 0x14, 0x42, 0xa6, // .f....`..). ..B. + 0x18, 0x80, 0x10, 0x52, 0x06, 0xa1, 0x9b, 0x86, 0xcb, 0x9f, 0xb0, 0x87, 0x90, 0xfc, 0x95, 0x90, // ...R............ + 0x56, 0x62, 0xf2, 0x8b, 0xdb, 0x46, 0xc5, 0x18, 0x63, 0x10, 0x2a, 0xf7, 0x0c, 0x97, 0x3f, 0x61, // Vb...F..c.*...?a + 0x0f, 0x21, 0xf9, 0x21, 0xd0, 0x0c, 0x0b, 0x81, 0x82, 0x55, 0x18, 0x45, 0x18, 0x1b, 0x63, 0x0c, // .!.!.....U.E..c. + 0x42, 0xc8, 0xa0, 0x36, 0x47, 0x10, 0x14, 0x83, 0x91, 0x42, 0xc8, 0x23, 0x38, 0x10, 0x30, 0x8c, // B..6G....B.#8.0. + 0x40, 0x0c, 0x33, 0xb5, 0xc1, 0x38, 0xb0, 0x43, 0x38, 0xcc, 0xc3, 0x3c, 0xb8, 0x01, 0x2d, 0x94, // @.3..8.C8..<..-. + 0x03, 0x3e, 0xd0, 0x43, 0x3d, 0xc8, 0x43, 0x39, 0xc8, 0x01, 0x29, 0xf0, 0x81, 0x3d, 0x94, 0xc3, // .>.C=.C9..)..=.. + 0x38, 0xd0, 0xc3, 0x3b, 0xc8, 0x03, 0x1f, 0x98, 0x03, 0x3b, 0xbc, 0x43, 0x38, 0xd0, 0x03, 0x1b, // 8..;.....;.C8... + 0x80, 0x01, 0x1d, 0xf8, 0x01, 0x18, 0xf8, 0x81, 0x1e, 0xe8, 0x41, 0x3b, 0xa4, 0x03, 0x3c, 0xcc, // ..........A;..<. + 0xc3, 0x2f, 0xd0, 0x43, 0x3e, 0xc0, 0x43, 0x39, 0xa0, 0x80, 0xcc, 0x24, 0x06, 0xe3, 0xc0, 0x0e, // ./.C>.C9...$.... + 0xe1, 0x30, 0x0f, 0xf3, 0xe0, 0x06, 0xb4, 0x50, 0x0e, 0xf8, 0x40, 0x0f, 0xf5, 0x20, 0x0f, 0xe5, // .0.....P..@.. .. + 0x20, 0x07, 0xa4, 0xc0, 0x07, 0xf6, 0x50, 0x0e, 0xe3, 0x40, 0x0f, 0xef, 0x20, 0x0f, 0x7c, 0x60, // .....P..@.. .|` + 0x0e, 0xec, 0xf0, 0x0e, 0xe1, 0x40, 0x0f, 0x6c, 0x00, 0x06, 0x74, 0xe0, 0x07, 0x60, 0xe0, 0x07, // .....@.l..t..`.. + 0x48, 0x98, 0x94, 0xea, 0x4d, 0xd2, 0x14, 0x51, 0xc2, 0xe4, 0xb3, 0x00, 0xf3, 0x2c, 0x44, 0xc4, // H...M..Q.....,D. + 0x4e, 0xc0, 0x44, 0xa0, 0x80, 0xd0, 0x4d, 0x06, 0x02, 0x00, 0x13, 0x14, 0x72, 0xc0, 0x87, 0x74, // N.D...M.....r..t + 0x60, 0x87, 0x36, 0x68, 0x87, 0x79, 0x68, 0x03, 0x72, 0xc0, 0x87, 0x0d, 0xaf, 0x50, 0x0e, 0x6d, // `.6h.yh.r....P.m + 0xd0, 0x0e, 0x7a, 0x50, 0x0e, 0x6d, 0x00, 0x0f, 0x7a, 0x30, 0x07, 0x72, 0xa0, 0x07, 0x73, 0x20, // ..zP.m..z0.r..s + 0x07, 0x6d, 0x90, 0x0e, 0x71, 0xa0, 0x07, 0x73, 0x20, 0x07, 0x6d, 0x90, 0x0e, 0x78, 0xa0, 0x07, // .m..q..s .m..x.. + 0x73, 0x20, 0x07, 0x6d, 0x90, 0x0e, 0x71, 0x60, 0x07, 0x7a, 0x30, 0x07, 0x72, 0xd0, 0x06, 0xe9, // s .m..q`.z0.r... + 0x30, 0x07, 0x72, 0xa0, 0x07, 0x73, 0x20, 0x07, 0x6d, 0x90, 0x0e, 0x76, 0x40, 0x07, 0x7a, 0x60, // 0.r..s .m..v@.z` + 0x07, 0x74, 0xd0, 0x06, 0xe6, 0x10, 0x07, 0x76, 0xa0, 0x07, 0x73, 0x20, 0x07, 0x6d, 0x60, 0x0e, // .t.....v..s .m`. + 0x73, 0x20, 0x07, 0x7a, 0x30, 0x07, 0x72, 0xd0, 0x06, 0xe6, 0x60, 0x07, 0x74, 0xa0, 0x07, 0x76, // s .z0.r...`.t..v + 0x40, 0x07, 0x6d, 0xe0, 0x0e, 0x78, 0xa0, 0x07, 0x71, 0x60, 0x07, 0x7a, 0x30, 0x07, 0x72, 0xa0, // @.m..x..q`.z0.r. + 0x07, 0x76, 0x40, 0x07, 0x43, 0x9e, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // .v@.C........... + 0x00, 0x86, 0x3c, 0x06, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x79, // ..<............y + 0x10, 0x20, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0xf2, 0x34, 0x40, 0x00, // . ...........4@. + 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0xe4, 0x81, 0x80, 0x00, 0x18, 0x00, 0x00, // ........0....... + 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x0b, 0x04, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x32, 0x1e, // ..... ........2. + 0x98, 0x14, 0x19, 0x11, 0x4c, 0x90, 0x8c, 0x09, 0x26, 0x47, 0xc6, 0x04, 0x43, 0x22, 0x25, 0x30, // ....L...&G..C"%0 + 0x02, 0x50, 0x0c, 0x45, 0x50, 0x12, 0x65, 0x50, 0x1e, 0x85, 0x50, 0x2c, 0x54, 0x4a, 0xa2, 0x0c, // .P.EP.eP..P,TJ.. + 0x0a, 0x61, 0x04, 0xa0, 0x08, 0x0a, 0x84, 0xec, 0x0c, 0x00, 0xe1, 0x19, 0x00, 0xca, 0x63, 0x31, // .a............c1 + 0x0a, 0x01, 0x00, 0x00, 0x10, 0x08, 0x04, 0xf2, 0x3c, 0x00, 0x79, 0x18, 0x00, 0x00, 0x84, 0x00, // ........<.y..... + 0x00, 0x00, 0x1a, 0x03, 0x4c, 0x90, 0x46, 0x02, 0x13, 0x44, 0x8f, 0x0c, 0x6f, 0xec, 0xed, 0x4d, // ....L.F..D..o..M + 0x0c, 0x24, 0xc6, 0x05, 0xc7, 0x45, 0xa6, 0x06, 0xa6, 0xc6, 0x65, 0x46, 0x06, 0x04, 0x45, 0x2c, // .$...E....eF..E, + 0x06, 0xc6, 0x26, 0x2c, 0xc7, 0x26, 0x86, 0x2c, 0x65, 0x43, 0x10, 0x4c, 0x10, 0x88, 0x62, 0x82, // ..&,.&.,eC.L..b. + 0x40, 0x18, 0x1b, 0x84, 0x81, 0xd8, 0x20, 0x10, 0x04, 0x05, 0xb8, 0xb9, 0x09, 0x02, 0x71, 0x6c, // @..... .......ql + 0x18, 0x0e, 0x84, 0x98, 0x20, 0x58, 0x14, 0x99, 0xb9, 0x2f, 0xba, 0x32, 0x3c, 0xaa, 0x32, 0x3c, // .... X.../.2<.2< + 0xba, 0x3a, 0xb9, 0xb2, 0x09, 0x02, 0x81, 0x4c, 0x10, 0x88, 0x64, 0x83, 0x40, 0x34, 0x1b, 0x12, // .:.....L..d.@4.. + 0x42, 0x59, 0x08, 0x62, 0x60, 0x08, 0x67, 0x43, 0xf0, 0x4c, 0x10, 0xb0, 0x8a, 0xcc, 0xdc, 0x17, // BY.b`.gC.L...... + 0x5d, 0x19, 0xde, 0x54, 0x58, 0x1b, 0x1c, 0x5b, 0x99, 0xdc, 0x06, 0x84, 0x88, 0x24, 0x82, 0x18, // ]..TX..[.....$.. + 0x08, 0x60, 0x43, 0x30, 0x6d, 0x20, 0x20, 0x00, 0xa0, 0x26, 0x08, 0x02, 0xb0, 0x01, 0xd8, 0x30, // .`C0m ..&.....0 + 0x10, 0xd7, 0xb5, 0x21, 0xc0, 0x36, 0x0c, 0x83, 0x95, 0x4d, 0x10, 0x32, 0x6b, 0x43, 0xb0, 0x91, // ...!.6...M.2kC.. + 0x68, 0x0b, 0x4b, 0x73, 0xe3, 0x32, 0x65, 0xf5, 0x05, 0xf5, 0x36, 0x97, 0x46, 0x97, 0xf6, 0xe6, // h.Ks.2e...6.F... + 0x36, 0x41, 0x28, 0x9c, 0x09, 0x42, 0xf1, 0x6c, 0x08, 0x88, 0x09, 0x42, 0x01, 0x4d, 0x10, 0x8a, // 6A(..B.l...B.M.. + 0x68, 0xc3, 0x42, 0x78, 0x1f, 0x18, 0x84, 0x81, 0x18, 0x0c, 0x62, 0x40, 0x8c, 0x01, 0xc0, 0x62, // h.Bx......b@...b + 0xe8, 0x89, 0xe9, 0x49, 0x6a, 0x82, 0x50, 0x48, 0x13, 0x04, 0x42, 0x99, 0x20, 0x10, 0xcb, 0x06, // ...Ij.PH..B. ... + 0xe1, 0x0c, 0xd0, 0x60, 0xc3, 0x32, 0x94, 0xc1, 0x37, 0x06, 0x61, 0x60, 0x06, 0x83, 0x18, 0x0c, // ...`.2..7.a`.... + 0x63, 0x90, 0x06, 0x44, 0xa8, 0x8a, 0xb0, 0x86, 0x9e, 0x9e, 0xa4, 0x88, 0x36, 0x08, 0x67, 0x70, // c..D........6.gp + 0x06, 0x1b, 0x16, 0x66, 0x0d, 0xbe, 0x31, 0x08, 0x03, 0x33, 0x18, 0xcc, 0x80, 0x19, 0x03, 0x36, // ...f..1..3.....6 + 0xd8, 0x30, 0x90, 0x81, 0x1a, 0xb4, 0x01, 0x93, 0x29, 0xab, 0x2f, 0xaa, 0x30, 0xb9, 0xb3, 0x32, // .0......)./.0..2 + 0xba, 0x09, 0x42, 0x31, 0x6d, 0x58, 0x88, 0x37, 0xf8, 0xe0, 0x20, 0x0c, 0xc6, 0x60, 0x10, 0x03, // ..B1mX.7.. ..`.. + 0x62, 0x0c, 0xd2, 0x60, 0x43, 0x10, 0x07, 0x1b, 0x06, 0x37, 0x90, 0x03, 0x60, 0x43, 0x61, 0x75, // b..`C....7..`Cau + 0x73, 0x50, 0x01, 0x34, 0xcc, 0xd8, 0xde, 0xc2, 0xe8, 0xe6, 0x26, 0x08, 0x04, 0xc3, 0x22, 0xcd, // sP.4......&...". + 0x6d, 0x8e, 0x6e, 0x6e, 0x82, 0x40, 0x34, 0x34, 0xe6, 0xd2, 0xce, 0xbe, 0xd8, 0xc8, 0x68, 0xcc, // m.nn.@44......h. + 0xa5, 0x9d, 0x7d, 0xcd, 0xd1, 0x11, 0xa1, 0x2b, 0xc3, 0xfb, 0x72, 0x7b, 0x93, 0x6b, 0xdb, 0xa0, // ..}....+..r{.k.. + 0xd4, 0x81, 0x1d, 0xdc, 0x01, 0x1e, 0xe4, 0x01, 0xa2, 0x07, 0x76, 0xb0, 0x07, 0x43, 0x15, 0x36, // ..........v..C.6 + 0x36, 0xbb, 0x36, 0x97, 0x34, 0xb2, 0x32, 0x37, 0xba, 0x29, 0x41, 0x50, 0x85, 0x0c, 0xcf, 0xc5, // 6.6.4.27.)AP.... + 0xae, 0x4c, 0x6e, 0x2e, 0xed, 0xcd, 0x6d, 0x4a, 0x40, 0x34, 0x21, 0xc3, 0x73, 0xb1, 0x0b, 0x63, // .Ln...mJ@4!.s..c + 0xb3, 0x2b, 0x93, 0x9b, 0x12, 0x14, 0x75, 0xc8, 0xf0, 0x5c, 0xe6, 0xd0, 0xc2, 0xc8, 0xca, 0xe4, // .+....u......... + 0x9a, 0xde, 0xc8, 0xca, 0xd8, 0xa6, 0x04, 0x48, 0x19, 0x32, 0x3c, 0x17, 0xb9, 0xb2, 0xb9, 0xb7, // .......H.2<..... + 0x3a, 0xb9, 0xb1, 0xb2, 0xb9, 0x29, 0x01, 0x55, 0x89, 0x0c, 0xcf, 0x85, 0x2e, 0x0f, 0xae, 0x2c, // :....).U......., + 0xc8, 0xcd, 0xed, 0x8d, 0x2e, 0x8c, 0x2e, 0xed, 0xcd, 0x6d, 0x6e, 0x4a, 0x90, 0xd5, 0x21, 0xc3, // .........mnJ..!. + 0x73, 0xb1, 0x4b, 0x2b, 0xbb, 0x4b, 0x22, 0x9b, 0xa2, 0x0b, 0xa3, 0x2b, 0x9b, 0x12, 0x6c, 0x75, // s.K+.K"....+..lu + 0xc8, 0xf0, 0x5c, 0xca, 0xdc, 0xe8, 0xe4, 0xf2, 0xa0, 0xde, 0xd2, 0xdc, 0xe8, 0xe6, 0xa6, 0x04, // ................ + 0x73, 0xd0, 0x85, 0x0c, 0xcf, 0x65, 0xec, 0xad, 0xce, 0x8d, 0xae, 0x4c, 0x6e, 0x6e, 0x4a, 0xb0, // s....e.....LnnJ. + 0x07, 0x00, 0x79, 0x18, 0x00, 0x00, 0x4c, 0x00, 0x00, 0x00, 0x33, 0x08, 0x80, 0x1c, 0xc4, 0xe1, // ..y...L...3..... + 0x1c, 0x66, 0x14, 0x01, 0x3d, 0x88, 0x43, 0x38, 0x84, 0xc3, 0x8c, 0x42, 0x80, 0x07, 0x79, 0x78, // .f..=.C8...B..yx + 0x07, 0x73, 0x98, 0x71, 0x0c, 0xe6, 0x00, 0x0f, 0xed, 0x10, 0x0e, 0xf4, 0x80, 0x0e, 0x33, 0x0c, // .s.q..........3. + 0x42, 0x1e, 0xc2, 0xc1, 0x1d, 0xce, 0xa1, 0x1c, 0x66, 0x30, 0x05, 0x3d, 0x88, 0x43, 0x38, 0x84, // B.......f0.=.C8. + 0x83, 0x1b, 0xcc, 0x03, 0x3d, 0xc8, 0x43, 0x3d, 0x8c, 0x03, 0x3d, 0xcc, 0x78, 0x8c, 0x74, 0x70, // ....=.C=..=.x.tp + 0x07, 0x7b, 0x08, 0x07, 0x79, 0x48, 0x87, 0x70, 0x70, 0x07, 0x7a, 0x70, 0x03, 0x76, 0x78, 0x87, // .{..yH.pp.zp.vx. + 0x70, 0x20, 0x87, 0x19, 0xcc, 0x11, 0x0e, 0xec, 0x90, 0x0e, 0xe1, 0x30, 0x0f, 0x6e, 0x30, 0x0f, // p .........0.n0. + 0xe3, 0xf0, 0x0e, 0xf0, 0x50, 0x0e, 0x33, 0x10, 0xc4, 0x1d, 0xde, 0x21, 0x1c, 0xd8, 0x21, 0x1d, // ....P.3....!..!. + 0xc2, 0x61, 0x1e, 0x66, 0x30, 0x89, 0x3b, 0xbc, 0x83, 0x3b, 0xd0, 0x43, 0x39, 0xb4, 0x03, 0x3c, // .a.f0.;..;.C9..< + 0xbc, 0x83, 0x3c, 0x84, 0x03, 0x3b, 0xcc, 0xf0, 0x14, 0x76, 0x60, 0x07, 0x7b, 0x68, 0x07, 0x37, // ..<..;...v`.{h.7 + 0x68, 0x87, 0x72, 0x68, 0x07, 0x37, 0x80, 0x87, 0x70, 0x90, 0x87, 0x70, 0x60, 0x07, 0x76, 0x28, // h.rh.7..p..p`.v( + 0x07, 0x76, 0xf8, 0x05, 0x76, 0x78, 0x87, 0x77, 0x80, 0x87, 0x5f, 0x08, 0x87, 0x71, 0x18, 0x87, // .v..vx.w.._..q.. + 0x72, 0x98, 0x87, 0x79, 0x98, 0x81, 0x2c, 0xee, 0xf0, 0x0e, 0xee, 0xe0, 0x0e, 0xf5, 0xc0, 0x0e, // r..y..,......... + 0xec, 0x30, 0x03, 0x62, 0xc8, 0xa1, 0x1c, 0xe4, 0xa1, 0x1c, 0xcc, 0xa1, 0x1c, 0xe4, 0xa1, 0x1c, // .0.b............ + 0xdc, 0x61, 0x1c, 0xca, 0x21, 0x1c, 0xc4, 0x81, 0x1d, 0xca, 0x61, 0x06, 0xd6, 0x90, 0x43, 0x39, // .a..!.....a...C9 + 0xc8, 0x43, 0x39, 0x98, 0x43, 0x39, 0xc8, 0x43, 0x39, 0xb8, 0xc3, 0x38, 0x94, 0x43, 0x38, 0x88, // .C9.C9.C9..8.C8. + 0x03, 0x3b, 0x94, 0xc3, 0x2f, 0xbc, 0x83, 0x3c, 0xfc, 0x82, 0x3b, 0xd4, 0x03, 0x3b, 0xb0, 0xc3, // .;../..<..;..;.. + 0x0c, 0xc4, 0x21, 0x07, 0x7c, 0x70, 0x03, 0x7a, 0x28, 0x87, 0x76, 0x80, 0x87, 0x19, 0xd1, 0x43, // ..!.|p.z(.v....C + 0x0e, 0xf8, 0xe0, 0x06, 0xe4, 0x20, 0x0e, 0xe7, 0xe0, 0x06, 0xf6, 0x10, 0x0e, 0xf2, 0xc0, 0x0e, // ..... .......... + 0xe1, 0x90, 0x0f, 0xef, 0x50, 0x0f, 0xf4, 0x00, 0x00, 0x00, 0x71, 0x20, 0x00, 0x00, 0x12, 0x00, // ....P.....q .... + 0x00, 0x00, 0x46, 0x20, 0x0d, 0x97, 0xef, 0x3c, 0xbe, 0x10, 0x11, 0xc0, 0x44, 0x84, 0x40, 0x33, // ..F ...<....D.@3 + 0x2c, 0x84, 0x05, 0x4c, 0xc3, 0xe5, 0x3b, 0x8f, 0xbf, 0x38, 0xc0, 0x20, 0x36, 0x0f, 0x35, 0xf9, // ,..L..;..8. 6.5. + 0xc5, 0x6d, 0xdb, 0x00, 0x34, 0x5c, 0xbe, 0xf3, 0xf8, 0x12, 0xc0, 0x3c, 0x0b, 0xe1, 0x17, 0xb7, // .m..4......<.... + 0x6d, 0x02, 0xd5, 0x70, 0xf9, 0xce, 0xe3, 0x4b, 0x93, 0x13, 0x11, 0x28, 0x35, 0x3d, 0xd4, 0xe4, // m..p...K...(5=.. + 0x17, 0xb7, 0x6d, 0x00, 0x04, 0x03, 0x20, 0x0d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x48, 0x41, // ..m... .......HA + 0x53, 0x48, 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x44, 0xe4, 0xe2, 0xdd, 0x4c, 0x1e, // SH........D...L. + 0x4d, 0x63, 0x44, 0x44, 0x5d, 0x84, 0x52, 0x88, 0x7f, 0xef, 0x44, 0x58, 0x49, 0x4c, 0xe0, 0x06, // McDD].R...DXIL.. + 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0xb8, 0x01, 0x00, 0x00, 0x44, 0x58, 0x49, 0x4c, 0x00, 0x01, // ..`.......DXIL.. + 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0xc8, 0x06, 0x00, 0x00, 0x42, 0x43, 0xc0, 0xde, 0x21, 0x0c, // ..........BC..!. + 0x00, 0x00, 0xaf, 0x01, 0x00, 0x00, 0x0b, 0x82, 0x20, 0x00, 0x02, 0x00, 0x00, 0x00, 0x13, 0x00, // ........ ....... + 0x00, 0x00, 0x07, 0x81, 0x23, 0x91, 0x41, 0xc8, 0x04, 0x49, 0x06, 0x10, 0x32, 0x39, 0x92, 0x01, // ....#.A..I..29.. + 0x84, 0x0c, 0x25, 0x05, 0x08, 0x19, 0x1e, 0x04, 0x8b, 0x62, 0x80, 0x14, 0x45, 0x02, 0x42, 0x92, // ..%......b..E.B. + 0x0b, 0x42, 0xa4, 0x10, 0x32, 0x14, 0x38, 0x08, 0x18, 0x4b, 0x0a, 0x32, 0x52, 0x88, 0x48, 0x90, // .B..2.8..K.2R.H. + 0x14, 0x20, 0x43, 0x46, 0x88, 0xa5, 0x00, 0x19, 0x32, 0x42, 0xe4, 0x48, 0x0e, 0x90, 0x91, 0x22, // . CF....2B.H..." + 0xc4, 0x50, 0x41, 0x51, 0x81, 0x8c, 0xe1, 0x83, 0xe5, 0x8a, 0x04, 0x29, 0x46, 0x06, 0x51, 0x18, // .PAQ.......)F.Q. + 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x1b, 0x8c, 0xe0, 0xff, 0xff, 0xff, 0xff, 0x07, 0x40, 0x02, // ..............@. + 0xa8, 0x0d, 0x84, 0xf0, 0xff, 0xff, 0xff, 0xff, 0x03, 0x20, 0x6d, 0x30, 0x86, 0xff, 0xff, 0xff, // ......... m0.... + 0xff, 0x1f, 0x00, 0x09, 0xa8, 0x00, 0x49, 0x18, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x13, 0x82, // ......I......... + 0x60, 0x42, 0x20, 0x4c, 0x08, 0x06, 0x00, 0x00, 0x00, 0x00, 0x89, 0x20, 0x00, 0x00, 0x43, 0x00, // `B L....... ..C. + 0x00, 0x00, 0x32, 0x22, 0x48, 0x09, 0x20, 0x64, 0x85, 0x04, 0x93, 0x22, 0xa4, 0x84, 0x04, 0x93, // ..2"H. d...".... + 0x22, 0xe3, 0x84, 0xa1, 0x90, 0x14, 0x12, 0x4c, 0x8a, 0x8c, 0x0b, 0x84, 0xa4, 0x4c, 0x10, 0x68, // "......L.....L.h + 0x23, 0x00, 0x25, 0x00, 0x14, 0x66, 0x00, 0xe6, 0x08, 0xc0, 0x60, 0x8e, 0x00, 0x29, 0xc6, 0x20, // #.%..f....`..). + 0x84, 0x14, 0x42, 0xa6, 0x18, 0x80, 0x10, 0x52, 0x06, 0xa1, 0x9b, 0x86, 0xcb, 0x9f, 0xb0, 0x87, // ..B....R........ + 0x90, 0xfc, 0x95, 0x90, 0x56, 0x62, 0xf2, 0x8b, 0xdb, 0x46, 0xc5, 0x18, 0x63, 0x10, 0x2a, 0xf7, // ....Vb...F..c.*. + 0x0c, 0x97, 0x3f, 0x61, 0x0f, 0x21, 0xf9, 0x21, 0xd0, 0x0c, 0x0b, 0x81, 0x82, 0x55, 0x18, 0x45, // ..?a.!.!.....U.E + 0x18, 0x1b, 0x63, 0x0c, 0x42, 0xc8, 0xa0, 0x36, 0x47, 0x10, 0x14, 0x83, 0x91, 0x42, 0xc8, 0x23, // ..c.B..6G....B.# + 0x38, 0x10, 0x30, 0x8c, 0x40, 0x0c, 0x33, 0xb5, 0xc1, 0x38, 0xb0, 0x43, 0x38, 0xcc, 0xc3, 0x3c, // 8.0.@.3..8.C8..< + 0xb8, 0x01, 0x2d, 0x94, 0x03, 0x3e, 0xd0, 0x43, 0x3d, 0xc8, 0x43, 0x39, 0xc8, 0x01, 0x29, 0xf0, // ..-..>.C=.C9..). + 0x81, 0x3d, 0x94, 0xc3, 0x38, 0xd0, 0xc3, 0x3b, 0xc8, 0x03, 0x1f, 0x98, 0x03, 0x3b, 0xbc, 0x43, // .=..8..;.....;.C + 0x38, 0xd0, 0x03, 0x1b, 0x80, 0x01, 0x1d, 0xf8, 0x01, 0x18, 0xf8, 0x81, 0x1e, 0xe8, 0x41, 0x3b, // 8.............A; + 0xa4, 0x03, 0x3c, 0xcc, 0xc3, 0x2f, 0xd0, 0x43, 0x3e, 0xc0, 0x43, 0x39, 0xa0, 0x80, 0xcc, 0x24, // ..<../.C>.C9...$ + 0x06, 0xe3, 0xc0, 0x0e, 0xe1, 0x30, 0x0f, 0xf3, 0xe0, 0x06, 0xb4, 0x50, 0x0e, 0xf8, 0x40, 0x0f, // .....0.....P..@. + 0xf5, 0x20, 0x0f, 0xe5, 0x20, 0x07, 0xa4, 0xc0, 0x07, 0xf6, 0x50, 0x0e, 0xe3, 0x40, 0x0f, 0xef, // . .. .....P..@.. + 0x20, 0x0f, 0x7c, 0x60, 0x0e, 0xec, 0xf0, 0x0e, 0xe1, 0x40, 0x0f, 0x6c, 0x00, 0x06, 0x74, 0xe0, // .|`.....@.l..t. + 0x07, 0x60, 0xe0, 0x07, 0x48, 0x98, 0x94, 0xea, 0x4d, 0xd2, 0x14, 0x51, 0xc2, 0xe4, 0xb3, 0x00, // .`..H...M..Q.... + 0xf3, 0x2c, 0x44, 0xc4, 0x4e, 0xc0, 0x44, 0xa0, 0x80, 0xd0, 0x4d, 0x06, 0x02, 0x00, 0x13, 0x14, // .,D.N.D...M..... + 0x72, 0xc0, 0x87, 0x74, 0x60, 0x87, 0x36, 0x68, 0x87, 0x79, 0x68, 0x03, 0x72, 0xc0, 0x87, 0x0d, // r..t`.6h.yh.r... + 0xaf, 0x50, 0x0e, 0x6d, 0xd0, 0x0e, 0x7a, 0x50, 0x0e, 0x6d, 0x00, 0x0f, 0x7a, 0x30, 0x07, 0x72, // .P.m..zP.m..z0.r + 0xa0, 0x07, 0x73, 0x20, 0x07, 0x6d, 0x90, 0x0e, 0x71, 0xa0, 0x07, 0x73, 0x20, 0x07, 0x6d, 0x90, // ..s .m..q..s .m. + 0x0e, 0x78, 0xa0, 0x07, 0x73, 0x20, 0x07, 0x6d, 0x90, 0x0e, 0x71, 0x60, 0x07, 0x7a, 0x30, 0x07, // .x..s .m..q`.z0. + 0x72, 0xd0, 0x06, 0xe9, 0x30, 0x07, 0x72, 0xa0, 0x07, 0x73, 0x20, 0x07, 0x6d, 0x90, 0x0e, 0x76, // r...0.r..s .m..v + 0x40, 0x07, 0x7a, 0x60, 0x07, 0x74, 0xd0, 0x06, 0xe6, 0x10, 0x07, 0x76, 0xa0, 0x07, 0x73, 0x20, // @.z`.t.....v..s + 0x07, 0x6d, 0x60, 0x0e, 0x73, 0x20, 0x07, 0x7a, 0x30, 0x07, 0x72, 0xd0, 0x06, 0xe6, 0x60, 0x07, // .m`.s .z0.r...`. + 0x74, 0xa0, 0x07, 0x76, 0x40, 0x07, 0x6d, 0xe0, 0x0e, 0x78, 0xa0, 0x07, 0x71, 0x60, 0x07, 0x7a, // t..v@.m..x..q`.z + 0x30, 0x07, 0x72, 0xa0, 0x07, 0x76, 0x40, 0x07, 0x43, 0x9e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 0.r..v@.C....... + 0x00, 0x00, 0x00, 0x00, 0x00, 0x86, 0x3c, 0x06, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, // ......<......... + 0x00, 0x00, 0x0c, 0x79, 0x10, 0x20, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, // ...y. .......... + 0xf2, 0x34, 0x40, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0xe4, 0x81, 0x80, // .4@.........0... + 0x00, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x0b, 0x04, 0x00, 0x00, 0x0f, 0x00, // ......... ...... + 0x00, 0x00, 0x32, 0x1e, 0x98, 0x14, 0x19, 0x11, 0x4c, 0x90, 0x8c, 0x09, 0x26, 0x47, 0xc6, 0x04, // ..2.....L...&G.. + 0x43, 0x22, 0x25, 0x30, 0x02, 0x50, 0x12, 0xc5, 0x50, 0x04, 0x65, 0x50, 0x1e, 0x54, 0x4a, 0xa2, // C"%0.P..P.eP.TJ. + 0x0c, 0x0a, 0x61, 0x04, 0xa0, 0x08, 0x0a, 0x84, 0xec, 0x0c, 0x00, 0xe1, 0x19, 0x00, 0xca, 0x63, // ..a............c + 0x31, 0x0a, 0x01, 0x00, 0x00, 0x10, 0x08, 0x04, 0xf2, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x79, 0x18, // 1........<....y. + 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x1a, 0x03, 0x4c, 0x90, 0x46, 0x02, 0x13, 0x44, 0x8f, 0x0c, // ..`.....L.F..D.. + 0x6f, 0xec, 0xed, 0x4d, 0x0c, 0x24, 0xc6, 0x05, 0xc7, 0x45, 0xa6, 0x06, 0xa6, 0xc6, 0x65, 0x46, // o..M.$...E....eF + 0x06, 0x04, 0x45, 0x2c, 0x06, 0xc6, 0x26, 0x2c, 0xc7, 0x26, 0x86, 0x2c, 0x65, 0x43, 0x10, 0x4c, // ..E,..&,.&.,eC.L + 0x10, 0x88, 0x62, 0x82, 0x40, 0x18, 0x1b, 0x84, 0x81, 0x98, 0x20, 0x10, 0xc7, 0x06, 0x61, 0x30, // ..b.@..... ...a0 + 0x28, 0xc0, 0xcd, 0x4d, 0x10, 0x08, 0x64, 0xc3, 0x80, 0x24, 0xc4, 0x04, 0xc1, 0x92, 0x08, 0x4c, // (..M..d..$.....L + 0x10, 0x88, 0x64, 0x83, 0x40, 0x18, 0x1b, 0x12, 0x62, 0x61, 0x08, 0x62, 0x68, 0x08, 0x67, 0x43, // ..d.@...ba.bh.gC + 0xf0, 0x4c, 0x10, 0xb0, 0x69, 0x03, 0x42, 0x44, 0x0c, 0x41, 0x0c, 0x04, 0xb0, 0x21, 0x90, 0x36, // .L..i.BD.A...!.6 + 0x10, 0x10, 0x00, 0x4c, 0x13, 0x84, 0x8c, 0xda, 0x10, 0x54, 0x13, 0x04, 0x01, 0x20, 0xd1, 0x16, // ...L.....T... .. + 0x96, 0xe6, 0xc6, 0x65, 0xca, 0xea, 0x0b, 0xea, 0x6d, 0x2e, 0x8d, 0x2e, 0xed, 0xcd, 0x6d, 0x82, // ...e....m.....m. + 0x50, 0x30, 0x13, 0x84, 0xa2, 0xd9, 0x10, 0x10, 0x13, 0x84, 0xc2, 0x99, 0x20, 0x14, 0xcf, 0x86, // P0.......... ... + 0x85, 0xc8, 0xb4, 0x8d, 0xeb, 0x86, 0x8e, 0xf0, 0x00, 0x16, 0x43, 0x4f, 0x4c, 0x4f, 0x52, 0x13, // ..........COLOR. + 0x84, 0x02, 0x9a, 0x20, 0x10, 0xca, 0x04, 0x81, 0x58, 0x36, 0x08, 0x62, 0x30, 0x06, 0x1b, 0x96, // ... ....X6.b0... + 0x01, 0x0c, 0x34, 0x8f, 0x0b, 0x83, 0xa1, 0x1b, 0x3c, 0x32, 0x20, 0x42, 0x55, 0x84, 0x35, 0xf4, // ..4.....<2 BU.5. + 0xf4, 0x24, 0x45, 0xb4, 0x41, 0x10, 0x03, 0x31, 0xd8, 0xb0, 0x34, 0x66, 0xa0, 0x79, 0x5c, 0x18, // .$E.A..1..4f.y.. + 0x0c, 0x61, 0xd0, 0x78, 0x67, 0xb0, 0x61, 0xf8, 0xca, 0x00, 0x0d, 0x98, 0x4c, 0x59, 0x7d, 0x51, // .a.xg.a.....LY}Q + 0x85, 0xc9, 0x9d, 0x95, 0xd1, 0x4d, 0x10, 0x8a, 0x68, 0xc3, 0x42, 0xa8, 0x81, 0xb6, 0x06, 0x9c, // .....M..h.B..... + 0x37, 0x74, 0x84, 0x47, 0x06, 0x1b, 0x02, 0x36, 0xd8, 0x30, 0xa4, 0x41, 0x1b, 0x00, 0x1b, 0x8a, // 7t.G...6.0.A.... + 0x0b, 0x73, 0x03, 0x0a, 0xa8, 0xc2, 0xc6, 0x66, 0xd7, 0xe6, 0x92, 0x46, 0x56, 0xe6, 0x46, 0x37, // .s.....f...FV.F7 + 0x25, 0x08, 0xaa, 0x90, 0xe1, 0xb9, 0xd8, 0x95, 0xc9, 0xcd, 0xa5, 0xbd, 0xb9, 0x4d, 0x09, 0x88, // %............M.. + 0x26, 0x64, 0x78, 0x2e, 0x76, 0x61, 0x6c, 0x76, 0x65, 0x72, 0x53, 0x02, 0xa3, 0x0e, 0x19, 0x9e, // &dx.valverS..... + 0xcb, 0x1c, 0x5a, 0x18, 0x59, 0x99, 0x5c, 0xd3, 0x1b, 0x59, 0x19, 0xdb, 0x94, 0x20, 0x29, 0x43, // ..Z.Y....Y... )C + 0x86, 0xe7, 0x22, 0x57, 0x36, 0xf7, 0x56, 0x27, 0x37, 0x56, 0x36, 0x37, 0x25, 0x98, 0xea, 0x90, // .."W6.V'7V67%... + 0xe1, 0xb9, 0xd8, 0xa5, 0x95, 0xdd, 0x25, 0x91, 0x4d, 0xd1, 0x85, 0xd1, 0x95, 0x4d, 0x09, 0xaa, // ......%.M....M.. + 0x3a, 0x64, 0x78, 0x2e, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x53, // :dx.entryPointsS + 0x02, 0x37, 0x00, 0x00, 0x00, 0x00, 0x79, 0x18, 0x00, 0x00, 0x4c, 0x00, 0x00, 0x00, 0x33, 0x08, // .7....y...L...3. + 0x80, 0x1c, 0xc4, 0xe1, 0x1c, 0x66, 0x14, 0x01, 0x3d, 0x88, 0x43, 0x38, 0x84, 0xc3, 0x8c, 0x42, // .....f..=.C8...B + 0x80, 0x07, 0x79, 0x78, 0x07, 0x73, 0x98, 0x71, 0x0c, 0xe6, 0x00, 0x0f, 0xed, 0x10, 0x0e, 0xf4, // ..yx.s.q........ + 0x80, 0x0e, 0x33, 0x0c, 0x42, 0x1e, 0xc2, 0xc1, 0x1d, 0xce, 0xa1, 0x1c, 0x66, 0x30, 0x05, 0x3d, // ..3.B.......f0.= + 0x88, 0x43, 0x38, 0x84, 0x83, 0x1b, 0xcc, 0x03, 0x3d, 0xc8, 0x43, 0x3d, 0x8c, 0x03, 0x3d, 0xcc, // .C8.....=.C=..=. + 0x78, 0x8c, 0x74, 0x70, 0x07, 0x7b, 0x08, 0x07, 0x79, 0x48, 0x87, 0x70, 0x70, 0x07, 0x7a, 0x70, // x.tp.{..yH.pp.zp + 0x03, 0x76, 0x78, 0x87, 0x70, 0x20, 0x87, 0x19, 0xcc, 0x11, 0x0e, 0xec, 0x90, 0x0e, 0xe1, 0x30, // .vx.p .........0 + 0x0f, 0x6e, 0x30, 0x0f, 0xe3, 0xf0, 0x0e, 0xf0, 0x50, 0x0e, 0x33, 0x10, 0xc4, 0x1d, 0xde, 0x21, // .n0.....P.3....! + 0x1c, 0xd8, 0x21, 0x1d, 0xc2, 0x61, 0x1e, 0x66, 0x30, 0x89, 0x3b, 0xbc, 0x83, 0x3b, 0xd0, 0x43, // ..!..a.f0.;..;.C + 0x39, 0xb4, 0x03, 0x3c, 0xbc, 0x83, 0x3c, 0x84, 0x03, 0x3b, 0xcc, 0xf0, 0x14, 0x76, 0x60, 0x07, // 9..<..<..;...v`. + 0x7b, 0x68, 0x07, 0x37, 0x68, 0x87, 0x72, 0x68, 0x07, 0x37, 0x80, 0x87, 0x70, 0x90, 0x87, 0x70, // {h.7h.rh.7..p..p + 0x60, 0x07, 0x76, 0x28, 0x07, 0x76, 0xf8, 0x05, 0x76, 0x78, 0x87, 0x77, 0x80, 0x87, 0x5f, 0x08, // `.v(.v..vx.w.._. + 0x87, 0x71, 0x18, 0x87, 0x72, 0x98, 0x87, 0x79, 0x98, 0x81, 0x2c, 0xee, 0xf0, 0x0e, 0xee, 0xe0, // .q..r..y..,..... + 0x0e, 0xf5, 0xc0, 0x0e, 0xec, 0x30, 0x03, 0x62, 0xc8, 0xa1, 0x1c, 0xe4, 0xa1, 0x1c, 0xcc, 0xa1, // .....0.b........ + 0x1c, 0xe4, 0xa1, 0x1c, 0xdc, 0x61, 0x1c, 0xca, 0x21, 0x1c, 0xc4, 0x81, 0x1d, 0xca, 0x61, 0x06, // .....a..!.....a. + 0xd6, 0x90, 0x43, 0x39, 0xc8, 0x43, 0x39, 0x98, 0x43, 0x39, 0xc8, 0x43, 0x39, 0xb8, 0xc3, 0x38, // ..C9.C9.C9.C9..8 + 0x94, 0x43, 0x38, 0x88, 0x03, 0x3b, 0x94, 0xc3, 0x2f, 0xbc, 0x83, 0x3c, 0xfc, 0x82, 0x3b, 0xd4, // .C8..;../..<..;. + 0x03, 0x3b, 0xb0, 0xc3, 0x0c, 0xc4, 0x21, 0x07, 0x7c, 0x70, 0x03, 0x7a, 0x28, 0x87, 0x76, 0x80, // .;....!.|p.z(.v. + 0x87, 0x19, 0xd1, 0x43, 0x0e, 0xf8, 0xe0, 0x06, 0xe4, 0x20, 0x0e, 0xe7, 0xe0, 0x06, 0xf6, 0x10, // ...C..... ...... + 0x0e, 0xf2, 0xc0, 0x0e, 0xe1, 0x90, 0x0f, 0xef, 0x50, 0x0f, 0xf4, 0x00, 0x00, 0x00, 0x71, 0x20, // ........P.....q + 0x00, 0x00, 0x12, 0x00, 0x00, 0x00, 0x46, 0x20, 0x0d, 0x97, 0xef, 0x3c, 0xbe, 0x10, 0x11, 0xc0, // ......F ...<.... + 0x44, 0x84, 0x40, 0x33, 0x2c, 0x84, 0x05, 0x4c, 0xc3, 0xe5, 0x3b, 0x8f, 0xbf, 0x38, 0xc0, 0x20, // D.@3,..L..;..8. + 0x36, 0x0f, 0x35, 0xf9, 0xc5, 0x6d, 0xdb, 0x00, 0x34, 0x5c, 0xbe, 0xf3, 0xf8, 0x12, 0xc0, 0x3c, // 6.5..m..4......< + 0x0b, 0xe1, 0x17, 0xb7, 0x6d, 0x02, 0xd5, 0x70, 0xf9, 0xce, 0xe3, 0x4b, 0x93, 0x13, 0x11, 0x28, // ....m..p...K...( + 0x35, 0x3d, 0xd4, 0xe4, 0x17, 0xb7, 0x6d, 0x00, 0x04, 0x03, 0x20, 0x0d, 0x00, 0x00, 0x61, 0x20, // 5=....m... ...a + 0x00, 0x00, 0x3a, 0x00, 0x00, 0x00, 0x13, 0x04, 0x41, 0x2c, 0x10, 0x00, 0x00, 0x00, 0x05, 0x00, // ..:.....A,...... + 0x00, 0x00, 0xf4, 0x46, 0x00, 0x88, 0xcc, 0x00, 0x14, 0x42, 0x29, 0x94, 0x5c, 0xe1, 0x51, 0x29, // ...F.....B)...Q) + 0x01, 0x1a, 0x33, 0x00, 0x00, 0x00, 0x23, 0x06, 0x09, 0x00, 0x82, 0x60, 0x00, 0x65, 0x84, 0x73, // ..3...#....`.e.s + 0x5d, 0xc8, 0x88, 0x41, 0x02, 0x80, 0x20, 0x18, 0x40, 0x5a, 0x11, 0x61, 0x58, 0x32, 0x62, 0x90, // ]..A.. .@Z.aX2b. + 0x00, 0x20, 0x08, 0x06, 0x86, 0x87, 0x58, 0x19, 0x94, 0x8c, 0x18, 0x24, 0x00, 0x08, 0x82, 0x81, // . ....X....$.... + 0xf1, 0x25, 0x97, 0x56, 0x28, 0x23, 0x06, 0x09, 0x00, 0x82, 0x60, 0x60, 0x80, 0x81, 0xc2, 0x6d, // .%.V(#....``...m + 0xd2, 0x32, 0x62, 0x90, 0x00, 0x20, 0x08, 0x06, 0x46, 0x18, 0x2c, 0x1d, 0x77, 0x30, 0x23, 0x06, // .2b.. ..F.,.w0#. + 0x09, 0x00, 0x82, 0x60, 0x60, 0x88, 0x01, 0xe3, 0x75, 0x53, 0x33, 0x62, 0x90, 0x00, 0x20, 0x08, // ...``...uS3b.. . + 0x06, 0xc6, 0x18, 0x34, 0x9f, 0x77, 0x39, 0x23, 0x06, 0x0f, 0x00, 0x82, 0x60, 0xd0, 0x88, 0xc1, // ...4.w9#....`... + 0x82, 0x1c, 0x46, 0x91, 0x24, 0xdf, 0xf7, 0x24, 0xa3, 0x09, 0x01, 0x30, 0x9a, 0x20, 0x04, 0xa3, // ..F.$..$...0. .. + 0x09, 0x83, 0x30, 0x9a, 0x40, 0x0c, 0x46, 0x24, 0xf2, 0x31, 0x22, 0x91, 0x8f, 0x11, 0x89, 0x7c, // ..0.@.F$.1"....| + 0x8c, 0x48, 0xe4, 0x33, 0x62, 0x90, 0x00, 0x20, 0x08, 0x06, 0x08, 0x1b, 0x58, 0x68, 0x80, 0x06, // .H.3b.. ....Xh.. + 0x1f, 0x31, 0x62, 0x90, 0x00, 0x20, 0x08, 0x06, 0x08, 0x1b, 0x58, 0x68, 0x80, 0x06, 0xd3, 0x30, // .1b.. ....Xh...0 + 0x62, 0x90, 0x00, 0x20, 0x08, 0x06, 0x08, 0x1b, 0x58, 0x68, 0x80, 0x06, 0x9e, 0x30, 0x62, 0x90, // b.. ....Xh...0b. + 0x00, 0x20, 0x08, 0x06, 0x08, 0x1b, 0x58, 0x68, 0x80, 0x06, 0x61, 0x10, 0x20, 0x00, 0x00, 0x00, // . ....Xh..a. ... + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ...... }; static const uint8_t fs_ocornut_imgui_mtl[609] = { - 0x46, 0x53, 0x48, 0x0b, 0x01, 0x83, 0xf2, 0xe1, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x0c, 0x73, // FSH............s - 0x5f, 0x74, 0x65, 0x78, 0x53, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x72, 0x11, 0x01, 0xff, 0xff, 0x01, // _texSampler..... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x73, 0x5f, 0x74, 0x65, 0x78, 0x54, 0x65, 0x78, 0x74, 0x75, // ......s_texTextu - 0x72, 0x65, 0x11, 0x01, 0xff, 0xff, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x73, 0x5f, 0x74, // re...........s_t - 0x65, 0x78, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0d, 0x02, 0x00, 0x00, // ex.............. - 0x23, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x20, 0x3c, 0x6d, 0x65, 0x74, 0x61, 0x6c, 0x5f, // #include .#include - 0x20, 0x3c, 0x73, 0x69, 0x6d, 0x64, 0x2f, 0x73, 0x69, 0x6d, 0x64, 0x2e, 0x68, 0x3e, 0x0a, 0x0a, // .. - 0x75, 0x73, 0x69, 0x6e, 0x67, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x20, // using namespace - 0x6d, 0x65, 0x74, 0x61, 0x6c, 0x3b, 0x0a, 0x0a, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x20, 0x78, // metal;..struct x - 0x6c, 0x61, 0x74, 0x4d, 0x74, 0x6c, 0x4d, 0x61, 0x69, 0x6e, 0x5f, 0x6f, 0x75, 0x74, 0x0a, 0x7b, // latMtlMain_out.{ - 0x0a, 0x20, 0x20, 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x34, 0x20, 0x62, 0x67, 0x66, 0x78, // . float4 bgfx - 0x5f, 0x46, 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, 0x61, 0x30, 0x20, 0x5b, 0x5b, 0x63, 0x6f, 0x6c, // _FragData0 [[col - 0x6f, 0x72, 0x28, 0x30, 0x29, 0x5d, 0x5d, 0x3b, 0x0a, 0x7d, 0x3b, 0x0a, 0x0a, 0x73, 0x74, 0x72, // or(0)]];.};..str - 0x75, 0x63, 0x74, 0x20, 0x78, 0x6c, 0x61, 0x74, 0x4d, 0x74, 0x6c, 0x4d, 0x61, 0x69, 0x6e, 0x5f, // uct xlatMtlMain_ - 0x69, 0x6e, 0x0a, 0x7b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x34, 0x20, // in.{. float4 - 0x76, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x20, 0x5b, 0x5b, 0x75, 0x73, 0x65, 0x72, 0x28, // v_color0 [[user( - 0x6c, 0x6f, 0x63, 0x6e, 0x30, 0x29, 0x5d, 0x5d, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x66, 0x6c, // locn0)]];. fl - 0x6f, 0x61, 0x74, 0x32, 0x20, 0x76, 0x5f, 0x74, 0x65, 0x78, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x30, // oat2 v_texcoord0 - 0x20, 0x5b, 0x5b, 0x75, 0x73, 0x65, 0x72, 0x28, 0x6c, 0x6f, 0x63, 0x6e, 0x31, 0x29, 0x5d, 0x5d, // [[user(locn1)]] - 0x3b, 0x0a, 0x7d, 0x3b, 0x0a, 0x0a, 0x66, 0x72, 0x61, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x20, 0x78, // ;.};..fragment x - 0x6c, 0x61, 0x74, 0x4d, 0x74, 0x6c, 0x4d, 0x61, 0x69, 0x6e, 0x5f, 0x6f, 0x75, 0x74, 0x20, 0x78, // latMtlMain_out x - 0x6c, 0x61, 0x74, 0x4d, 0x74, 0x6c, 0x4d, 0x61, 0x69, 0x6e, 0x28, 0x78, 0x6c, 0x61, 0x74, 0x4d, // latMtlMain(xlatM - 0x74, 0x6c, 0x4d, 0x61, 0x69, 0x6e, 0x5f, 0x69, 0x6e, 0x20, 0x69, 0x6e, 0x20, 0x5b, 0x5b, 0x73, // tlMain_in in [[s - 0x74, 0x61, 0x67, 0x65, 0x5f, 0x69, 0x6e, 0x5d, 0x5d, 0x2c, 0x20, 0x74, 0x65, 0x78, 0x74, 0x75, // tage_in]], textu - 0x72, 0x65, 0x32, 0x64, 0x3c, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x3e, 0x20, 0x73, 0x5f, 0x74, 0x65, // re2d s_te - 0x78, 0x20, 0x5b, 0x5b, 0x74, 0x65, 0x78, 0x74, 0x75, 0x72, 0x65, 0x28, 0x30, 0x29, 0x5d, 0x5d, // x [[texture(0)]] - 0x2c, 0x20, 0x73, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x72, 0x20, 0x73, 0x5f, 0x74, 0x65, 0x78, 0x53, // , sampler s_texS - 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x72, 0x20, 0x5b, 0x5b, 0x73, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x72, // ampler [[sampler - 0x28, 0x30, 0x29, 0x5d, 0x5d, 0x29, 0x0a, 0x7b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x78, 0x6c, 0x61, // (0)]]).{. xla - 0x74, 0x4d, 0x74, 0x6c, 0x4d, 0x61, 0x69, 0x6e, 0x5f, 0x6f, 0x75, 0x74, 0x20, 0x6f, 0x75, 0x74, // tMtlMain_out out - 0x20, 0x3d, 0x20, 0x7b, 0x7d, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x6f, 0x75, 0x74, 0x2e, 0x62, // = {};. out.b - 0x67, 0x66, 0x78, 0x5f, 0x46, 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, 0x61, 0x30, 0x20, 0x3d, 0x20, // gfx_FragData0 = - 0x73, 0x5f, 0x74, 0x65, 0x78, 0x2e, 0x73, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x28, 0x73, 0x5f, 0x74, // s_tex.sample(s_t - 0x65, 0x78, 0x53, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x72, 0x2c, 0x20, 0x69, 0x6e, 0x2e, 0x76, 0x5f, // exSampler, in.v_ - 0x74, 0x65, 0x78, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x30, 0x29, 0x20, 0x2a, 0x20, 0x69, 0x6e, 0x2e, // texcoord0) * in. - 0x76, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x72, 0x65, // v_color0;. re - 0x74, 0x75, 0x72, 0x6e, 0x20, 0x6f, 0x75, 0x74, 0x3b, 0x0a, 0x7d, 0x0a, 0x0a, 0x00, 0x00, 0x20, // turn out;.}.... - 0x00, // . + 0x46, 0x53, 0x48, 0x0b, 0x01, 0x83, 0xf2, 0xe1, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x0c, 0x73, // FSH............s + 0x5f, 0x74, 0x65, 0x78, 0x53, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x72, 0x11, 0x01, 0xff, 0xff, 0x01, // _texSampler..... + 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x73, 0x5f, 0x74, 0x65, 0x78, 0x54, 0x65, 0x78, 0x74, 0x75, // ......s_texTextu + 0x72, 0x65, 0x11, 0x01, 0xff, 0xff, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x73, 0x5f, 0x74, // re...........s_t + 0x65, 0x78, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0d, 0x02, 0x00, 0x00, // ex.............. + 0x23, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x20, 0x3c, 0x6d, 0x65, 0x74, 0x61, 0x6c, 0x5f, // #include .#include + 0x20, 0x3c, 0x73, 0x69, 0x6d, 0x64, 0x2f, 0x73, 0x69, 0x6d, 0x64, 0x2e, 0x68, 0x3e, 0x0a, 0x0a, // .. + 0x75, 0x73, 0x69, 0x6e, 0x67, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x20, // using namespace + 0x6d, 0x65, 0x74, 0x61, 0x6c, 0x3b, 0x0a, 0x0a, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x20, 0x78, // metal;..struct x + 0x6c, 0x61, 0x74, 0x4d, 0x74, 0x6c, 0x4d, 0x61, 0x69, 0x6e, 0x5f, 0x6f, 0x75, 0x74, 0x0a, 0x7b, // latMtlMain_out.{ + 0x0a, 0x20, 0x20, 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x34, 0x20, 0x62, 0x67, 0x66, 0x78, // . float4 bgfx + 0x5f, 0x46, 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, 0x61, 0x30, 0x20, 0x5b, 0x5b, 0x63, 0x6f, 0x6c, // _FragData0 [[col + 0x6f, 0x72, 0x28, 0x30, 0x29, 0x5d, 0x5d, 0x3b, 0x0a, 0x7d, 0x3b, 0x0a, 0x0a, 0x73, 0x74, 0x72, // or(0)]];.};..str + 0x75, 0x63, 0x74, 0x20, 0x78, 0x6c, 0x61, 0x74, 0x4d, 0x74, 0x6c, 0x4d, 0x61, 0x69, 0x6e, 0x5f, // uct xlatMtlMain_ + 0x69, 0x6e, 0x0a, 0x7b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x34, 0x20, // in.{. float4 + 0x76, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x20, 0x5b, 0x5b, 0x75, 0x73, 0x65, 0x72, 0x28, // v_color0 [[user( + 0x6c, 0x6f, 0x63, 0x6e, 0x30, 0x29, 0x5d, 0x5d, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x66, 0x6c, // locn0)]];. fl + 0x6f, 0x61, 0x74, 0x32, 0x20, 0x76, 0x5f, 0x74, 0x65, 0x78, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x30, // oat2 v_texcoord0 + 0x20, 0x5b, 0x5b, 0x75, 0x73, 0x65, 0x72, 0x28, 0x6c, 0x6f, 0x63, 0x6e, 0x31, 0x29, 0x5d, 0x5d, // [[user(locn1)]] + 0x3b, 0x0a, 0x7d, 0x3b, 0x0a, 0x0a, 0x66, 0x72, 0x61, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x20, 0x78, // ;.};..fragment x + 0x6c, 0x61, 0x74, 0x4d, 0x74, 0x6c, 0x4d, 0x61, 0x69, 0x6e, 0x5f, 0x6f, 0x75, 0x74, 0x20, 0x78, // latMtlMain_out x + 0x6c, 0x61, 0x74, 0x4d, 0x74, 0x6c, 0x4d, 0x61, 0x69, 0x6e, 0x28, 0x78, 0x6c, 0x61, 0x74, 0x4d, // latMtlMain(xlatM + 0x74, 0x6c, 0x4d, 0x61, 0x69, 0x6e, 0x5f, 0x69, 0x6e, 0x20, 0x69, 0x6e, 0x20, 0x5b, 0x5b, 0x73, // tlMain_in in [[s + 0x74, 0x61, 0x67, 0x65, 0x5f, 0x69, 0x6e, 0x5d, 0x5d, 0x2c, 0x20, 0x74, 0x65, 0x78, 0x74, 0x75, // tage_in]], textu + 0x72, 0x65, 0x32, 0x64, 0x3c, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x3e, 0x20, 0x73, 0x5f, 0x74, 0x65, // re2d s_te + 0x78, 0x20, 0x5b, 0x5b, 0x74, 0x65, 0x78, 0x74, 0x75, 0x72, 0x65, 0x28, 0x30, 0x29, 0x5d, 0x5d, // x [[texture(0)]] + 0x2c, 0x20, 0x73, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x72, 0x20, 0x73, 0x5f, 0x74, 0x65, 0x78, 0x53, // , sampler s_texS + 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x72, 0x20, 0x5b, 0x5b, 0x73, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x72, // ampler [[sampler + 0x28, 0x30, 0x29, 0x5d, 0x5d, 0x29, 0x0a, 0x7b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x78, 0x6c, 0x61, // (0)]]).{. xla + 0x74, 0x4d, 0x74, 0x6c, 0x4d, 0x61, 0x69, 0x6e, 0x5f, 0x6f, 0x75, 0x74, 0x20, 0x6f, 0x75, 0x74, // tMtlMain_out out + 0x20, 0x3d, 0x20, 0x7b, 0x7d, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x6f, 0x75, 0x74, 0x2e, 0x62, // = {};. out.b + 0x67, 0x66, 0x78, 0x5f, 0x46, 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, 0x61, 0x30, 0x20, 0x3d, 0x20, // gfx_FragData0 = + 0x73, 0x5f, 0x74, 0x65, 0x78, 0x2e, 0x73, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x28, 0x73, 0x5f, 0x74, // s_tex.sample(s_t + 0x65, 0x78, 0x53, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x72, 0x2c, 0x20, 0x69, 0x6e, 0x2e, 0x76, 0x5f, // exSampler, in.v_ + 0x74, 0x65, 0x78, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x30, 0x29, 0x20, 0x2a, 0x20, 0x69, 0x6e, 0x2e, // texcoord0) * in. + 0x76, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x72, 0x65, // v_color0;. re + 0x74, 0x75, 0x72, 0x6e, 0x20, 0x6f, 0x75, 0x74, 0x3b, 0x0a, 0x7d, 0x0a, 0x0a, 0x00, 0x00, 0x20, // turn out;.}.... + 0x00, // . }; extern const uint8_t* fs_ocornut_imgui_pssl; extern const uint32_t fs_ocornut_imgui_pssl_size; diff --git a/Modules/Moonlight/Source/ImGui/Resources/vs_imgui_image.bin.hpp b/Modules/Moonlight/Source/ImGui/Resources/vs_imgui_image.bin.hpp index c8ea3089..083ae307 100644 --- a/Modules/Moonlight/Source/ImGui/Resources/vs_imgui_image.bin.hpp +++ b/Modules/Moonlight/Source/ImGui/Resources/vs_imgui_image.bin.hpp @@ -1,221 +1,406 @@ static const uint8_t vs_imgui_image_glsl[311] = { - 0x56, 0x53, 0x48, 0x0b, 0x00, 0x00, 0x00, 0x00, 0x6f, 0x1e, 0x3e, 0x3c, 0x01, 0x00, 0x0a, 0x75, // VSH.....o.><...u - 0x5f, 0x76, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x04, 0x01, 0x00, 0x00, 0x01, 0x00, 0x00, // _viewProj....... - 0x00, 0x00, 0x00, 0x0f, 0x01, 0x00, 0x00, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, // .......attribute - 0x20, 0x76, 0x65, 0x63, 0x32, 0x20, 0x61, 0x5f, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, // vec2 a_position - 0x3b, 0x0a, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x20, 0x76, 0x65, 0x63, 0x32, // ;.attribute vec2 - 0x20, 0x61, 0x5f, 0x74, 0x65, 0x78, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x30, 0x3b, 0x0a, 0x76, 0x61, // a_texcoord0;.va - 0x72, 0x79, 0x69, 0x6e, 0x67, 0x20, 0x76, 0x65, 0x63, 0x32, 0x20, 0x76, 0x5f, 0x74, 0x65, 0x78, // rying vec2 v_tex - 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x30, 0x3b, 0x0a, 0x75, 0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, 0x20, // coord0;.uniform - 0x6d, 0x61, 0x74, 0x34, 0x20, 0x75, 0x5f, 0x76, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x3b, // mat4 u_viewProj; - 0x0a, 0x76, 0x6f, 0x69, 0x64, 0x20, 0x6d, 0x61, 0x69, 0x6e, 0x20, 0x28, 0x29, 0x0a, 0x7b, 0x0a, // .void main ().{. - 0x20, 0x20, 0x76, 0x65, 0x63, 0x34, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x31, 0x3b, // vec4 tmpvar_1; - 0x0a, 0x20, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x31, 0x2e, 0x7a, 0x77, 0x20, 0x3d, // . tmpvar_1.zw = - 0x20, 0x76, 0x65, 0x63, 0x32, 0x28, 0x30, 0x2e, 0x30, 0x2c, 0x20, 0x31, 0x2e, 0x30, 0x29, 0x3b, // vec2(0.0, 1.0); - 0x0a, 0x20, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x31, 0x2e, 0x78, 0x79, 0x20, 0x3d, // . tmpvar_1.xy = - 0x20, 0x61, 0x5f, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x3b, 0x0a, 0x20, 0x20, 0x67, // a_position;. g - 0x6c, 0x5f, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x3d, 0x20, 0x28, 0x75, 0x5f, // l_Position = (u_ - 0x76, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x20, 0x2a, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, // viewProj * tmpva - 0x72, 0x5f, 0x31, 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x76, 0x5f, 0x74, 0x65, 0x78, 0x63, 0x6f, 0x6f, // r_1);. v_texcoo - 0x72, 0x64, 0x30, 0x20, 0x3d, 0x20, 0x61, 0x5f, 0x74, 0x65, 0x78, 0x63, 0x6f, 0x6f, 0x72, 0x64, // rd0 = a_texcoord - 0x30, 0x3b, 0x0a, 0x7d, 0x0a, 0x0a, 0x00, // 0;.}... + 0x56, 0x53, 0x48, 0x0b, 0x00, 0x00, 0x00, 0x00, 0x6f, 0x1e, 0x3e, 0x3c, 0x01, 0x00, 0x0a, 0x75, // VSH.....o.><...u + 0x5f, 0x76, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x04, 0x01, 0x00, 0x00, 0x04, 0x00, 0x00, // _viewProj....... + 0x00, 0x00, 0x00, 0x0f, 0x01, 0x00, 0x00, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, // .......attribute + 0x20, 0x76, 0x65, 0x63, 0x32, 0x20, 0x61, 0x5f, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, // vec2 a_position + 0x3b, 0x0a, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x20, 0x76, 0x65, 0x63, 0x32, // ;.attribute vec2 + 0x20, 0x61, 0x5f, 0x74, 0x65, 0x78, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x30, 0x3b, 0x0a, 0x76, 0x61, // a_texcoord0;.va + 0x72, 0x79, 0x69, 0x6e, 0x67, 0x20, 0x76, 0x65, 0x63, 0x32, 0x20, 0x76, 0x5f, 0x74, 0x65, 0x78, // rying vec2 v_tex + 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x30, 0x3b, 0x0a, 0x75, 0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, 0x20, // coord0;.uniform + 0x6d, 0x61, 0x74, 0x34, 0x20, 0x75, 0x5f, 0x76, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x3b, // mat4 u_viewProj; + 0x0a, 0x76, 0x6f, 0x69, 0x64, 0x20, 0x6d, 0x61, 0x69, 0x6e, 0x20, 0x28, 0x29, 0x0a, 0x7b, 0x0a, // .void main ().{. + 0x20, 0x20, 0x76, 0x65, 0x63, 0x34, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x31, 0x3b, // vec4 tmpvar_1; + 0x0a, 0x20, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x31, 0x2e, 0x7a, 0x77, 0x20, 0x3d, // . tmpvar_1.zw = + 0x20, 0x76, 0x65, 0x63, 0x32, 0x28, 0x30, 0x2e, 0x30, 0x2c, 0x20, 0x31, 0x2e, 0x30, 0x29, 0x3b, // vec2(0.0, 1.0); + 0x0a, 0x20, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x31, 0x2e, 0x78, 0x79, 0x20, 0x3d, // . tmpvar_1.xy = + 0x20, 0x61, 0x5f, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x3b, 0x0a, 0x20, 0x20, 0x67, // a_position;. g + 0x6c, 0x5f, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x3d, 0x20, 0x28, 0x75, 0x5f, // l_Position = (u_ + 0x76, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x20, 0x2a, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, // viewProj * tmpva + 0x72, 0x5f, 0x31, 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x76, 0x5f, 0x74, 0x65, 0x78, 0x63, 0x6f, 0x6f, // r_1);. v_texcoo + 0x72, 0x64, 0x30, 0x20, 0x3d, 0x20, 0x61, 0x5f, 0x74, 0x65, 0x78, 0x63, 0x6f, 0x6f, 0x72, 0x64, // rd0 = a_texcoord + 0x30, 0x3b, 0x0a, 0x7d, 0x0a, 0x0a, 0x00, // 0;.}... }; static const uint8_t vs_imgui_image_essl[341] = { - 0x56, 0x53, 0x48, 0x0b, 0x00, 0x00, 0x00, 0x00, 0x6f, 0x1e, 0x3e, 0x3c, 0x01, 0x00, 0x0a, 0x75, // VSH.....o.><...u - 0x5f, 0x76, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x04, 0x01, 0x00, 0x00, 0x01, 0x00, 0x00, // _viewProj....... - 0x00, 0x00, 0x00, 0x2d, 0x01, 0x00, 0x00, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, // ...-...attribute - 0x20, 0x68, 0x69, 0x67, 0x68, 0x70, 0x20, 0x76, 0x65, 0x63, 0x32, 0x20, 0x61, 0x5f, 0x70, 0x6f, // highp vec2 a_po - 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x3b, 0x0a, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, // sition;.attribut - 0x65, 0x20, 0x68, 0x69, 0x67, 0x68, 0x70, 0x20, 0x76, 0x65, 0x63, 0x32, 0x20, 0x61, 0x5f, 0x74, // e highp vec2 a_t - 0x65, 0x78, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x30, 0x3b, 0x0a, 0x76, 0x61, 0x72, 0x79, 0x69, 0x6e, // excoord0;.varyin - 0x67, 0x20, 0x68, 0x69, 0x67, 0x68, 0x70, 0x20, 0x76, 0x65, 0x63, 0x32, 0x20, 0x76, 0x5f, 0x74, // g highp vec2 v_t - 0x65, 0x78, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x30, 0x3b, 0x0a, 0x75, 0x6e, 0x69, 0x66, 0x6f, 0x72, // excoord0;.unifor - 0x6d, 0x20, 0x68, 0x69, 0x67, 0x68, 0x70, 0x20, 0x6d, 0x61, 0x74, 0x34, 0x20, 0x75, 0x5f, 0x76, // m highp mat4 u_v - 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x3b, 0x0a, 0x76, 0x6f, 0x69, 0x64, 0x20, 0x6d, 0x61, // iewProj;.void ma - 0x69, 0x6e, 0x20, 0x28, 0x29, 0x0a, 0x7b, 0x0a, 0x20, 0x20, 0x68, 0x69, 0x67, 0x68, 0x70, 0x20, // in ().{. highp - 0x76, 0x65, 0x63, 0x34, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x31, 0x3b, 0x0a, 0x20, // vec4 tmpvar_1;. - 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x31, 0x2e, 0x7a, 0x77, 0x20, 0x3d, 0x20, 0x76, // tmpvar_1.zw = v - 0x65, 0x63, 0x32, 0x28, 0x30, 0x2e, 0x30, 0x2c, 0x20, 0x31, 0x2e, 0x30, 0x29, 0x3b, 0x0a, 0x20, // ec2(0.0, 1.0);. - 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x31, 0x2e, 0x78, 0x79, 0x20, 0x3d, 0x20, 0x61, // tmpvar_1.xy = a - 0x5f, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x3b, 0x0a, 0x20, 0x20, 0x67, 0x6c, 0x5f, // _position;. gl_ - 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x3d, 0x20, 0x28, 0x75, 0x5f, 0x76, 0x69, // Position = (u_vi - 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x20, 0x2a, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, // ewProj * tmpvar_ - 0x31, 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x76, 0x5f, 0x74, 0x65, 0x78, 0x63, 0x6f, 0x6f, 0x72, 0x64, // 1);. v_texcoord - 0x30, 0x20, 0x3d, 0x20, 0x61, 0x5f, 0x74, 0x65, 0x78, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x30, 0x3b, // 0 = a_texcoord0; - 0x0a, 0x7d, 0x0a, 0x0a, 0x00, // .}... + 0x56, 0x53, 0x48, 0x0b, 0x00, 0x00, 0x00, 0x00, 0x6f, 0x1e, 0x3e, 0x3c, 0x01, 0x00, 0x0a, 0x75, // VSH.....o.><...u + 0x5f, 0x76, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x04, 0x01, 0x00, 0x00, 0x04, 0x00, 0x00, // _viewProj....... + 0x00, 0x00, 0x00, 0x2d, 0x01, 0x00, 0x00, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, // ...-...attribute + 0x20, 0x68, 0x69, 0x67, 0x68, 0x70, 0x20, 0x76, 0x65, 0x63, 0x32, 0x20, 0x61, 0x5f, 0x70, 0x6f, // highp vec2 a_po + 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x3b, 0x0a, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, // sition;.attribut + 0x65, 0x20, 0x68, 0x69, 0x67, 0x68, 0x70, 0x20, 0x76, 0x65, 0x63, 0x32, 0x20, 0x61, 0x5f, 0x74, // e highp vec2 a_t + 0x65, 0x78, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x30, 0x3b, 0x0a, 0x76, 0x61, 0x72, 0x79, 0x69, 0x6e, // excoord0;.varyin + 0x67, 0x20, 0x68, 0x69, 0x67, 0x68, 0x70, 0x20, 0x76, 0x65, 0x63, 0x32, 0x20, 0x76, 0x5f, 0x74, // g highp vec2 v_t + 0x65, 0x78, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x30, 0x3b, 0x0a, 0x75, 0x6e, 0x69, 0x66, 0x6f, 0x72, // excoord0;.unifor + 0x6d, 0x20, 0x68, 0x69, 0x67, 0x68, 0x70, 0x20, 0x6d, 0x61, 0x74, 0x34, 0x20, 0x75, 0x5f, 0x76, // m highp mat4 u_v + 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x3b, 0x0a, 0x76, 0x6f, 0x69, 0x64, 0x20, 0x6d, 0x61, // iewProj;.void ma + 0x69, 0x6e, 0x20, 0x28, 0x29, 0x0a, 0x7b, 0x0a, 0x20, 0x20, 0x68, 0x69, 0x67, 0x68, 0x70, 0x20, // in ().{. highp + 0x76, 0x65, 0x63, 0x34, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x31, 0x3b, 0x0a, 0x20, // vec4 tmpvar_1;. + 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x31, 0x2e, 0x7a, 0x77, 0x20, 0x3d, 0x20, 0x76, // tmpvar_1.zw = v + 0x65, 0x63, 0x32, 0x28, 0x30, 0x2e, 0x30, 0x2c, 0x20, 0x31, 0x2e, 0x30, 0x29, 0x3b, 0x0a, 0x20, // ec2(0.0, 1.0);. + 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x31, 0x2e, 0x78, 0x79, 0x20, 0x3d, 0x20, 0x61, // tmpvar_1.xy = a + 0x5f, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x3b, 0x0a, 0x20, 0x20, 0x67, 0x6c, 0x5f, // _position;. gl_ + 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x3d, 0x20, 0x28, 0x75, 0x5f, 0x76, 0x69, // Position = (u_vi + 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x20, 0x2a, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, // ewProj * tmpvar_ + 0x31, 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x76, 0x5f, 0x74, 0x65, 0x78, 0x63, 0x6f, 0x6f, 0x72, 0x64, // 1);. v_texcoord + 0x30, 0x20, 0x3d, 0x20, 0x61, 0x5f, 0x74, 0x65, 0x78, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x30, 0x3b, // 0 = a_texcoord0; + 0x0a, 0x7d, 0x0a, 0x0a, 0x00, // .}... }; static const uint8_t vs_imgui_image_spv[1051] = { - 0x56, 0x53, 0x48, 0x0b, 0x00, 0x00, 0x00, 0x00, 0x6f, 0x1e, 0x3e, 0x3c, 0x01, 0x00, 0x0a, 0x75, // VSH.....o.><...u - 0x5f, 0x76, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, // _viewProj....... - 0x00, 0x00, 0x00, 0xec, 0x03, 0x00, 0x00, 0x03, 0x02, 0x23, 0x07, 0x00, 0x00, 0x01, 0x00, 0x0a, // .........#...... - 0x00, 0x08, 0x00, 0x5d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x11, 0x00, 0x02, 0x00, 0x01, // ...]............ - 0x00, 0x00, 0x00, 0x0b, 0x00, 0x06, 0x00, 0x01, 0x00, 0x00, 0x00, 0x47, 0x4c, 0x53, 0x4c, 0x2e, // ...........GLSL. - 0x73, 0x74, 0x64, 0x2e, 0x34, 0x35, 0x30, 0x00, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x03, 0x00, 0x00, // std.450......... - 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x09, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, // ................ - 0x00, 0x00, 0x00, 0x6d, 0x61, 0x69, 0x6e, 0x00, 0x00, 0x00, 0x00, 0x2e, 0x00, 0x00, 0x00, 0x31, // ...main........1 - 0x00, 0x00, 0x00, 0x3a, 0x00, 0x00, 0x00, 0x3e, 0x00, 0x00, 0x00, 0x03, 0x00, 0x03, 0x00, 0x05, // ...:...>........ - 0x00, 0x00, 0x00, 0xf4, 0x01, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0x04, 0x00, 0x00, 0x00, 0x6d, // ...............m - 0x61, 0x69, 0x6e, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x06, 0x00, 0x1e, 0x00, 0x00, 0x00, 0x55, // ain............U - 0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x00, 0x00, 0x00, 0x00, 0x06, // niformBlock..... - 0x00, 0x06, 0x00, 0x1e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x76, 0x69, 0x65, // ...........u_vie - 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x00, 0x00, 0x05, 0x00, 0x03, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, // wProj...... .... - 0x00, 0x00, 0x00, 0x05, 0x00, 0x05, 0x00, 0x2e, 0x00, 0x00, 0x00, 0x61, 0x5f, 0x70, 0x6f, 0x73, // ...........a_pos - 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x00, 0x00, 0x05, 0x00, 0x05, 0x00, 0x31, 0x00, 0x00, 0x00, 0x61, // ition......1...a - 0x5f, 0x74, 0x65, 0x78, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x30, 0x00, 0x05, 0x00, 0x0a, 0x00, 0x3a, // _texcoord0.....: - 0x00, 0x00, 0x00, 0x40, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x4f, 0x75, // ...@entryPointOu - 0x74, 0x70, 0x75, 0x74, 0x2e, 0x67, 0x6c, 0x5f, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, // tput.gl_Position - 0x00, 0x00, 0x00, 0x05, 0x00, 0x0a, 0x00, 0x3e, 0x00, 0x00, 0x00, 0x40, 0x65, 0x6e, 0x74, 0x72, // .......>...@entr - 0x79, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x2e, 0x76, 0x5f, 0x74, // yPointOutput.v_t - 0x65, 0x78, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x30, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0x1e, // excoord0...H.... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x1e, // ...........H.... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x48, // .......#.......H - 0x00, 0x05, 0x00, 0x1e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, // ................ - 0x00, 0x00, 0x00, 0x47, 0x00, 0x03, 0x00, 0x1e, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x47, // ...G...........G - 0x00, 0x04, 0x00, 0x20, 0x00, 0x00, 0x00, 0x22, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, // ... ...".......G - 0x00, 0x04, 0x00, 0x20, 0x00, 0x00, 0x00, 0x21, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, // ... ...!.......G - 0x00, 0x04, 0x00, 0x2e, 0x00, 0x00, 0x00, 0x1e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, // ...............G - 0x00, 0x04, 0x00, 0x31, 0x00, 0x00, 0x00, 0x1e, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x47, // ...1...........G - 0x00, 0x04, 0x00, 0x3a, 0x00, 0x00, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, // ...:...........G - 0x00, 0x04, 0x00, 0x3e, 0x00, 0x00, 0x00, 0x1e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x13, // ...>............ - 0x00, 0x02, 0x00, 0x02, 0x00, 0x00, 0x00, 0x21, 0x00, 0x03, 0x00, 0x03, 0x00, 0x00, 0x00, 0x02, // .......!........ - 0x00, 0x00, 0x00, 0x16, 0x00, 0x03, 0x00, 0x06, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x17, // ........... .... - 0x00, 0x04, 0x00, 0x07, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x17, // ................ - 0x00, 0x04, 0x00, 0x09, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x15, // ................ - 0x00, 0x04, 0x00, 0x12, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x2b, // ....... .......+ - 0x00, 0x04, 0x00, 0x06, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2b, // ...............+ - 0x00, 0x04, 0x00, 0x12, 0x00, 0x00, 0x00, 0x17, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2b, // ...............+ - 0x00, 0x04, 0x00, 0x06, 0x00, 0x00, 0x00, 0x19, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x3f, 0x18, // ..............?. - 0x00, 0x04, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x1e, // ................ - 0x00, 0x03, 0x00, 0x1e, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x1f, // ........... .... - 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x1e, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x1f, // ...........;.... - 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x21, // ... ....... ...! - 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x2d, // ........... ...- - 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x2d, // ...........;...- - 0x00, 0x00, 0x00, 0x2e, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x2d, // ...........;...- - 0x00, 0x00, 0x00, 0x31, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x39, // ...1....... ...9 - 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x39, // ...........;...9 - 0x00, 0x00, 0x00, 0x3a, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x3d, // ...:....... ...= - 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x3d, // ...........;...= - 0x00, 0x00, 0x00, 0x3e, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x36, 0x00, 0x05, 0x00, 0x02, // ...>.......6.... - 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0xf8, // ................ - 0x00, 0x02, 0x00, 0x05, 0x00, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x07, 0x00, 0x00, 0x00, 0x2f, // .......=......./ - 0x00, 0x00, 0x00, 0x2e, 0x00, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x07, 0x00, 0x00, 0x00, 0x32, // .......=.......2 - 0x00, 0x00, 0x00, 0x31, 0x00, 0x00, 0x00, 0x51, 0x00, 0x05, 0x00, 0x06, 0x00, 0x00, 0x00, 0x57, // ...1...Q.......W - 0x00, 0x00, 0x00, 0x2f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x51, 0x00, 0x05, 0x00, 0x06, // .../.......Q.... - 0x00, 0x00, 0x00, 0x58, 0x00, 0x00, 0x00, 0x2f, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x50, // ...X.../.......P - 0x00, 0x07, 0x00, 0x09, 0x00, 0x00, 0x00, 0x59, 0x00, 0x00, 0x00, 0x57, 0x00, 0x00, 0x00, 0x58, // .......Y...W...X - 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0x19, 0x00, 0x00, 0x00, 0x41, 0x00, 0x05, 0x00, 0x21, // ...........A...! - 0x00, 0x00, 0x00, 0x5a, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x17, 0x00, 0x00, 0x00, 0x3d, // ...Z... .......= - 0x00, 0x04, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x5b, 0x00, 0x00, 0x00, 0x5a, 0x00, 0x00, 0x00, 0x90, // .......[...Z.... - 0x00, 0x05, 0x00, 0x09, 0x00, 0x00, 0x00, 0x5c, 0x00, 0x00, 0x00, 0x59, 0x00, 0x00, 0x00, 0x5b, // ...........Y...[ - 0x00, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0x3a, 0x00, 0x00, 0x00, 0x5c, 0x00, 0x00, 0x00, 0x3e, // ...>...:.......> - 0x00, 0x03, 0x00, 0x3e, 0x00, 0x00, 0x00, 0x32, 0x00, 0x00, 0x00, 0xfd, 0x00, 0x01, 0x00, 0x38, // ...>...2.......8 - 0x00, 0x01, 0x00, 0x00, 0x02, 0x01, 0x00, 0x10, 0x00, 0x40, 0x00, // .........@. + 0x56, 0x53, 0x48, 0x0b, 0x00, 0x00, 0x00, 0x00, 0x6f, 0x1e, 0x3e, 0x3c, 0x01, 0x00, 0x0a, 0x75, // VSH.....o.><...u + 0x5f, 0x76, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x04, 0x01, 0x00, 0x00, 0x04, 0x00, 0x00, // _viewProj....... + 0x00, 0x00, 0x00, 0xec, 0x03, 0x00, 0x00, 0x03, 0x02, 0x23, 0x07, 0x00, 0x00, 0x01, 0x00, 0x0b, // .........#...... + 0x00, 0x08, 0x00, 0x5e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x11, 0x00, 0x02, 0x00, 0x01, // ...^............ + 0x00, 0x00, 0x00, 0x0b, 0x00, 0x06, 0x00, 0x01, 0x00, 0x00, 0x00, 0x47, 0x4c, 0x53, 0x4c, 0x2e, // ...........GLSL. + 0x73, 0x74, 0x64, 0x2e, 0x34, 0x35, 0x30, 0x00, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x03, 0x00, 0x00, // std.450......... + 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x09, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, // ................ + 0x00, 0x00, 0x00, 0x6d, 0x61, 0x69, 0x6e, 0x00, 0x00, 0x00, 0x00, 0x2e, 0x00, 0x00, 0x00, 0x31, // ...main........1 + 0x00, 0x00, 0x00, 0x3a, 0x00, 0x00, 0x00, 0x3e, 0x00, 0x00, 0x00, 0x03, 0x00, 0x03, 0x00, 0x05, // ...:...>........ + 0x00, 0x00, 0x00, 0xf4, 0x01, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0x04, 0x00, 0x00, 0x00, 0x6d, // ...............m + 0x61, 0x69, 0x6e, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x06, 0x00, 0x1e, 0x00, 0x00, 0x00, 0x55, // ain............U + 0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x00, 0x00, 0x00, 0x00, 0x06, // niformBlock..... + 0x00, 0x06, 0x00, 0x1e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x76, 0x69, 0x65, // ...........u_vie + 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x00, 0x00, 0x05, 0x00, 0x03, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, // wProj...... .... + 0x00, 0x00, 0x00, 0x05, 0x00, 0x05, 0x00, 0x2e, 0x00, 0x00, 0x00, 0x61, 0x5f, 0x70, 0x6f, 0x73, // ...........a_pos + 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x00, 0x00, 0x05, 0x00, 0x05, 0x00, 0x31, 0x00, 0x00, 0x00, 0x61, // ition......1...a + 0x5f, 0x74, 0x65, 0x78, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x30, 0x00, 0x05, 0x00, 0x0a, 0x00, 0x3a, // _texcoord0.....: + 0x00, 0x00, 0x00, 0x40, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x4f, 0x75, // ...@entryPointOu + 0x74, 0x70, 0x75, 0x74, 0x2e, 0x67, 0x6c, 0x5f, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, // tput.gl_Position + 0x00, 0x00, 0x00, 0x05, 0x00, 0x0a, 0x00, 0x3e, 0x00, 0x00, 0x00, 0x40, 0x65, 0x6e, 0x74, 0x72, // .......>...@entr + 0x79, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x2e, 0x76, 0x5f, 0x74, // yPointOutput.v_t + 0x65, 0x78, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x30, 0x00, 0x00, 0x00, 0x47, 0x00, 0x03, 0x00, 0x1e, // excoord0...G.... + 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0x1e, 0x00, 0x00, 0x00, 0x00, // .......H........ + 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x1e, 0x00, 0x00, 0x00, 0x00, // .......H........ + 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x1e, // ...........H.... + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, // .......#.......G + 0x00, 0x04, 0x00, 0x20, 0x00, 0x00, 0x00, 0x21, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, // ... ...!.......G + 0x00, 0x04, 0x00, 0x20, 0x00, 0x00, 0x00, 0x22, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, // ... ...".......G + 0x00, 0x04, 0x00, 0x2e, 0x00, 0x00, 0x00, 0x1e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, // ...............G + 0x00, 0x04, 0x00, 0x31, 0x00, 0x00, 0x00, 0x1e, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x47, // ...1...........G + 0x00, 0x04, 0x00, 0x3a, 0x00, 0x00, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, // ...:...........G + 0x00, 0x04, 0x00, 0x3e, 0x00, 0x00, 0x00, 0x1e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x13, // ...>............ + 0x00, 0x02, 0x00, 0x02, 0x00, 0x00, 0x00, 0x21, 0x00, 0x03, 0x00, 0x03, 0x00, 0x00, 0x00, 0x02, // .......!........ + 0x00, 0x00, 0x00, 0x16, 0x00, 0x03, 0x00, 0x06, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x17, // ........... .... + 0x00, 0x04, 0x00, 0x07, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x17, // ................ + 0x00, 0x04, 0x00, 0x09, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x15, // ................ + 0x00, 0x04, 0x00, 0x12, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x2b, // ....... .......+ + 0x00, 0x04, 0x00, 0x06, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2b, // ...............+ + 0x00, 0x04, 0x00, 0x12, 0x00, 0x00, 0x00, 0x17, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2b, // ...............+ + 0x00, 0x04, 0x00, 0x06, 0x00, 0x00, 0x00, 0x19, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x3f, 0x18, // ..............?. + 0x00, 0x04, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x1e, // ................ + 0x00, 0x03, 0x00, 0x1e, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x1f, // ........... .... + 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x1e, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x1f, // ...........;.... + 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x21, // ... ....... ...! + 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x2d, // ........... ...- + 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x2d, // ...........;...- + 0x00, 0x00, 0x00, 0x2e, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x2d, // ...........;...- + 0x00, 0x00, 0x00, 0x31, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x39, // ...1....... ...9 + 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x39, // ...........;...9 + 0x00, 0x00, 0x00, 0x3a, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x3d, // ...:....... ...= + 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x3d, // ...........;...= + 0x00, 0x00, 0x00, 0x3e, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x36, 0x00, 0x05, 0x00, 0x02, // ...>.......6.... + 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0xf8, // ................ + 0x00, 0x02, 0x00, 0x05, 0x00, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x07, 0x00, 0x00, 0x00, 0x2f, // .......=......./ + 0x00, 0x00, 0x00, 0x2e, 0x00, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x07, 0x00, 0x00, 0x00, 0x32, // .......=.......2 + 0x00, 0x00, 0x00, 0x31, 0x00, 0x00, 0x00, 0x51, 0x00, 0x05, 0x00, 0x06, 0x00, 0x00, 0x00, 0x58, // ...1...Q.......X + 0x00, 0x00, 0x00, 0x2f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x51, 0x00, 0x05, 0x00, 0x06, // .../.......Q.... + 0x00, 0x00, 0x00, 0x59, 0x00, 0x00, 0x00, 0x2f, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x50, // ...Y.../.......P + 0x00, 0x07, 0x00, 0x09, 0x00, 0x00, 0x00, 0x5a, 0x00, 0x00, 0x00, 0x58, 0x00, 0x00, 0x00, 0x59, // .......Z...X...Y + 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0x19, 0x00, 0x00, 0x00, 0x41, 0x00, 0x05, 0x00, 0x21, // ...........A...! + 0x00, 0x00, 0x00, 0x5b, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x17, 0x00, 0x00, 0x00, 0x3d, // ...[... .......= + 0x00, 0x04, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x5c, 0x00, 0x00, 0x00, 0x5b, 0x00, 0x00, 0x00, 0x90, // ...........[.... + 0x00, 0x05, 0x00, 0x09, 0x00, 0x00, 0x00, 0x5d, 0x00, 0x00, 0x00, 0x5a, 0x00, 0x00, 0x00, 0x5c, // .......]...Z.... + 0x00, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0x3a, 0x00, 0x00, 0x00, 0x5d, 0x00, 0x00, 0x00, 0x3e, // ...>...:...]...> + 0x00, 0x03, 0x00, 0x3e, 0x00, 0x00, 0x00, 0x32, 0x00, 0x00, 0x00, 0xfd, 0x00, 0x01, 0x00, 0x38, // ...>...2.......8 + 0x00, 0x01, 0x00, 0x00, 0x02, 0x01, 0x00, 0x10, 0x00, 0x40, 0x00, // .........@. }; -static const uint8_t vs_imgui_image_dx9[292] = +static const uint8_t vs_imgui_image_wgsl[752] = { - 0x56, 0x53, 0x48, 0x0b, 0x00, 0x00, 0x00, 0x00, 0x6f, 0x1e, 0x3e, 0x3c, 0x01, 0x00, 0x0a, 0x75, // VSH.....o.><...u - 0x5f, 0x76, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x04, 0x01, 0x00, 0x00, 0x04, 0x00, 0x00, // _viewProj....... - 0x00, 0x00, 0x00, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x03, 0xfe, 0xff, 0xfe, 0xff, 0x20, 0x00, 0x43, // ............. .C - 0x54, 0x41, 0x42, 0x1c, 0x00, 0x00, 0x00, 0x53, 0x00, 0x00, 0x00, 0x00, 0x03, 0xfe, 0xff, 0x01, // TAB....S........ - 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x91, 0x00, 0x00, 0x4c, 0x00, 0x00, 0x00, 0x30, // ...........L...0 - 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x3c, 0x00, 0x00, 0x00, 0x00, // ...........<.... - 0x00, 0x00, 0x00, 0x75, 0x5f, 0x76, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x00, 0xab, 0x03, // ...u_viewProj... - 0x00, 0x03, 0x00, 0x04, 0x00, 0x04, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x76, // ...............v - 0x73, 0x5f, 0x33, 0x5f, 0x30, 0x00, 0x4d, 0x69, 0x63, 0x72, 0x6f, 0x73, 0x6f, 0x66, 0x74, 0x20, // s_3_0.Microsoft - 0x28, 0x52, 0x29, 0x20, 0x48, 0x4c, 0x53, 0x4c, 0x20, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, 0x20, // (R) HLSL Shader - 0x43, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x72, 0x20, 0x31, 0x30, 0x2e, 0x31, 0x00, 0xab, 0x1f, // Compiler 10.1... - 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x0f, 0x90, 0x1f, 0x00, 0x00, 0x02, 0x05, // ................ - 0x00, 0x00, 0x80, 0x01, 0x00, 0x0f, 0x90, 0x1f, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x80, 0x00, // ................ - 0x00, 0x0f, 0xe0, 0x1f, 0x00, 0x00, 0x02, 0x05, 0x00, 0x00, 0x80, 0x01, 0x00, 0x03, 0xe0, 0x05, // ................ - 0x00, 0x00, 0x03, 0x00, 0x00, 0x0f, 0x80, 0x01, 0x00, 0xe4, 0xa0, 0x00, 0x00, 0x55, 0x90, 0x04, // .............U.. - 0x00, 0x00, 0x04, 0x00, 0x00, 0x0f, 0x80, 0x00, 0x00, 0xe4, 0xa0, 0x00, 0x00, 0x00, 0x90, 0x00, // ................ - 0x00, 0xe4, 0x80, 0x02, 0x00, 0x00, 0x03, 0x00, 0x00, 0x0f, 0xe0, 0x00, 0x00, 0xe4, 0x80, 0x03, // ................ - 0x00, 0xe4, 0xa0, 0x01, 0x00, 0x00, 0x02, 0x01, 0x00, 0x03, 0xe0, 0x01, 0x00, 0xe4, 0x90, 0xff, // ................ - 0xff, 0x00, 0x00, 0x00, // .... + 0x56, 0x53, 0x48, 0x0b, 0x00, 0x00, 0x00, 0x00, 0x6f, 0x1e, 0x3e, 0x3c, 0x01, 0x00, 0x0a, 0x75, // VSH.....o.><...u + 0x5f, 0x76, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x04, 0x01, 0x00, 0x00, 0x04, 0x00, 0x00, // _viewProj....... + 0x00, 0x00, 0x00, 0xbf, 0x02, 0x00, 0x00, 0x64, 0x69, 0x61, 0x67, 0x6e, 0x6f, 0x73, 0x74, 0x69, // .......diagnosti + 0x63, 0x28, 0x6f, 0x66, 0x66, 0x2c, 0x20, 0x64, 0x65, 0x72, 0x69, 0x76, 0x61, 0x74, 0x69, 0x76, // c(off, derivativ + 0x65, 0x5f, 0x75, 0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, 0x69, 0x74, 0x79, 0x29, 0x3b, 0x0a, 0x64, // e_uniformity);.d + 0x69, 0x61, 0x67, 0x6e, 0x6f, 0x73, 0x74, 0x69, 0x63, 0x28, 0x6f, 0x66, 0x66, 0x2c, 0x20, 0x73, // iagnostic(off, s + 0x75, 0x62, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x5f, 0x75, 0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, 0x69, // ubgroup_uniformi + 0x74, 0x79, 0x29, 0x3b, 0x0a, 0x0a, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x20, 0x55, 0x6e, 0x69, // ty);..struct Uni + 0x66, 0x6f, 0x72, 0x6d, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x31, 0x5f, 0x31, 0x20, 0x7b, 0x0a, // formBlock_1_1 {. + 0x20, 0x20, 0x75, 0x5f, 0x76, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x20, 0x3a, 0x20, 0x6d, // u_viewProj : m + 0x61, 0x74, 0x34, 0x78, 0x34, 0x3c, 0x66, 0x33, 0x32, 0x3e, 0x2c, 0x0a, 0x7d, 0x0a, 0x0a, 0x40, // at4x4,.}..@ + 0x67, 0x72, 0x6f, 0x75, 0x70, 0x28, 0x30, 0x75, 0x29, 0x20, 0x40, 0x62, 0x69, 0x6e, 0x64, 0x69, // group(0u) @bindi + 0x6e, 0x67, 0x28, 0x30, 0x75, 0x29, 0x20, 0x76, 0x61, 0x72, 0x3c, 0x75, 0x6e, 0x69, 0x66, 0x6f, // ng(0u) var v : UniformB + 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x31, 0x5f, 0x31, 0x3b, 0x0a, 0x0a, 0x76, 0x61, 0x72, 0x3c, 0x70, // lock_1_1;..var

v_1 : ve + 0x63, 0x34, 0x3c, 0x66, 0x33, 0x32, 0x3e, 0x3b, 0x0a, 0x0a, 0x76, 0x61, 0x72, 0x3c, 0x70, 0x72, // c4;..var v_2 : vec + 0x32, 0x3c, 0x66, 0x33, 0x32, 0x3e, 0x3b, 0x0a, 0x0a, 0x66, 0x6e, 0x20, 0x6d, 0x61, 0x69, 0x6e, // 2;..fn main + 0x5f, 0x69, 0x6e, 0x6e, 0x65, 0x72, 0x28, 0x61, 0x5f, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, // _inner(a_positio + 0x6e, 0x20, 0x3a, 0x20, 0x76, 0x65, 0x63, 0x32, 0x3c, 0x66, 0x33, 0x32, 0x3e, 0x2c, 0x20, 0x61, // n : vec2, a + 0x5f, 0x74, 0x65, 0x78, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x30, 0x20, 0x3a, 0x20, 0x76, 0x65, 0x63, // _texcoord0 : vec + 0x32, 0x3c, 0x66, 0x33, 0x32, 0x3e, 0x29, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x76, 0x5f, 0x31, 0x20, // 2) {. v_1 + 0x3d, 0x20, 0x28, 0x76, 0x2e, 0x75, 0x5f, 0x76, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x20, // = (v.u_viewProj + 0x2a, 0x20, 0x76, 0x65, 0x63, 0x34, 0x3c, 0x66, 0x33, 0x32, 0x3e, 0x28, 0x61, 0x5f, 0x70, 0x6f, // * vec4(a_po + 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x78, 0x2c, 0x20, 0x61, 0x5f, 0x70, 0x6f, 0x73, 0x69, // sition.x, a_posi + 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x79, 0x2c, 0x20, 0x30, 0x2e, 0x30, 0x66, 0x2c, 0x20, 0x31, 0x2e, // tion.y, 0.0f, 1. + 0x30, 0x66, 0x29, 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x76, 0x5f, 0x32, 0x20, 0x3d, 0x20, 0x61, 0x5f, // 0f));. v_2 = a_ + 0x74, 0x65, 0x78, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x30, 0x3b, 0x0a, 0x7d, 0x0a, 0x0a, 0x73, 0x74, // texcoord0;.}..st + 0x72, 0x75, 0x63, 0x74, 0x20, 0x74, 0x69, 0x6e, 0x74, 0x5f, 0x73, 0x79, 0x6d, 0x62, 0x6f, 0x6c, // ruct tint_symbol + 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x40, 0x62, 0x75, 0x69, 0x6c, 0x74, 0x69, 0x6e, 0x28, 0x70, 0x6f, // {. @builtin(po + 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x29, 0x0a, 0x20, 0x20, 0x6d, 0x20, 0x3a, 0x20, 0x76, 0x65, // sition). m : ve + 0x63, 0x34, 0x3c, 0x66, 0x33, 0x32, 0x3e, 0x2c, 0x0a, 0x20, 0x20, 0x40, 0x6c, 0x6f, 0x63, 0x61, // c4,. @loca + 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x30, 0x75, 0x29, 0x0a, 0x20, 0x20, 0x6d, 0x5f, 0x31, 0x20, 0x3a, // tion(0u). m_1 : + 0x20, 0x76, 0x65, 0x63, 0x32, 0x3c, 0x66, 0x33, 0x32, 0x3e, 0x2c, 0x0a, 0x7d, 0x0a, 0x0a, 0x40, // vec2,.}..@ + 0x76, 0x65, 0x72, 0x74, 0x65, 0x78, 0x0a, 0x66, 0x6e, 0x20, 0x6d, 0x61, 0x69, 0x6e, 0x28, 0x40, // vertex.fn main(@ + 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x30, 0x75, 0x29, 0x20, 0x61, 0x5f, 0x70, // location(0u) a_p + 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x3a, 0x20, 0x76, 0x65, 0x63, 0x32, 0x3c, 0x66, // osition : vec2, @location(1 + 0x75, 0x29, 0x20, 0x61, 0x5f, 0x74, 0x65, 0x78, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x30, 0x20, 0x3a, // u) a_texcoord0 : + 0x20, 0x76, 0x65, 0x63, 0x32, 0x3c, 0x66, 0x33, 0x32, 0x3e, 0x29, 0x20, 0x2d, 0x3e, 0x20, 0x74, // vec2) -> t + 0x69, 0x6e, 0x74, 0x5f, 0x73, 0x79, 0x6d, 0x62, 0x6f, 0x6c, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x6d, // int_symbol {. m + 0x61, 0x69, 0x6e, 0x5f, 0x69, 0x6e, 0x6e, 0x65, 0x72, 0x28, 0x61, 0x5f, 0x70, 0x6f, 0x73, 0x69, // ain_inner(a_posi + 0x74, 0x69, 0x6f, 0x6e, 0x2c, 0x20, 0x61, 0x5f, 0x74, 0x65, 0x78, 0x63, 0x6f, 0x6f, 0x72, 0x64, // tion, a_texcoord + 0x30, 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x74, 0x69, 0x6e, // 0);. return tin + 0x74, 0x5f, 0x73, 0x79, 0x6d, 0x62, 0x6f, 0x6c, 0x28, 0x76, 0x5f, 0x31, 0x2c, 0x20, 0x76, 0x5f, // t_symbol(v_1, v_ + 0x32, 0x29, 0x3b, 0x0a, 0x7d, 0x0a, 0x00, 0x02, 0x01, 0x00, 0x10, 0x00, 0x40, 0x00, 0x40, 0x00, // 2);.}.......@.@. }; -static const uint8_t vs_imgui_image_dx11[483] = +static const uint8_t vs_imgui_image_dxbc[487] = { - 0x56, 0x53, 0x48, 0x0b, 0x00, 0x00, 0x00, 0x00, 0x6f, 0x1e, 0x3e, 0x3c, 0x01, 0x00, 0x0a, 0x75, // VSH.....o.><...u - 0x5f, 0x76, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, // _viewProj....... - 0x00, 0x00, 0x00, 0xb4, 0x01, 0x00, 0x00, 0x44, 0x58, 0x42, 0x43, 0xfd, 0x09, 0x41, 0xa3, 0x52, // .......DXBC..A.R - 0x84, 0xc1, 0x51, 0xab, 0x1b, 0xf1, 0x5e, 0xed, 0xfa, 0xf6, 0x14, 0x01, 0x00, 0x00, 0x00, 0xb4, // ..Q...^......... - 0x01, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x2c, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0xd8, // .......,........ - 0x00, 0x00, 0x00, 0x49, 0x53, 0x47, 0x4e, 0x4c, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x08, // ...ISGNL........ - 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, // ...8............ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x03, 0x00, 0x00, 0x41, 0x00, 0x00, 0x00, 0x00, // ...........A.... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x03, // ................ - 0x03, 0x00, 0x00, 0x50, 0x4f, 0x53, 0x49, 0x54, 0x49, 0x4f, 0x4e, 0x00, 0x54, 0x45, 0x58, 0x43, // ...POSITION.TEXC - 0x4f, 0x4f, 0x52, 0x44, 0x00, 0xab, 0xab, 0x4f, 0x53, 0x47, 0x4e, 0x50, 0x00, 0x00, 0x00, 0x02, // OORD...OSGNP.... - 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, // .......8........ - 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x44, // ...............D - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x01, // ................ - 0x00, 0x00, 0x00, 0x03, 0x0c, 0x00, 0x00, 0x53, 0x56, 0x5f, 0x50, 0x4f, 0x53, 0x49, 0x54, 0x49, // .......SV_POSITI - 0x4f, 0x4e, 0x00, 0x54, 0x45, 0x58, 0x43, 0x4f, 0x4f, 0x52, 0x44, 0x00, 0xab, 0xab, 0xab, 0x53, // ON.TEXCOORD....S - 0x48, 0x44, 0x52, 0xd4, 0x00, 0x00, 0x00, 0x40, 0x00, 0x01, 0x00, 0x35, 0x00, 0x00, 0x00, 0x59, // HDR....@...5...Y - 0x00, 0x00, 0x04, 0x46, 0x8e, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x5f, // ...F. ........._ - 0x00, 0x00, 0x03, 0x32, 0x10, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5f, 0x00, 0x00, 0x03, 0x32, // ...2......._...2 - 0x10, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x67, 0x00, 0x00, 0x04, 0xf2, 0x20, 0x10, 0x00, 0x00, // .......g.... ... - 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x03, 0x32, 0x20, 0x10, 0x00, 0x01, // .......e...2 ... - 0x00, 0x00, 0x00, 0x68, 0x00, 0x00, 0x02, 0x01, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x08, 0xf2, // ...h.......8.... - 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x56, 0x15, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, // .......V.......F - 0x8e, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x32, 0x00, 0x00, 0x0a, 0xf2, // . .........2.... - 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x8e, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // .......F. ...... - 0x00, 0x00, 0x00, 0x06, 0x10, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x0e, 0x10, 0x00, 0x00, // ...........F.... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0xf2, 0x20, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, // ........ ......F - 0x0e, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x8e, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, // .......F. ...... - 0x00, 0x00, 0x00, 0x36, 0x00, 0x00, 0x05, 0x32, 0x20, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x46, // ...6...2 ......F - 0x10, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x3e, 0x00, 0x00, 0x01, 0x00, 0x02, 0x01, 0x00, 0x10, // .......>........ - 0x00, 0x40, 0x00, // .@. + 0x56, 0x53, 0x48, 0x0b, 0x00, 0x00, 0x00, 0x00, 0x6f, 0x1e, 0x3e, 0x3c, 0x01, 0x00, 0x0a, 0x75, // VSH.....o.><...u + 0x5f, 0x76, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, // _viewProj....... + 0x00, 0x00, 0x00, 0xb8, 0x01, 0x00, 0x00, 0x44, 0x58, 0x42, 0x43, 0xd8, 0xa9, 0x97, 0x32, 0xdf, // .......DXBC...2. + 0x93, 0x0d, 0xa9, 0x44, 0xeb, 0x32, 0xe5, 0xd9, 0x58, 0xf7, 0x91, 0x01, 0x00, 0x00, 0x00, 0xb8, // ...D.2..X....... + 0x01, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x2c, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0xd8, // .......,........ + 0x00, 0x00, 0x00, 0x49, 0x53, 0x47, 0x4e, 0x4c, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x08, // ...ISGNL........ + 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, // ...8............ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x03, 0x00, 0x00, 0x41, 0x00, 0x00, 0x00, 0x00, // ...........A.... + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x03, // ................ + 0x03, 0x00, 0x00, 0x50, 0x4f, 0x53, 0x49, 0x54, 0x49, 0x4f, 0x4e, 0x00, 0x54, 0x45, 0x58, 0x43, // ...POSITION.TEXC + 0x4f, 0x4f, 0x52, 0x44, 0x00, 0xab, 0xab, 0x4f, 0x53, 0x47, 0x4e, 0x50, 0x00, 0x00, 0x00, 0x02, // OORD...OSGNP.... + 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, // .......8........ + 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x44, // ...............D + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x01, // ................ + 0x00, 0x00, 0x00, 0x03, 0x0c, 0x00, 0x00, 0x53, 0x56, 0x5f, 0x50, 0x4f, 0x53, 0x49, 0x54, 0x49, // .......SV_POSITI + 0x4f, 0x4e, 0x00, 0x54, 0x45, 0x58, 0x43, 0x4f, 0x4f, 0x52, 0x44, 0x00, 0xab, 0xab, 0xab, 0x53, // ON.TEXCOORD....S + 0x48, 0x45, 0x58, 0xd8, 0x00, 0x00, 0x00, 0x50, 0x00, 0x01, 0x00, 0x36, 0x00, 0x00, 0x00, 0x6a, // HEX....P...6...j + 0x08, 0x00, 0x01, 0x59, 0x00, 0x00, 0x04, 0x46, 0x8e, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, // ...Y...F. ...... + 0x00, 0x00, 0x00, 0x5f, 0x00, 0x00, 0x03, 0x32, 0x10, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5f, // ..._...2......._ + 0x00, 0x00, 0x03, 0x32, 0x10, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x67, 0x00, 0x00, 0x04, 0xf2, // ...2.......g.... + 0x20, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x03, 0x32, // ..........e...2 + 0x20, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x68, 0x00, 0x00, 0x02, 0x01, 0x00, 0x00, 0x00, 0x38, // ......h.......8 + 0x00, 0x00, 0x08, 0xf2, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x56, 0x15, 0x10, 0x00, 0x00, // ...........V.... + 0x00, 0x00, 0x00, 0x46, 0x8e, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x32, // ...F. .........2 + 0x00, 0x00, 0x0a, 0xf2, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x8e, 0x20, 0x00, 0x00, // ...........F. .. + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x10, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, // ...............F + 0x0e, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0xf2, 0x20, 0x10, 0x00, 0x00, // ............ ... + 0x00, 0x00, 0x00, 0x46, 0x0e, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x8e, 0x20, 0x00, 0x00, // ...F.......F. .. + 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x36, 0x00, 0x00, 0x05, 0x32, 0x20, 0x10, 0x00, 0x01, // .......6...2 ... + 0x00, 0x00, 0x00, 0x46, 0x10, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x3e, 0x00, 0x00, 0x01, 0x00, // ...F.......>.... + 0x02, 0x01, 0x00, 0x10, 0x00, 0x40, 0x00, // .....@. }; -static const uint8_t vs_imgui_image_mtl[687] = +static const uint8_t vs_imgui_image_dxil[2403] = { - 0x56, 0x53, 0x48, 0x0b, 0x00, 0x00, 0x00, 0x00, 0x6f, 0x1e, 0x3e, 0x3c, 0x01, 0x00, 0x0a, 0x75, // VSH.....o.><...u - 0x5f, 0x76, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x04, 0x01, 0x00, 0x00, 0x04, 0x00, 0x00, // _viewProj....... - 0x00, 0x00, 0x00, 0x80, 0x02, 0x00, 0x00, 0x23, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x20, // .......#include - 0x3c, 0x6d, 0x65, 0x74, 0x61, 0x6c, 0x5f, 0x73, 0x74, 0x64, 0x6c, 0x69, 0x62, 0x3e, 0x0a, 0x23, // .# - 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x20, 0x3c, 0x73, 0x69, 0x6d, 0x64, 0x2f, 0x73, 0x69, // include ..using nam - 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x20, 0x6d, 0x65, 0x74, 0x61, 0x6c, 0x3b, 0x0a, 0x0a, 0x73, // espace metal;..s - 0x74, 0x72, 0x75, 0x63, 0x74, 0x20, 0x5f, 0x47, 0x6c, 0x6f, 0x62, 0x61, 0x6c, 0x0a, 0x7b, 0x0a, // truct _Global.{. - 0x20, 0x20, 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x34, 0x78, 0x34, 0x20, 0x75, 0x5f, 0x76, // float4x4 u_v - 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x3b, 0x0a, 0x7d, 0x3b, 0x0a, 0x0a, 0x73, 0x74, 0x72, // iewProj;.};..str - 0x75, 0x63, 0x74, 0x20, 0x78, 0x6c, 0x61, 0x74, 0x4d, 0x74, 0x6c, 0x4d, 0x61, 0x69, 0x6e, 0x5f, // uct xlatMtlMain_ - 0x6f, 0x75, 0x74, 0x0a, 0x7b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x32, // out.{. float2 - 0x20, 0x5f, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x4f, 0x75, 0x74, 0x70, // _entryPointOutp - 0x75, 0x74, 0x5f, 0x76, 0x5f, 0x74, 0x65, 0x78, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x30, 0x20, 0x5b, // ut_v_texcoord0 [ - 0x5b, 0x75, 0x73, 0x65, 0x72, 0x28, 0x6c, 0x6f, 0x63, 0x6e, 0x30, 0x29, 0x5d, 0x5d, 0x3b, 0x0a, // [user(locn0)]];. - 0x20, 0x20, 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x34, 0x20, 0x67, 0x6c, 0x5f, 0x50, 0x6f, // float4 gl_Po - 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x5b, 0x5b, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, // sition [[positio - 0x6e, 0x5d, 0x5d, 0x3b, 0x0a, 0x7d, 0x3b, 0x0a, 0x0a, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x20, // n]];.};..struct - 0x78, 0x6c, 0x61, 0x74, 0x4d, 0x74, 0x6c, 0x4d, 0x61, 0x69, 0x6e, 0x5f, 0x69, 0x6e, 0x0a, 0x7b, // xlatMtlMain_in.{ - 0x0a, 0x20, 0x20, 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x32, 0x20, 0x61, 0x5f, 0x70, 0x6f, // . float2 a_po - 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x5b, 0x5b, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, // sition [[attribu - 0x74, 0x65, 0x28, 0x30, 0x29, 0x5d, 0x5d, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x66, 0x6c, 0x6f, // te(0)]];. flo - 0x61, 0x74, 0x32, 0x20, 0x61, 0x5f, 0x74, 0x65, 0x78, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x30, 0x20, // at2 a_texcoord0 - 0x5b, 0x5b, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x28, 0x31, 0x29, 0x5d, 0x5d, // [[attribute(1)]] - 0x3b, 0x0a, 0x7d, 0x3b, 0x0a, 0x0a, 0x76, 0x65, 0x72, 0x74, 0x65, 0x78, 0x20, 0x78, 0x6c, 0x61, // ;.};..vertex xla - 0x74, 0x4d, 0x74, 0x6c, 0x4d, 0x61, 0x69, 0x6e, 0x5f, 0x6f, 0x75, 0x74, 0x20, 0x78, 0x6c, 0x61, // tMtlMain_out xla - 0x74, 0x4d, 0x74, 0x6c, 0x4d, 0x61, 0x69, 0x6e, 0x28, 0x78, 0x6c, 0x61, 0x74, 0x4d, 0x74, 0x6c, // tMtlMain(xlatMtl - 0x4d, 0x61, 0x69, 0x6e, 0x5f, 0x69, 0x6e, 0x20, 0x69, 0x6e, 0x20, 0x5b, 0x5b, 0x73, 0x74, 0x61, // Main_in in [[sta - 0x67, 0x65, 0x5f, 0x69, 0x6e, 0x5d, 0x5d, 0x2c, 0x20, 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x61, 0x6e, // ge_in]], constan - 0x74, 0x20, 0x5f, 0x47, 0x6c, 0x6f, 0x62, 0x61, 0x6c, 0x26, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, // t _Global& _mtl_ - 0x75, 0x20, 0x5b, 0x5b, 0x62, 0x75, 0x66, 0x66, 0x65, 0x72, 0x28, 0x30, 0x29, 0x5d, 0x5d, 0x29, // u [[buffer(0)]]) - 0x0a, 0x7b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x78, 0x6c, 0x61, 0x74, 0x4d, 0x74, 0x6c, 0x4d, 0x61, // .{. xlatMtlMa - 0x69, 0x6e, 0x5f, 0x6f, 0x75, 0x74, 0x20, 0x6f, 0x75, 0x74, 0x20, 0x3d, 0x20, 0x7b, 0x7d, 0x3b, // in_out out = {}; - 0x0a, 0x20, 0x20, 0x20, 0x20, 0x6f, 0x75, 0x74, 0x2e, 0x67, 0x6c, 0x5f, 0x50, 0x6f, 0x73, 0x69, // . out.gl_Posi - 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x3d, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x75, 0x2e, 0x75, 0x5f, // tion = _mtl_u.u_ - 0x76, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x20, 0x2a, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, // viewProj * float - 0x34, 0x28, 0x69, 0x6e, 0x2e, 0x61, 0x5f, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x2c, // 4(in.a_position, - 0x20, 0x30, 0x2e, 0x30, 0x2c, 0x20, 0x31, 0x2e, 0x30, 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, // 0.0, 1.0);. - 0x6f, 0x75, 0x74, 0x2e, 0x5f, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x4f, // out._entryPointO - 0x75, 0x74, 0x70, 0x75, 0x74, 0x5f, 0x76, 0x5f, 0x74, 0x65, 0x78, 0x63, 0x6f, 0x6f, 0x72, 0x64, // utput_v_texcoord - 0x30, 0x20, 0x3d, 0x20, 0x69, 0x6e, 0x2e, 0x61, 0x5f, 0x74, 0x65, 0x78, 0x63, 0x6f, 0x6f, 0x72, // 0 = in.a_texcoor - 0x64, 0x30, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x6f, // d0;. return o - 0x75, 0x74, 0x3b, 0x0a, 0x7d, 0x0a, 0x0a, 0x00, 0x02, 0x01, 0x00, 0x10, 0x00, 0x40, 0x00, // ut;.}........@. + 0x56, 0x53, 0x48, 0x0b, 0x00, 0x00, 0x00, 0x00, 0x6f, 0x1e, 0x3e, 0x3c, 0x01, 0x00, 0x0a, 0x75, // VSH.....o.><...u + 0x5f, 0x76, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, // _viewProj....... + 0x00, 0x00, 0x00, 0x34, 0x09, 0x00, 0x00, 0x44, 0x58, 0x42, 0x43, 0xe9, 0x2a, 0x70, 0x90, 0x53, // ...4...DXBC.*p.S + 0xc1, 0xfc, 0xef, 0x34, 0xfe, 0xd5, 0x11, 0x37, 0x12, 0xb3, 0x10, 0x01, 0x00, 0x00, 0x00, 0x34, // ...4...7.......4 + 0x09, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x3c, 0x00, 0x00, 0x00, 0x4c, 0x00, 0x00, 0x00, 0xb0, // .......<...L.... + 0x00, 0x00, 0x00, 0x18, 0x01, 0x00, 0x00, 0x0c, 0x02, 0x00, 0x00, 0x40, 0x02, 0x00, 0x00, 0x5c, // ...........@.... + 0x02, 0x00, 0x00, 0x53, 0x46, 0x49, 0x30, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ...SFI0......... + 0x00, 0x00, 0x00, 0x49, 0x53, 0x47, 0x31, 0x5c, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x08, // ...ISG1......... + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x48, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // .......H........ + 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x03, 0x00, 0x00, 0x00, // ................ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x51, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // .......Q........ + 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x03, 0x03, 0x00, 0x00, 0x00, // ................ + 0x00, 0x00, 0x00, 0x50, 0x4f, 0x53, 0x49, 0x54, 0x49, 0x4f, 0x4e, 0x00, 0x54, 0x45, 0x58, 0x43, // ...POSITION.TEXC + 0x4f, 0x4f, 0x52, 0x44, 0x00, 0x00, 0x00, 0x4f, 0x53, 0x47, 0x31, 0x60, 0x00, 0x00, 0x00, 0x02, // OORD...OSG1`.... + 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x48, 0x00, 0x00, 0x00, 0x00, // ...........H.... + 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, // ................ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0x00, 0x00, 0x00, 0x00, // ...........T.... + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x03, // ................ + 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x53, 0x56, 0x5f, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, // .......SV_Positi + 0x6f, 0x6e, 0x00, 0x54, 0x45, 0x58, 0x43, 0x4f, 0x4f, 0x52, 0x44, 0x00, 0x00, 0x00, 0x00, 0x50, // on.TEXCOORD....P + 0x53, 0x56, 0x30, 0xec, 0x00, 0x00, 0x00, 0x34, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, // SV0....4........ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, // ................ + 0xff, 0xff, 0xff, 0x01, 0x00, 0x00, 0x00, 0x02, 0x02, 0x00, 0x02, 0x02, 0x00, 0x00, 0x00, 0x00, // ................ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x01, // ................ + 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ................ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x24, // ...............$ + 0x00, 0x00, 0x00, 0x00, 0x50, 0x4f, 0x53, 0x49, 0x54, 0x49, 0x4f, 0x4e, 0x00, 0x54, 0x45, 0x58, // ....POSITION.TEX + 0x43, 0x4f, 0x4f, 0x52, 0x44, 0x00, 0x54, 0x45, 0x58, 0x43, 0x4f, 0x4f, 0x52, 0x44, 0x00, 0x6d, // COORD.TEXCOORD.m + 0x61, 0x69, 0x6e, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, // ain............. + 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x42, 0x00, 0x03, // .............B.. + 0x00, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x42, 0x00, 0x03, // .............B.. + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x44, 0x03, 0x03, // .............D.. + 0x04, 0x00, 0x00, 0x13, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x42, 0x00, 0x03, // .............B.. + 0x02, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ................ + 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ....... ........ + 0x00, 0x00, 0x00, 0x49, 0x4c, 0x44, 0x4e, 0x2c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x24, 0x00, 0x35, // ...ILDN,.....$.5 + 0x30, 0x33, 0x37, 0x30, 0x38, 0x37, 0x63, 0x33, 0x66, 0x61, 0x39, 0x36, 0x63, 0x63, 0x66, 0x36, // 037087c3fa96ccf6 + 0x63, 0x38, 0x30, 0x34, 0x38, 0x35, 0x34, 0x31, 0x35, 0x33, 0x33, 0x31, 0x31, 0x62, 0x36, 0x2e, // c804854153311b6. + 0x70, 0x64, 0x62, 0x00, 0x00, 0x00, 0x00, 0x48, 0x41, 0x53, 0x48, 0x14, 0x00, 0x00, 0x00, 0x00, // pdb....HASH..... + 0x00, 0x00, 0x00, 0x50, 0x37, 0x08, 0x7c, 0x3f, 0xa9, 0x6c, 0xcf, 0x6c, 0x80, 0x48, 0x54, 0x15, // ...P7.|?.l.l.HT. + 0x33, 0x11, 0xb6, 0x44, 0x58, 0x49, 0x4c, 0xd0, 0x06, 0x00, 0x00, 0x60, 0x00, 0x01, 0x00, 0xb4, // 3..DXIL....`.... + 0x01, 0x00, 0x00, 0x44, 0x58, 0x49, 0x4c, 0x00, 0x01, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0xb8, // ...DXIL......... + 0x06, 0x00, 0x00, 0x42, 0x43, 0xc0, 0xde, 0x21, 0x0c, 0x00, 0x00, 0xab, 0x01, 0x00, 0x00, 0x0b, // ...BC..!........ + 0x82, 0x20, 0x00, 0x02, 0x00, 0x00, 0x00, 0x13, 0x00, 0x00, 0x00, 0x07, 0x81, 0x23, 0x91, 0x41, // . ...........#.A + 0xc8, 0x04, 0x49, 0x06, 0x10, 0x32, 0x39, 0x92, 0x01, 0x84, 0x0c, 0x25, 0x05, 0x08, 0x19, 0x1e, // ..I..29....%.... + 0x04, 0x8b, 0x62, 0x80, 0x14, 0x45, 0x02, 0x42, 0x92, 0x0b, 0x42, 0xa4, 0x10, 0x32, 0x14, 0x38, // ..b..E.B..B..2.8 + 0x08, 0x18, 0x4b, 0x0a, 0x32, 0x52, 0x88, 0x48, 0x90, 0x14, 0x20, 0x43, 0x46, 0x88, 0xa5, 0x00, // ..K.2R.H.. CF... + 0x19, 0x32, 0x42, 0xe4, 0x48, 0x0e, 0x90, 0x91, 0x22, 0xc4, 0x50, 0x41, 0x51, 0x81, 0x8c, 0xe1, // .2B.H...".PAQ... + 0x83, 0xe5, 0x8a, 0x04, 0x29, 0x46, 0x06, 0x51, 0x18, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x1b, // ....)F.Q........ + 0x8c, 0xe0, 0xff, 0xff, 0xff, 0xff, 0x07, 0x40, 0x02, 0xa8, 0x0d, 0x84, 0xf0, 0xff, 0xff, 0xff, // .......@........ + 0xff, 0x03, 0x20, 0x6d, 0x30, 0x86, 0xff, 0xff, 0xff, 0xff, 0x1f, 0x00, 0x09, 0xa8, 0x00, 0x49, // .. m0..........I + 0x18, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x13, 0x82, 0x60, 0x42, 0x20, 0x4c, 0x08, 0x06, 0x00, // .........`B L... + 0x00, 0x00, 0x00, 0x89, 0x20, 0x00, 0x00, 0x27, 0x00, 0x00, 0x00, 0x32, 0x22, 0x48, 0x09, 0x20, // .... ..'...2"H. + 0x64, 0x85, 0x04, 0x93, 0x22, 0xa4, 0x84, 0x04, 0x93, 0x22, 0xe3, 0x84, 0xa1, 0x90, 0x14, 0x12, // d..."...."...... + 0x4c, 0x8a, 0x8c, 0x0b, 0x84, 0xa4, 0x4c, 0x10, 0x68, 0x23, 0x00, 0x25, 0x00, 0x14, 0x66, 0x00, // L.....L.h#.%..f. + 0xe6, 0x08, 0xc0, 0x60, 0x8e, 0x00, 0x29, 0xc6, 0x20, 0x84, 0x14, 0x42, 0xa6, 0x18, 0x80, 0x10, // ...`..). ..B.... + 0x52, 0x06, 0xa1, 0xa3, 0x86, 0xcb, 0x9f, 0xb0, 0x87, 0x90, 0x7c, 0x6e, 0xa3, 0x8a, 0x95, 0x98, // R.........|n.... + 0xfc, 0xe2, 0xb6, 0x11, 0x31, 0xc6, 0x18, 0x54, 0xee, 0x19, 0x2e, 0x7f, 0xc2, 0x1e, 0x42, 0xf2, // ....1..T......B. + 0x43, 0xa0, 0x19, 0x16, 0x02, 0x05, 0xab, 0x10, 0x8a, 0x30, 0x42, 0xad, 0x14, 0x83, 0x8c, 0x31, // C........0B....1 + 0xe8, 0xcd, 0x11, 0x04, 0xc5, 0x60, 0xa4, 0x10, 0x12, 0x49, 0x0e, 0x04, 0x0c, 0x23, 0x10, 0x43, // .....`...I...#.C + 0x12, 0xd4, 0x99, 0x26, 0x74, 0x78, 0x87, 0x79, 0xa0, 0x07, 0x76, 0x08, 0x87, 0x7c, 0x78, 0x87, // ...&tx.y..v..|x. + 0x7a, 0xa0, 0x07, 0x37, 0x20, 0x83, 0x53, 0x60, 0x87, 0x77, 0x10, 0x87, 0x70, 0x60, 0x87, 0x79, // z..7 .S`.w..p`.y + 0x40, 0x81, 0xa5, 0x9b, 0x08, 0x04, 0x00, 0x13, 0x14, 0x72, 0xc0, 0x87, 0x74, 0x60, 0x87, 0x36, // @........r..t`.6 + 0x68, 0x87, 0x79, 0x68, 0x03, 0x72, 0xc0, 0x87, 0x0d, 0xaf, 0x50, 0x0e, 0x6d, 0xd0, 0x0e, 0x7a, // h.yh.r....P.m..z + 0x50, 0x0e, 0x6d, 0x00, 0x0f, 0x7a, 0x30, 0x07, 0x72, 0xa0, 0x07, 0x73, 0x20, 0x07, 0x6d, 0x90, // P.m..z0.r..s .m. + 0x0e, 0x71, 0xa0, 0x07, 0x73, 0x20, 0x07, 0x6d, 0x90, 0x0e, 0x78, 0xa0, 0x07, 0x73, 0x20, 0x07, // .q..s .m..x..s . + 0x6d, 0x90, 0x0e, 0x71, 0x60, 0x07, 0x7a, 0x30, 0x07, 0x72, 0xd0, 0x06, 0xe9, 0x30, 0x07, 0x72, // m..q`.z0.r...0.r + 0xa0, 0x07, 0x73, 0x20, 0x07, 0x6d, 0x90, 0x0e, 0x76, 0x40, 0x07, 0x7a, 0x60, 0x07, 0x74, 0xd0, // ..s .m..v@.z`.t. + 0x06, 0xe6, 0x10, 0x07, 0x76, 0xa0, 0x07, 0x73, 0x20, 0x07, 0x6d, 0x60, 0x0e, 0x73, 0x20, 0x07, // ....v..s .m`.s . + 0x7a, 0x30, 0x07, 0x72, 0xd0, 0x06, 0xe6, 0x60, 0x07, 0x74, 0xa0, 0x07, 0x76, 0x40, 0x07, 0x6d, // z0.r...`.t..v@.m + 0xe0, 0x0e, 0x78, 0xa0, 0x07, 0x71, 0x60, 0x07, 0x7a, 0x30, 0x07, 0x72, 0xa0, 0x07, 0x76, 0x40, // ..x..q`.z0.r..v@ + 0x07, 0x43, 0x9e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x86, 0x3c, // .C.............< + 0x06, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x79, 0x10, 0x20, 0x00, // ............y. . + 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0xf2, 0x34, 0x40, 0x00, 0x0c, 0x00, 0x00, // ..........4@.... + 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0xe4, 0x79, 0x80, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, // .....0.y........ + 0x00, 0x00, 0x60, 0xc8, 0x23, 0x01, 0x01, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, // ..`.#..0.......@ + 0x16, 0x08, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x32, 0x1e, 0x98, 0x14, 0x19, 0x11, 0x4c, 0x90, 0x8c, // .......2.....L.. + 0x09, 0x26, 0x47, 0xc6, 0x04, 0x43, 0x22, 0x25, 0x30, 0x02, 0x50, 0x12, 0xc5, 0x50, 0x80, 0x01, // .&G..C"%0.P..P.. + 0x65, 0x50, 0x1e, 0x54, 0x4a, 0x62, 0x04, 0xa0, 0x08, 0xca, 0xa0, 0x10, 0x08, 0xcf, 0x00, 0x50, // eP.TJb.........P + 0x1e, 0x0b, 0x31, 0x8c, 0xe7, 0x01, 0x00, 0x08, 0x0c, 0x00, 0x00, 0x79, 0x18, 0x00, 0x00, 0x57, // ..1........y...W + 0x00, 0x00, 0x00, 0x1a, 0x03, 0x4c, 0x90, 0x46, 0x02, 0x13, 0x44, 0x8f, 0x0c, 0x6f, 0xec, 0xed, // .....L.F..D..o.. + 0x4d, 0x0c, 0x24, 0xc6, 0x05, 0xc7, 0x45, 0xa6, 0x06, 0xa6, 0xc6, 0x65, 0x46, 0x06, 0x04, 0x45, // M.$...E....eF..E + 0x2c, 0x06, 0xc6, 0x26, 0x2c, 0xc7, 0x26, 0x86, 0x2c, 0x65, 0x43, 0x10, 0x4c, 0x10, 0x08, 0x63, // ,..&,.&.,eC.L..c + 0x82, 0x40, 0x1c, 0x1b, 0x84, 0x81, 0x98, 0x20, 0x10, 0xc8, 0x06, 0x61, 0x30, 0x28, 0xd8, 0xcd, // .@..... ...a0(.. + 0x4d, 0x10, 0x88, 0x64, 0xc3, 0x80, 0x24, 0xc4, 0x04, 0x01, 0x93, 0x08, 0x4c, 0x10, 0x08, 0x65, // M..d..$.....L..e + 0x03, 0x42, 0x2c, 0x0c, 0x41, 0x0c, 0x0d, 0xb0, 0x21, 0x70, 0x36, 0x10, 0x00, 0xf0, 0x00, 0x13, // .B,.A...!p6..... + 0x84, 0x6c, 0xda, 0x10, 0x44, 0x13, 0x04, 0x01, 0x20, 0xd1, 0x16, 0x96, 0xe6, 0x46, 0x04, 0xea, // .l..D... ....F.. + 0x69, 0x2a, 0x89, 0x2a, 0xe9, 0xc9, 0x69, 0x82, 0x50, 0x34, 0x13, 0x84, 0xc2, 0xd9, 0x10, 0x10, // i*.*..i.P4...... + 0x13, 0x84, 0xe2, 0x99, 0x20, 0x10, 0xcb, 0x06, 0x41, 0xd3, 0x36, 0x2c, 0x44, 0x65, 0x5d, 0xd8, // .... ...A.6,De]. + 0x35, 0x64, 0xc4, 0xb5, 0x11, 0xa1, 0x2a, 0xc2, 0x1a, 0x7a, 0x7a, 0x92, 0x22, 0xda, 0xb0, 0x0c, // 5d....*..zz."... + 0x9d, 0x75, 0x61, 0xd7, 0x90, 0x0d, 0xd7, 0xb6, 0x41, 0xe0, 0x3c, 0x2e, 0x53, 0x56, 0x5f, 0x50, // .ua.....A.<.SV_P + 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x13, 0x84, 0x02, 0x9a, 0x20, 0x14, 0xd1, 0x04, 0x81, // osition.... .... + 0x60, 0x36, 0x08, 0xda, 0x18, 0x6c, 0x58, 0x08, 0x30, 0xb0, 0xc2, 0x00, 0x13, 0x83, 0x41, 0x0c, // `6...lX.0.....A. + 0x88, 0x8b, 0x0c, 0x36, 0x2c, 0x43, 0x67, 0x5d, 0x58, 0x36, 0x64, 0xc3, 0xb5, 0x6d, 0x10, 0xca, // ...6,Cg]X6d..m.. + 0xc0, 0x0c, 0x36, 0x0c, 0xdf, 0x19, 0x00, 0x1b, 0x8a, 0x89, 0x42, 0x03, 0x08, 0xa8, 0xc2, 0xc6, // ..6.......B..... + 0x66, 0xd7, 0xe6, 0x92, 0x46, 0x56, 0xe6, 0x46, 0x37, 0x25, 0x08, 0xaa, 0x90, 0xe1, 0xb9, 0xd8, // f...FV.F7%...... + 0x95, 0xc9, 0xcd, 0xa5, 0xbd, 0xb9, 0x4d, 0x09, 0x88, 0x26, 0x64, 0x78, 0x2e, 0x76, 0x61, 0x6c, // ......M..&dx.val + 0x76, 0x65, 0x72, 0x53, 0x02, 0xa3, 0x0e, 0x19, 0x9e, 0xcb, 0x1c, 0x5a, 0x18, 0x59, 0x99, 0x5c, // verS.......Z.Y.. + 0xd3, 0x1b, 0x59, 0x19, 0xdb, 0x94, 0x20, 0x29, 0x43, 0x86, 0xe7, 0x22, 0x57, 0x36, 0xf7, 0x56, // ..Y... )C.."W6.V + 0x27, 0x37, 0x56, 0x36, 0x37, 0x25, 0x78, 0xea, 0x90, 0xe1, 0xb9, 0xd8, 0xa5, 0x95, 0xdd, 0x25, // '7V67%x........% + 0x91, 0x4d, 0xd1, 0x85, 0xd1, 0x95, 0x4d, 0x09, 0xa2, 0x3a, 0x64, 0x78, 0x2e, 0x65, 0x6e, 0x74, // .M....M..:dx.ent + 0x72, 0x79, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x53, 0x02, 0x34, 0x00, 0x00, 0x00, 0x00, 0x79, // ryPointsS.4....y + 0x18, 0x00, 0x00, 0x4c, 0x00, 0x00, 0x00, 0x33, 0x08, 0x80, 0x1c, 0xc4, 0xe1, 0x1c, 0x66, 0x14, // ...L...3......f. + 0x01, 0x3d, 0x88, 0x43, 0x38, 0x84, 0xc3, 0x8c, 0x42, 0x80, 0x07, 0x79, 0x78, 0x07, 0x73, 0x98, // .=.C8...B..yx.s. + 0x71, 0x0c, 0xe6, 0x00, 0x0f, 0xed, 0x10, 0x0e, 0xf4, 0x80, 0x0e, 0x33, 0x0c, 0x42, 0x1e, 0xc2, // q..........3.B.. + 0xc1, 0x1d, 0xce, 0xa1, 0x1c, 0x66, 0x30, 0x05, 0x3d, 0x88, 0x43, 0x38, 0x84, 0x83, 0x1b, 0xcc, // .....f0.=.C8.... + 0x03, 0x3d, 0xc8, 0x43, 0x3d, 0x8c, 0x03, 0x3d, 0xcc, 0x78, 0x8c, 0x74, 0x70, 0x07, 0x7b, 0x08, // .=.C=..=.x.tp.{. + 0x07, 0x79, 0x48, 0x87, 0x70, 0x70, 0x07, 0x7a, 0x70, 0x03, 0x76, 0x78, 0x87, 0x70, 0x20, 0x87, // .yH.pp.zp.vx.p . + 0x19, 0xcc, 0x11, 0x0e, 0xec, 0x90, 0x0e, 0xe1, 0x30, 0x0f, 0x6e, 0x30, 0x0f, 0xe3, 0xf0, 0x0e, // ........0.n0.... + 0xf0, 0x50, 0x0e, 0x33, 0x10, 0xc4, 0x1d, 0xde, 0x21, 0x1c, 0xd8, 0x21, 0x1d, 0xc2, 0x61, 0x1e, // .P.3....!..!..a. + 0x66, 0x30, 0x89, 0x3b, 0xbc, 0x83, 0x3b, 0xd0, 0x43, 0x39, 0xb4, 0x03, 0x3c, 0xbc, 0x83, 0x3c, // f0.;..;.C9..<..< + 0x84, 0x03, 0x3b, 0xcc, 0xf0, 0x14, 0x76, 0x60, 0x07, 0x7b, 0x68, 0x07, 0x37, 0x68, 0x87, 0x72, // ..;...v`.{h.7h.r + 0x68, 0x07, 0x37, 0x80, 0x87, 0x70, 0x90, 0x87, 0x70, 0x60, 0x07, 0x76, 0x28, 0x07, 0x76, 0xf8, // h.7..p..p`.v(.v. + 0x05, 0x76, 0x78, 0x87, 0x77, 0x80, 0x87, 0x5f, 0x08, 0x87, 0x71, 0x18, 0x87, 0x72, 0x98, 0x87, // .vx.w.._..q..r.. + 0x79, 0x98, 0x81, 0x2c, 0xee, 0xf0, 0x0e, 0xee, 0xe0, 0x0e, 0xf5, 0xc0, 0x0e, 0xec, 0x30, 0x03, // y..,..........0. + 0x62, 0xc8, 0xa1, 0x1c, 0xe4, 0xa1, 0x1c, 0xcc, 0xa1, 0x1c, 0xe4, 0xa1, 0x1c, 0xdc, 0x61, 0x1c, // b.............a. + 0xca, 0x21, 0x1c, 0xc4, 0x81, 0x1d, 0xca, 0x61, 0x06, 0xd6, 0x90, 0x43, 0x39, 0xc8, 0x43, 0x39, // .!.....a...C9.C9 + 0x98, 0x43, 0x39, 0xc8, 0x43, 0x39, 0xb8, 0xc3, 0x38, 0x94, 0x43, 0x38, 0x88, 0x03, 0x3b, 0x94, // .C9.C9..8.C8..;. + 0xc3, 0x2f, 0xbc, 0x83, 0x3c, 0xfc, 0x82, 0x3b, 0xd4, 0x03, 0x3b, 0xb0, 0xc3, 0x0c, 0xc4, 0x21, // ./..<..;..;....! + 0x07, 0x7c, 0x70, 0x03, 0x7a, 0x28, 0x87, 0x76, 0x80, 0x87, 0x19, 0xd1, 0x43, 0x0e, 0xf8, 0xe0, // .|p.z(.v....C... + 0x06, 0xe4, 0x20, 0x0e, 0xe7, 0xe0, 0x06, 0xf6, 0x10, 0x0e, 0xf2, 0xc0, 0x0e, 0xe1, 0x90, 0x0f, // .. ............. + 0xef, 0x50, 0x0f, 0xf4, 0x00, 0x00, 0x00, 0x71, 0x20, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x36, // .P.....q ......6 + 0xb0, 0x0d, 0x97, 0xef, 0x3c, 0xbe, 0x10, 0x50, 0x45, 0x41, 0x44, 0xa5, 0x03, 0x0c, 0x25, 0x61, // ....<..PEAD...%a + 0x00, 0x02, 0xe6, 0x17, 0xb7, 0x6d, 0x05, 0xd2, 0x70, 0xf9, 0xce, 0xe3, 0x0b, 0x11, 0x01, 0x4c, // .....m..p......L + 0x44, 0x08, 0x34, 0xc3, 0x42, 0x58, 0xc0, 0x34, 0x5c, 0xbe, 0xf3, 0xf8, 0x8b, 0x03, 0x0c, 0x62, // D.4.BX.4.......b + 0xf3, 0x50, 0x93, 0x5f, 0xdc, 0xb6, 0x09, 0x54, 0xc3, 0xe5, 0x3b, 0x8f, 0x2f, 0x4d, 0x4e, 0x44, // .P._...T..;./MND + 0xa0, 0xd4, 0xf4, 0x50, 0x93, 0x5f, 0xdc, 0xb6, 0x11, 0x48, 0xc3, 0xe5, 0x3b, 0x8f, 0x3f, 0x11, // ...P._...H..;.?. + 0xd1, 0x84, 0x00, 0x11, 0xe6, 0x17, 0xb7, 0x6d, 0x00, 0x04, 0x03, 0x20, 0x0d, 0x00, 0x00, 0x61, // .......m... ...a + 0x20, 0x00, 0x00, 0x54, 0x00, 0x00, 0x00, 0x13, 0x04, 0x41, 0x2c, 0x10, 0x00, 0x00, 0x00, 0x05, // ..T.....A,..... + 0x00, 0x00, 0x00, 0x44, 0x4a, 0xa1, 0x10, 0x66, 0x00, 0x8a, 0xab, 0xec, 0x4a, 0x8e, 0x4a, 0x09, // ...DJ..f....J.J. + 0x50, 0x1c, 0x01, 0x00, 0x00, 0x00, 0x00, 0x23, 0x06, 0x09, 0x00, 0x82, 0x60, 0x20, 0x5d, 0x43, // P......#....` ]C + 0x53, 0x55, 0xc1, 0x88, 0x41, 0x02, 0x80, 0x20, 0x18, 0x18, 0x1c, 0x72, 0x59, 0xcf, 0x31, 0x62, // SU..A.. ...rY.1b + 0x90, 0x00, 0x20, 0x08, 0x06, 0x46, 0x97, 0x60, 0x17, 0x81, 0x8c, 0x18, 0x24, 0x00, 0x08, 0x82, // .. ..F.`....$... + 0x81, 0xe1, 0x29, 0x18, 0x16, 0x25, 0x23, 0x06, 0x09, 0x00, 0x82, 0x60, 0x60, 0x7c, 0x4b, 0x96, // ..)..%#....``|K. + 0x19, 0xca, 0x88, 0xc1, 0x01, 0x80, 0x20, 0x18, 0x34, 0x5e, 0x52, 0x68, 0xa3, 0x09, 0x01, 0x30, // ...... .4^Rh...0 + 0x9a, 0x20, 0x04, 0xa3, 0x09, 0x83, 0x30, 0x9a, 0x40, 0x0c, 0x23, 0x06, 0x07, 0x00, 0x82, 0x60, // . ....0.@.#....` + 0xd0, 0x8c, 0x81, 0xa3, 0x80, 0xc1, 0x68, 0x42, 0x00, 0x8c, 0x26, 0x08, 0xc1, 0x68, 0xc2, 0x20, // ......hB..&..h. + 0x8c, 0x26, 0x10, 0xc3, 0x88, 0xc1, 0x01, 0x80, 0x20, 0x18, 0x34, 0x68, 0x30, 0x3d, 0x60, 0x30, // .&...... .4h0=`0 + 0x9a, 0x10, 0x00, 0xa3, 0x09, 0x42, 0x30, 0x9a, 0x30, 0x08, 0xa3, 0x09, 0xc4, 0x60, 0x4e, 0x24, // .....B0.0....`N$ + 0x9f, 0x11, 0x03, 0x04, 0x00, 0x41, 0x30, 0x78, 0xda, 0x40, 0x53, 0xa2, 0xc0, 0x8c, 0x00, 0x3a, // .....A0x.@S....: + 0x06, 0x51, 0xf2, 0x19, 0x31, 0x40, 0x00, 0x10, 0x04, 0x83, 0x07, 0x0e, 0x3a, 0x86, 0x0a, 0x2c, // .Q..1@......:.., + 0x40, 0xa0, 0x63, 0xd2, 0x25, 0x9f, 0x11, 0x03, 0x04, 0x00, 0x41, 0x30, 0x78, 0xe6, 0x00, 0x0c, // @.c.%.....A0x... + 0x9c, 0x2b, 0xb0, 0x40, 0x81, 0x8e, 0x51, 0x9a, 0x7c, 0x46, 0x0c, 0x10, 0x00, 0x04, 0xc1, 0xe0, // .+.@..Q.|F...... + 0xb1, 0x83, 0x31, 0x80, 0xb4, 0xc0, 0x02, 0x06, 0x3a, 0x23, 0x06, 0x09, 0x00, 0x82, 0x60, 0x80, // ..1.....:#....`. + 0xe8, 0x01, 0x1a, 0xd4, 0x41, 0x1d, 0xb8, 0x81, 0x32, 0x62, 0x90, 0x00, 0x20, 0x08, 0x06, 0x88, // ....A...2b.. ... + 0x1e, 0xa0, 0x41, 0x1d, 0xd4, 0x81, 0x18, 0x1c, 0x23, 0x06, 0x09, 0x00, 0x82, 0x60, 0x80, 0xe8, // ..A.....#....`.. + 0x01, 0x1a, 0xd4, 0x41, 0x1d, 0xb4, 0x01, 0x31, 0x62, 0x90, 0x00, 0x20, 0x08, 0x06, 0x88, 0x1e, // ...A...1b.. .... + 0xa0, 0x41, 0x1d, 0xd4, 0x01, 0x1b, 0x04, 0x23, 0x06, 0x09, 0x00, 0x82, 0x60, 0x80, 0xe8, 0x01, // .A.....#....`... + 0x1a, 0xd8, 0x41, 0x1d, 0xb8, 0xc1, 0x37, 0x62, 0x90, 0x00, 0x20, 0x08, 0x06, 0x88, 0x1e, 0xa0, // ..A...7b.. ..... + 0x81, 0x1d, 0xd4, 0x81, 0x18, 0x78, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x01, 0x00, 0x10, // .....x.......... + 0x00, 0x40, 0x00, // .@. +}; +static const uint8_t vs_imgui_image_mtl[735] = +{ + 0x56, 0x53, 0x48, 0x0b, 0x00, 0x00, 0x00, 0x00, 0x6f, 0x1e, 0x3e, 0x3c, 0x01, 0x00, 0x0a, 0x75, // VSH.....o.><...u + 0x5f, 0x76, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x04, 0x01, 0x00, 0x00, 0x04, 0x00, 0x00, // _viewProj....... + 0x00, 0x00, 0x00, 0xb0, 0x02, 0x00, 0x00, 0x23, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x20, // .......#include + 0x3c, 0x6d, 0x65, 0x74, 0x61, 0x6c, 0x5f, 0x73, 0x74, 0x64, 0x6c, 0x69, 0x62, 0x3e, 0x0a, 0x23, // .# + 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x20, 0x3c, 0x73, 0x69, 0x6d, 0x64, 0x2f, 0x73, 0x69, // include ..using nam + 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x20, 0x6d, 0x65, 0x74, 0x61, 0x6c, 0x3b, 0x0a, 0x0a, 0x73, // espace metal;..s + 0x74, 0x72, 0x75, 0x63, 0x74, 0x20, 0x5f, 0x47, 0x6c, 0x6f, 0x62, 0x61, 0x6c, 0x0a, 0x7b, 0x0a, // truct _Global.{. + 0x20, 0x20, 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x34, 0x78, 0x34, 0x20, 0x75, 0x5f, 0x76, // float4x4 u_v + 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x3b, 0x0a, 0x7d, 0x3b, 0x0a, 0x0a, 0x73, 0x74, 0x72, // iewProj;.};..str + 0x75, 0x63, 0x74, 0x20, 0x78, 0x6c, 0x61, 0x74, 0x4d, 0x74, 0x6c, 0x4d, 0x61, 0x69, 0x6e, 0x5f, // uct xlatMtlMain_ + 0x6f, 0x75, 0x74, 0x0a, 0x7b, 0x0a, 0x09, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x20, 0x62, 0x67, 0x66, // out.{..float bgf + 0x78, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x6c, 0x5f, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x53, 0x69, 0x7a, // x_metal_pointSiz + 0x65, 0x20, 0x5b, 0x5b, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x5d, 0x5d, // e [[point_size]] + 0x20, 0x3d, 0x20, 0x31, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x32, // = 1;. float2 + 0x20, 0x5f, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x4f, 0x75, 0x74, 0x70, // _entryPointOutp + 0x75, 0x74, 0x5f, 0x76, 0x5f, 0x74, 0x65, 0x78, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x30, 0x20, 0x5b, // ut_v_texcoord0 [ + 0x5b, 0x75, 0x73, 0x65, 0x72, 0x28, 0x6c, 0x6f, 0x63, 0x6e, 0x30, 0x29, 0x5d, 0x5d, 0x3b, 0x0a, // [user(locn0)]];. + 0x20, 0x20, 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x34, 0x20, 0x67, 0x6c, 0x5f, 0x50, 0x6f, // float4 gl_Po + 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x5b, 0x5b, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, // sition [[positio + 0x6e, 0x5d, 0x5d, 0x3b, 0x0a, 0x7d, 0x3b, 0x0a, 0x0a, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x20, // n]];.};..struct + 0x78, 0x6c, 0x61, 0x74, 0x4d, 0x74, 0x6c, 0x4d, 0x61, 0x69, 0x6e, 0x5f, 0x69, 0x6e, 0x0a, 0x7b, // xlatMtlMain_in.{ + 0x0a, 0x20, 0x20, 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x32, 0x20, 0x61, 0x5f, 0x70, 0x6f, // . float2 a_po + 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x5b, 0x5b, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, // sition [[attribu + 0x74, 0x65, 0x28, 0x30, 0x29, 0x5d, 0x5d, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x66, 0x6c, 0x6f, // te(0)]];. flo + 0x61, 0x74, 0x32, 0x20, 0x61, 0x5f, 0x74, 0x65, 0x78, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x30, 0x20, // at2 a_texcoord0 + 0x5b, 0x5b, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x28, 0x31, 0x29, 0x5d, 0x5d, // [[attribute(1)]] + 0x3b, 0x0a, 0x7d, 0x3b, 0x0a, 0x0a, 0x76, 0x65, 0x72, 0x74, 0x65, 0x78, 0x20, 0x78, 0x6c, 0x61, // ;.};..vertex xla + 0x74, 0x4d, 0x74, 0x6c, 0x4d, 0x61, 0x69, 0x6e, 0x5f, 0x6f, 0x75, 0x74, 0x20, 0x78, 0x6c, 0x61, // tMtlMain_out xla + 0x74, 0x4d, 0x74, 0x6c, 0x4d, 0x61, 0x69, 0x6e, 0x28, 0x78, 0x6c, 0x61, 0x74, 0x4d, 0x74, 0x6c, // tMtlMain(xlatMtl + 0x4d, 0x61, 0x69, 0x6e, 0x5f, 0x69, 0x6e, 0x20, 0x69, 0x6e, 0x20, 0x5b, 0x5b, 0x73, 0x74, 0x61, // Main_in in [[sta + 0x67, 0x65, 0x5f, 0x69, 0x6e, 0x5d, 0x5d, 0x2c, 0x20, 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x61, 0x6e, // ge_in]], constan + 0x74, 0x20, 0x5f, 0x47, 0x6c, 0x6f, 0x62, 0x61, 0x6c, 0x26, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, // t _Global& _mtl_ + 0x75, 0x20, 0x5b, 0x5b, 0x62, 0x75, 0x66, 0x66, 0x65, 0x72, 0x28, 0x30, 0x29, 0x5d, 0x5d, 0x29, // u [[buffer(0)]]) + 0x0a, 0x7b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x78, 0x6c, 0x61, 0x74, 0x4d, 0x74, 0x6c, 0x4d, 0x61, // .{. xlatMtlMa + 0x69, 0x6e, 0x5f, 0x6f, 0x75, 0x74, 0x20, 0x6f, 0x75, 0x74, 0x20, 0x3d, 0x20, 0x7b, 0x7d, 0x3b, // in_out out = {}; + 0x0a, 0x20, 0x20, 0x20, 0x20, 0x6f, 0x75, 0x74, 0x2e, 0x67, 0x6c, 0x5f, 0x50, 0x6f, 0x73, 0x69, // . out.gl_Posi + 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x3d, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x75, 0x2e, 0x75, 0x5f, // tion = _mtl_u.u_ + 0x76, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x20, 0x2a, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, // viewProj * float + 0x34, 0x28, 0x69, 0x6e, 0x2e, 0x61, 0x5f, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x2c, // 4(in.a_position, + 0x20, 0x30, 0x2e, 0x30, 0x2c, 0x20, 0x31, 0x2e, 0x30, 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, // 0.0, 1.0);. + 0x6f, 0x75, 0x74, 0x2e, 0x5f, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x4f, // out._entryPointO + 0x75, 0x74, 0x70, 0x75, 0x74, 0x5f, 0x76, 0x5f, 0x74, 0x65, 0x78, 0x63, 0x6f, 0x6f, 0x72, 0x64, // utput_v_texcoord + 0x30, 0x20, 0x3d, 0x20, 0x69, 0x6e, 0x2e, 0x61, 0x5f, 0x74, 0x65, 0x78, 0x63, 0x6f, 0x6f, 0x72, // 0 = in.a_texcoor + 0x64, 0x30, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x6f, // d0;. return o + 0x75, 0x74, 0x3b, 0x0a, 0x7d, 0x0a, 0x0a, 0x00, 0x02, 0x01, 0x00, 0x10, 0x00, 0x40, 0x00, // ut;.}........@. }; extern const uint8_t* vs_imgui_image_pssl; extern const uint32_t vs_imgui_image_pssl_size; diff --git a/Modules/Moonlight/Source/ImGui/Resources/vs_ocornut_imgui.bin.hpp b/Modules/Moonlight/Source/ImGui/Resources/vs_ocornut_imgui.bin.hpp index 31624506..02b5ba6f 100644 --- a/Modules/Moonlight/Source/ImGui/Resources/vs_ocornut_imgui.bin.hpp +++ b/Modules/Moonlight/Source/ImGui/Resources/vs_ocornut_imgui.bin.hpp @@ -1,278 +1,487 @@ static const uint8_t vs_ocornut_imgui_glsl[460] = { - 0x56, 0x53, 0x48, 0x0b, 0x00, 0x00, 0x00, 0x00, 0x01, 0x83, 0xf2, 0xe1, 0x01, 0x00, 0x0a, 0x75, // VSH............u - 0x5f, 0x76, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x04, 0x01, 0x00, 0x00, 0x01, 0x00, 0x00, // _viewProj....... - 0x00, 0x00, 0x00, 0xa4, 0x01, 0x00, 0x00, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, // .......attribute - 0x20, 0x76, 0x65, 0x63, 0x34, 0x20, 0x61, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x3b, 0x0a, // vec4 a_color0;. - 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x20, 0x76, 0x65, 0x63, 0x32, 0x20, 0x61, // attribute vec2 a - 0x5f, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x3b, 0x0a, 0x61, 0x74, 0x74, 0x72, 0x69, // _position;.attri - 0x62, 0x75, 0x74, 0x65, 0x20, 0x76, 0x65, 0x63, 0x32, 0x20, 0x61, 0x5f, 0x74, 0x65, 0x78, 0x63, // bute vec2 a_texc - 0x6f, 0x6f, 0x72, 0x64, 0x30, 0x3b, 0x0a, 0x76, 0x61, 0x72, 0x79, 0x69, 0x6e, 0x67, 0x20, 0x76, // oord0;.varying v - 0x65, 0x63, 0x34, 0x20, 0x76, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x3b, 0x0a, 0x76, 0x61, // ec4 v_color0;.va - 0x72, 0x79, 0x69, 0x6e, 0x67, 0x20, 0x76, 0x65, 0x63, 0x32, 0x20, 0x76, 0x5f, 0x74, 0x65, 0x78, // rying vec2 v_tex - 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x30, 0x3b, 0x0a, 0x75, 0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, 0x20, // coord0;.uniform - 0x6d, 0x61, 0x74, 0x34, 0x20, 0x75, 0x5f, 0x76, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x3b, // mat4 u_viewProj; - 0x0a, 0x76, 0x6f, 0x69, 0x64, 0x20, 0x6d, 0x61, 0x69, 0x6e, 0x20, 0x28, 0x29, 0x0a, 0x7b, 0x0a, // .void main ().{. - 0x20, 0x20, 0x76, 0x65, 0x63, 0x34, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x31, 0x3b, // vec4 tmpvar_1; - 0x0a, 0x20, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x31, 0x2e, 0x7a, 0x77, 0x20, 0x3d, // . tmpvar_1.zw = - 0x20, 0x76, 0x65, 0x63, 0x32, 0x28, 0x30, 0x2e, 0x30, 0x2c, 0x20, 0x31, 0x2e, 0x30, 0x29, 0x3b, // vec2(0.0, 1.0); - 0x0a, 0x20, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x31, 0x2e, 0x78, 0x79, 0x20, 0x3d, // . tmpvar_1.xy = - 0x20, 0x61, 0x5f, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x3b, 0x0a, 0x20, 0x20, 0x76, // a_position;. v - 0x65, 0x63, 0x34, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x32, 0x3b, 0x0a, 0x20, 0x20, // ec4 tmpvar_2;. - 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x32, 0x2e, 0x7a, 0x77, 0x20, 0x3d, 0x20, 0x76, 0x65, // tmpvar_2.zw = ve - 0x63, 0x32, 0x28, 0x30, 0x2e, 0x30, 0x2c, 0x20, 0x31, 0x2e, 0x30, 0x29, 0x3b, 0x0a, 0x20, 0x20, // c2(0.0, 1.0);. - 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x32, 0x2e, 0x78, 0x79, 0x20, 0x3d, 0x20, 0x28, 0x75, // tmpvar_2.xy = (u - 0x5f, 0x76, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x20, 0x2a, 0x20, 0x74, 0x6d, 0x70, 0x76, // _viewProj * tmpv - 0x61, 0x72, 0x5f, 0x31, 0x29, 0x2e, 0x78, 0x79, 0x3b, 0x0a, 0x20, 0x20, 0x67, 0x6c, 0x5f, 0x50, // ar_1).xy;. gl_P - 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x3d, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, // osition = tmpvar - 0x5f, 0x32, 0x3b, 0x0a, 0x20, 0x20, 0x76, 0x5f, 0x74, 0x65, 0x78, 0x63, 0x6f, 0x6f, 0x72, 0x64, // _2;. v_texcoord - 0x30, 0x20, 0x3d, 0x20, 0x61, 0x5f, 0x74, 0x65, 0x78, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x30, 0x3b, // 0 = a_texcoord0; - 0x0a, 0x20, 0x20, 0x76, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x20, 0x3d, 0x20, 0x61, 0x5f, // . v_color0 = a_ - 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x3b, 0x0a, 0x7d, 0x0a, 0x0a, 0x00, // color0;.}... + 0x56, 0x53, 0x48, 0x0b, 0x00, 0x00, 0x00, 0x00, 0x01, 0x83, 0xf2, 0xe1, 0x01, 0x00, 0x0a, 0x75, // VSH............u + 0x5f, 0x76, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x04, 0x01, 0x00, 0x00, 0x04, 0x00, 0x00, // _viewProj....... + 0x00, 0x00, 0x00, 0xa4, 0x01, 0x00, 0x00, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, // .......attribute + 0x20, 0x76, 0x65, 0x63, 0x34, 0x20, 0x61, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x3b, 0x0a, // vec4 a_color0;. + 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x20, 0x76, 0x65, 0x63, 0x32, 0x20, 0x61, // attribute vec2 a + 0x5f, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x3b, 0x0a, 0x61, 0x74, 0x74, 0x72, 0x69, // _position;.attri + 0x62, 0x75, 0x74, 0x65, 0x20, 0x76, 0x65, 0x63, 0x32, 0x20, 0x61, 0x5f, 0x74, 0x65, 0x78, 0x63, // bute vec2 a_texc + 0x6f, 0x6f, 0x72, 0x64, 0x30, 0x3b, 0x0a, 0x76, 0x61, 0x72, 0x79, 0x69, 0x6e, 0x67, 0x20, 0x76, // oord0;.varying v + 0x65, 0x63, 0x34, 0x20, 0x76, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x3b, 0x0a, 0x76, 0x61, // ec4 v_color0;.va + 0x72, 0x79, 0x69, 0x6e, 0x67, 0x20, 0x76, 0x65, 0x63, 0x32, 0x20, 0x76, 0x5f, 0x74, 0x65, 0x78, // rying vec2 v_tex + 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x30, 0x3b, 0x0a, 0x75, 0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, 0x20, // coord0;.uniform + 0x6d, 0x61, 0x74, 0x34, 0x20, 0x75, 0x5f, 0x76, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x3b, // mat4 u_viewProj; + 0x0a, 0x76, 0x6f, 0x69, 0x64, 0x20, 0x6d, 0x61, 0x69, 0x6e, 0x20, 0x28, 0x29, 0x0a, 0x7b, 0x0a, // .void main ().{. + 0x20, 0x20, 0x76, 0x65, 0x63, 0x34, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x31, 0x3b, // vec4 tmpvar_1; + 0x0a, 0x20, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x31, 0x2e, 0x7a, 0x77, 0x20, 0x3d, // . tmpvar_1.zw = + 0x20, 0x76, 0x65, 0x63, 0x32, 0x28, 0x30, 0x2e, 0x30, 0x2c, 0x20, 0x31, 0x2e, 0x30, 0x29, 0x3b, // vec2(0.0, 1.0); + 0x0a, 0x20, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x31, 0x2e, 0x78, 0x79, 0x20, 0x3d, // . tmpvar_1.xy = + 0x20, 0x61, 0x5f, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x3b, 0x0a, 0x20, 0x20, 0x76, // a_position;. v + 0x65, 0x63, 0x34, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x32, 0x3b, 0x0a, 0x20, 0x20, // ec4 tmpvar_2;. + 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x32, 0x2e, 0x7a, 0x77, 0x20, 0x3d, 0x20, 0x76, 0x65, // tmpvar_2.zw = ve + 0x63, 0x32, 0x28, 0x30, 0x2e, 0x30, 0x2c, 0x20, 0x31, 0x2e, 0x30, 0x29, 0x3b, 0x0a, 0x20, 0x20, // c2(0.0, 1.0);. + 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x32, 0x2e, 0x78, 0x79, 0x20, 0x3d, 0x20, 0x28, 0x75, // tmpvar_2.xy = (u + 0x5f, 0x76, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x20, 0x2a, 0x20, 0x74, 0x6d, 0x70, 0x76, // _viewProj * tmpv + 0x61, 0x72, 0x5f, 0x31, 0x29, 0x2e, 0x78, 0x79, 0x3b, 0x0a, 0x20, 0x20, 0x67, 0x6c, 0x5f, 0x50, // ar_1).xy;. gl_P + 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x3d, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, // osition = tmpvar + 0x5f, 0x32, 0x3b, 0x0a, 0x20, 0x20, 0x76, 0x5f, 0x74, 0x65, 0x78, 0x63, 0x6f, 0x6f, 0x72, 0x64, // _2;. v_texcoord + 0x30, 0x20, 0x3d, 0x20, 0x61, 0x5f, 0x74, 0x65, 0x78, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x30, 0x3b, // 0 = a_texcoord0; + 0x0a, 0x20, 0x20, 0x76, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x20, 0x3d, 0x20, 0x61, 0x5f, // . v_color0 = a_ + 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x3b, 0x0a, 0x7d, 0x0a, 0x0a, 0x00, // color0;.}... }; static const uint8_t vs_ocornut_imgui_essl[508] = { - 0x56, 0x53, 0x48, 0x0b, 0x00, 0x00, 0x00, 0x00, 0x01, 0x83, 0xf2, 0xe1, 0x01, 0x00, 0x0a, 0x75, // VSH............u - 0x5f, 0x76, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x04, 0x01, 0x00, 0x00, 0x01, 0x00, 0x00, // _viewProj....... - 0x00, 0x00, 0x00, 0xd4, 0x01, 0x00, 0x00, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, // .......attribute - 0x20, 0x68, 0x69, 0x67, 0x68, 0x70, 0x20, 0x76, 0x65, 0x63, 0x34, 0x20, 0x61, 0x5f, 0x63, 0x6f, // highp vec4 a_co - 0x6c, 0x6f, 0x72, 0x30, 0x3b, 0x0a, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x20, // lor0;.attribute - 0x68, 0x69, 0x67, 0x68, 0x70, 0x20, 0x76, 0x65, 0x63, 0x32, 0x20, 0x61, 0x5f, 0x70, 0x6f, 0x73, // highp vec2 a_pos - 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x3b, 0x0a, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, // ition;.attribute - 0x20, 0x68, 0x69, 0x67, 0x68, 0x70, 0x20, 0x76, 0x65, 0x63, 0x32, 0x20, 0x61, 0x5f, 0x74, 0x65, // highp vec2 a_te - 0x78, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x30, 0x3b, 0x0a, 0x76, 0x61, 0x72, 0x79, 0x69, 0x6e, 0x67, // xcoord0;.varying - 0x20, 0x68, 0x69, 0x67, 0x68, 0x70, 0x20, 0x76, 0x65, 0x63, 0x34, 0x20, 0x76, 0x5f, 0x63, 0x6f, // highp vec4 v_co - 0x6c, 0x6f, 0x72, 0x30, 0x3b, 0x0a, 0x76, 0x61, 0x72, 0x79, 0x69, 0x6e, 0x67, 0x20, 0x68, 0x69, // lor0;.varying hi - 0x67, 0x68, 0x70, 0x20, 0x76, 0x65, 0x63, 0x32, 0x20, 0x76, 0x5f, 0x74, 0x65, 0x78, 0x63, 0x6f, // ghp vec2 v_texco - 0x6f, 0x72, 0x64, 0x30, 0x3b, 0x0a, 0x75, 0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, 0x20, 0x68, 0x69, // ord0;.uniform hi - 0x67, 0x68, 0x70, 0x20, 0x6d, 0x61, 0x74, 0x34, 0x20, 0x75, 0x5f, 0x76, 0x69, 0x65, 0x77, 0x50, // ghp mat4 u_viewP - 0x72, 0x6f, 0x6a, 0x3b, 0x0a, 0x76, 0x6f, 0x69, 0x64, 0x20, 0x6d, 0x61, 0x69, 0x6e, 0x20, 0x28, // roj;.void main ( - 0x29, 0x0a, 0x7b, 0x0a, 0x20, 0x20, 0x68, 0x69, 0x67, 0x68, 0x70, 0x20, 0x76, 0x65, 0x63, 0x34, // ).{. highp vec4 - 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x31, 0x3b, 0x0a, 0x20, 0x20, 0x74, 0x6d, 0x70, // tmpvar_1;. tmp - 0x76, 0x61, 0x72, 0x5f, 0x31, 0x2e, 0x7a, 0x77, 0x20, 0x3d, 0x20, 0x76, 0x65, 0x63, 0x32, 0x28, // var_1.zw = vec2( - 0x30, 0x2e, 0x30, 0x2c, 0x20, 0x31, 0x2e, 0x30, 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x74, 0x6d, 0x70, // 0.0, 1.0);. tmp - 0x76, 0x61, 0x72, 0x5f, 0x31, 0x2e, 0x78, 0x79, 0x20, 0x3d, 0x20, 0x61, 0x5f, 0x70, 0x6f, 0x73, // var_1.xy = a_pos - 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x3b, 0x0a, 0x20, 0x20, 0x68, 0x69, 0x67, 0x68, 0x70, 0x20, 0x76, // ition;. highp v - 0x65, 0x63, 0x34, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x32, 0x3b, 0x0a, 0x20, 0x20, // ec4 tmpvar_2;. - 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x32, 0x2e, 0x7a, 0x77, 0x20, 0x3d, 0x20, 0x76, 0x65, // tmpvar_2.zw = ve - 0x63, 0x32, 0x28, 0x30, 0x2e, 0x30, 0x2c, 0x20, 0x31, 0x2e, 0x30, 0x29, 0x3b, 0x0a, 0x20, 0x20, // c2(0.0, 1.0);. - 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x32, 0x2e, 0x78, 0x79, 0x20, 0x3d, 0x20, 0x28, 0x75, // tmpvar_2.xy = (u - 0x5f, 0x76, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x20, 0x2a, 0x20, 0x74, 0x6d, 0x70, 0x76, // _viewProj * tmpv - 0x61, 0x72, 0x5f, 0x31, 0x29, 0x2e, 0x78, 0x79, 0x3b, 0x0a, 0x20, 0x20, 0x67, 0x6c, 0x5f, 0x50, // ar_1).xy;. gl_P - 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x3d, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, // osition = tmpvar - 0x5f, 0x32, 0x3b, 0x0a, 0x20, 0x20, 0x76, 0x5f, 0x74, 0x65, 0x78, 0x63, 0x6f, 0x6f, 0x72, 0x64, // _2;. v_texcoord - 0x30, 0x20, 0x3d, 0x20, 0x61, 0x5f, 0x74, 0x65, 0x78, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x30, 0x3b, // 0 = a_texcoord0; - 0x0a, 0x20, 0x20, 0x76, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x20, 0x3d, 0x20, 0x61, 0x5f, // . v_color0 = a_ - 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x3b, 0x0a, 0x7d, 0x0a, 0x0a, 0x00, // color0;.}... + 0x56, 0x53, 0x48, 0x0b, 0x00, 0x00, 0x00, 0x00, 0x01, 0x83, 0xf2, 0xe1, 0x01, 0x00, 0x0a, 0x75, // VSH............u + 0x5f, 0x76, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x04, 0x01, 0x00, 0x00, 0x04, 0x00, 0x00, // _viewProj....... + 0x00, 0x00, 0x00, 0xd4, 0x01, 0x00, 0x00, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, // .......attribute + 0x20, 0x68, 0x69, 0x67, 0x68, 0x70, 0x20, 0x76, 0x65, 0x63, 0x34, 0x20, 0x61, 0x5f, 0x63, 0x6f, // highp vec4 a_co + 0x6c, 0x6f, 0x72, 0x30, 0x3b, 0x0a, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x20, // lor0;.attribute + 0x68, 0x69, 0x67, 0x68, 0x70, 0x20, 0x76, 0x65, 0x63, 0x32, 0x20, 0x61, 0x5f, 0x70, 0x6f, 0x73, // highp vec2 a_pos + 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x3b, 0x0a, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, // ition;.attribute + 0x20, 0x68, 0x69, 0x67, 0x68, 0x70, 0x20, 0x76, 0x65, 0x63, 0x32, 0x20, 0x61, 0x5f, 0x74, 0x65, // highp vec2 a_te + 0x78, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x30, 0x3b, 0x0a, 0x76, 0x61, 0x72, 0x79, 0x69, 0x6e, 0x67, // xcoord0;.varying + 0x20, 0x68, 0x69, 0x67, 0x68, 0x70, 0x20, 0x76, 0x65, 0x63, 0x34, 0x20, 0x76, 0x5f, 0x63, 0x6f, // highp vec4 v_co + 0x6c, 0x6f, 0x72, 0x30, 0x3b, 0x0a, 0x76, 0x61, 0x72, 0x79, 0x69, 0x6e, 0x67, 0x20, 0x68, 0x69, // lor0;.varying hi + 0x67, 0x68, 0x70, 0x20, 0x76, 0x65, 0x63, 0x32, 0x20, 0x76, 0x5f, 0x74, 0x65, 0x78, 0x63, 0x6f, // ghp vec2 v_texco + 0x6f, 0x72, 0x64, 0x30, 0x3b, 0x0a, 0x75, 0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, 0x20, 0x68, 0x69, // ord0;.uniform hi + 0x67, 0x68, 0x70, 0x20, 0x6d, 0x61, 0x74, 0x34, 0x20, 0x75, 0x5f, 0x76, 0x69, 0x65, 0x77, 0x50, // ghp mat4 u_viewP + 0x72, 0x6f, 0x6a, 0x3b, 0x0a, 0x76, 0x6f, 0x69, 0x64, 0x20, 0x6d, 0x61, 0x69, 0x6e, 0x20, 0x28, // roj;.void main ( + 0x29, 0x0a, 0x7b, 0x0a, 0x20, 0x20, 0x68, 0x69, 0x67, 0x68, 0x70, 0x20, 0x76, 0x65, 0x63, 0x34, // ).{. highp vec4 + 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x31, 0x3b, 0x0a, 0x20, 0x20, 0x74, 0x6d, 0x70, // tmpvar_1;. tmp + 0x76, 0x61, 0x72, 0x5f, 0x31, 0x2e, 0x7a, 0x77, 0x20, 0x3d, 0x20, 0x76, 0x65, 0x63, 0x32, 0x28, // var_1.zw = vec2( + 0x30, 0x2e, 0x30, 0x2c, 0x20, 0x31, 0x2e, 0x30, 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x74, 0x6d, 0x70, // 0.0, 1.0);. tmp + 0x76, 0x61, 0x72, 0x5f, 0x31, 0x2e, 0x78, 0x79, 0x20, 0x3d, 0x20, 0x61, 0x5f, 0x70, 0x6f, 0x73, // var_1.xy = a_pos + 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x3b, 0x0a, 0x20, 0x20, 0x68, 0x69, 0x67, 0x68, 0x70, 0x20, 0x76, // ition;. highp v + 0x65, 0x63, 0x34, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x32, 0x3b, 0x0a, 0x20, 0x20, // ec4 tmpvar_2;. + 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x32, 0x2e, 0x7a, 0x77, 0x20, 0x3d, 0x20, 0x76, 0x65, // tmpvar_2.zw = ve + 0x63, 0x32, 0x28, 0x30, 0x2e, 0x30, 0x2c, 0x20, 0x31, 0x2e, 0x30, 0x29, 0x3b, 0x0a, 0x20, 0x20, // c2(0.0, 1.0);. + 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x32, 0x2e, 0x78, 0x79, 0x20, 0x3d, 0x20, 0x28, 0x75, // tmpvar_2.xy = (u + 0x5f, 0x76, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x20, 0x2a, 0x20, 0x74, 0x6d, 0x70, 0x76, // _viewProj * tmpv + 0x61, 0x72, 0x5f, 0x31, 0x29, 0x2e, 0x78, 0x79, 0x3b, 0x0a, 0x20, 0x20, 0x67, 0x6c, 0x5f, 0x50, // ar_1).xy;. gl_P + 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x3d, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, // osition = tmpvar + 0x5f, 0x32, 0x3b, 0x0a, 0x20, 0x20, 0x76, 0x5f, 0x74, 0x65, 0x78, 0x63, 0x6f, 0x6f, 0x72, 0x64, // _2;. v_texcoord + 0x30, 0x20, 0x3d, 0x20, 0x61, 0x5f, 0x74, 0x65, 0x78, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x30, 0x3b, // 0 = a_texcoord0; + 0x0a, 0x20, 0x20, 0x76, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x20, 0x3d, 0x20, 0x61, 0x5f, // . v_color0 = a_ + 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x3b, 0x0a, 0x7d, 0x0a, 0x0a, 0x00, // color0;.}... }; static const uint8_t vs_ocornut_imgui_spv[1293] = { - 0x56, 0x53, 0x48, 0x0b, 0x00, 0x00, 0x00, 0x00, 0x01, 0x83, 0xf2, 0xe1, 0x01, 0x00, 0x0a, 0x75, // VSH............u - 0x5f, 0x76, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, // _viewProj....... - 0x00, 0x00, 0x00, 0xdc, 0x04, 0x00, 0x00, 0x03, 0x02, 0x23, 0x07, 0x00, 0x00, 0x01, 0x00, 0x0a, // .........#...... - 0x00, 0x08, 0x00, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x11, 0x00, 0x02, 0x00, 0x01, // ...|............ - 0x00, 0x00, 0x00, 0x0b, 0x00, 0x06, 0x00, 0x01, 0x00, 0x00, 0x00, 0x47, 0x4c, 0x53, 0x4c, 0x2e, // ...........GLSL. - 0x73, 0x74, 0x64, 0x2e, 0x34, 0x35, 0x30, 0x00, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x03, 0x00, 0x00, // std.450......... - 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, // ................ - 0x00, 0x00, 0x00, 0x6d, 0x61, 0x69, 0x6e, 0x00, 0x00, 0x00, 0x00, 0x3e, 0x00, 0x00, 0x00, 0x42, // ...main....>...B - 0x00, 0x00, 0x00, 0x45, 0x00, 0x00, 0x00, 0x50, 0x00, 0x00, 0x00, 0x53, 0x00, 0x00, 0x00, 0x57, // ...E...P...S...W - 0x00, 0x00, 0x00, 0x03, 0x00, 0x03, 0x00, 0x05, 0x00, 0x00, 0x00, 0xf4, 0x01, 0x00, 0x00, 0x05, // ................ - 0x00, 0x04, 0x00, 0x04, 0x00, 0x00, 0x00, 0x6d, 0x61, 0x69, 0x6e, 0x00, 0x00, 0x00, 0x00, 0x05, // .......main..... - 0x00, 0x06, 0x00, 0x23, 0x00, 0x00, 0x00, 0x55, 0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, 0x42, 0x6c, // ...#...UniformBl - 0x6f, 0x63, 0x6b, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x06, 0x00, 0x23, 0x00, 0x00, 0x00, 0x00, // ock........#.... - 0x00, 0x00, 0x00, 0x75, 0x5f, 0x76, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x00, 0x00, 0x05, // ...u_viewProj... - 0x00, 0x03, 0x00, 0x25, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x05, 0x00, 0x3e, // ...%...........> - 0x00, 0x00, 0x00, 0x61, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x00, 0x00, 0x00, 0x00, 0x05, // ...a_color0..... - 0x00, 0x05, 0x00, 0x42, 0x00, 0x00, 0x00, 0x61, 0x5f, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, // ...B...a_positio - 0x6e, 0x00, 0x00, 0x05, 0x00, 0x05, 0x00, 0x45, 0x00, 0x00, 0x00, 0x61, 0x5f, 0x74, 0x65, 0x78, // n......E...a_tex - 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x30, 0x00, 0x05, 0x00, 0x0a, 0x00, 0x50, 0x00, 0x00, 0x00, 0x40, // coord0.....P...@ - 0x65, 0x6e, 0x74, 0x72, 0x79, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, // entryPointOutput - 0x2e, 0x67, 0x6c, 0x5f, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x00, 0x00, 0x00, 0x05, // .gl_Position.... - 0x00, 0x09, 0x00, 0x53, 0x00, 0x00, 0x00, 0x40, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x50, 0x6f, 0x69, // ...S...@entryPoi - 0x6e, 0x74, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x2e, 0x76, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, // ntOutput.v_color - 0x30, 0x00, 0x00, 0x05, 0x00, 0x0a, 0x00, 0x57, 0x00, 0x00, 0x00, 0x40, 0x65, 0x6e, 0x74, 0x72, // 0......W...@entr - 0x79, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x2e, 0x76, 0x5f, 0x74, // yPointOutput.v_t - 0x65, 0x78, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x30, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0x23, // excoord0...H...# - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x23, // ...........H...# - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x48, // .......#.......H - 0x00, 0x05, 0x00, 0x23, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, // ...#............ - 0x00, 0x00, 0x00, 0x47, 0x00, 0x03, 0x00, 0x23, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x47, // ...G...#.......G - 0x00, 0x04, 0x00, 0x25, 0x00, 0x00, 0x00, 0x22, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, // ...%...".......G - 0x00, 0x04, 0x00, 0x25, 0x00, 0x00, 0x00, 0x21, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, // ...%...!.......G - 0x00, 0x04, 0x00, 0x3e, 0x00, 0x00, 0x00, 0x1e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, // ...>...........G - 0x00, 0x04, 0x00, 0x42, 0x00, 0x00, 0x00, 0x1e, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x47, // ...B...........G - 0x00, 0x04, 0x00, 0x45, 0x00, 0x00, 0x00, 0x1e, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x47, // ...E...........G - 0x00, 0x04, 0x00, 0x50, 0x00, 0x00, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, // ...P...........G - 0x00, 0x04, 0x00, 0x53, 0x00, 0x00, 0x00, 0x1e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, // ...S...........G - 0x00, 0x04, 0x00, 0x57, 0x00, 0x00, 0x00, 0x1e, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x13, // ...W............ - 0x00, 0x02, 0x00, 0x02, 0x00, 0x00, 0x00, 0x21, 0x00, 0x03, 0x00, 0x03, 0x00, 0x00, 0x00, 0x02, // .......!........ - 0x00, 0x00, 0x00, 0x16, 0x00, 0x03, 0x00, 0x06, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x17, // ........... .... - 0x00, 0x04, 0x00, 0x07, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x17, // ................ - 0x00, 0x04, 0x00, 0x09, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x15, // ................ - 0x00, 0x04, 0x00, 0x14, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x2b, // ....... .......+ - 0x00, 0x04, 0x00, 0x06, 0x00, 0x00, 0x00, 0x16, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x3f, 0x2b, // ..............?+ - 0x00, 0x04, 0x00, 0x06, 0x00, 0x00, 0x00, 0x17, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, // ................ - 0x00, 0x04, 0x00, 0x22, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x1e, // ..."............ - 0x00, 0x03, 0x00, 0x23, 0x00, 0x00, 0x00, 0x22, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x24, // ...#..."... ...$ - 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x24, // .......#...;...$ - 0x00, 0x00, 0x00, 0x25, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, 0x14, // ...%.......+.... - 0x00, 0x00, 0x00, 0x26, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x27, // ...&....... ...' - 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x22, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x3d, // ......."... ...= - 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x3d, // ...........;...= - 0x00, 0x00, 0x00, 0x3e, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x41, // ...>....... ...A - 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x41, // ...........;...A - 0x00, 0x00, 0x00, 0x42, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x41, // ...B.......;...A - 0x00, 0x00, 0x00, 0x45, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x4f, // ...E....... ...O - 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x4f, // ...........;...O - 0x00, 0x00, 0x00, 0x50, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x4f, // ...P.......;...O - 0x00, 0x00, 0x00, 0x53, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x56, // ...S....... ...V - 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x56, // ...........;...V - 0x00, 0x00, 0x00, 0x57, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x36, 0x00, 0x05, 0x00, 0x02, // ...W.......6.... - 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0xf8, // ................ - 0x00, 0x02, 0x00, 0x05, 0x00, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x07, 0x00, 0x00, 0x00, 0x3f, // .......=.......? - 0x00, 0x00, 0x00, 0x3e, 0x00, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x09, 0x00, 0x00, 0x00, 0x43, // ...>...=.......C - 0x00, 0x00, 0x00, 0x42, 0x00, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x09, 0x00, 0x00, 0x00, 0x46, // ...B...=.......F - 0x00, 0x00, 0x00, 0x45, 0x00, 0x00, 0x00, 0x51, 0x00, 0x05, 0x00, 0x06, 0x00, 0x00, 0x00, 0x71, // ...E...Q.......q - 0x00, 0x00, 0x00, 0x43, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x51, 0x00, 0x05, 0x00, 0x06, // ...C.......Q.... - 0x00, 0x00, 0x00, 0x72, 0x00, 0x00, 0x00, 0x43, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x50, // ...r...C.......P - 0x00, 0x07, 0x00, 0x07, 0x00, 0x00, 0x00, 0x73, 0x00, 0x00, 0x00, 0x71, 0x00, 0x00, 0x00, 0x72, // .......s...q...r - 0x00, 0x00, 0x00, 0x17, 0x00, 0x00, 0x00, 0x16, 0x00, 0x00, 0x00, 0x41, 0x00, 0x05, 0x00, 0x27, // ...........A...' - 0x00, 0x00, 0x00, 0x74, 0x00, 0x00, 0x00, 0x25, 0x00, 0x00, 0x00, 0x26, 0x00, 0x00, 0x00, 0x3d, // ...t...%...&...= - 0x00, 0x04, 0x00, 0x22, 0x00, 0x00, 0x00, 0x75, 0x00, 0x00, 0x00, 0x74, 0x00, 0x00, 0x00, 0x90, // ..."...u...t.... - 0x00, 0x05, 0x00, 0x07, 0x00, 0x00, 0x00, 0x76, 0x00, 0x00, 0x00, 0x73, 0x00, 0x00, 0x00, 0x75, // .......v...s...u - 0x00, 0x00, 0x00, 0x51, 0x00, 0x05, 0x00, 0x06, 0x00, 0x00, 0x00, 0x78, 0x00, 0x00, 0x00, 0x76, // ...Q.......x...v - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x51, 0x00, 0x05, 0x00, 0x06, 0x00, 0x00, 0x00, 0x7a, // .......Q.......z - 0x00, 0x00, 0x00, 0x76, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x50, 0x00, 0x07, 0x00, 0x07, // ...v.......P.... - 0x00, 0x00, 0x00, 0x7b, 0x00, 0x00, 0x00, 0x78, 0x00, 0x00, 0x00, 0x7a, 0x00, 0x00, 0x00, 0x17, // ...{...x...z.... - 0x00, 0x00, 0x00, 0x16, 0x00, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0x50, 0x00, 0x00, 0x00, 0x7b, // .......>...P...{ - 0x00, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0x53, 0x00, 0x00, 0x00, 0x3f, 0x00, 0x00, 0x00, 0x3e, // ...>...S...?...> - 0x00, 0x03, 0x00, 0x57, 0x00, 0x00, 0x00, 0x46, 0x00, 0x00, 0x00, 0xfd, 0x00, 0x01, 0x00, 0x38, // ...W...F.......8 - 0x00, 0x01, 0x00, 0x00, 0x03, 0x05, 0x00, 0x01, 0x00, 0x10, 0x00, 0x40, 0x00, // ...........@. + 0x56, 0x53, 0x48, 0x0b, 0x00, 0x00, 0x00, 0x00, 0x01, 0x83, 0xf2, 0xe1, 0x01, 0x00, 0x0a, 0x75, // VSH............u + 0x5f, 0x76, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x04, 0x01, 0x00, 0x00, 0x04, 0x00, 0x00, // _viewProj....... + 0x00, 0x00, 0x00, 0xdc, 0x04, 0x00, 0x00, 0x03, 0x02, 0x23, 0x07, 0x00, 0x00, 0x01, 0x00, 0x0b, // .........#...... + 0x00, 0x08, 0x00, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x11, 0x00, 0x02, 0x00, 0x01, // ...|............ + 0x00, 0x00, 0x00, 0x0b, 0x00, 0x06, 0x00, 0x01, 0x00, 0x00, 0x00, 0x47, 0x4c, 0x53, 0x4c, 0x2e, // ...........GLSL. + 0x73, 0x74, 0x64, 0x2e, 0x34, 0x35, 0x30, 0x00, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x03, 0x00, 0x00, // std.450......... + 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, // ................ + 0x00, 0x00, 0x00, 0x6d, 0x61, 0x69, 0x6e, 0x00, 0x00, 0x00, 0x00, 0x3e, 0x00, 0x00, 0x00, 0x42, // ...main....>...B + 0x00, 0x00, 0x00, 0x45, 0x00, 0x00, 0x00, 0x50, 0x00, 0x00, 0x00, 0x53, 0x00, 0x00, 0x00, 0x57, // ...E...P...S...W + 0x00, 0x00, 0x00, 0x03, 0x00, 0x03, 0x00, 0x05, 0x00, 0x00, 0x00, 0xf4, 0x01, 0x00, 0x00, 0x05, // ................ + 0x00, 0x04, 0x00, 0x04, 0x00, 0x00, 0x00, 0x6d, 0x61, 0x69, 0x6e, 0x00, 0x00, 0x00, 0x00, 0x05, // .......main..... + 0x00, 0x06, 0x00, 0x23, 0x00, 0x00, 0x00, 0x55, 0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, 0x42, 0x6c, // ...#...UniformBl + 0x6f, 0x63, 0x6b, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x06, 0x00, 0x23, 0x00, 0x00, 0x00, 0x00, // ock........#.... + 0x00, 0x00, 0x00, 0x75, 0x5f, 0x76, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x00, 0x00, 0x05, // ...u_viewProj... + 0x00, 0x03, 0x00, 0x25, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x05, 0x00, 0x3e, // ...%...........> + 0x00, 0x00, 0x00, 0x61, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x00, 0x00, 0x00, 0x00, 0x05, // ...a_color0..... + 0x00, 0x05, 0x00, 0x42, 0x00, 0x00, 0x00, 0x61, 0x5f, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, // ...B...a_positio + 0x6e, 0x00, 0x00, 0x05, 0x00, 0x05, 0x00, 0x45, 0x00, 0x00, 0x00, 0x61, 0x5f, 0x74, 0x65, 0x78, // n......E...a_tex + 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x30, 0x00, 0x05, 0x00, 0x0a, 0x00, 0x50, 0x00, 0x00, 0x00, 0x40, // coord0.....P...@ + 0x65, 0x6e, 0x74, 0x72, 0x79, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, // entryPointOutput + 0x2e, 0x67, 0x6c, 0x5f, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x00, 0x00, 0x00, 0x05, // .gl_Position.... + 0x00, 0x09, 0x00, 0x53, 0x00, 0x00, 0x00, 0x40, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x50, 0x6f, 0x69, // ...S...@entryPoi + 0x6e, 0x74, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x2e, 0x76, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, // ntOutput.v_color + 0x30, 0x00, 0x00, 0x05, 0x00, 0x0a, 0x00, 0x57, 0x00, 0x00, 0x00, 0x40, 0x65, 0x6e, 0x74, 0x72, // 0......W...@entr + 0x79, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x2e, 0x76, 0x5f, 0x74, // yPointOutput.v_t + 0x65, 0x78, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x30, 0x00, 0x00, 0x00, 0x47, 0x00, 0x03, 0x00, 0x23, // excoord0...G...# + 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0x23, 0x00, 0x00, 0x00, 0x00, // .......H...#.... + 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x23, 0x00, 0x00, 0x00, 0x00, // .......H...#.... + 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x23, // ...........H...# + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, // .......#.......G + 0x00, 0x04, 0x00, 0x25, 0x00, 0x00, 0x00, 0x21, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, // ...%...!.......G + 0x00, 0x04, 0x00, 0x25, 0x00, 0x00, 0x00, 0x22, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, // ...%...".......G + 0x00, 0x04, 0x00, 0x3e, 0x00, 0x00, 0x00, 0x1e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, // ...>...........G + 0x00, 0x04, 0x00, 0x42, 0x00, 0x00, 0x00, 0x1e, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x47, // ...B...........G + 0x00, 0x04, 0x00, 0x45, 0x00, 0x00, 0x00, 0x1e, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x47, // ...E...........G + 0x00, 0x04, 0x00, 0x50, 0x00, 0x00, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, // ...P...........G + 0x00, 0x04, 0x00, 0x53, 0x00, 0x00, 0x00, 0x1e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, // ...S...........G + 0x00, 0x04, 0x00, 0x57, 0x00, 0x00, 0x00, 0x1e, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x13, // ...W............ + 0x00, 0x02, 0x00, 0x02, 0x00, 0x00, 0x00, 0x21, 0x00, 0x03, 0x00, 0x03, 0x00, 0x00, 0x00, 0x02, // .......!........ + 0x00, 0x00, 0x00, 0x16, 0x00, 0x03, 0x00, 0x06, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x17, // ........... .... + 0x00, 0x04, 0x00, 0x07, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x17, // ................ + 0x00, 0x04, 0x00, 0x09, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x15, // ................ + 0x00, 0x04, 0x00, 0x14, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x2b, // ....... .......+ + 0x00, 0x04, 0x00, 0x06, 0x00, 0x00, 0x00, 0x16, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x3f, 0x2b, // ..............?+ + 0x00, 0x04, 0x00, 0x06, 0x00, 0x00, 0x00, 0x17, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, // ................ + 0x00, 0x04, 0x00, 0x22, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x1e, // ..."............ + 0x00, 0x03, 0x00, 0x23, 0x00, 0x00, 0x00, 0x22, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x24, // ...#..."... ...$ + 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x24, // .......#...;...$ + 0x00, 0x00, 0x00, 0x25, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, 0x14, // ...%.......+.... + 0x00, 0x00, 0x00, 0x26, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x27, // ...&....... ...' + 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x22, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x3d, // ......."... ...= + 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x3d, // ...........;...= + 0x00, 0x00, 0x00, 0x3e, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x41, // ...>....... ...A + 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x41, // ...........;...A + 0x00, 0x00, 0x00, 0x42, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x41, // ...B.......;...A + 0x00, 0x00, 0x00, 0x45, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x4f, // ...E....... ...O + 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x4f, // ...........;...O + 0x00, 0x00, 0x00, 0x50, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x4f, // ...P.......;...O + 0x00, 0x00, 0x00, 0x53, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x56, // ...S....... ...V + 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x56, // ...........;...V + 0x00, 0x00, 0x00, 0x57, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x36, 0x00, 0x05, 0x00, 0x02, // ...W.......6.... + 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0xf8, // ................ + 0x00, 0x02, 0x00, 0x05, 0x00, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x07, 0x00, 0x00, 0x00, 0x3f, // .......=.......? + 0x00, 0x00, 0x00, 0x3e, 0x00, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x09, 0x00, 0x00, 0x00, 0x43, // ...>...=.......C + 0x00, 0x00, 0x00, 0x42, 0x00, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x09, 0x00, 0x00, 0x00, 0x46, // ...B...=.......F + 0x00, 0x00, 0x00, 0x45, 0x00, 0x00, 0x00, 0x51, 0x00, 0x05, 0x00, 0x06, 0x00, 0x00, 0x00, 0x71, // ...E...Q.......q + 0x00, 0x00, 0x00, 0x43, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x51, 0x00, 0x05, 0x00, 0x06, // ...C.......Q.... + 0x00, 0x00, 0x00, 0x72, 0x00, 0x00, 0x00, 0x43, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x50, // ...r...C.......P + 0x00, 0x07, 0x00, 0x07, 0x00, 0x00, 0x00, 0x73, 0x00, 0x00, 0x00, 0x71, 0x00, 0x00, 0x00, 0x72, // .......s...q...r + 0x00, 0x00, 0x00, 0x17, 0x00, 0x00, 0x00, 0x16, 0x00, 0x00, 0x00, 0x41, 0x00, 0x05, 0x00, 0x27, // ...........A...' + 0x00, 0x00, 0x00, 0x74, 0x00, 0x00, 0x00, 0x25, 0x00, 0x00, 0x00, 0x26, 0x00, 0x00, 0x00, 0x3d, // ...t...%...&...= + 0x00, 0x04, 0x00, 0x22, 0x00, 0x00, 0x00, 0x75, 0x00, 0x00, 0x00, 0x74, 0x00, 0x00, 0x00, 0x90, // ..."...u...t.... + 0x00, 0x05, 0x00, 0x07, 0x00, 0x00, 0x00, 0x76, 0x00, 0x00, 0x00, 0x73, 0x00, 0x00, 0x00, 0x75, // .......v...s...u + 0x00, 0x00, 0x00, 0x51, 0x00, 0x05, 0x00, 0x06, 0x00, 0x00, 0x00, 0x78, 0x00, 0x00, 0x00, 0x76, // ...Q.......x...v + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x51, 0x00, 0x05, 0x00, 0x06, 0x00, 0x00, 0x00, 0x7a, // .......Q.......z + 0x00, 0x00, 0x00, 0x76, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x50, 0x00, 0x07, 0x00, 0x07, // ...v.......P.... + 0x00, 0x00, 0x00, 0x7b, 0x00, 0x00, 0x00, 0x78, 0x00, 0x00, 0x00, 0x7a, 0x00, 0x00, 0x00, 0x17, // ...{...x...z.... + 0x00, 0x00, 0x00, 0x16, 0x00, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0x50, 0x00, 0x00, 0x00, 0x7b, // .......>...P...{ + 0x00, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0x53, 0x00, 0x00, 0x00, 0x3f, 0x00, 0x00, 0x00, 0x3e, // ...>...S...?...> + 0x00, 0x03, 0x00, 0x57, 0x00, 0x00, 0x00, 0x46, 0x00, 0x00, 0x00, 0xfd, 0x00, 0x01, 0x00, 0x38, // ...W...F.......8 + 0x00, 0x01, 0x00, 0x00, 0x03, 0x05, 0x00, 0x01, 0x00, 0x10, 0x00, 0x40, 0x00, // ...........@. }; -static const uint8_t vs_ocornut_imgui_dx9[364] = +static const uint8_t vs_ocornut_imgui_wgsl[960] = { - 0x56, 0x53, 0x48, 0x0b, 0x00, 0x00, 0x00, 0x00, 0x01, 0x83, 0xf2, 0xe1, 0x01, 0x00, 0x0a, 0x75, // VSH............u - 0x5f, 0x76, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x04, 0x01, 0x00, 0x00, 0x04, 0x00, 0x00, // _viewProj....... - 0x00, 0x00, 0x00, 0x44, 0x01, 0x00, 0x00, 0x00, 0x03, 0xfe, 0xff, 0xfe, 0xff, 0x20, 0x00, 0x43, // ...D......... .C - 0x54, 0x41, 0x42, 0x1c, 0x00, 0x00, 0x00, 0x53, 0x00, 0x00, 0x00, 0x00, 0x03, 0xfe, 0xff, 0x01, // TAB....S........ - 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x91, 0x00, 0x00, 0x4c, 0x00, 0x00, 0x00, 0x30, // ...........L...0 - 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x3c, 0x00, 0x00, 0x00, 0x00, // ...........<.... - 0x00, 0x00, 0x00, 0x75, 0x5f, 0x76, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x00, 0xab, 0x03, // ...u_viewProj... - 0x00, 0x03, 0x00, 0x04, 0x00, 0x04, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x76, // ...............v - 0x73, 0x5f, 0x33, 0x5f, 0x30, 0x00, 0x4d, 0x69, 0x63, 0x72, 0x6f, 0x73, 0x6f, 0x66, 0x74, 0x20, // s_3_0.Microsoft - 0x28, 0x52, 0x29, 0x20, 0x48, 0x4c, 0x53, 0x4c, 0x20, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, 0x20, // (R) HLSL Shader - 0x43, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x72, 0x20, 0x31, 0x30, 0x2e, 0x31, 0x00, 0xab, 0x51, // Compiler 10.1..Q - 0x00, 0x00, 0x05, 0x04, 0x00, 0x0f, 0xa0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x3f, 0x00, // ..............?. - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1f, 0x00, 0x00, 0x02, 0x0a, 0x00, 0x00, 0x80, 0x00, // ................ - 0x00, 0x0f, 0x90, 0x1f, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x80, 0x01, 0x00, 0x0f, 0x90, 0x1f, // ................ - 0x00, 0x00, 0x02, 0x05, 0x00, 0x00, 0x80, 0x02, 0x00, 0x0f, 0x90, 0x1f, 0x00, 0x00, 0x02, 0x00, // ................ - 0x00, 0x00, 0x80, 0x00, 0x00, 0x0f, 0xe0, 0x1f, 0x00, 0x00, 0x02, 0x0a, 0x00, 0x00, 0x80, 0x01, // ................ - 0x00, 0x0f, 0xe0, 0x1f, 0x00, 0x00, 0x02, 0x05, 0x00, 0x00, 0x80, 0x02, 0x00, 0x03, 0xe0, 0x05, // ................ - 0x00, 0x00, 0x03, 0x00, 0x00, 0x03, 0x80, 0x01, 0x00, 0xe4, 0xa0, 0x01, 0x00, 0x55, 0x90, 0x04, // .............U.. - 0x00, 0x00, 0x04, 0x00, 0x00, 0x03, 0x80, 0x00, 0x00, 0xe4, 0xa0, 0x01, 0x00, 0x00, 0x90, 0x00, // ................ - 0x00, 0xe4, 0x80, 0x02, 0x00, 0x00, 0x03, 0x00, 0x00, 0x03, 0xe0, 0x00, 0x00, 0xe4, 0x80, 0x03, // ................ - 0x00, 0xe4, 0xa0, 0x01, 0x00, 0x00, 0x02, 0x00, 0x00, 0x0c, 0xe0, 0x04, 0x00, 0x44, 0xa0, 0x01, // .............D.. - 0x00, 0x00, 0x02, 0x01, 0x00, 0x0f, 0xe0, 0x00, 0x00, 0xe4, 0x90, 0x01, 0x00, 0x00, 0x02, 0x02, // ................ - 0x00, 0x03, 0xe0, 0x02, 0x00, 0xe4, 0x90, 0xff, 0xff, 0x00, 0x00, 0x00, // ............ + 0x56, 0x53, 0x48, 0x0b, 0x00, 0x00, 0x00, 0x00, 0x01, 0x83, 0xf2, 0xe1, 0x01, 0x00, 0x0a, 0x75, // VSH............u + 0x5f, 0x76, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x04, 0x01, 0x00, 0x00, 0x04, 0x00, 0x00, // _viewProj....... + 0x00, 0x00, 0x00, 0x8d, 0x03, 0x00, 0x00, 0x64, 0x69, 0x61, 0x67, 0x6e, 0x6f, 0x73, 0x74, 0x69, // .......diagnosti + 0x63, 0x28, 0x6f, 0x66, 0x66, 0x2c, 0x20, 0x64, 0x65, 0x72, 0x69, 0x76, 0x61, 0x74, 0x69, 0x76, // c(off, derivativ + 0x65, 0x5f, 0x75, 0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, 0x69, 0x74, 0x79, 0x29, 0x3b, 0x0a, 0x64, // e_uniformity);.d + 0x69, 0x61, 0x67, 0x6e, 0x6f, 0x73, 0x74, 0x69, 0x63, 0x28, 0x6f, 0x66, 0x66, 0x2c, 0x20, 0x73, // iagnostic(off, s + 0x75, 0x62, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x5f, 0x75, 0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, 0x69, // ubgroup_uniformi + 0x74, 0x79, 0x29, 0x3b, 0x0a, 0x0a, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x20, 0x55, 0x6e, 0x69, // ty);..struct Uni + 0x66, 0x6f, 0x72, 0x6d, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x31, 0x5f, 0x31, 0x20, 0x7b, 0x0a, // formBlock_1_1 {. + 0x20, 0x20, 0x75, 0x5f, 0x76, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x20, 0x3a, 0x20, 0x6d, // u_viewProj : m + 0x61, 0x74, 0x34, 0x78, 0x34, 0x3c, 0x66, 0x33, 0x32, 0x3e, 0x2c, 0x0a, 0x7d, 0x0a, 0x0a, 0x40, // at4x4,.}..@ + 0x67, 0x72, 0x6f, 0x75, 0x70, 0x28, 0x30, 0x75, 0x29, 0x20, 0x40, 0x62, 0x69, 0x6e, 0x64, 0x69, // group(0u) @bindi + 0x6e, 0x67, 0x28, 0x30, 0x75, 0x29, 0x20, 0x76, 0x61, 0x72, 0x3c, 0x75, 0x6e, 0x69, 0x66, 0x6f, // ng(0u) var v : UniformB + 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x31, 0x5f, 0x31, 0x3b, 0x0a, 0x0a, 0x76, 0x61, 0x72, 0x3c, 0x70, // lock_1_1;..var

v_1 : ve + 0x63, 0x34, 0x3c, 0x66, 0x33, 0x32, 0x3e, 0x3b, 0x0a, 0x0a, 0x76, 0x61, 0x72, 0x3c, 0x70, 0x72, // c4;..var v_2 : vec + 0x34, 0x3c, 0x66, 0x33, 0x32, 0x3e, 0x3b, 0x0a, 0x0a, 0x76, 0x61, 0x72, 0x3c, 0x70, 0x72, 0x69, // 4;..var v_3 : vec2 + 0x3c, 0x66, 0x33, 0x32, 0x3e, 0x3b, 0x0a, 0x0a, 0x66, 0x6e, 0x20, 0x6d, 0x61, 0x69, 0x6e, 0x5f, // ;..fn main_ + 0x69, 0x6e, 0x6e, 0x65, 0x72, 0x28, 0x61, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x20, 0x3a, // inner(a_color0 : + 0x20, 0x76, 0x65, 0x63, 0x34, 0x3c, 0x66, 0x33, 0x32, 0x3e, 0x2c, 0x20, 0x61, 0x5f, 0x70, 0x6f, // vec4, a_po + 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x3a, 0x20, 0x76, 0x65, 0x63, 0x32, 0x3c, 0x66, 0x33, // sition : vec2, a_texcoord0 + 0x3a, 0x20, 0x76, 0x65, 0x63, 0x32, 0x3c, 0x66, 0x33, 0x32, 0x3e, 0x29, 0x20, 0x7b, 0x0a, 0x20, // : vec2) {. + 0x20, 0x6c, 0x65, 0x74, 0x20, 0x76, 0x5f, 0x34, 0x20, 0x3d, 0x20, 0x28, 0x76, 0x2e, 0x75, 0x5f, // let v_4 = (v.u_ + 0x76, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x20, 0x2a, 0x20, 0x76, 0x65, 0x63, 0x34, 0x3c, // viewProj * vec4< + 0x66, 0x33, 0x32, 0x3e, 0x28, 0x61, 0x5f, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x2e, // f32>(a_position. + 0x78, 0x2c, 0x20, 0x61, 0x5f, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x79, 0x2c, // x, a_position.y, + 0x20, 0x30, 0x2e, 0x30, 0x66, 0x2c, 0x20, 0x31, 0x2e, 0x30, 0x66, 0x29, 0x29, 0x3b, 0x0a, 0x20, // 0.0f, 1.0f));. + 0x20, 0x76, 0x5f, 0x31, 0x20, 0x3d, 0x20, 0x76, 0x65, 0x63, 0x34, 0x3c, 0x66, 0x33, 0x32, 0x3e, // v_1 = vec4 + 0x28, 0x76, 0x5f, 0x34, 0x2e, 0x78, 0x2c, 0x20, 0x76, 0x5f, 0x34, 0x2e, 0x79, 0x2c, 0x20, 0x30, // (v_4.x, v_4.y, 0 + 0x2e, 0x30, 0x66, 0x2c, 0x20, 0x31, 0x2e, 0x30, 0x66, 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x76, 0x5f, // .0f, 1.0f);. v_ + 0x32, 0x20, 0x3d, 0x20, 0x61, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x3b, 0x0a, 0x20, 0x20, // 2 = a_color0;. + 0x76, 0x5f, 0x33, 0x20, 0x3d, 0x20, 0x61, 0x5f, 0x74, 0x65, 0x78, 0x63, 0x6f, 0x6f, 0x72, 0x64, // v_3 = a_texcoord + 0x30, 0x3b, 0x0a, 0x7d, 0x0a, 0x0a, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x20, 0x74, 0x69, 0x6e, // 0;.}..struct tin + 0x74, 0x5f, 0x73, 0x79, 0x6d, 0x62, 0x6f, 0x6c, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x40, 0x62, 0x75, // t_symbol {. @bu + 0x69, 0x6c, 0x74, 0x69, 0x6e, 0x28, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x29, 0x0a, // iltin(position). + 0x20, 0x20, 0x6d, 0x20, 0x3a, 0x20, 0x76, 0x65, 0x63, 0x34, 0x3c, 0x66, 0x33, 0x32, 0x3e, 0x2c, // m : vec4, + 0x0a, 0x20, 0x20, 0x40, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x30, 0x75, 0x29, // . @location(0u) + 0x0a, 0x20, 0x20, 0x6d, 0x5f, 0x31, 0x20, 0x3a, 0x20, 0x76, 0x65, 0x63, 0x34, 0x3c, 0x66, 0x33, // . m_1 : vec4,. @location( + 0x31, 0x75, 0x29, 0x0a, 0x20, 0x20, 0x6d, 0x5f, 0x32, 0x20, 0x3a, 0x20, 0x76, 0x65, 0x63, 0x32, // 1u). m_2 : vec2 + 0x3c, 0x66, 0x33, 0x32, 0x3e, 0x2c, 0x0a, 0x7d, 0x0a, 0x0a, 0x40, 0x76, 0x65, 0x72, 0x74, 0x65, // ,.}..@verte + 0x78, 0x0a, 0x66, 0x6e, 0x20, 0x6d, 0x61, 0x69, 0x6e, 0x28, 0x40, 0x6c, 0x6f, 0x63, 0x61, 0x74, // x.fn main(@locat + 0x69, 0x6f, 0x6e, 0x28, 0x30, 0x75, 0x29, 0x20, 0x61, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x30, // ion(0u) a_color0 + 0x20, 0x3a, 0x20, 0x76, 0x65, 0x63, 0x34, 0x3c, 0x66, 0x33, 0x32, 0x3e, 0x2c, 0x20, 0x40, 0x6c, // : vec4, @l + 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x31, 0x75, 0x29, 0x20, 0x61, 0x5f, 0x70, 0x6f, // ocation(1u) a_po + 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x3a, 0x20, 0x76, 0x65, 0x63, 0x32, 0x3c, 0x66, 0x33, // sition : vec2, @location(2u + 0x29, 0x20, 0x61, 0x5f, 0x74, 0x65, 0x78, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x30, 0x20, 0x3a, 0x20, // ) a_texcoord0 : + 0x76, 0x65, 0x63, 0x32, 0x3c, 0x66, 0x33, 0x32, 0x3e, 0x29, 0x20, 0x2d, 0x3e, 0x20, 0x74, 0x69, // vec2) -> ti + 0x6e, 0x74, 0x5f, 0x73, 0x79, 0x6d, 0x62, 0x6f, 0x6c, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x6d, 0x61, // nt_symbol {. ma + 0x69, 0x6e, 0x5f, 0x69, 0x6e, 0x6e, 0x65, 0x72, 0x28, 0x61, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, // in_inner(a_color + 0x30, 0x2c, 0x20, 0x61, 0x5f, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x2c, 0x20, 0x61, // 0, a_position, a + 0x5f, 0x74, 0x65, 0x78, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x30, 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x72, // _texcoord0);. r + 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x74, 0x69, 0x6e, 0x74, 0x5f, 0x73, 0x79, 0x6d, 0x62, 0x6f, // eturn tint_symbo + 0x6c, 0x28, 0x76, 0x5f, 0x31, 0x2c, 0x20, 0x76, 0x5f, 0x32, 0x2c, 0x20, 0x76, 0x5f, 0x33, 0x29, // l(v_1, v_2, v_3) + 0x3b, 0x0a, 0x7d, 0x0a, 0x00, 0x03, 0x05, 0x00, 0x01, 0x00, 0x10, 0x00, 0x40, 0x00, 0x40, 0x00, // ;.}.........@.@. }; -static const uint8_t vs_ocornut_imgui_dx11[617] = +static const uint8_t vs_ocornut_imgui_dxbc[621] = { - 0x56, 0x53, 0x48, 0x0b, 0x00, 0x00, 0x00, 0x00, 0x01, 0x83, 0xf2, 0xe1, 0x01, 0x00, 0x0a, 0x75, // VSH............u - 0x5f, 0x76, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, // _viewProj....... - 0x00, 0x00, 0x00, 0x38, 0x02, 0x00, 0x00, 0x44, 0x58, 0x42, 0x43, 0xa9, 0x5b, 0xb0, 0xfb, 0xae, // ...8...DXBC.[... - 0x5e, 0xc6, 0x4a, 0xef, 0x25, 0x0b, 0x81, 0x23, 0x55, 0x3d, 0x00, 0x01, 0x00, 0x00, 0x00, 0x38, // ^.J.%..#U=.....8 - 0x02, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x2c, 0x00, 0x00, 0x00, 0x9c, 0x00, 0x00, 0x00, 0x10, // .......,........ - 0x01, 0x00, 0x00, 0x49, 0x53, 0x47, 0x4e, 0x68, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x08, // ...ISGNh........ - 0x00, 0x00, 0x00, 0x50, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, // ...P............ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x0f, 0x00, 0x00, 0x56, 0x00, 0x00, 0x00, 0x00, // ...........V.... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x03, // ................ - 0x03, 0x00, 0x00, 0x5f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, // ..._............ - 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x03, 0x03, 0x00, 0x00, 0x43, 0x4f, 0x4c, 0x4f, 0x52, // ...........COLOR - 0x00, 0x50, 0x4f, 0x53, 0x49, 0x54, 0x49, 0x4f, 0x4e, 0x00, 0x54, 0x45, 0x58, 0x43, 0x4f, 0x4f, // .POSITION.TEXCOO - 0x52, 0x44, 0x00, 0x4f, 0x53, 0x47, 0x4e, 0x6c, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x08, // RD.OSGNl........ - 0x00, 0x00, 0x00, 0x50, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x03, // ...P............ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x5c, 0x00, 0x00, 0x00, 0x00, // ................ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x0f, // ................ - 0x00, 0x00, 0x00, 0x62, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, // ...b............ - 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x03, 0x0c, 0x00, 0x00, 0x53, 0x56, 0x5f, 0x50, 0x4f, // ...........SV_PO - 0x53, 0x49, 0x54, 0x49, 0x4f, 0x4e, 0x00, 0x43, 0x4f, 0x4c, 0x4f, 0x52, 0x00, 0x54, 0x45, 0x58, // SITION.COLOR.TEX - 0x43, 0x4f, 0x4f, 0x52, 0x44, 0x00, 0xab, 0x53, 0x48, 0x44, 0x52, 0x20, 0x01, 0x00, 0x00, 0x40, // COORD..SHDR ...@ - 0x00, 0x01, 0x00, 0x48, 0x00, 0x00, 0x00, 0x59, 0x00, 0x00, 0x04, 0x46, 0x8e, 0x20, 0x00, 0x00, // ...H...Y...F. .. - 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x5f, 0x00, 0x00, 0x03, 0xf2, 0x10, 0x10, 0x00, 0x00, // ......._........ - 0x00, 0x00, 0x00, 0x5f, 0x00, 0x00, 0x03, 0x32, 0x10, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x5f, // ..._...2......._ - 0x00, 0x00, 0x03, 0x32, 0x10, 0x10, 0x00, 0x02, 0x00, 0x00, 0x00, 0x67, 0x00, 0x00, 0x04, 0xf2, // ...2.......g.... - 0x20, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x03, 0xf2, // ..........e.... - 0x20, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x03, 0x32, 0x20, 0x10, 0x00, 0x02, // ......e...2 ... - 0x00, 0x00, 0x00, 0x68, 0x00, 0x00, 0x02, 0x01, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x08, 0x32, // ...h.......8...2 - 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x56, 0x15, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x46, // .......V.......F - 0x80, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x32, 0x00, 0x00, 0x0a, 0x32, // . .........2...2 - 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x80, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // .......F. ...... - 0x00, 0x00, 0x00, 0x06, 0x10, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x46, 0x00, 0x10, 0x00, 0x00, // ...........F.... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x32, 0x20, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, // .......2 ......F - 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x80, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, // .......F. ...... - 0x00, 0x00, 0x00, 0x36, 0x00, 0x00, 0x08, 0xc2, 0x20, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, // ...6.... ....... - 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // @............... - 0x00, 0x80, 0x3f, 0x36, 0x00, 0x00, 0x05, 0xf2, 0x20, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x46, // ..?6.... ......F - 0x1e, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x36, 0x00, 0x00, 0x05, 0x32, 0x20, 0x10, 0x00, 0x02, // .......6...2 ... - 0x00, 0x00, 0x00, 0x46, 0x10, 0x10, 0x00, 0x02, 0x00, 0x00, 0x00, 0x3e, 0x00, 0x00, 0x01, 0x00, // ...F.......>.... - 0x03, 0x05, 0x00, 0x01, 0x00, 0x10, 0x00, 0x40, 0x00, // .......@. + 0x56, 0x53, 0x48, 0x0b, 0x00, 0x00, 0x00, 0x00, 0x01, 0x83, 0xf2, 0xe1, 0x01, 0x00, 0x0a, 0x75, // VSH............u + 0x5f, 0x76, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, // _viewProj....... + 0x00, 0x00, 0x00, 0x3c, 0x02, 0x00, 0x00, 0x44, 0x58, 0x42, 0x43, 0xf7, 0x40, 0x03, 0xbd, 0x59, // ...<...DXBC.@..Y + 0x4b, 0x0a, 0x7a, 0xe0, 0xf3, 0xad, 0xa1, 0xda, 0xcb, 0xc4, 0x1b, 0x01, 0x00, 0x00, 0x00, 0x3c, // K.z............< + 0x02, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x2c, 0x00, 0x00, 0x00, 0x9c, 0x00, 0x00, 0x00, 0x10, // .......,........ + 0x01, 0x00, 0x00, 0x49, 0x53, 0x47, 0x4e, 0x68, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x08, // ...ISGNh........ + 0x00, 0x00, 0x00, 0x50, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, // ...P............ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x0f, 0x00, 0x00, 0x56, 0x00, 0x00, 0x00, 0x00, // ...........V.... + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x03, // ................ + 0x03, 0x00, 0x00, 0x5f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, // ..._............ + 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x03, 0x03, 0x00, 0x00, 0x43, 0x4f, 0x4c, 0x4f, 0x52, // ...........COLOR + 0x00, 0x50, 0x4f, 0x53, 0x49, 0x54, 0x49, 0x4f, 0x4e, 0x00, 0x54, 0x45, 0x58, 0x43, 0x4f, 0x4f, // .POSITION.TEXCOO + 0x52, 0x44, 0x00, 0x4f, 0x53, 0x47, 0x4e, 0x6c, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x08, // RD.OSGNl........ + 0x00, 0x00, 0x00, 0x50, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x03, // ...P............ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x5c, 0x00, 0x00, 0x00, 0x00, // ................ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x0f, // ................ + 0x00, 0x00, 0x00, 0x62, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, // ...b............ + 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x03, 0x0c, 0x00, 0x00, 0x53, 0x56, 0x5f, 0x50, 0x4f, // ...........SV_PO + 0x53, 0x49, 0x54, 0x49, 0x4f, 0x4e, 0x00, 0x43, 0x4f, 0x4c, 0x4f, 0x52, 0x00, 0x54, 0x45, 0x58, // SITION.COLOR.TEX + 0x43, 0x4f, 0x4f, 0x52, 0x44, 0x00, 0xab, 0x53, 0x48, 0x45, 0x58, 0x24, 0x01, 0x00, 0x00, 0x50, // COORD..SHEX$...P + 0x00, 0x01, 0x00, 0x49, 0x00, 0x00, 0x00, 0x6a, 0x08, 0x00, 0x01, 0x59, 0x00, 0x00, 0x04, 0x46, // ...I...j...Y...F + 0x8e, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x5f, 0x00, 0x00, 0x03, 0xf2, // . ........._.... + 0x10, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5f, 0x00, 0x00, 0x03, 0x32, 0x10, 0x10, 0x00, 0x01, // ......._...2.... + 0x00, 0x00, 0x00, 0x5f, 0x00, 0x00, 0x03, 0x32, 0x10, 0x10, 0x00, 0x02, 0x00, 0x00, 0x00, 0x67, // ..._...2.......g + 0x00, 0x00, 0x04, 0xf2, 0x20, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x65, // .... ..........e + 0x00, 0x00, 0x03, 0xf2, 0x20, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x03, 0x32, // .... ......e...2 + 0x20, 0x10, 0x00, 0x02, 0x00, 0x00, 0x00, 0x68, 0x00, 0x00, 0x02, 0x01, 0x00, 0x00, 0x00, 0x38, // ......h.......8 + 0x00, 0x00, 0x08, 0x32, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x56, 0x15, 0x10, 0x00, 0x01, // ...2.......V.... + 0x00, 0x00, 0x00, 0x46, 0x80, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x32, // ...F. .........2 + 0x00, 0x00, 0x0a, 0x32, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x80, 0x20, 0x00, 0x00, // ...2.......F. .. + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x10, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x46, // ...............F + 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x32, 0x20, 0x10, 0x00, 0x00, // ...........2 ... + 0x00, 0x00, 0x00, 0x46, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x80, 0x20, 0x00, 0x00, // ...F.......F. .. + 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x36, 0x00, 0x00, 0x08, 0xc2, 0x20, 0x10, 0x00, 0x00, // .......6.... ... + 0x00, 0x00, 0x00, 0x02, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ....@........... + 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x3f, 0x36, 0x00, 0x00, 0x05, 0xf2, 0x20, 0x10, 0x00, 0x01, // ......?6.... ... + 0x00, 0x00, 0x00, 0x46, 0x1e, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x36, 0x00, 0x00, 0x05, 0x32, // ...F.......6...2 + 0x20, 0x10, 0x00, 0x02, 0x00, 0x00, 0x00, 0x46, 0x10, 0x10, 0x00, 0x02, 0x00, 0x00, 0x00, 0x3e, // ......F.......> + 0x00, 0x00, 0x01, 0x00, 0x03, 0x05, 0x00, 0x01, 0x00, 0x10, 0x00, 0x40, 0x00, // ...........@. }; -static const uint8_t vs_ocornut_imgui_mtl[855] = +static const uint8_t vs_ocornut_imgui_dxil[2649] = { - 0x56, 0x53, 0x48, 0x0b, 0x00, 0x00, 0x00, 0x00, 0x01, 0x83, 0xf2, 0xe1, 0x01, 0x00, 0x0a, 0x75, // VSH............u - 0x5f, 0x76, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x04, 0x01, 0x00, 0x00, 0x04, 0x00, 0x00, // _viewProj....... - 0x00, 0x00, 0x00, 0x26, 0x03, 0x00, 0x00, 0x23, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x20, // ...&...#include - 0x3c, 0x6d, 0x65, 0x74, 0x61, 0x6c, 0x5f, 0x73, 0x74, 0x64, 0x6c, 0x69, 0x62, 0x3e, 0x0a, 0x23, // .# - 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x20, 0x3c, 0x73, 0x69, 0x6d, 0x64, 0x2f, 0x73, 0x69, // include ..using nam - 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x20, 0x6d, 0x65, 0x74, 0x61, 0x6c, 0x3b, 0x0a, 0x0a, 0x73, // espace metal;..s - 0x74, 0x72, 0x75, 0x63, 0x74, 0x20, 0x5f, 0x47, 0x6c, 0x6f, 0x62, 0x61, 0x6c, 0x0a, 0x7b, 0x0a, // truct _Global.{. - 0x20, 0x20, 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x34, 0x78, 0x34, 0x20, 0x75, 0x5f, 0x76, // float4x4 u_v - 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x3b, 0x0a, 0x7d, 0x3b, 0x0a, 0x0a, 0x73, 0x74, 0x72, // iewProj;.};..str - 0x75, 0x63, 0x74, 0x20, 0x78, 0x6c, 0x61, 0x74, 0x4d, 0x74, 0x6c, 0x4d, 0x61, 0x69, 0x6e, 0x5f, // uct xlatMtlMain_ - 0x6f, 0x75, 0x74, 0x0a, 0x7b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x34, // out.{. float4 - 0x20, 0x5f, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x4f, 0x75, 0x74, 0x70, // _entryPointOutp - 0x75, 0x74, 0x5f, 0x76, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x20, 0x5b, 0x5b, 0x75, 0x73, // ut_v_color0 [[us - 0x65, 0x72, 0x28, 0x6c, 0x6f, 0x63, 0x6e, 0x30, 0x29, 0x5d, 0x5d, 0x3b, 0x0a, 0x20, 0x20, 0x20, // er(locn0)]];. - 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x32, 0x20, 0x5f, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x50, 0x6f, // float2 _entryPo - 0x69, 0x6e, 0x74, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x5f, 0x76, 0x5f, 0x74, 0x65, 0x78, 0x63, // intOutput_v_texc - 0x6f, 0x6f, 0x72, 0x64, 0x30, 0x20, 0x5b, 0x5b, 0x75, 0x73, 0x65, 0x72, 0x28, 0x6c, 0x6f, 0x63, // oord0 [[user(loc - 0x6e, 0x31, 0x29, 0x5d, 0x5d, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, // n1)]];. float - 0x34, 0x20, 0x67, 0x6c, 0x5f, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x5b, 0x5b, // 4 gl_Position [[ - 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x5d, 0x5d, 0x3b, 0x0a, 0x7d, 0x3b, 0x0a, 0x0a, // position]];.};.. - 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x20, 0x78, 0x6c, 0x61, 0x74, 0x4d, 0x74, 0x6c, 0x4d, 0x61, // struct xlatMtlMa - 0x69, 0x6e, 0x5f, 0x69, 0x6e, 0x0a, 0x7b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, // in_in.{. floa - 0x74, 0x34, 0x20, 0x61, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x20, 0x5b, 0x5b, 0x61, 0x74, // t4 a_color0 [[at - 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x28, 0x30, 0x29, 0x5d, 0x5d, 0x3b, 0x0a, 0x20, 0x20, // tribute(0)]];. - 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x32, 0x20, 0x61, 0x5f, 0x70, 0x6f, 0x73, 0x69, 0x74, // float2 a_posit - 0x69, 0x6f, 0x6e, 0x20, 0x5b, 0x5b, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x28, // ion [[attribute( - 0x31, 0x29, 0x5d, 0x5d, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x32, // 1)]];. float2 - 0x20, 0x61, 0x5f, 0x74, 0x65, 0x78, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x30, 0x20, 0x5b, 0x5b, 0x61, // a_texcoord0 [[a - 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x28, 0x32, 0x29, 0x5d, 0x5d, 0x3b, 0x0a, 0x7d, // ttribute(2)]];.} - 0x3b, 0x0a, 0x0a, 0x76, 0x65, 0x72, 0x74, 0x65, 0x78, 0x20, 0x78, 0x6c, 0x61, 0x74, 0x4d, 0x74, // ;..vertex xlatMt - 0x6c, 0x4d, 0x61, 0x69, 0x6e, 0x5f, 0x6f, 0x75, 0x74, 0x20, 0x78, 0x6c, 0x61, 0x74, 0x4d, 0x74, // lMain_out xlatMt - 0x6c, 0x4d, 0x61, 0x69, 0x6e, 0x28, 0x78, 0x6c, 0x61, 0x74, 0x4d, 0x74, 0x6c, 0x4d, 0x61, 0x69, // lMain(xlatMtlMai - 0x6e, 0x5f, 0x69, 0x6e, 0x20, 0x69, 0x6e, 0x20, 0x5b, 0x5b, 0x73, 0x74, 0x61, 0x67, 0x65, 0x5f, // n_in in [[stage_ - 0x69, 0x6e, 0x5d, 0x5d, 0x2c, 0x20, 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x74, 0x20, 0x5f, // in]], constant _ - 0x47, 0x6c, 0x6f, 0x62, 0x61, 0x6c, 0x26, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x75, 0x20, 0x5b, // Global& _mtl_u [ - 0x5b, 0x62, 0x75, 0x66, 0x66, 0x65, 0x72, 0x28, 0x30, 0x29, 0x5d, 0x5d, 0x29, 0x0a, 0x7b, 0x0a, // [buffer(0)]]).{. - 0x20, 0x20, 0x20, 0x20, 0x78, 0x6c, 0x61, 0x74, 0x4d, 0x74, 0x6c, 0x4d, 0x61, 0x69, 0x6e, 0x5f, // xlatMtlMain_ - 0x6f, 0x75, 0x74, 0x20, 0x6f, 0x75, 0x74, 0x20, 0x3d, 0x20, 0x7b, 0x7d, 0x3b, 0x0a, 0x20, 0x20, // out out = {};. - 0x20, 0x20, 0x6f, 0x75, 0x74, 0x2e, 0x67, 0x6c, 0x5f, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, // out.gl_Positio - 0x6e, 0x20, 0x3d, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x34, 0x28, 0x28, 0x5f, 0x6d, 0x74, 0x6c, // n = float4((_mtl - 0x5f, 0x75, 0x2e, 0x75, 0x5f, 0x76, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x20, 0x2a, 0x20, // _u.u_viewProj * - 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x34, 0x28, 0x69, 0x6e, 0x2e, 0x61, 0x5f, 0x70, 0x6f, 0x73, 0x69, // float4(in.a_posi - 0x74, 0x69, 0x6f, 0x6e, 0x2c, 0x20, 0x30, 0x2e, 0x30, 0x2c, 0x20, 0x31, 0x2e, 0x30, 0x29, 0x29, // tion, 0.0, 1.0)) - 0x2e, 0x78, 0x79, 0x2c, 0x20, 0x30, 0x2e, 0x30, 0x2c, 0x20, 0x31, 0x2e, 0x30, 0x29, 0x3b, 0x0a, // .xy, 0.0, 1.0);. - 0x20, 0x20, 0x20, 0x20, 0x6f, 0x75, 0x74, 0x2e, 0x5f, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x50, 0x6f, // out._entryPo - 0x69, 0x6e, 0x74, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x5f, 0x76, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, // intOutput_v_colo - 0x72, 0x30, 0x20, 0x3d, 0x20, 0x69, 0x6e, 0x2e, 0x61, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x30, // r0 = in.a_color0 - 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x6f, 0x75, 0x74, 0x2e, 0x5f, 0x65, 0x6e, 0x74, 0x72, 0x79, // ;. out._entry - 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x5f, 0x76, 0x5f, 0x74, 0x65, // PointOutput_v_te - 0x78, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x30, 0x20, 0x3d, 0x20, 0x69, 0x6e, 0x2e, 0x61, 0x5f, 0x74, // xcoord0 = in.a_t - 0x65, 0x78, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x30, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x72, 0x65, // excoord0;. re - 0x74, 0x75, 0x72, 0x6e, 0x20, 0x6f, 0x75, 0x74, 0x3b, 0x0a, 0x7d, 0x0a, 0x0a, 0x00, 0x03, 0x05, // turn out;.}..... - 0x00, 0x01, 0x00, 0x10, 0x00, 0x40, 0x00, // .....@. + 0x56, 0x53, 0x48, 0x0b, 0x00, 0x00, 0x00, 0x00, 0x01, 0x83, 0xf2, 0xe1, 0x01, 0x00, 0x0a, 0x75, // VSH............u + 0x5f, 0x76, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, // _viewProj....... + 0x00, 0x00, 0x00, 0x28, 0x0a, 0x00, 0x00, 0x44, 0x58, 0x42, 0x43, 0x81, 0x63, 0x84, 0xa1, 0x3b, // ...(...DXBC.c..; + 0xe4, 0xc6, 0xbf, 0x22, 0x3c, 0x64, 0x21, 0x49, 0xf5, 0xc7, 0xf2, 0x01, 0x00, 0x00, 0x00, 0x28, // ...".# + 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x20, 0x3c, 0x73, 0x69, 0x6d, 0x64, 0x2f, 0x73, 0x69, // include ..using nam + 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x20, 0x6d, 0x65, 0x74, 0x61, 0x6c, 0x3b, 0x0a, 0x0a, 0x73, // espace metal;..s + 0x74, 0x72, 0x75, 0x63, 0x74, 0x20, 0x5f, 0x47, 0x6c, 0x6f, 0x62, 0x61, 0x6c, 0x0a, 0x7b, 0x0a, // truct _Global.{. + 0x20, 0x20, 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x34, 0x78, 0x34, 0x20, 0x75, 0x5f, 0x76, // float4x4 u_v + 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x3b, 0x0a, 0x7d, 0x3b, 0x0a, 0x0a, 0x73, 0x74, 0x72, // iewProj;.};..str + 0x75, 0x63, 0x74, 0x20, 0x78, 0x6c, 0x61, 0x74, 0x4d, 0x74, 0x6c, 0x4d, 0x61, 0x69, 0x6e, 0x5f, // uct xlatMtlMain_ + 0x6f, 0x75, 0x74, 0x0a, 0x7b, 0x0a, 0x09, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x20, 0x62, 0x67, 0x66, // out.{..float bgf + 0x78, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x6c, 0x5f, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x53, 0x69, 0x7a, // x_metal_pointSiz + 0x65, 0x20, 0x5b, 0x5b, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x5d, 0x5d, // e [[point_size]] + 0x20, 0x3d, 0x20, 0x31, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x34, // = 1;. float4 + 0x20, 0x5f, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x4f, 0x75, 0x74, 0x70, // _entryPointOutp + 0x75, 0x74, 0x5f, 0x76, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x20, 0x5b, 0x5b, 0x75, 0x73, // ut_v_color0 [[us + 0x65, 0x72, 0x28, 0x6c, 0x6f, 0x63, 0x6e, 0x30, 0x29, 0x5d, 0x5d, 0x3b, 0x0a, 0x20, 0x20, 0x20, // er(locn0)]];. + 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x32, 0x20, 0x5f, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x50, 0x6f, // float2 _entryPo + 0x69, 0x6e, 0x74, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x5f, 0x76, 0x5f, 0x74, 0x65, 0x78, 0x63, // intOutput_v_texc + 0x6f, 0x6f, 0x72, 0x64, 0x30, 0x20, 0x5b, 0x5b, 0x75, 0x73, 0x65, 0x72, 0x28, 0x6c, 0x6f, 0x63, // oord0 [[user(loc + 0x6e, 0x31, 0x29, 0x5d, 0x5d, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, // n1)]];. float + 0x34, 0x20, 0x67, 0x6c, 0x5f, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x5b, 0x5b, // 4 gl_Position [[ + 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x5d, 0x5d, 0x3b, 0x0a, 0x7d, 0x3b, 0x0a, 0x0a, // position]];.};.. + 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x20, 0x78, 0x6c, 0x61, 0x74, 0x4d, 0x74, 0x6c, 0x4d, 0x61, // struct xlatMtlMa + 0x69, 0x6e, 0x5f, 0x69, 0x6e, 0x0a, 0x7b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, // in_in.{. floa + 0x74, 0x34, 0x20, 0x61, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x20, 0x5b, 0x5b, 0x61, 0x74, // t4 a_color0 [[at + 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x28, 0x30, 0x29, 0x5d, 0x5d, 0x3b, 0x0a, 0x20, 0x20, // tribute(0)]];. + 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x32, 0x20, 0x61, 0x5f, 0x70, 0x6f, 0x73, 0x69, 0x74, // float2 a_posit + 0x69, 0x6f, 0x6e, 0x20, 0x5b, 0x5b, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x28, // ion [[attribute( + 0x31, 0x29, 0x5d, 0x5d, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x32, // 1)]];. float2 + 0x20, 0x61, 0x5f, 0x74, 0x65, 0x78, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x30, 0x20, 0x5b, 0x5b, 0x61, // a_texcoord0 [[a + 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x28, 0x32, 0x29, 0x5d, 0x5d, 0x3b, 0x0a, 0x7d, // ttribute(2)]];.} + 0x3b, 0x0a, 0x0a, 0x76, 0x65, 0x72, 0x74, 0x65, 0x78, 0x20, 0x78, 0x6c, 0x61, 0x74, 0x4d, 0x74, // ;..vertex xlatMt + 0x6c, 0x4d, 0x61, 0x69, 0x6e, 0x5f, 0x6f, 0x75, 0x74, 0x20, 0x78, 0x6c, 0x61, 0x74, 0x4d, 0x74, // lMain_out xlatMt + 0x6c, 0x4d, 0x61, 0x69, 0x6e, 0x28, 0x78, 0x6c, 0x61, 0x74, 0x4d, 0x74, 0x6c, 0x4d, 0x61, 0x69, // lMain(xlatMtlMai + 0x6e, 0x5f, 0x69, 0x6e, 0x20, 0x69, 0x6e, 0x20, 0x5b, 0x5b, 0x73, 0x74, 0x61, 0x67, 0x65, 0x5f, // n_in in [[stage_ + 0x69, 0x6e, 0x5d, 0x5d, 0x2c, 0x20, 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x74, 0x20, 0x5f, // in]], constant _ + 0x47, 0x6c, 0x6f, 0x62, 0x61, 0x6c, 0x26, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x75, 0x20, 0x5b, // Global& _mtl_u [ + 0x5b, 0x62, 0x75, 0x66, 0x66, 0x65, 0x72, 0x28, 0x30, 0x29, 0x5d, 0x5d, 0x29, 0x0a, 0x7b, 0x0a, // [buffer(0)]]).{. + 0x20, 0x20, 0x20, 0x20, 0x78, 0x6c, 0x61, 0x74, 0x4d, 0x74, 0x6c, 0x4d, 0x61, 0x69, 0x6e, 0x5f, // xlatMtlMain_ + 0x6f, 0x75, 0x74, 0x20, 0x6f, 0x75, 0x74, 0x20, 0x3d, 0x20, 0x7b, 0x7d, 0x3b, 0x0a, 0x20, 0x20, // out out = {};. + 0x20, 0x20, 0x6f, 0x75, 0x74, 0x2e, 0x67, 0x6c, 0x5f, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, // out.gl_Positio + 0x6e, 0x20, 0x3d, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x34, 0x28, 0x28, 0x5f, 0x6d, 0x74, 0x6c, // n = float4((_mtl + 0x5f, 0x75, 0x2e, 0x75, 0x5f, 0x76, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x20, 0x2a, 0x20, // _u.u_viewProj * + 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x34, 0x28, 0x69, 0x6e, 0x2e, 0x61, 0x5f, 0x70, 0x6f, 0x73, 0x69, // float4(in.a_posi + 0x74, 0x69, 0x6f, 0x6e, 0x2c, 0x20, 0x30, 0x2e, 0x30, 0x2c, 0x20, 0x31, 0x2e, 0x30, 0x29, 0x29, // tion, 0.0, 1.0)) + 0x2e, 0x78, 0x79, 0x2c, 0x20, 0x30, 0x2e, 0x30, 0x2c, 0x20, 0x31, 0x2e, 0x30, 0x29, 0x3b, 0x0a, // .xy, 0.0, 1.0);. + 0x20, 0x20, 0x20, 0x20, 0x6f, 0x75, 0x74, 0x2e, 0x5f, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x50, 0x6f, // out._entryPo + 0x69, 0x6e, 0x74, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x5f, 0x76, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, // intOutput_v_colo + 0x72, 0x30, 0x20, 0x3d, 0x20, 0x69, 0x6e, 0x2e, 0x61, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x30, // r0 = in.a_color0 + 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x6f, 0x75, 0x74, 0x2e, 0x5f, 0x65, 0x6e, 0x74, 0x72, 0x79, // ;. out._entry + 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x5f, 0x76, 0x5f, 0x74, 0x65, // PointOutput_v_te + 0x78, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x30, 0x20, 0x3d, 0x20, 0x69, 0x6e, 0x2e, 0x61, 0x5f, 0x74, // xcoord0 = in.a_t + 0x65, 0x78, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x30, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x72, 0x65, // excoord0;. re + 0x74, 0x75, 0x72, 0x6e, 0x20, 0x6f, 0x75, 0x74, 0x3b, 0x0a, 0x7d, 0x0a, 0x0a, 0x00, 0x03, 0x05, // turn out;.}..... + 0x00, 0x01, 0x00, 0x10, 0x00, 0x40, 0x00, // .....@. }; extern const uint8_t* vs_ocornut_imgui_pssl; extern const uint32_t vs_ocornut_imgui_pssl_size; diff --git a/Modules/Moonlight/Source/Materials/DiffuseMaterial.h b/Modules/Moonlight/Source/Materials/DiffuseMaterial.h index 668197af..59dc2a6c 100644 --- a/Modules/Moonlight/Source/Materials/DiffuseMaterial.h +++ b/Modules/Moonlight/Source/Materials/DiffuseMaterial.h @@ -8,33 +8,37 @@ class DiffuseMaterial public: DiffuseMaterial() : Moonlight::Material( "DiffuseMaterial", "Assets/Shaders/Diffuse" ) - , s_diffuse( BGFX_INVALID_HANDLE ) - , s_tiling( BGFX_INVALID_HANDLE ) { - + SupportsInstancing = true; } void Init() override { - s_diffuse = bgfx::createUniform( "s_diffuse", bgfx::UniformType::Vec4 ); - s_tiling = bgfx::createUniform( "s_tiling", bgfx::UniformType::Vec4 ); + if ( !bgfx::isValid( s_diffuse ) ) + { + s_diffuse = bgfx::createUniform( "s_diffuse", bgfx::UniformType::Vec4 ); + } + if ( !bgfx::isValid( s_tiling ) ) + { + s_tiling = bgfx::createUniform( "s_tiling", bgfx::UniformType::Vec4 ); + } } virtual void Use() final { bgfx::setUniform( s_diffuse, &DiffuseColor.x ); + bgfx::setUniform( s_tiling, &Tiling.x ); } SharedPtr CreateInstance() final { - SharedPtr ptr = MakeShared( *this ); - - return ptr; + return MakeShared( *this ); } + private: - bgfx::UniformHandle s_diffuse; - bgfx::UniformHandle s_tiling; + inline static bgfx::UniformHandle s_diffuse = BGFX_INVALID_HANDLE; + inline static bgfx::UniformHandle s_tiling = BGFX_INVALID_HANDLE; }; class WhiteMaterial @@ -44,12 +48,13 @@ class WhiteMaterial WhiteMaterial() : Moonlight::Material( "WhiteMaterial", "Assets/Shaders/Diffuse" ) { - + SupportsInstancing = true; } WhiteMaterial( WhiteMaterial* ref ) : Moonlight::Material( "WhiteMaterial" ) { CopyValues( ref ); + SupportsInstancing = true; } diff --git a/Modules/Moonlight/Source/Primitives/Plane.h b/Modules/Moonlight/Source/Primitives/Plane.h index f8efdacd..2b01f36a 100644 --- a/Modules/Moonlight/Source/Primitives/Plane.h +++ b/Modules/Moonlight/Source/Primitives/Plane.h @@ -50,6 +50,7 @@ class PlaneMesh //verts[4].TexCoord = vert2.TexCoord; //this->vertices.push_back() MeshMaterial = MakeShared(); + MeshMaterial->Init(); InitMesh(); } diff --git a/Modules/Moonlight/Source/RenderCommands.h b/Modules/Moonlight/Source/RenderCommands.h index c78e87b0..8688bc45 100644 --- a/Modules/Moonlight/Source/RenderCommands.h +++ b/Modules/Moonlight/Source/RenderCommands.h @@ -60,6 +60,12 @@ namespace Moonlight uint64_t ID = 0u; int VisibilityIndex = 0; bool Visible = false; + + uint64_t BatchKey = 0u; + uint16_t VertexBufferIdx = UINT16_MAX; + uint16_t IndexBufferIdx = UINT16_MAX; + bool IsTransparent = false; + bool SupportsInstancing = false; }; struct LightCommand diff --git a/Modules/Moonlight/Source/Renderer.cpp b/Modules/Moonlight/Source/Renderer.cpp index 2080aa88..80da0b1e 100644 --- a/Modules/Moonlight/Source/Renderer.cpp +++ b/Modules/Moonlight/Source/Renderer.cpp @@ -13,6 +13,7 @@ #include "Graphics/MeshData.h" #include "Graphics/ShaderCommand.h" #include +#include #include "Resource/ResourceCache.h" #include #include @@ -58,7 +59,7 @@ namespace BGFX_STATE_PT_LINESTRIP, BGFX_STATE_PT_POINTS, }; - BX_STATIC_ASSERT( BX_COUNTOF( s_ptState ) == BX_COUNTOF( s_ptNames ) ); + static_assert( BX_COUNTOF( s_ptState ) == BX_COUNTOF( s_ptNames ) ); } @@ -83,35 +84,44 @@ namespace void BGFXRenderer::Create( const RendererCreationSettings& settings ) { + OPTICK_EVENT( "BGFXRenderer::Create" ); PreviousSize = settings.InitialSize; // Call bgfx::renderFrame before bgfx::init to signal to bgfx not to create a render thread. // Most graphics APIs must be used on the same thread that created the window. + BRUH("renderFrame"); bgfx::renderFrame(); + BRUH("renderFrame"); // Initialize bgfx using the native window handle and window resolution. bgfx::Init init; - init.platformData.nwh = settings.WindowPtr; - init.resolution.width = static_cast( PreviousSize.x ); + init.platformData.nwh = settings.WindowPtr; + init.platformData.ndt = settings.DisplayPtr; + init.platformData.type = settings.WindowType; + init.resolution.width = static_cast( PreviousSize.x ); init.resolution.height = static_cast( PreviousSize.y ); #if USING( ME_PLATFORM_MACOS ) init.resolution.reset = BGFX_RESET_VSYNC; #else - init.resolution.reset =/* BGFX_RESET_VSYNC |*/ BGFX_RESET_MSAA_X16; + init.resolution.reset = BGFX_RESET_NONE;// | BGFX_RESET_MSAA_X16; #endif #if USING( ME_PLATFORM_UWP ) // Something is up with using DX12 and my shaders, so this is the fix for now. init.type = bgfx::RendererType::Direct3D11; +#elif USING( ME_PLATFORM_LINUX ) + init.type = bgfx::RendererType::Vulkan; #endif m_resetFlags = init.resolution.reset; CurrentSize = settings.InitialSize; #if USING( ME_ENABLE_RENDERDOC ) RenderDoc = new RenderDocManager(); #endif - if( !bgfx::init( init ) ) { - CLog::Log( CLog::LogType::Error, "BGFX Failed to Init." ); - - return; + OPTICK_EVENT( "BGFXRenderer::bgfx_init" ); + if( !bgfx::init( init ) ) + { + CLog::Log( CLog::LogType::Error, "BGFX Failed to Init." ); + return; + } } // Set view 0 clear state. @@ -128,6 +138,7 @@ void BGFXRenderer::Create( const RendererCreationSettings& settings ) EditorCameraBuffer->ReCreate( m_resetFlags ); m_debugDraw.reset( new DebugDrawer() ); + //m_debugDraw->End(); //bgfx::setViewClear(1 // , BGFX_CLEAR_COLOR | BGFX_CLEAR_DEPTH // , 0x303030ff @@ -153,7 +164,8 @@ void BGFXRenderer::Create( const RendererCreationSettings& settings ) // Static data can be passed with bgfx::makeRef bgfx::makeRef( Moonlight::s_cubeTriList, sizeof( Moonlight::s_cubeTriList ) ) ); - + BRUH("Renderer assets"); + OPTICK_EVENT( "BGFXRenderer::LoadShaders" ); UIProgram = Moonlight::LoadProgram( "Assets/Shaders/UI.vert", "Assets/Shaders/UI.frag" ); s_texDiffuse = bgfx::createUniform( "s_texDiffuse", bgfx::UniformType::Sampler ); s_texNormal = bgfx::createUniform( "s_texNormal", bgfx::UniformType::Sampler ); @@ -178,8 +190,11 @@ void BGFXRenderer::Create( const RendererCreationSettings& settings ) TransparentIndicies.reserve( kMeshTransparencyTempSize ); #if USING( ME_IMGUI ) - ImGuiRender = new ImGuiRenderer(); - ImGuiRender->Create(); + { + OPTICK_EVENT( "BGFXRenderer::ImGuiCreate" ); + ImGuiRender = new ImGuiRenderer(); + ImGuiRender->Create(); + } #endif @@ -232,7 +247,7 @@ void BGFXRenderer::Render( Moonlight::CameraData& EditorCamera, FrameRenderData& PreviousSize = CurrentSize; bgfx::reset( (uint32_t)CurrentSize.x, (uint32_t)CurrentSize.y, m_resetFlags ); - bgfx::setViewRect( kClearView, 0, 0, bgfx::BackbufferRatio::Equal ); + //bgfx::setViewRect( kClearView, 0, 0, bgfx::BackbufferRatio::Equal ); if( NeedsReset ) { for( auto& cam : m_cameraCache.Commands ) @@ -422,6 +437,34 @@ void BGFXRenderer::RenderCameraView( Moonlight::CameraData& camera, bgfx::ViewId } TransparentIndicies.clear(); + + for( size_t b = 0; b < m_activeBatchCount; ++b ) + { + m_instanceBatches[b].transforms.clear(); + } + m_activeBatchCount = 0; + + auto getBatch = [this]( uint16_t vbh, uint16_t ibh, uint64_t key, size_t cmdIndex ) -> InstanceBatch& { + for( size_t b = 0; b < m_activeBatchCount; ++b ) + { + InstanceBatch& batch = m_instanceBatches[b]; + if( batch.vertexBuffer == vbh && batch.indexBuffer == ibh && batch.materialKey == key ) + { + return batch; + } + } + if( m_activeBatchCount == m_instanceBatches.size() ) + { + m_instanceBatches.emplace_back(); + } + InstanceBatch& batch = m_instanceBatches[m_activeBatchCount++]; + batch.vertexBuffer = vbh; + batch.indexBuffer = ibh; + batch.materialKey = key; + batch.representativeIndex = cmdIndex; + return batch; + }; + { OPTICK_CATEGORY( "Meshes", Optick::Category::GPU_Scene ); bool hasCullingInfo = camera.ShouldCull && !camera.VisibleFlags.empty(); @@ -439,22 +482,34 @@ void BGFXRenderer::RenderCameraView( Moonlight::CameraData& camera, bgfx::ViewId continue; } - if( mesh.MeshMaterial->IsTransparent() ) + if( mesh.IsTransparent ) { TransparentIndicies.push_back( i ); continue; } - //float dist = glm::distance( camera.Position.InternalVector, glm::vec3( mesh.Transform[3] ) ); - //if( dist <= camera.Far ) - //m_debugDraw->Push(); - //m_debugDraw->Draw(&mesh.Transform[0][0]); - //m_debugDraw->Pop(); + if( mesh.SupportsInstancing && mesh.VertexBufferIdx != UINT16_MAX ) + { + InstanceBatch& batch = getBatch( mesh.VertexBufferIdx, mesh.IndexBufferIdx, mesh.BatchKey, i ); + batch.transforms.push_back( mesh.Transform ); + continue; + } + RenderSingleMesh( id, mesh, state ); } } } + { + OPTICK_CATEGORY( "Instanced Meshes", Optick::Category::GPU_Scene ); + + for( size_t b = 0; b < m_activeBatchCount; ++b ) + { + InstanceBatch& batch = m_instanceBatches[b]; + RenderMeshInstanced( id, m_meshCache.Commands[batch.representativeIndex], batch.transforms.data(), (uint32_t)batch.transforms.size(), state ); + } + } + { OPTICK_CATEGORY( "Transparent Sorting", Optick::Category::Camera ); ME_ASSERT_MSG( TransparentIndicies.size() < kMeshTransparencyTempSize, "Transparent Indicies vector was resized, consider upping the cached size." ); @@ -483,7 +538,15 @@ void BGFXRenderer::RenderCameraView( Moonlight::CameraData& camera, bgfx::ViewId for( auto index : TransparentIndicies ) { - RenderSingleMesh( id, m_meshCache.Commands[index], transparentState ); + const Moonlight::MeshCommand& mesh = m_meshCache.Commands[index]; + if( mesh.SupportsInstancing ) + { + RenderMeshInstanced( id, mesh, &mesh.Transform, 1, transparentState ); + } + else + { + RenderSingleMesh( id, mesh, transparentState ); + } } } @@ -550,83 +613,71 @@ void BGFXRenderer::RenderCameraView( Moonlight::CameraData& camera, bgfx::ViewId } } -void BGFXRenderer::RenderSingleMesh( bgfx::ViewId id, const Moonlight::MeshCommand& mesh, uint64_t state ) +bgfx::ProgramHandle BGFXRenderer::BindMeshDrawState( const Moonlight::MeshCommand& mesh, uint64_t state ) { - OPTICK_CATEGORY( "Mesh", Optick::Category::Rendering ); -//if (mesh.Type == Moonlight::Cube) - //{ - // if (mesh.MeshMaterial) - // { - // // Set model matrix for rendering. - // bgfx::setTransform(&mesh.Transform); - - // // Set vertex and index buffer. - // bgfx::setVertexBuffer(0, m_vbh); - // bgfx::setIndexBuffer(m_ibh); - - // mesh.MeshMaterial->Use(); - - // // Set render states. - // bgfx::setState(state); - - // // Submit primitive for rendering to view 0. - // bgfx::submit(id, mesh.MeshMaterial->MeshShader.GetProgram()); - // } - //} - //else - if( mesh.Type == Moonlight::MeshType::Model || mesh.Type == Moonlight::MeshType::Plane || mesh.Type == Moonlight::Cube ) + // Set vertex and index buffer. + bgfx::setVertexBuffer( 0, mesh.SingleMesh->GetVertexBuffer() ); + bgfx::setIndexBuffer( mesh.SingleMesh->GetIndexuffer() ); + + if( const Moonlight::Texture* diffuse = mesh.MeshMaterial->GetTexture( Moonlight::TextureType::Diffuse ) ) { - if( !mesh.SingleMesh || !bgfx::isValid(mesh.SingleMesh->GetVertexBuffer() ) ) + if( bgfx::isValid( diffuse->TexHandle ) ) { - return; + bgfx::setTexture( 0, s_texDiffuse, diffuse->TexHandle ); } + } - // Set model matrix for rendering. - bgfx::setTransform( &mesh.Transform ); - - // Set vertex and index buffer. - bgfx::setVertexBuffer( 0, mesh.SingleMesh->GetVertexBuffer() ); - bgfx::setIndexBuffer( mesh.SingleMesh->GetIndexuffer() ); - - if( const Moonlight::Texture* diffuse = mesh.MeshMaterial->GetTexture( Moonlight::TextureType::Diffuse ) ) + if( const Moonlight::Texture* normal = mesh.MeshMaterial->GetTexture( Moonlight::TextureType::Normal ) ) + { + if( bgfx::isValid( normal->TexHandle ) ) { - if( bgfx::isValid( diffuse->TexHandle ) ) - { - bgfx::setTexture( 0, s_texDiffuse, diffuse->TexHandle ); - } + bgfx::setTexture( 1, s_texNormal, normal->TexHandle ); } + } + else + { + bgfx::setTexture( 1, s_texNormal, m_defaultOpacityTexture->TexHandle ); + } - if( const Moonlight::Texture* normal = mesh.MeshMaterial->GetTexture( Moonlight::TextureType::Normal ) ) - { - if( bgfx::isValid( normal->TexHandle ) ) - { - bgfx::setTexture( 1, s_texNormal, normal->TexHandle ); - } - } - else + if( const Moonlight::Texture* opacity = mesh.MeshMaterial->GetTexture( Moonlight::TextureType::Opacity ) ) + { + if( bgfx::isValid( opacity->TexHandle ) ) { - bgfx::setTexture( 1, s_texNormal, m_defaultOpacityTexture->TexHandle ); + bgfx::setTexture( 2, s_texAlpha, opacity->TexHandle ); } + } + else + { + bgfx::setTexture( 2, s_texAlpha, m_defaultOpacityTexture->TexHandle ); + } - if( const Moonlight::Texture* opacity = mesh.MeshMaterial->GetTexture( Moonlight::TextureType::Opacity ) ) - { - if( bgfx::isValid( opacity->TexHandle ) ) - { - bgfx::setTexture( 2, s_texAlpha, opacity->TexHandle ); - } - } - else + mesh.MeshMaterial->Use(); + + // Set render states. + bgfx::setState( mesh.MeshMaterial->GetRenderState( state ) ); + + return mesh.MeshMaterial->MeshShader.GetProgram(); +} + + +void BGFXRenderer::RenderSingleMesh( bgfx::ViewId id, const Moonlight::MeshCommand& mesh, uint64_t state ) +{ + OPTICK_CATEGORY( "Mesh", Optick::Category::Rendering ); + + if( mesh.Type == Moonlight::MeshType::Model || mesh.Type == Moonlight::MeshType::Plane || mesh.Type == Moonlight::Cube ) + { + if( !mesh.SingleMesh || !bgfx::isValid(mesh.SingleMesh->GetVertexBuffer() ) ) { - bgfx::setTexture( 2, s_texAlpha, m_defaultOpacityTexture->TexHandle ); + return; } - mesh.MeshMaterial->Use(); + // Set model matrix for rendering. + bgfx::setTransform( &mesh.Transform ); - // Set render states. - bgfx::setState( mesh.MeshMaterial->GetRenderState( state ) ); + bgfx::ProgramHandle program = BindMeshDrawState( mesh, state ); // Submit primitive for rendering to view 0. - bgfx::submit( id, mesh.MeshMaterial->MeshShader.GetProgram() ); + bgfx::submit( id, program ); } else { @@ -634,6 +685,40 @@ void BGFXRenderer::RenderSingleMesh( bgfx::ViewId id, const Moonlight::MeshComma } } + +void BGFXRenderer::RenderMeshInstanced( bgfx::ViewId id, const Moonlight::MeshCommand& representative, const glm::mat4* transforms, uint32_t count, uint64_t state ) +{ + if( count == 0 || transforms == nullptr || !representative.SingleMesh || !bgfx::isValid( representative.SingleMesh->GetVertexBuffer() ) ) + { + return; + } + + constexpr uint16_t kInstanceStride = sizeof( glm::mat4 ); + + uint32_t remaining = count; + uint32_t offset = 0; + while( remaining > 0 ) + { + const uint32_t available = bgfx::getAvailInstanceDataBuffer( remaining, kInstanceStride ); + if( available == 0 ) + { + break; + } + + bgfx::InstanceDataBuffer idb; + bgfx::allocInstanceDataBuffer( &idb, available, kInstanceStride ); + std::memcpy( idb.data, transforms + offset, (size_t)available * kInstanceStride ); + + bgfx::ProgramHandle program = BindMeshDrawState( representative, state ); + bgfx::setInstanceDataBuffer( &idb ); + + bgfx::submit( id, program ); + + offset += available; + remaining -= available; + } +} + void BGFXRenderer::WindowResized( const Vector2& newSize ) { if( CurrentSize == newSize ) diff --git a/Modules/Moonlight/Source/Renderer.h b/Modules/Moonlight/Source/Renderer.h index e433a9fb..96223d5b 100644 --- a/Modules/Moonlight/Source/Renderer.h +++ b/Modules/Moonlight/Source/Renderer.h @@ -27,6 +27,8 @@ namespace Moonlight { struct RendererCreationSettings { void* WindowPtr = nullptr; + void* DisplayPtr = nullptr; + bgfx::NativeWindowHandleType::Enum WindowType = bgfx::NativeWindowHandleType::Default; Vector2 InitialSize = Vector2( 1280.f, 720.f ); bool InitAssets = true; }; @@ -69,6 +71,8 @@ class BGFXRenderer void RenderSingleMesh( bgfx::ViewId id, const Moonlight::MeshCommand& mesh, uint64_t state ); + void RenderMeshInstanced( bgfx::ViewId id, const Moonlight::MeshCommand& representative, const glm::mat4* transforms, uint32_t count, uint64_t state ); + void WindowResized( const Vector2& newSize ); uint32_t GetResetFlags() const; @@ -102,6 +106,19 @@ class BGFXRenderer #endif private: + bgfx::ProgramHandle BindMeshDrawState( const Moonlight::MeshCommand& mesh, uint64_t state ); + + struct InstanceBatch + { + uint16_t vertexBuffer = 0; + uint16_t indexBuffer = 0; + uint64_t materialKey = 0; + size_t representativeIndex = 0; + std::vector transforms; + }; + std::vector m_instanceBatches; + size_t m_activeBatchCount = 0; + Vector2 PreviousSize; Vector2 CurrentSize; uint32_t m_resetFlags = 0u; diff --git a/Modules/Moonlight/Source/Utils/BGFXUtils.cpp b/Modules/Moonlight/Source/Utils/BGFXUtils.cpp index e9c93f0a..4fd197df 100644 --- a/Modules/Moonlight/Source/Utils/BGFXUtils.cpp +++ b/Modules/Moonlight/Source/Utils/BGFXUtils.cpp @@ -21,7 +21,7 @@ const bgfx::Memory* Moonlight::LoadMemory( const Path& filePath ) if( err && !err->isOk() ) { - YIKES_FMT( "[%s]: %s", filePath.GetLocalPathString().c_str(), err->getMessage().getPtr() ); + YIKES_FMT( "[%s]: %s", filePath.GetLocalPathString().c_str(), err->getMessage().getCPtr() ); } //if (filePath.Exists) diff --git a/Modules/Moonlight/Source/Utils/BGFXUtils.h b/Modules/Moonlight/Source/Utils/BGFXUtils.h index dbe1b969..bc8458d3 100644 --- a/Modules/Moonlight/Source/Utils/BGFXUtils.h +++ b/Modules/Moonlight/Source/Utils/BGFXUtils.h @@ -23,7 +23,7 @@ namespace Moonlight { String filePath( s_currentDir ); filePath.append( _filePath ); - return super::open( filePath.getPtr(), _err ); + return super::open( filePath.getCPtr(), _err ); } }; @@ -36,7 +36,7 @@ namespace Moonlight { String filePath( s_currentDir ); filePath.append( _filePath ); - return super::open( filePath.getPtr(), _append, _err ); + return super::open( filePath.getCPtr(), _append, _err ); } }; diff --git a/Modules/ScriptCore/ScriptCore.sharpmake.cs b/Modules/ScriptCore/ScriptCore.sharpmake.cs index 9196af0b..64a5a53b 100644 --- a/Modules/ScriptCore/ScriptCore.sharpmake.cs +++ b/Modules/ScriptCore/ScriptCore.sharpmake.cs @@ -1,4 +1,5 @@ using System.IO; +using System.Linq; using Sharpmake; using static Sharpmake.Options; @@ -9,15 +10,21 @@ public ScriptCore() : base(typeof(CommonTarget)) { Name = "ScriptCore"; - SourceRootPath = Path.Combine(Globals.RootDir, "Engine/Modules/ScriptCore/Source"); - AdditionalSourceRootPaths.Add(Path.Combine(Globals.RootDir, "Assets")); + + SourceRootPath = @"[project.SharpmakeCsPath]\Source"; string[] ignoredAssets = { ".xml", ".map", ".config", ".bat", ".txt", ".xsd", ".h.template", ".resx", ".cur" }; NoneExtensions.Remove(ignoredAssets); SourceFilesExtensions = new Strings("cs"); - ProjectSchema = CSharpProjectSchema.NetFramework; + ProjectSchema = CSharpProjectSchema.NetCore; + + // SDK-style projects need an explicit or VS falls back to AnyCPU. + // #TODO: this + NetCore schema + unsafe blocks + ignoredAssets is duplicated in GameScript. + // factor the shared managed-project setup into a common base when there's a third one. + CustomProperties.Add("Configurations", GetConfigurationsList()); + CustomProperties.Add("Platforms", "x64"); AddTargets(CommonTarget.GetDefaultTargets()); } @@ -30,28 +37,47 @@ public virtual void ConfigureAll(Configuration conf, CommonTarget target) conf.SolutionFolder = "Engine"; conf.TargetPath = "$(SolutionDir).build/[target.Name]/"; - conf.ProjectPath = @"[project.SharpmakeCsPath]/.tmp/project/[target.Framework]"; - CSharpProjectExtensions.AddAspNetReferences(conf); - //conf.ReferencesByPath.Add(@"[project.SharpmakeCsPath]/Engine/Tools/Sharpmake/Sharpmake.dll"); - //conf.ReferencesByPath.Add(@"[project.SharpmakeCsPath]/Engine/Tools/Sharpmake/Sharpmake.Generators.dll"); - + conf.ProjectPath = @"[project.SharpmakeCsPath]\.tmp\project"; + conf.Options.Add(Options.CSharp.DebugSymbols.Enabled); conf.Options.Add(Options.CSharp.DebugType.Pdbonly); - //conf.CustomAdditionalOptions.Add("/p:DebugType=portable"); - //conf.CustomAdditionalOptions.Add("/p:DebugSymbols=true"); + conf.Options.Add(Options.CSharp.AllowUnsafeBlocks.Enabled); + } + + // built from the targets Sharpmake expands, so it stays in sync. + public static string GetConfigurationsList() + { + var names = new System.Collections.Generic.HashSet(); + var optimizations = new[] { Optimization.Debug, Optimization.Release, Optimization.Retail }; + + foreach (var t in CommonTarget.GetDefaultTargets()) + { + foreach (var opt in optimizations) + { + if ((t.Optimization & opt) == 0) continue; + + string name = t.SelectedMode == CommonTarget.Mode.Editor + ? $"{t.SelectedMode}_{opt}" + : $"{t.SelectedMode}_{t.SubPlatform}_{opt}"; + names.Add(name); + } + } + + return string.Join(";", names.OrderBy(n => n)); } } [Generate] public abstract class GameScript : CSharpProject -{ +{ public GameScript() : base(typeof(CommonTarget)) { Name = "Game.Script"; - SourceRootPath = Path.Combine(Globals.RootDir, "Assets"); - //SourceFiles.Add(@"[project.SharpmakeCsPath]/Assets/Scripts/TestScript.cs"); + // SharpmakeCsPath is the subclass's dir (Game.sharpmake.cs), which sits next to Assets. + SourceRootPath = Path.Combine(SharpmakeCsPath, "Assets"); + string[] ignoredAssets = { ".xml", ".map", ".config", ".bat", ".txt", ".xsd", ".h.template", ".resx", ".cur" }; NoneExtensions.Remove(ignoredAssets); @@ -59,7 +85,10 @@ public GameScript() ContentExtension.Add("GenerateSolution.bat", "macOS.yml", "Windows.yml", "UWP.yml"); - ProjectSchema = CSharpProjectSchema.NetFramework; + ProjectSchema = CSharpProjectSchema.NetCore; + CustomProperties.Add("Configurations", ScriptCore.GetConfigurationsList()); + CustomProperties.Add("Platforms", "x64"); + AddTargets(CommonTarget.GetDefaultTargets()); } @@ -70,7 +99,8 @@ public virtual void ConfigureAll(Configuration conf, CommonTarget target) conf.ProjectFileName = @"[project.Name]_[target.Platform]"; conf.SolutionFolder = "Apps/Game"; + conf.ProjectPath = Path.Combine(SharpmakeCsPath, ".tmp/project/GameScript"); conf.TargetPath = "$(SolutionDir).build/[target.Name]/"; - conf.ReferencesByPath.Add(@"[project.SharpmakeCsPath].build/[target.Name]/ScriptCore.dll"); + conf.AddPublicDependency(target); } } diff --git a/Modules/ScriptCore/Source/Components/BasicUIView.cs b/Modules/ScriptCore/Source/Components/BasicUIView.cs index 773b6d7a..767ebf58 100644 --- a/Modules/ScriptCore/Source/Components/BasicUIView.cs +++ b/Modules/ScriptCore/Source/Components/BasicUIView.cs @@ -1,14 +1,9 @@ -using System; -using System.Runtime.CompilerServices; +namespace ScriptCore; -public class BasicUIView - : Component +public class BasicUIView : Component { public void ExecuteJS(string inJS) { - BasicUIView_ExecuteJS(Parent.EntID, inJS); + unsafe { fixed (byte* p = Engine.Utf8(inJS)) Engine._api.BasicUIView_ExecuteJS(Entity, p); } } - - [MethodImplAttribute(MethodImplOptions.InternalCall)] - public extern static void BasicUIView_ExecuteJS(EntityID id, string inJS); } diff --git a/Modules/ScriptCore/Source/Components/Camera.cs b/Modules/ScriptCore/Source/Components/Camera.cs index bb247d21..7f905e6a 100644 --- a/Modules/ScriptCore/Source/Components/Camera.cs +++ b/Modules/ScriptCore/Source/Components/Camera.cs @@ -1,25 +1,10 @@ -using System; -using System.Runtime.CompilerServices; +namespace ScriptCore; -public class Camera - : Component +public class Camera : Component { public Vector3 ClearColor { - get - { - Camera_GetClearColor(Parent.EntID, out Vector3 clearColor); - return clearColor; - } - set - { - Camera_SetClearColor(Parent.EntID, ref value); - } + get { unsafe { Vector3 v; Engine._api.Camera_GetClearColor(Entity, &v); return v; } } + set { unsafe { Engine._api.Camera_SetClearColor(Entity, &value); } } } - - [MethodImplAttribute(MethodImplOptions.InternalCall)] - extern static void Camera_GetClearColor(EntityID id, out Vector3 clearColor); - - [MethodImplAttribute(MethodImplOptions.InternalCall)] - extern static void Camera_SetClearColor(EntityID id, ref Vector3 clearColor); } diff --git a/Modules/ScriptCore/Source/Components/Transform.cs b/Modules/ScriptCore/Source/Components/Transform.cs index d9b5e80e..82824e43 100644 --- a/Modules/ScriptCore/Source/Components/Transform.cs +++ b/Modules/ScriptCore/Source/Components/Transform.cs @@ -1,43 +1,23 @@ -using System; -using System.Runtime.CompilerServices; +namespace ScriptCore; public class Transform : Component { - public Vector3 Translation + public Vector3 Position { - get - { - Entity_GetTranslation(Parent.EntID, out Vector3 translation); - return translation; - } - set - { - Entity_SetTranslation(Parent.EntID, ref value); - } + get { unsafe { Vector3 v; Engine._api.Transform_GetTranslation(Entity, &v); return v; } } + set { unsafe { Engine._api.Transform_SetTranslation(Entity, &value); } } } - [MethodImplAttribute(MethodImplOptions.InternalCall)] - extern static void Entity_GetTranslation(EntityID id, out Vector3 translation); - - [MethodImplAttribute(MethodImplOptions.InternalCall)] - extern static void Entity_SetTranslation(EntityID id, ref Vector3 translation); - public Vector3 Scale { - get - { - Transform_GetScale(Parent.EntID, out Vector3 scale); - return scale; - } - set - { - Transform_SetScale(Parent.EntID, ref value); - } + get { unsafe { Vector3 v; Engine._api.Transform_GetScale(Entity, &v); return v; } } + set { unsafe { Engine._api.Transform_SetScale(Entity, &value); } } } - [MethodImplAttribute(MethodImplOptions.InternalCall)] - extern static void Transform_GetScale(EntityID id, out Vector3 scale); - - [MethodImplAttribute(MethodImplOptions.InternalCall)] - extern static void Transform_SetScale(EntityID id, ref Vector3 scale); + // Euler + public Vector3 Rotation + { + get { unsafe { Vector3 v; Engine._api.Transform_GetRotation(Entity, &v); return v; } } + set { unsafe { Engine._api.Transform_SetRotation(Entity, &value); } } + } } diff --git a/Modules/ScriptCore/Source/Core/Component.cs b/Modules/ScriptCore/Source/Core/Component.cs index af1cbc3e..348c3cc3 100644 --- a/Modules/ScriptCore/Source/Core/Component.cs +++ b/Modules/ScriptCore/Source/Core/Component.cs @@ -1,44 +1,38 @@ using System; -using System.Collections.Generic; -public class MEObject -{ - -} +namespace ScriptCore; -public abstract class Component : MEObject +// stateless proxy, just marshalling really +public abstract class Component { - public Entity _parent; - public Entity Parent => _parent; + public Entity Entity { get; internal set; } - public T GetComponent() where T : Component, new() - { - if (Parent == null) - { - return null; - } + // if the entity is being observed by the world in any capacity, you cannot hide in silence + public bool Exists => Entity.IsAlive && Entity.HasComponentNamed(GetType().Name); - return Parent.GetComponent(); - } + public Transform transform => Entity.GetComponent(); + public T GetComponent() where T : Component, new() => Entity.GetComponent(); + public bool HasComponent() where T : Component, new() => Entity.HasComponent(); + public T AddComponent() where T : Component, new() => Entity.AddComponent(); - public bool HasComponent() where T : Component + public bool Equals(Component other) { - if (Parent == null) - { - return false; - } - - return Parent.HasComponent(); + bool meNull = !Exists; + bool otherNull = other is null || !other.Exists; + if (meNull || otherNull) return meNull && otherNull; + return Entity == other.Entity && GetType() == other.GetType(); } - public T AddComponent() where T : Component, new() - { - if (Parent == null) - { - Console.WriteLine("NULL PARENT"); - return null; - } + public override bool Equals(object obj) => Equals(obj as Component); + public override int GetHashCode() => HashCode.Combine(GetType(), Entity.Index, Entity.Counter); - return Parent.AddComponent(); + public static bool operator ==(Component a, Component b) + { + bool aNull = a is null || !a.Exists; + bool bNull = b is null || !b.Exists; + if (aNull || bNull) return aNull && bNull; + return a.Entity == b.Entity && a.GetType() == b.GetType(); } + + public static bool operator !=(Component a, Component b) => !(a == b); } diff --git a/Modules/ScriptCore/Source/Core/Debug.cs b/Modules/ScriptCore/Source/Core/Debug.cs index 6b506b29..6ea658b4 100644 --- a/Modules/ScriptCore/Source/Core/Debug.cs +++ b/Modules/ScriptCore/Source/Core/Debug.cs @@ -1,20 +1,10 @@ -using System.Runtime.CompilerServices; +namespace ScriptCore; -public class Debug +// TODO: errything an error for now +public static class Debug { - [MethodImplAttribute( MethodImplOptions.InternalCall )] - public static extern void Log( string inString ); - - [MethodImplAttribute( MethodImplOptions.InternalCall )] - public static extern void Error( string inString ); - - public static void Log( object inObject ) - { - Log( inObject.ToString() ); - } - - public static void Error( object inObject ) - { - Error( inObject.ToString() ); - } + public static void Log(string inString) => Engine.Log(inString); + public static void Log(object inObject) => Engine.Log(inObject?.ToString() ?? "null"); + public static void Error(string inString) => Engine.Log(inString); + public static void Error(object inObject) => Engine.Log(inObject?.ToString() ?? "null"); } diff --git a/Modules/ScriptCore/Source/Core/Entity.cs b/Modules/ScriptCore/Source/Core/Entity.cs new file mode 100644 index 00000000..3dbac484 --- /dev/null +++ b/Modules/ScriptCore/Source/Core/Entity.cs @@ -0,0 +1,74 @@ +using System; +using System.Runtime.InteropServices; +using System.Text; + +namespace ScriptCore; + +// struct because it's mapped to the engine EntityID struct. don't fuckin add anything to this <3 or at least update it to reflect it +[StructLayout(LayoutKind.Sequential)] +public readonly struct Entity : IEquatable +{ + public static readonly Entity Null = default; // {0, 0} + + public readonly ulong Index; + public readonly ulong Counter; + + public Entity(ulong inIndex, ulong inCounter) + { + Index = inIndex; + Counter = inCounter; + } + + public bool IsAlive { get { unsafe { return Engine._api.Entity_IsAlive(this) != 0; } } } + + // what is life? + public static implicit operator bool(Entity e) => e.IsAlive; + + public bool HasComponent() where T : Component, new() + { + unsafe { fixed (byte* p = ComponentName.Utf8) return Engine._api.Entity_HasComponent(this, p) != 0; } + } + + public T GetComponent() where T : Component, new() + => HasComponent() ? new T { Entity = this } : null; + + public bool TryGetComponent(out T component) where T : Component, new() + { + if (HasComponent()) + { + component = new T { Entity = this }; + return true; + } + component = null; + return false; + } + + public T AddComponent() where T : Component, new() + { + unsafe { fixed (byte* p = ComponentName.Utf8) Engine._api.Entity_AddComponent(this, p); } + return GetComponent(); + } + + public Transform Transform => GetComponent(); + + // used by Component's fake-null check, where the type is only known at runtime. + internal bool HasComponentNamed(string inName) + { + var bytes = Encoding.UTF8.GetBytes(inName + "\0"); + unsafe { fixed (byte* p = bytes) return Engine._api.Entity_HasComponent(this, p) != 0; } + } + + public bool Equals(Entity o) => Index == o.Index && Counter == o.Counter; + public override bool Equals(object? obj) => obj is Entity e && Equals(e); + public override int GetHashCode() => HashCode.Combine(Index, Counter); + public static bool operator ==(Entity a, Entity b) => a.Equals(b); + public static bool operator !=(Entity a, Entity b) => !a.Equals(b); + + public override string ToString() => $"Entity({Index}:{Counter})"; +} + +// pre-cache per typename so HasComponent/GetComponent doesn't re-marshal the string on every single call. +internal static class ComponentName +{ + public static readonly byte[] Utf8 = Encoding.UTF8.GetBytes(typeof(T).Name + "\0"); +} diff --git a/Modules/ScriptCore/Source/Core/Input.cs b/Modules/ScriptCore/Source/Core/Input.cs index 82d32cea..81b0ea7a 100644 --- a/Modules/ScriptCore/Source/Core/Input.cs +++ b/Modules/ScriptCore/Source/Core/Input.cs @@ -1,4 +1,4 @@ -using System.Runtime.CompilerServices; +namespace ScriptCore; // this is clearly a problem public enum SDLKey : int @@ -368,56 +368,52 @@ footnotes in USB doc */ SDL_NUM_SCANCODES = 512 /**< not a key, just marks the number of scancodes for array bounds */ }; + +// script friendly names for my SDL garbage public enum KeyCode : int { - Unknown = SDLKey.SDL_SCANCODE_UNKNOWN, - - /** - * \name Usage page 0x07 - * - * These values are from usage page 0x07 (USB keyboard page). - */ - /* @{ */ + None = SDLKey.SDL_SCANCODE_UNKNOWN, A = SDLKey.SDL_SCANCODE_A, - B = SDLKey.SDL_SCANCODE_B, - C = SDLKey.SDL_SCANCODE_C, - D = SDLKey.SDL_SCANCODE_D, - E = SDLKey.SDL_SCANCODE_E, - F = SDLKey.SDL_SCANCODE_F, - G = SDLKey.SDL_SCANCODE_G, - H = SDLKey.SDL_SCANCODE_H, - I = SDLKey.SDL_SCANCODE_I, - J = SDLKey.SDL_SCANCODE_J, - K = SDLKey.SDL_SCANCODE_K, - L = SDLKey.SDL_SCANCODE_L, - M = SDLKey.SDL_SCANCODE_M, - N = SDLKey.SDL_SCANCODE_N, - O = SDLKey.SDL_SCANCODE_O, - P = SDLKey.SDL_SCANCODE_P, - Q = SDLKey.SDL_SCANCODE_Q, - R = SDLKey.SDL_SCANCODE_R, - S = SDLKey.SDL_SCANCODE_S, - T = SDLKey.SDL_SCANCODE_T, - U = SDLKey.SDL_SCANCODE_U, - V = SDLKey.SDL_SCANCODE_V, - W = SDLKey.SDL_SCANCODE_W, - X = SDLKey.SDL_SCANCODE_X, - Y = SDLKey.SDL_SCANCODE_Y, - Z = SDLKey.SDL_SCANCODE_Z, - - Num1 = SDLKey.SDL_SCANCODE_1, - Num2 = SDLKey.SDL_SCANCODE_2, - Num3 = SDLKey.SDL_SCANCODE_3, - Num4 = SDLKey.SDL_SCANCODE_4, - Num5 = SDLKey.SDL_SCANCODE_5, - Num6 = SDLKey.SDL_SCANCODE_6, - Num7 = SDLKey.SDL_SCANCODE_7, - Num8 = SDLKey.SDL_SCANCODE_8, - Num9 = SDLKey.SDL_SCANCODE_9, - Num0 = SDLKey.SDL_SCANCODE_0, - - Enter = SDLKey.SDL_SCANCODE_RETURN, + B = SDLKey.SDL_SCANCODE_B, + C = SDLKey.SDL_SCANCODE_C, + D = SDLKey.SDL_SCANCODE_D, + E = SDLKey.SDL_SCANCODE_E, + F = SDLKey.SDL_SCANCODE_F, + G = SDLKey.SDL_SCANCODE_G, + H = SDLKey.SDL_SCANCODE_H, + I = SDLKey.SDL_SCANCODE_I, + J = SDLKey.SDL_SCANCODE_J, + K = SDLKey.SDL_SCANCODE_K, + L = SDLKey.SDL_SCANCODE_L, + M = SDLKey.SDL_SCANCODE_M, + N = SDLKey.SDL_SCANCODE_N, + O = SDLKey.SDL_SCANCODE_O, + P = SDLKey.SDL_SCANCODE_P, + Q = SDLKey.SDL_SCANCODE_Q, + R = SDLKey.SDL_SCANCODE_R, + S = SDLKey.SDL_SCANCODE_S, + T = SDLKey.SDL_SCANCODE_T, + U = SDLKey.SDL_SCANCODE_U, + V = SDLKey.SDL_SCANCODE_V, + W = SDLKey.SDL_SCANCODE_W, + X = SDLKey.SDL_SCANCODE_X, + Y = SDLKey.SDL_SCANCODE_Y, + Z = SDLKey.SDL_SCANCODE_Z, + + // top-row numbers + Alpha0 = SDLKey.SDL_SCANCODE_0, + Alpha1 = SDLKey.SDL_SCANCODE_1, + Alpha2 = SDLKey.SDL_SCANCODE_2, + Alpha3 = SDLKey.SDL_SCANCODE_3, + Alpha4 = SDLKey.SDL_SCANCODE_4, + Alpha5 = SDLKey.SDL_SCANCODE_5, + Alpha6 = SDLKey.SDL_SCANCODE_6, + Alpha7 = SDLKey.SDL_SCANCODE_7, + Alpha8 = SDLKey.SDL_SCANCODE_8, + Alpha9 = SDLKey.SDL_SCANCODE_9, + + Return = SDLKey.SDL_SCANCODE_RETURN, Escape = SDLKey.SDL_SCANCODE_ESCAPE, Backspace = SDLKey.SDL_SCANCODE_BACKSPACE, Tab = SDLKey.SDL_SCANCODE_TAB, @@ -427,317 +423,81 @@ public enum KeyCode : int Equals = SDLKey.SDL_SCANCODE_EQUALS, LeftBracket = SDLKey.SDL_SCANCODE_LEFTBRACKET, RightBracket = SDLKey.SDL_SCANCODE_RIGHTBRACKET, - Backslash = SDLKey.SDL_SCANCODE_BACKSLASH, /**< Located at the lower left of the return - * key on ISO keyboards and at the right end - * of the QWERTY row on ANSI keyboards. - * Produces REVERSE SOLIDUS (backslash) and - * VERTICAL LINE in a US layout, REVERSE - * SOLIDUS and VERTICAL LINE in a UK Mac - * layout, NUMBER SIGN and TILDE in a UK - * Windows layout, DOLLAR SIGN and POUND SIGN - * in a Swiss German layout, NUMBER SIGN and - * APOSTROPHE in a German layout, GRAVE - * ACCENT and POUND SIGN in a French Mac - * layout, and ASTERISK and MICRO SIGN in a - * French Windows layout. - */ - NonUSHash = SDLKey.SDL_SCANCODE_NONUSHASH, /**< ISO USB keyboards actually use this code - * instead of 49 for the same key, but all - * OSes I've seen treat the two codes - * identically. So, as an implementor, unless - * your keyboard generates both of those - * codes and your OS treats them differently, - * you should generate SDL_SCANCODE_BACKSLASH - * instead of this code. As a user, you - * should not rely on this code because SDL - * will never generate it with most (all?) - * keyboards. - */ - SemiColon = SDLKey.SDL_SCANCODE_SEMICOLON, - Apostrophe = SDLKey.SDL_SCANCODE_APOSTROPHE, - Tilde = SDLKey.SDL_SCANCODE_GRAVE, /**< Located in the top left corner (on both ANSI - * and ISO keyboards). Produces GRAVE ACCENT and - * TILDE in a US Windows layout and in US and UK - * Mac layouts on ANSI keyboards, GRAVE ACCENT - * and NOT SIGN in a UK Windows layout, SECTION - * SIGN and PLUS-MINUS SIGN in US and UK Mac - * layouts on ISO keyboards, SECTION SIGN and - * DEGREE SIGN in a Swiss German layout (Mac: - * only on ISO keyboards), CIRCUMFLEX ACCENT and - * DEGREE SIGN in a German layout (Mac: only on - * ISO keyboards), SUPERSCRIPT TWO and TILDE in a - * French Windows layout, COMMERCIAL AT and - * NUMBER SIGN in a French Mac layout on ISO - * keyboards, and LESS-THAN SIGN and GREATER-THAN - * SIGN in a Swiss German, German, or French Mac - * layout on ANSI keyboards. - */ - SDL_SCANCODE_COMMA = 54, - SDL_SCANCODE_PERIOD = 55, - SDL_SCANCODE_SLASH = 56, - - SDL_SCANCODE_CAPSLOCK = 57, - - F1 = SDLKey.SDL_SCANCODE_F1, - F2 = SDLKey.SDL_SCANCODE_F2, - F3 = SDLKey.SDL_SCANCODE_F3, - F4 = SDLKey.SDL_SCANCODE_F4, - F5 = SDLKey.SDL_SCANCODE_F5, - F6 = SDLKey.SDL_SCANCODE_F6, - F7 = SDLKey.SDL_SCANCODE_F7, - F8 = SDLKey.SDL_SCANCODE_F8, - F9 = SDLKey.SDL_SCANCODE_F9, - F10 = SDLKey.SDL_SCANCODE_F10, - F11 = SDLKey.SDL_SCANCODE_F11, - F12 = SDLKey.SDL_SCANCODE_F12, - - SDL_SCANCODE_PRINTSCREEN = 70, - SDL_SCANCODE_SCROLLLOCK = 71, - SDL_SCANCODE_PAUSE = 72, - SDL_SCANCODE_INSERT = 73, /**< insert on PC, help on some Mac keyboards (but - does send code 73, not 117) */ - SDL_SCANCODE_HOME = 74, - SDL_SCANCODE_PAGEUP = 75, + Backslash = SDLKey.SDL_SCANCODE_BACKSLASH, + Semicolon = SDLKey.SDL_SCANCODE_SEMICOLON, + Quote = SDLKey.SDL_SCANCODE_APOSTROPHE, + BackQuote = SDLKey.SDL_SCANCODE_GRAVE, + Comma = SDLKey.SDL_SCANCODE_COMMA, + Period = SDLKey.SDL_SCANCODE_PERIOD, + Slash = SDLKey.SDL_SCANCODE_SLASH, + CapsLock = SDLKey.SDL_SCANCODE_CAPSLOCK, + + F1 = SDLKey.SDL_SCANCODE_F1, + F2 = SDLKey.SDL_SCANCODE_F2, + F3 = SDLKey.SDL_SCANCODE_F3, + F4 = SDLKey.SDL_SCANCODE_F4, + F5 = SDLKey.SDL_SCANCODE_F5, + F6 = SDLKey.SDL_SCANCODE_F6, + F7 = SDLKey.SDL_SCANCODE_F7, + F8 = SDLKey.SDL_SCANCODE_F8, + F9 = SDLKey.SDL_SCANCODE_F9, + F10 = SDLKey.SDL_SCANCODE_F10, + F11 = SDLKey.SDL_SCANCODE_F11, + F12 = SDLKey.SDL_SCANCODE_F12, + F13 = SDLKey.SDL_SCANCODE_F13, + F14 = SDLKey.SDL_SCANCODE_F14, + F15 = SDLKey.SDL_SCANCODE_F15, + + Print = SDLKey.SDL_SCANCODE_PRINTSCREEN, + ScrollLock = SDLKey.SDL_SCANCODE_SCROLLLOCK, + Pause = SDLKey.SDL_SCANCODE_PAUSE, + Insert = SDLKey.SDL_SCANCODE_INSERT, + Home = SDLKey.SDL_SCANCODE_HOME, + PageUp = SDLKey.SDL_SCANCODE_PAGEUP, Delete = SDLKey.SDL_SCANCODE_DELETE, - SDL_SCANCODE_END = 77, - SDL_SCANCODE_PAGEDOWN = 78, - SDL_SCANCODE_RIGHT = 79, - SDL_SCANCODE_LEFT = 80, - SDL_SCANCODE_DOWN = 81, - SDL_SCANCODE_UP = 82, - - SDL_SCANCODE_NUMLOCKCLEAR = 83, /**< num lock on PC, clear on Mac keyboards - */ - SDL_SCANCODE_KP_DIVIDE = 84, - SDL_SCANCODE_KP_MULTIPLY = 85, - SDL_SCANCODE_KP_MINUS = 86, - SDL_SCANCODE_KP_PLUS = 87, - SDL_SCANCODE_KP_ENTER = 88, - SDL_SCANCODE_KP_1 = 89, - SDL_SCANCODE_KP_2 = 90, - SDL_SCANCODE_KP_3 = 91, - SDL_SCANCODE_KP_4 = 92, - SDL_SCANCODE_KP_5 = 93, - SDL_SCANCODE_KP_6 = 94, - SDL_SCANCODE_KP_7 = 95, - SDL_SCANCODE_KP_8 = 96, - SDL_SCANCODE_KP_9 = 97, - SDL_SCANCODE_KP_0 = 98, - SDL_SCANCODE_KP_PERIOD = 99, - - SDL_SCANCODE_NONUSBACKSLASH = 100, /**< This is the additional key that ISO - * keyboards have over ANSI ones, - * located between left shift and Y. - * Produces GRAVE ACCENT and TILDE in a - * US or UK Mac layout, REVERSE SOLIDUS - * (backslash) and VERTICAL LINE in a - * US or UK Windows layout, and - * LESS-THAN SIGN and GREATER-THAN SIGN - * in a Swiss German, German, or French - * layout. */ - SDL_SCANCODE_APPLICATION = 101, /**< windows contextual menu, compose */ - SDL_SCANCODE_POWER = 102, /**< The USB document says this is a status flag, - * not a physical key - but some Mac keyboards - * do have a power key. */ - SDL_SCANCODE_KP_EQUALS = 103, - SDL_SCANCODE_F13 = 104, - SDL_SCANCODE_F14 = 105, - SDL_SCANCODE_F15 = 106, - SDL_SCANCODE_F16 = 107, - SDL_SCANCODE_F17 = 108, - SDL_SCANCODE_F18 = 109, - SDL_SCANCODE_F19 = 110, - SDL_SCANCODE_F20 = 111, - SDL_SCANCODE_F21 = 112, - SDL_SCANCODE_F22 = 113, - SDL_SCANCODE_F23 = 114, - SDL_SCANCODE_F24 = 115, - SDL_SCANCODE_EXECUTE = 116, - SDL_SCANCODE_HELP = 117, - SDL_SCANCODE_MENU = 118, - SDL_SCANCODE_SELECT = 119, - SDL_SCANCODE_STOP = 120, - SDL_SCANCODE_AGAIN = 121, /**< redo */ - SDL_SCANCODE_UNDO = 122, - SDL_SCANCODE_CUT = 123, - SDL_SCANCODE_COPY = 124, - SDL_SCANCODE_PASTE = 125, - SDL_SCANCODE_FIND = 126, - SDL_SCANCODE_MUTE = 127, - SDL_SCANCODE_VOLUMEUP = 128, - SDL_SCANCODE_VOLUMEDOWN = 129, -/* not sure whether there's a reason to enable these */ -/* SDL_SCANCODE_LOCKINGCAPSLOCK = 130, */ -/* SDL_SCANCODE_LOCKINGNUMLOCK = 131, */ -/* SDL_SCANCODE_LOCKINGSCROLLLOCK = 132, */ - SDL_SCANCODE_KP_COMMA = 133, - SDL_SCANCODE_KP_EQUALSAS400 = 134, + End = SDLKey.SDL_SCANCODE_END, + PageDown = SDLKey.SDL_SCANCODE_PAGEDOWN, + RightArrow = SDLKey.SDL_SCANCODE_RIGHT, + LeftArrow = SDLKey.SDL_SCANCODE_LEFT, + DownArrow = SDLKey.SDL_SCANCODE_DOWN, + UpArrow = SDLKey.SDL_SCANCODE_UP, + + Numlock = SDLKey.SDL_SCANCODE_NUMLOCKCLEAR, + KeypadDivide = SDLKey.SDL_SCANCODE_KP_DIVIDE, + KeypadMultiply = SDLKey.SDL_SCANCODE_KP_MULTIPLY, + KeypadMinus = SDLKey.SDL_SCANCODE_KP_MINUS, + KeypadPlus = SDLKey.SDL_SCANCODE_KP_PLUS, + KeypadEnter = SDLKey.SDL_SCANCODE_KP_ENTER, + Keypad1 = SDLKey.SDL_SCANCODE_KP_1, + Keypad2 = SDLKey.SDL_SCANCODE_KP_2, + Keypad3 = SDLKey.SDL_SCANCODE_KP_3, + Keypad4 = SDLKey.SDL_SCANCODE_KP_4, + Keypad5 = SDLKey.SDL_SCANCODE_KP_5, + Keypad6 = SDLKey.SDL_SCANCODE_KP_6, + Keypad7 = SDLKey.SDL_SCANCODE_KP_7, + Keypad8 = SDLKey.SDL_SCANCODE_KP_8, + Keypad9 = SDLKey.SDL_SCANCODE_KP_9, + Keypad0 = SDLKey.SDL_SCANCODE_KP_0, + KeypadPeriod = SDLKey.SDL_SCANCODE_KP_PERIOD, + KeypadEquals = SDLKey.SDL_SCANCODE_KP_EQUALS, + + Help = SDLKey.SDL_SCANCODE_HELP, + Menu = SDLKey.SDL_SCANCODE_MENU, - SDL_SCANCODE_INTERNATIONAL1 = 135, /**< used on Asian keyboards, see - footnotes in USB doc */ - SDL_SCANCODE_INTERNATIONAL2 = 136, - SDL_SCANCODE_INTERNATIONAL3 = 137, /**< Yen */ - SDL_SCANCODE_INTERNATIONAL4 = 138, - SDL_SCANCODE_INTERNATIONAL5 = 139, - SDL_SCANCODE_INTERNATIONAL6 = 140, - SDL_SCANCODE_INTERNATIONAL7 = 141, - SDL_SCANCODE_INTERNATIONAL8 = 142, - SDL_SCANCODE_INTERNATIONAL9 = 143, - SDL_SCANCODE_LANG1 = 144, /**< Hangul/English toggle */ - SDL_SCANCODE_LANG2 = 145, /**< Hanja conversion */ - SDL_SCANCODE_LANG3 = 146, /**< Katakana */ - SDL_SCANCODE_LANG4 = 147, /**< Hiragana */ - SDL_SCANCODE_LANG5 = 148, /**< Zenkaku/Hankaku */ - SDL_SCANCODE_LANG6 = 149, /**< reserved */ - SDL_SCANCODE_LANG7 = 150, /**< reserved */ - SDL_SCANCODE_LANG8 = 151, /**< reserved */ - SDL_SCANCODE_LANG9 = 152, /**< reserved */ - - SDL_SCANCODE_ALTERASE = 153, /**< Erase-Eaze */ - SDL_SCANCODE_SYSREQ = 154, - SDL_SCANCODE_CANCEL = 155, - SDL_SCANCODE_CLEAR = 156, - SDL_SCANCODE_PRIOR = 157, - SDL_SCANCODE_RETURN2 = 158, - SDL_SCANCODE_SEPARATOR = 159, - SDL_SCANCODE_OUT = 160, - SDL_SCANCODE_OPER = 161, - SDL_SCANCODE_CLEARAGAIN = 162, - SDL_SCANCODE_CRSEL = 163, - SDL_SCANCODE_EXSEL = 164, - - SDL_SCANCODE_KP_00 = 176, - SDL_SCANCODE_KP_000 = 177, - SDL_SCANCODE_THOUSANDSSEPARATOR = 178, - SDL_SCANCODE_DECIMALSEPARATOR = 179, - SDL_SCANCODE_CURRENCYUNIT = 180, - SDL_SCANCODE_CURRENCYSUBUNIT = 181, - SDL_SCANCODE_KP_LEFTPAREN = 182, - SDL_SCANCODE_KP_RIGHTPAREN = 183, - SDL_SCANCODE_KP_LEFTBRACE = 184, - SDL_SCANCODE_KP_RIGHTBRACE = 185, - SDL_SCANCODE_KP_TAB = 186, - SDL_SCANCODE_KP_BACKSPACE = 187, - SDL_SCANCODE_KP_A = 188, - SDL_SCANCODE_KP_B = 189, - SDL_SCANCODE_KP_C = 190, - SDL_SCANCODE_KP_D = 191, - SDL_SCANCODE_KP_E = 192, - SDL_SCANCODE_KP_F = 193, - SDL_SCANCODE_KP_XOR = 194, - SDL_SCANCODE_KP_POWER = 195, - SDL_SCANCODE_KP_PERCENT = 196, - SDL_SCANCODE_KP_LESS = 197, - SDL_SCANCODE_KP_GREATER = 198, - SDL_SCANCODE_KP_AMPERSAND = 199, - SDL_SCANCODE_KP_DBLAMPERSAND = 200, - SDL_SCANCODE_KP_VERTICALBAR = 201, - SDL_SCANCODE_KP_DBLVERTICALBAR = 202, - SDL_SCANCODE_KP_COLON = 203, - SDL_SCANCODE_KP_HASH = 204, - SDL_SCANCODE_KP_SPACE = 205, - SDL_SCANCODE_KP_AT = 206, - SDL_SCANCODE_KP_EXCLAM = 207, - SDL_SCANCODE_KP_MEMSTORE = 208, - SDL_SCANCODE_KP_MEMRECALL = 209, - SDL_SCANCODE_KP_MEMCLEAR = 210, - SDL_SCANCODE_KP_MEMADD = 211, - SDL_SCANCODE_KP_MEMSUBTRACT = 212, - SDL_SCANCODE_KP_MEMMULTIPLY = 213, - SDL_SCANCODE_KP_MEMDIVIDE = 214, - SDL_SCANCODE_KP_PLUSMINUS = 215, - SDL_SCANCODE_KP_CLEAR = 216, - SDL_SCANCODE_KP_CLEARENTRY = 217, - SDL_SCANCODE_KP_BINARY = 218, - SDL_SCANCODE_KP_OCTAL = 219, - SDL_SCANCODE_KP_DECIMAL = 220, - SDL_SCANCODE_KP_HEXADECIMAL = 221, - - LeftControl = 224, LeftShift = SDLKey.SDL_SCANCODE_LSHIFT, - LeftAlt = SDLKey.SDL_SCANCODE_LALT, /**< alt, option */ - SDL_SCANCODE_LGUI = 227, /**< windows, command (apple), meta */ - RightControl = 228, - SDL_SCANCODE_RSHIFT = 229, - RightAlt = SDLKey.SDL_SCANCODE_RALT, /**< alt gr, option */ - SDL_SCANCODE_RGUI = 231, /**< windows, command (apple), meta */ - - SDL_SCANCODE_MODE = 257, /**< I'm not sure if this is really not covered - * by any of the above, but since there's a - * special KMOD_MODE for it I'm adding it here - */ - - /* @} *//* Usage page 0x07 */ - - /** - * \name Usage page 0x0C - * - * These values are mapped from usage page 0x0C (USB consumer page). - */ - /* @{ */ - - SDL_SCANCODE_AUDIONEXT = 258, - SDL_SCANCODE_AUDIOPREV = 259, - SDL_SCANCODE_AUDIOSTOP = 260, - SDL_SCANCODE_AUDIOPLAY = 261, - SDL_SCANCODE_AUDIOMUTE = 262, - SDL_SCANCODE_MEDIASELECT = 263, - SDL_SCANCODE_WWW = 264, - SDL_SCANCODE_MAIL = 265, - SDL_SCANCODE_CALCULATOR = 266, - SDL_SCANCODE_COMPUTER = 267, - SDL_SCANCODE_AC_SEARCH = 268, - SDL_SCANCODE_AC_HOME = 269, - SDL_SCANCODE_AC_BACK = 270, - SDL_SCANCODE_AC_FORWARD = 271, - SDL_SCANCODE_AC_STOP = 272, - SDL_SCANCODE_AC_REFRESH = 273, - SDL_SCANCODE_AC_BOOKMARKS = 274, - - /* @} *//* Usage page 0x0C */ - - /** - * \name Walther keys - * - * These are values that Christian Walther added (for mac keyboard?). - */ - /* @{ */ - - SDL_SCANCODE_BRIGHTNESSDOWN = 275, - SDL_SCANCODE_BRIGHTNESSUP = 276, - SDL_SCANCODE_DISPLAYSWITCH = 277, /**< display mirroring/dual display - switch, video mode switch */ - SDL_SCANCODE_KBDILLUMTOGGLE = 278, - SDL_SCANCODE_KBDILLUMDOWN = 279, - SDL_SCANCODE_KBDILLUMUP = 280, - SDL_SCANCODE_EJECT = 281, - SDL_SCANCODE_SLEEP = 282, - - SDL_SCANCODE_APP1 = 283, - SDL_SCANCODE_APP2 = 284, - - /* @} *//* Walther keys */ - - /** - * \name Usage page 0x0C (additional media keys) - * - * These values are mapped from usage page 0x0C (USB consumer page). - */ - /* @{ */ - - SDL_SCANCODE_AUDIOREWIND = 285, - SDL_SCANCODE_AUDIOFASTFORWARD = 286, - - /* @} *//* Usage page 0x0C (additional media keys) */ - - /* Add any other keys here. */ - - SDL_NUM_SCANCODES = 512 /**< not a key, just marks the number of scancodes - for array bounds */ + RightShift = SDLKey.SDL_SCANCODE_RSHIFT, + LeftControl = SDLKey.SDL_SCANCODE_LCTRL, + RightControl = SDLKey.SDL_SCANCODE_RCTRL, + LeftAlt = SDLKey.SDL_SCANCODE_LALT, + RightAlt = SDLKey.SDL_SCANCODE_RALT, + LeftCommand = SDLKey.SDL_SCANCODE_LGUI, // aka LeftWindows / LeftSuper + RightCommand = SDLKey.SDL_SCANCODE_RGUI, // aka RightWindows / RightSuper }; -public class Input +public static class Input { - [MethodImplAttribute(MethodImplOptions.InternalCall)] - public static extern bool IsKeyDown(KeyCode key); + public static bool IsKeyDown(KeyCode key) + { + unsafe { return Engine._api.Input_IsKeyDown((int)key) != 0; } + } } diff --git a/Modules/ScriptCore/Source/Core/World.cs b/Modules/ScriptCore/Source/Core/World.cs index ff0ff3c9..18a29558 100644 --- a/Modules/ScriptCore/Source/Core/World.cs +++ b/Modules/ScriptCore/Source/Core/World.cs @@ -1,18 +1,26 @@ -using System.Runtime.CompilerServices; +namespace ScriptCore; -public class World +public static unsafe class World { - [MethodImplAttribute(MethodImplOptions.InternalCall)] - public static extern Entity World_CreateEntity(string inString); - public static Entity CreateEntity(string inName) + public static Entity CreateEntity( string name ) { - return World_CreateEntity(inName); + Entity e = default; + fixed (byte* p = Engine.Utf8(name)) Engine._api.World_CreateEntity(p, &e); + return e; } - [MethodImplAttribute(MethodImplOptions.InternalCall)] - public static extern Entity World_GetTransformByName(string inString); - public static Transform GetTransformByName(string inName) + + public static Entity Find( string name ) + { + Entity e = default; + fixed (byte* p = Engine.Utf8(name)) Engine._api.World_FindByName(p, &e); + return e; + } + + + public static Transform GetTransformByName( string name ) { - return World_GetTransformByName(inName).GetComponent(); + var e = Find(name); + return e ? e.GetComponent() : null; } } diff --git a/Modules/ScriptCore/Source/Engine.cs b/Modules/ScriptCore/Source/Engine.cs new file mode 100644 index 00000000..3ddde589 --- /dev/null +++ b/Modules/ScriptCore/Source/Engine.cs @@ -0,0 +1,300 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using System.Text; + +namespace ScriptCore; + +[StructLayout(LayoutKind.Sequential)] +public unsafe struct EngineAPIBindings +{ + public delegate* unmanaged Log; + public delegate* unmanaged GetTime; + + // Entity and components + public delegate* unmanaged Entity_IsAlive; + public delegate* unmanaged Entity_HasComponent; + public delegate* unmanaged Entity_AddComponent; + public delegate* unmanaged Transform_GetTranslation; + public delegate* unmanaged Transform_SetTranslation; + + // ImGui + public delegate* unmanaged ImGui_Float; + public delegate* unmanaged ImGui_Int; + public delegate* unmanaged ImGui_Bool; + public delegate* unmanaged ImGui_Vec3; + + public delegate* unmanaged ImGui_Begin; + public delegate* unmanaged ImGui_Text; + public delegate* unmanaged ImGui_Checkbox; + public delegate* unmanaged ImGui_Button; + public delegate* unmanaged ImGui_End; + + // Engine shit + public delegate* unmanaged Input_IsKeyDown; + + public delegate* unmanaged World_CreateEntity; + public delegate* unmanaged World_FindByName; + + public delegate* unmanaged Camera_GetClearColor; + public delegate* unmanaged Camera_SetClearColor; + + public delegate* unmanaged Transform_GetScale; + public delegate* unmanaged Transform_SetScale; + public delegate* unmanaged Transform_GetRotation; + public delegate* unmanaged Transform_SetRotation; + + public delegate* unmanaged BasicUIView_ExecuteJS; +} + +public static unsafe class Engine +{ + internal static EngineAPIBindings _api; + + internal static void Bind(EngineAPIBindings api) => _api = api; + + public static void Log(string msg, + [CallerMemberName] string member = "", + [CallerFilePath] string file = "", + [CallerLineNumber] int line = 0) + { + var full = $"{msg} [{System.IO.Path.GetFileName(file)}:{line} {member}]"; + int maxBytes = Encoding.UTF8.GetMaxByteCount(full.Length) + 1; + Span buf = maxBytes <= 256 ? stackalloc byte[maxBytes] : new byte[maxBytes]; + int written = Encoding.UTF8.GetBytes(full, buf); + buf[written] = 0; + fixed (byte* p = buf) _api.Log(p); + } + + public static float GetTime() => _api.GetTime(); + + internal static byte[] Utf8(string s) + { + var b = new byte[Encoding.UTF8.GetByteCount(s) + 1]; + Encoding.UTF8.GetBytes(s, b); + return b; + } +} + +public static class ScriptBridge +{ + private static GameScriptALC? _alc; + // scaffolding for hot-reload: a weak ref to the collectible ALC so we can later confirm the old + // one actually unloaded after a reload. not wired up yet (reload path is still commented out). + private static WeakReference? _alcRef; + private static readonly Dictionary Instances = new(); + private static int _nextHandle = 1; + + private static readonly List _handleOrder = new(); + + private record FieldSnapshot(string TypeName, Dictionary Fields); + private static readonly Dictionary _snapshots = new(); + + [UnmanagedCallersOnly] + public static unsafe int SetEngineAPI(EngineAPIBindings* api, int size) + { + if (size != sizeof(EngineAPIBindings)) + { + Console.WriteLine($"[ScriptBridge] SetEngineAPI: size mismatch (got {size}, expected {sizeof(EngineAPIBindings)})"); + return -1; + } + try + { + Engine.Bind(*api); + Console.WriteLine("[ScriptBridge] Engine API bound."); + Engine.Log("Engine Time: " + Engine.GetTime().ToString()); + return 0; + } + catch (Exception ex) + { + ReportException("SetEngineAPI", ex); + return -1; + } + } + + internal static unsafe string ReadUtf8(byte* ptr) + => ptr is null ? string.Empty : Marshal.PtrToStringUTF8((IntPtr)ptr) ?? string.Empty; + + internal static unsafe void WriteUtf8(string s, byte* buf, int size) + { + if (buf is null || size <= 0) + { + return; + } + + var bytes = Encoding.UTF8.GetBytes(s); + int len = Math.Min(bytes.Length, size - 1); + bytes.AsSpan(0, len).CopyTo(new Span(buf, size)); + buf[len] = 0; + } + + // Nothing managed is allowed to throw back across the native boundary - CoreCLR turns an + // escaped exception into a process kill. Every [UnmanagedCallersOnly] that touches user + // script code or reflection funnels its failures through here instead. + private static void ReportException(string where, Exception ex) + => Console.WriteLine($"[ScriptBridge] {where} threw {ex.GetType().Name}: {ex.Message}"); + + [UnmanagedCallersOnly] + public static unsafe int LoadGameAssembly(byte* pathPtr) + { + var path = System.IO.Path.GetFullPath(ReadUtf8(pathPtr)); + try + { + _alc = new GameScriptALC(path); + _alcRef = new WeakReference(_alc); + var asm = _alc.LoadFromAssemblyPath(path); + ScriptRegistry.Scan(asm); + Console.WriteLine($"[ScriptBridge] Loaded {ScriptRegistry.ScriptTypes.Count} type(s) from {System.IO.Path.GetFileName(path)}"); + return 0; + } + catch (Exception ex) + { + Console.WriteLine($"[ScriptBridge] LoadGameAssembly failed: {ex.Message}"); + return -1; + } + } + + [UnmanagedCallersOnly] + public static int GetScriptCount() => ScriptRegistry.ScriptTypes.Count; + + [UnmanagedCallersOnly] + public static unsafe void GetScriptName(int index, byte* outBuf, int bufSize) + { + var types = ScriptRegistry.ScriptTypes; + if ((uint)index < (uint)types.Count) + { + WriteUtf8(types[index].Name, outBuf, bufSize); + } + } + + [UnmanagedCallersOnly] + public static unsafe int CreateScript(byte* inTypeName, Entity inEntity) + { + var name = ReadUtf8(inTypeName); + try + { + // matched by short name - see the collision note on ScriptRegistry.ScriptTypes + var type = ScriptRegistry.ScriptTypes.FirstOrDefault(t => t.Name == name); + if (type is null) + { + Console.WriteLine($"[ScriptBridge] CreateScript: no script type named '{name}'"); + return -1; + } + + // ctor can throw, or the type may have no usable parameterless ctor - both land here. + if (Activator.CreateInstance(type) is not IGameScript instance) + { + Console.WriteLine($"[ScriptBridge] CreateScript: '{name}' is not an IGameScript"); + return -1; + } + + // new .NET world: the entity is just its id. C# owns the wrapper, C++ only ever sees + // the EntityID. Scripts that don't derive from Script (raw IGameScript) just don't get one. + if (instance is Script script) + { + script.Entity = inEntity; + } + + int handle = _nextHandle++; + Instances[handle] = instance; + _handleOrder.Add(handle); + return handle; + } + catch (Exception ex) + { + ReportException($"CreateScript('{name}')", ex); + return -1; + } + } + + [UnmanagedCallersOnly] + public static void ScriptOnStart(int handle) + { + if (!Instances.TryGetValue(handle, out var s)) + { + return; + } + + try + { + s.OnStart(); + } + catch (Exception ex) + { + ReportException($"OnStart(handle={handle})", ex); + } + } + + [UnmanagedCallersOnly] + public static void ScriptOnUpdate(int handle, float dt) + { + if (!Instances.TryGetValue(handle, out var s)) + { + return; + } + + try + { + s.OnUpdate(dt); + } + catch (Exception ex) + { + ReportException($"OnUpdate(handle={handle})", ex); + } + } + + [UnmanagedCallersOnly] + public static void ScriptOnDestroy(int handle) + { + if (!Instances.TryGetValue(handle, out var s)) return; + try + { + s.OnDestroy(); + } + catch (Exception ex) + { + ReportException($"OnDestroy(handle={handle})", ex); + } + finally + { + // a throwing OnDestroy still has to release the handle, or it leaks forever. + Instances.Remove(handle); + _handleOrder.Remove(handle); + } + } + + [UnmanagedCallersOnly] + public static void ScriptOnEditorInspect(int handle) + { + if (!Instances.TryGetValue(handle, out var s)) return; + try + { + Inspector.DrawDefault(s); s.OnEditorInspect(); + } + catch (Exception ex) + { + ReportException($"OnEditorInspect(handle={handle})", ex); + } + } + + [UnmanagedCallersOnly] + public static unsafe void GetFieldsJson(int handle, byte* outBuf, int bufSize) + { + if (outBuf is null || bufSize <= 0) return; + outBuf[0] = 0; + if (!Instances.TryGetValue(handle, out var s)) return; + try { WriteUtf8(ScriptSerializer.Serialize(s), outBuf, bufSize); } + catch (Exception ex) { ReportException($"GetFieldsJson(handle={handle})", ex); } + } + + [UnmanagedCallersOnly] + public static unsafe void SetFieldsJson(int handle, byte* json) + { + if (!Instances.TryGetValue(handle, out var s)) return; + try { ScriptSerializer.Deserialize(s, ReadUtf8(json)); } + catch (Exception ex) { ReportException($"SetFieldsJson(handle={handle})", ex); } + } + +} \ No newline at end of file diff --git a/Modules/ScriptCore/Source/Entity.cs b/Modules/ScriptCore/Source/Entity.cs deleted file mode 100644 index 7db1b41a..00000000 --- a/Modules/ScriptCore/Source/Entity.cs +++ /dev/null @@ -1,83 +0,0 @@ -using System; -using System.Collections.Generic; -using System.ComponentModel; -using System.Runtime.CompilerServices; - -[AttributeUsage(AttributeTargets.Method | AttributeTargets.Class)] -public class UsedImplicitlyAttribute : Attribute { } - -[Serializable] -public struct EntityID -{ - public ulong Index; - public ulong Counter; -} - -// Everything in your world is an Entity -public class Entity : MEObject -{ - public EntityID EntID { get; protected set; } // No readonly! Use private set if you want more control - - private Dictionary _componentCache = new Dictionary(); - - protected Entity() - { - Console.WriteLine("Created a new entity"); - EntID = new EntityID { Index = 0, Counter = 0 }; - } - - internal Entity(EntityID inID) - { - Console.WriteLine("Created a new entity with ID"); - EntID = inID; - } - - public bool HasComponent() where T : Component - { - Type type = typeof(T); - - if (_componentCache.TryGetValue(type, out var existing)) - return true; - - return Entity_HasComponent(EntID, type); - } - - public T GetComponent() where T : Component, new() - { - var type = typeof(T); - - if (_componentCache.TryGetValue(type, out var existing)) - return (T)existing; - - if (!HasComponent()) - return null; - - var comp = new T { _parent = this }; - _componentCache[type] = comp; - return comp; - } - - public T AddComponent() where T : Component, new() - { - T existing = GetComponent(); - if (existing != null) - { - Console.WriteLine("HAVE EXISTING"); - return existing; - } - - Type type = typeof(T); - Console.WriteLine("CALLING C++"); - Entity_AddComponent(EntID, type); - - return GetComponent(); - } - - public Transform transform => GetComponent(); - - [MethodImplAttribute(MethodImplOptions.InternalCall)] - extern static bool Entity_HasComponent(EntityID id, Type type); - - [MethodImplAttribute(MethodImplOptions.InternalCall)] - extern static void Entity_AddComponent(EntityID id, Type type); -} \ No newline at end of file diff --git a/Modules/ScriptCore/Source/GameScriptALC.cs b/Modules/ScriptCore/Source/GameScriptALC.cs new file mode 100644 index 00000000..d0222155 --- /dev/null +++ b/Modules/ScriptCore/Source/GameScriptALC.cs @@ -0,0 +1,27 @@ +using System; +using System.Reflection; +using System.Runtime.Loader; + +namespace ScriptCore; + +public sealed class GameScriptALC : AssemblyLoadContext +{ + private readonly AssemblyDependencyResolver _resolver; + + public GameScriptALC(string assemblyPath) + : base($"GameScripts-{Guid.NewGuid():N}", isCollectible: true) + { + _resolver = new AssemblyDependencyResolver(assemblyPath); + } + + protected override Assembly? Load(AssemblyName name) + { + if (name.Name == "ScriptCore") + { + return typeof(IGameScript).Assembly; + } + + string? path = _resolver.ResolveAssemblyToPath(name); + return path is not null ? LoadFromAssemblyPath(path) : null; + } +} diff --git a/Modules/ScriptCore/Source/IGameScript.cs b/Modules/ScriptCore/Source/IGameScript.cs new file mode 100644 index 00000000..29e5de71 --- /dev/null +++ b/Modules/ScriptCore/Source/IGameScript.cs @@ -0,0 +1,9 @@ +namespace ScriptCore; + +public interface IGameScript +{ + void OnStart(); + void OnUpdate(float deltaTime); + void OnDestroy(); + void OnEditorInspect(); +} diff --git a/Modules/ScriptCore/Source/Inspector.cs b/Modules/ScriptCore/Source/Inspector.cs new file mode 100644 index 00000000..8d9e61d2 --- /dev/null +++ b/Modules/ScriptCore/Source/Inspector.cs @@ -0,0 +1,105 @@ +using System; +using System.Collections.Generic; +using System.Reflection; +using System.Text; +using System.Text.Json; + +namespace ScriptCore; + +// surpress your feelings, hide your fields +[AttributeUsage(AttributeTargets.Field)] +public sealed class HideInInspectorAttribute : Attribute { } + +internal static class FieldReflection +{ + public static IEnumerable Of(Type type) + { + foreach (var f in type.GetFields(BindingFlags.Public | BindingFlags.Instance)) + { + if (!f.IsDefined(typeof(HideInInspectorAttribute), true)) + { + yield return f; + } + } + } + + public static byte[] Utf8(string s) + { + var b = new byte[Encoding.UTF8.GetByteCount(s) + 1]; + Encoding.UTF8.GetBytes(s, b); + return b; + } +} + + +// imgui inspection for base shit atm, more to come +public static unsafe class Inspector +{ + public static void DrawDefault(object target) + { + foreach (var f in FieldReflection.Of(target.GetType())) + { + DrawField(target, f); + } + } + + private static void DrawField(object target, FieldInfo f) + { + var t = f.FieldType; + + if (t == typeof(float)) + { + float v = (float)f.GetValue(target); + fixed (byte* l = FieldReflection.Utf8(f.Name)) + if (Engine._api.ImGui_Float(l, &v) != 0) f.SetValue(target, v); + } + else if (t == typeof(int)) + { + int v = (int)f.GetValue(target); + fixed (byte* l = FieldReflection.Utf8(f.Name)) + if (Engine._api.ImGui_Int(l, &v) != 0) f.SetValue(target, v); + } + else if (t == typeof(bool)) + { + byte v = (bool)f.GetValue(target) ? (byte)1 : (byte)0; + fixed (byte* l = FieldReflection.Utf8(f.Name)) + if (Engine._api.ImGui_Bool(l, &v) != 0) f.SetValue(target, v != 0); + } + else if (t == typeof(Vector3)) + { + Vector3 v = (Vector3)f.GetValue(target); + fixed (byte* l = FieldReflection.Utf8(f.Name)) + if (Engine._api.ImGui_Vec3(l, &v) != 0) f.SetValue(target, v); + } + } +} + + +// simple JSON serialization for script state, using the same field reflection as the inspector. not super efficient but hey, it's only for editor persistence and maybe some debug dumping, so who cares. +public static class ScriptSerializer +{ + private static readonly JsonSerializerOptions Options = new() { IncludeFields = true }; + + public static string Serialize(object target) + { + var dict = new Dictionary(); + foreach (var f in FieldReflection.Of(target.GetType())) + { + dict[f.Name] = f.GetValue(target); + } + + return JsonSerializer.Serialize(dict, Options); + } + + public static void Deserialize(object target, string json) + { + if (string.IsNullOrEmpty(json)) return; + using var doc = JsonDocument.Parse(json); + var root = doc.RootElement; + foreach (var f in FieldReflection.Of(target.GetType())) + if (root.TryGetProperty(f.Name, out var el)) + { + f.SetValue(target, el.Deserialize(f.FieldType, Options)); + } + } +} diff --git a/Modules/ScriptCore/Source/Script.cs b/Modules/ScriptCore/Source/Script.cs new file mode 100644 index 00000000..9a047f0f --- /dev/null +++ b/Modules/ScriptCore/Source/Script.cs @@ -0,0 +1,17 @@ +namespace ScriptCore; + +// Base for scripts that live on an entity +public abstract class Script : IGameScript +{ + public Entity Entity { get; internal set; } = Entity.Null; + + public virtual void OnStart() { } + public virtual void OnUpdate( float deltaTime ) { } + public virtual void OnDestroy() { } + public virtual void OnEditorInspect() { } + + public Transform transform => Entity.GetComponent(); + public T GetComponent() where T : Component, new() => Entity.GetComponent(); + public bool HasComponent() where T : Component, new() => Entity.HasComponent(); + public T AddComponent() where T : Component, new() => Entity.AddComponent(); +} diff --git a/Modules/ScriptCore/Source/ScriptRegistry.cs b/Modules/ScriptCore/Source/ScriptRegistry.cs new file mode 100644 index 00000000..7237fa35 --- /dev/null +++ b/Modules/ScriptCore/Source/ScriptRegistry.cs @@ -0,0 +1,27 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Reflection; + +namespace ScriptCore; + +public static class ScriptRegistry +{ + private static List _types = new(); + + // TODO: scripts are looked up by Type.Name so fix name clashing whenever + public static IReadOnlyList ScriptTypes => _types; + + public static void Scan(Assembly assembly) + { + _types = assembly.GetTypes() + .Where(t => typeof(IGameScript).IsAssignableFrom(t) + && !t.IsInterface + && !t.IsAbstract) + .OrderBy(t => t.Name) + .ToList(); + } + + // only used when I get to hot reloading + public static void Clear() => _types.Clear(); +} \ No newline at end of file diff --git a/Modules/ScriptCore/Source/Utils/ImGui.cs b/Modules/ScriptCore/Source/Utils/ImGui.cs index 2dade74c..55e6eb99 100644 --- a/Modules/ScriptCore/Source/Utils/ImGui.cs +++ b/Modules/ScriptCore/Source/Utils/ImGui.cs @@ -1,43 +1,31 @@ -using System.Runtime.CompilerServices; +namespace ScriptCore; -public class ImGui +// Immediate-mode ImGui for game scripts (editor inspector widgets live on EngineAPI separately). +public static unsafe class ImGui { - [MethodImplAttribute(MethodImplOptions.InternalCall)] - extern static bool ImGui_Begin(string Name); - public static bool Begin(string Name) + public static bool Begin(string name) { - return ImGui_Begin(Name); + fixed (byte* p = Engine.Utf8(name)) return Engine._api.ImGui_Begin(p) != 0; } - - [MethodImplAttribute(MethodImplOptions.InternalCall)] - extern static void ImGui_End(); - public static void End() + public static void Text(string text) { - ImGui_End(); + fixed (byte* p = Engine.Utf8(text)) Engine._api.ImGui_Text(p); } - - [MethodImplAttribute(MethodImplOptions.InternalCall)] - extern static void ImGui_Text(string inString); - public static void Text(string inString) + public static bool Checkbox(string label, ref bool value) { - ImGui_Text(inString); + byte v = value ? (byte)1 : (byte)0; + bool changed; + fixed (byte* p = Engine.Utf8(label)) changed = Engine._api.ImGui_Checkbox(p, &v) != 0; + value = v != 0; + return changed; } - - [MethodImplAttribute(MethodImplOptions.InternalCall)] - extern static void ImGui_Checkbox(string inString, ref bool inValue); - public static void Checkbox(string inString, ref bool inValue) + public static bool Button(string label) { - ImGui_Checkbox(inString, ref inValue); + fixed (byte* p = Engine.Utf8(label)) return Engine._api.ImGui_Button(p) != 0; } - - [MethodImplAttribute(MethodImplOptions.InternalCall)] - extern static bool ImGui_Button(string inString); - public static bool Button(string inString) - { - return ImGui_Button(inString); - } + public static void End() => Engine._api.ImGui_End(); } diff --git a/README.md b/README.md index 32905be5..e4932677 100644 --- a/README.md +++ b/README.md @@ -4,22 +4,23 @@ ====== The 3D game engine so good it has my name in it. -Mitch Engine is a simple c++ component based game engine for creating games for Xbox One, macOS, and the Windows 10 Store. +Mitch Engine is a simple c++ component based game engine for creating games for Xbox ( One & Series X/S ), Linux, macOS, Windows, and the Windows 10 Store ( UWP ). It's a great hobby project to keep me exploring the world of c++. Check out my [Notion][4] to view the current development status. |Platform|Game| |---|---| +|Linux|[![Build status Linux](https://github.com/wobbier/MitchEngine/actions/workflows/Linux.yml/badge.svg)](https://github.com/wobbier/MitchEngine/actions/workflows/Linux.yml)| |Win64|[![Build status Win64](https://github.com/wobbier/MitchEngine/actions/workflows/Windows.yml/badge.svg)](https://github.com/wobbier/MitchEngine/actions/workflows/Windows.yml)| |UWP / Xbox|[![Build status UWP](https://github.com/wobbier/MitchEngine/actions/workflows/UWP.yml/badge.svg)](https://github.com/wobbier/MitchEngine/actions/workflows/UWP.yml)| -|macOS|[![Build Status](https://github.com/wobbier/MitchEngine/actions/workflows/macOS.yml/badge.svg)](https://github.com/wobbier/MitchEngine/actions/workflows/macOS.yml)| +|macOS|[![Build Status macOS](https://github.com/wobbier/MitchEngine/actions/workflows/macOS.yml/badge.svg)](https://github.com/wobbier/MitchEngine/actions/workflows/macOS.yml)| Main Features ------------- * (ECS) Entity-Component System based design - * Supports Windows, Xbox, and macOS - * World Editor (Windows & macOS) + * Supports Linux, Windows, Xbox, and macOS + * World Editor * HTML UI with [Ultralight][5] * Language: C++ * [Optick][6] Profiling diff --git a/Source/Components/Audio/AudioSource.cpp b/Source/Components/Audio/AudioSource.cpp index 1175eb14..2c2b4033 100644 --- a/Source/Components/Audio/AudioSource.cpp +++ b/Source/Components/Audio/AudioSource.cpp @@ -278,8 +278,9 @@ void AudioSource::OnEditorInspect() { if( const ImGuiPayload* payload = ImGui::AcceptDragDropPayload( AssetDescriptor::kDragAndDropPayload ) ) { - IM_ASSERT( payload->DataSize == sizeof( AssetDescriptor ) ); - AssetDescriptor& payload_n = *(AssetDescriptor*)payload->Data; + AssetDescriptor* _p = AssetDescriptor::GetDragged(); + if( !_p ) return; + AssetDescriptor& payload_n = *_p; if( payload_n.Type == AssetType::Audio ) { diff --git a/Source/Components/Camera.cpp b/Source/Components/Camera.cpp index d66f9fdd..b2d3023d 100644 --- a/Source/Components/Camera.cpp +++ b/Source/Components/Camera.cpp @@ -16,9 +16,6 @@ #include "Types/AssetDescriptor.h" #endif -Camera* Camera::CurrentCamera = nullptr; -Camera* Camera::EditorCamera = nullptr; - Camera::Camera() : Component( "Camera" ) , OutputSize( 1280.f, 720.f ) @@ -354,8 +351,9 @@ void Camera::OnEditorInspect() { if( const ImGuiPayload* payload = ImGui::AcceptDragDropPayload( AssetDescriptor::kDragAndDropPayload ) ) { - IM_ASSERT( payload->DataSize == sizeof( AssetDescriptor ) ); - AssetDescriptor& payload_n = *(AssetDescriptor*)payload->Data; + AssetDescriptor* _p = AssetDescriptor::GetDragged(); + if( !_p ) return; + AssetDescriptor& payload_n = *_p; if( payload_n.Type == AssetType::Texture ) { diff --git a/Source/Components/Camera.h b/Source/Components/Camera.h index 8d4ad8d6..5a93c241 100644 --- a/Source/Components/Camera.h +++ b/Source/Components/Camera.h @@ -15,8 +15,8 @@ class Camera { friend class CameraCore; public: - static Camera* CurrentCamera; - static Camera* EditorCamera; + inline static Camera* CurrentCamera = nullptr; + inline static Camera* EditorCamera = nullptr; Vector2 OutputSize; Vector3 ClearColor; diff --git a/Source/Components/Graphics/Mesh.cpp b/Source/Components/Graphics/Mesh.cpp index a319f17b..13a05058 100644 --- a/Source/Components/Graphics/Mesh.cpp +++ b/Source/Components/Graphics/Mesh.cpp @@ -115,6 +115,7 @@ void Mesh::OnDeserialize( const json& inJson ) if( reg.find( matType ) != reg.end() ) { MeshMaterial = reg[matType].CreateFunc(); + MeshMaterial->Init(); } else { diff --git a/Source/Components/Graphics/Model.cpp b/Source/Components/Graphics/Model.cpp index 23d9228e..3a29f5b9 100644 --- a/Source/Components/Graphics/Model.cpp +++ b/Source/Components/Graphics/Model.cpp @@ -110,7 +110,7 @@ void Model::OnEditorInspect() { ImGui::Text( "Loaded Path" ); ImGui::SameLine(); - ImGui::Text( ModelPath.GetLocalPath().data() ); + ImGui::Text("%s", ModelPath.GetLocalPath().data()); RecursiveModelNode( ModelHandle, ModelHandle->RootNode ); for( const Moonlight::AnimationClip& clip : ModelHandle->GetAnimations() ) { @@ -118,7 +118,7 @@ void Model::OnEditorInspect() { for( const auto& nodeAnim : clip.NodeChannels ) { - ImGui::Text( nodeAnim.NodeName.c_str() ); + ImGui::Text("%s", ModelPath.GetLocalPath().data()); } } } @@ -141,8 +141,9 @@ void Model::OnEditorInspect() { if( const ImGuiPayload* payload = ImGui::AcceptDragDropPayload( AssetDescriptor::kDragAndDropPayload ) ) { - IM_ASSERT( payload->DataSize == sizeof( AssetDescriptor ) ); - const AssetDescriptor& payload_n = *static_cast( payload->Data ); + const AssetDescriptor* _p = AssetDescriptor::GetDragged(); + if( !_p ) return; + const AssetDescriptor& payload_n = *_p; if( payload_n.Type == AssetType::Model ) { diff --git a/Source/Components/Physics/CharacterController.cpp b/Source/Components/Physics/CharacterController.cpp index fd31a6f1..c3731f50 100644 --- a/Source/Components/Physics/CharacterController.cpp +++ b/Source/Components/Physics/CharacterController.cpp @@ -4,6 +4,7 @@ #include #include +#if USING( ME_PHYSICS_3D ) class IgnoreBodyAndGhostCast : public btCollisionWorld::ClosestRayResultCallback { @@ -28,7 +29,7 @@ class IgnoreBodyAndGhostCast btRigidBody* m_body = nullptr; btPairCachingGhostObjectWithEvents* m_ghostObject = nullptr; }; - +#endif CharacterController::CharacterController() : Component( "CharacterController" ) diff --git a/Source/Components/Physics/CharacterController.h b/Source/Components/Physics/CharacterController.h index bfddfd74..551de80b 100644 --- a/Source/Components/Physics/CharacterController.h +++ b/Source/Components/Physics/CharacterController.h @@ -72,10 +72,10 @@ class CharacterController Vector3 m_manualVelocity; std::vector m_surfaceHitNormals; - btVector3 m_previousPosition; float m_jumpTimer = 0.f; #if USING( ME_PHYSICS_3D ) + btVector3 m_previousPosition; void ParseGhostContacts(); void UpdatePosition(); diff --git a/Source/Components/Scripting/ScriptComponent.cpp b/Source/Components/Scripting/ScriptComponent.cpp index e2fd77f1..8c234b68 100644 --- a/Source/Components/Scripting/ScriptComponent.cpp +++ b/Source/Components/Scripting/ScriptComponent.cpp @@ -1,11 +1,5 @@ #include "PCH.h" -#if USING( ME_SCRIPTING ) -#include -#include // this should go -#include -#endif - #include "ScriptComponent.h" #include "imgui.h" #include "Cores/Scripting/ScriptCore.h" @@ -14,98 +8,38 @@ #include "Components/Camera.h" #include "Engine/Engine.h" #include "Components/UI/BasicUIView.h" -#include "Scripting/MonoUtils.h" #include #include "File.h" #include "Utils/HavanaUtils.h" #include "Engine/World.h" - -#if USING( ME_SCRIPTING ) -static std::unordered_map> s_EntityHasComponentFuncs; -static std::unordered_map> s_EntityAddComponentFuncs; - -template -static void RegisterComponent() -{ - ( []() - { - std::string_view typeName = typeid( Component ).name(); - size_t pos = typeName.find_last_of( ' ' ); - std::string_view structName = typeName.substr( pos + 1 ); - std::string managedTypename( structName ); - - MonoType* managedType = mono_reflection_type_from_name( managedTypename.data(), ScriptEngine::GetCoreImage() ); - if( !managedType ) - { - YIKES( "Could not find component type {}" ); - return; - } - s_EntityHasComponentFuncs[managedType] = []( EntityHandle entity ) - { - return entity->HasComponent(); - }; - - s_EntityAddComponentFuncs[managedType] = []( EntityHandle entity ) - { - entity->AddComponent(); - }; - }( ), ... ); -} -#endif - ScriptComponent::ScriptComponent() : Component( "ScriptComponent" ) { -#if USING( ME_SCRIPTING ) - // Remove this shit - // Did you update your bgfx .hpp shaders at all?? - mono_add_internal_call( "Transform::Entity_GetTranslation", (void*)Transform_GetTranslation ); - mono_add_internal_call( "Transform::Entity_GetTranslation", (void*)Transform_GetTranslation ); - mono_add_internal_call( "Transform::Transform_GetScale", (void*)Transform_GetScale ); - mono_add_internal_call( "Transform::Transform_SetScale", (void*)Transform_SetScale ); - mono_add_internal_call( "Camera::Camera_GetClearColor", (void*)Camera_GetClearColor ); - mono_add_internal_call( "Camera::Camera_SetClearColor", (void*)Camera_SetClearColor ); - mono_add_internal_call( "Input::IsKeyDown", (void*)Input_IsKeyDown ); - - mono_add_internal_call( "Entity::Entity_HasComponent", (void*)Entity_HasComponent ); - mono_add_internal_call( "Entity::Entity_AddComponent", (void*)Entity_AddComponent ); - mono_add_internal_call( "BasicUIView::BasicUIView_ExecuteJS", (void*)BasicUIView_ExecuteJS ); - mono_add_internal_call( "HTTP::HTTP_DownloadFile", (void*)HTTP_DownloadFile ); - // does this go into the other components? - RegisterComponent(); - RegisterComponent(); - RegisterComponent(); -#endif } + ScriptComponent::~ScriptComponent() { } + void ScriptComponent::Init() { #if USING( ME_SCRIPTING ) - if( !Instance && !ScriptName.empty() ) + if( m_dotnetHandle < 0 && !ScriptName.empty() ) { - auto foundClass = ScriptEngine::sScriptData.EntityClasses.find( ScriptName ); - if( foundClass != ScriptEngine::sScriptData.EntityClasses.end() ) + m_dotnetHandle = ScriptEngine::CreateScript( ScriptName, Parent.GetID() ); + if( m_dotnetHandle >= 0 ) { - Instance = ScriptEngine::CreateScriptInstance( foundClass->second, Parent ); - - if( ScriptEngine::sScriptData.EntityScriptFields.find( Parent.GetID().Value() ) != ScriptEngine::sScriptData.EntityScriptFields.end() ) - { - const ScriptFieldMap& fieldMap = ScriptEngine::sScriptData.EntityScriptFields.at( Parent.GetID().Value() ); - for( const auto& [name, fieldInstance] : fieldMap ) - { - Instance->SetFieldValueInternal( name, (void*)fieldInstance.Buffer ); - } - } - - ScriptName = foundClass->first; - - // Call OnCreate exactly ONCE after initialization: - Instance->OnCreate(); + // restore inspector/serialized values before the script runs + if( !m_savedFields.empty() ) + ScriptEngine::SetFieldsJson( m_dotnetHandle, m_savedFields ); + ScriptEngine::ScriptOnStart( m_dotnetHandle ); + } + else + { + BRUH_NEW( "dotnet: couldn't create script '{}', is it in the game dll?", ScriptName ); } } #endif @@ -117,26 +51,26 @@ void ScriptComponent::Init() void ScriptComponent::OnEditorInspect() { #if USING( ME_SCRIPTING ) - HavanaUtils::Label( "Has Valid Entity" ); - ImGui::Text( Parent.Get() ? "VALID" : "INVALID" ); - // Uninitialized script - if( !Instance ) + if( m_dotnetHandle < 0 ) { - if( ImGui::BeginCombo( "Script Name", "" ) ) + int count = ScriptEngine::GetScriptCount(); + if( ImGui::BeginCombo( "Script Name", ScriptName.empty() ? "" : ScriptName.c_str() ) ) { - for( auto it : ScriptEngine::sScriptData.EntityClasses ) + for( int i = 0; i < count; ++i ) { - if( ImGui::Selectable( it.first.c_str(), false ) ) + std::string name = ScriptEngine::GetScriptName( i ); + if( ImGui::Selectable( name.c_str(), ScriptName == name ) ) { - auto foundClass = ScriptEngine::sScriptData.EntityClasses.find( it.first ); - if( foundClass != ScriptEngine::sScriptData.EntityClasses.end() ) + ScriptName = name; + m_dotnetHandle = ScriptEngine::CreateScript( ScriptName, Parent.GetID() ); + if( m_dotnetHandle >= 0 ) { - // create class instance - Instance = ScriptEngine::CreateScriptInstance( foundClass->second, Parent ); - ScriptName = foundClass->first; - Instance->OnCreate(); + ScriptEngine::ScriptOnStart( m_dotnetHandle ); + } + else + { + BRUH_NEW( "dotnet: CreateScript failed for '{}'", ScriptName ); } - break; } } ImGui::EndCombo(); @@ -144,264 +78,41 @@ void ScriptComponent::OnEditorInspect() } else { - ImGui::Text( ScriptName.c_str() ); - - // Add a inspect settings option passed in - // #TODO: questionable?? - if( true )//if ( static_cast( GetEngine().GetGame() )->IsGameRunning() ) - { - ScriptClass& scriptClass = ScriptEngine::GetEntityClass( ScriptName ); - DrawValues( scriptClass ); - } - else - { - DrawValues( Instance->GetScriptClass() ); - } + ImGui::Text( "%s (handle: %d)", ScriptName.c_str(), m_dotnetHandle ); + ScriptEngine::ScriptOnEditorInspect( m_dotnetHandle ); } #endif } #endif -#if USING( ME_SCRIPTING ) - -void ScriptComponent::DrawValues( const ScriptClass& scriptClass ) -{ -#if USING( ME_IMGUI ) - const auto& fields = scriptClass.m_fields; - - for( const auto& [name, field] : fields ) - { - switch( field.Type ) - { - case MonoUtils::ScriptFieldType::Char: - { - char value = Instance->GetFieldValue( name ); - ImGui::LabelText( name.c_str(), &value ); - - break; - } - case MonoUtils::ScriptFieldType::Bool: - { - bool value = Instance->GetFieldValue( name ); - if( ImGui::Checkbox( name.c_str(), &value ) ) - { - Instance->SetFieldValue( name, value ); - } - break; - } - case MonoUtils::ScriptFieldType::Long: - { - int64_t value = Instance->GetFieldValue( name ); - if( HavanaUtils::Int( name.c_str(), value ) ) - { - Instance->SetFieldValue( name, value ); - } - - break; - } - case MonoUtils::ScriptFieldType::ULong: - { - uint64_t value = Instance->GetFieldValue( name ); - if( HavanaUtils::UInt( name.c_str(), value ) ) - { - Instance->SetFieldValue( name, value ); - } - - break; - } - case MonoUtils::ScriptFieldType::Short: - { - int16_t value = Instance->GetFieldValue( name ); - if( HavanaUtils::Int( name.c_str(), value ) ) - { - Instance->SetFieldValue( name, value ); - } - - break; - } - case MonoUtils::ScriptFieldType::UShort: - { - uint16_t value = Instance->GetFieldValue( name ); - if( HavanaUtils::UInt( name.c_str(), value ) ) - { - Instance->SetFieldValue( name, value ); - } - - break; - } - case MonoUtils::ScriptFieldType::Int: - { - int value = Instance->GetFieldValue( name ); - if( HavanaUtils::Int( name.c_str(), value ) ) - { - Instance->SetFieldValue( name, value ); - } - - break; - } - case MonoUtils::ScriptFieldType::UInt: - { - unsigned int value = Instance->GetFieldValue( name ); - if( HavanaUtils::UInt( name.c_str(), value ) ) - { - Instance->SetFieldValue( name, value ); - } - - break; - } - case MonoUtils::ScriptFieldType::Double: - { - double value = Instance->GetFieldValue( name ); - if( HavanaUtils::Double( name.c_str(), value ) ) - { - Instance->SetFieldValue( name, value ); - } - - break; - } - case MonoUtils::ScriptFieldType::Float: - { - float value = Instance->GetFieldValue( name ); - if( HavanaUtils::Float( name, value ) ) - { - Instance->SetFieldValue( name, value ); - } - - break; - } - case MonoUtils::ScriptFieldType::Vector2: - { - Vector2 v2 = Instance->GetFieldValue( name ); - if( HavanaUtils::EditableVector( name, v2 ) ) - { - Instance->SetFieldValue( name, v2 ); - } - break; - } - case MonoUtils::ScriptFieldType::Vector3: - { - Vector3 v3 = Instance->GetFieldValue( name ); - if( HavanaUtils::EditableVector3( name, v3 ) ) - { - Instance->SetFieldValue( name, v3 ); - } - break; - } - default: - BRUH_FMT( "Missing entry for %s", name.c_str() ); - break; - } - } -#endif -} -#endif - void ScriptComponent::OnSerialize( json& outJson ) { outJson["ScriptName"] = ScriptName; -} - -void ScriptComponent::OnDeserialize( const json& inJson ) -{ - ScriptName = inJson["ScriptName"]; -} #if USING( ME_SCRIPTING ) - -void ScriptComponent::Transform_GetTranslation( EntityID id, Vector3* outPosition ) -{ - EntityHandle handle( id, ScriptEngine::sScriptData.worldPtr ); - *outPosition = handle->GetComponent().GetPosition(); -} - - -void ScriptComponent::Transform_SetTranslation( EntityID id, Vector3* inPos ) -{ - EntityHandle handle( id, ScriptEngine::sScriptData.worldPtr ); - handle->GetComponent().SetPosition( *inPos ); -} - -void ScriptComponent::Transform_GetScale( EntityID id, Vector3* outPosition ) -{ - EntityHandle handle( id, ScriptEngine::sScriptData.worldPtr ); - *outPosition = handle->GetComponent().GetScale(); -} - -void ScriptComponent::Transform_SetScale( EntityID id, Vector3* inPos ) -{ - EntityHandle handle( id, ScriptEngine::sScriptData.worldPtr ); - handle->GetComponent().SetScale( *inPos ); -} - -void ScriptComponent::Camera_GetClearColor( EntityID id, Vector3* outPosition ) -{ - EntityHandle handle( id, ScriptEngine::sScriptData.worldPtr ); - *outPosition = handle->GetComponent().ClearColor; -} - -void ScriptComponent::Camera_SetClearColor( EntityID id, Vector3* inPos ) -{ - EntityHandle handle( id, ScriptEngine::sScriptData.worldPtr ); - handle->GetComponent().ClearColor = *inPos; -} - - -void ScriptComponent::BasicUIView_ExecuteJS( EntityID id, MonoString* inString ) -{ - EntityHandle handle( id, ScriptEngine::sScriptData.worldPtr ); - if( handle ) + // serialize script for saving + if( m_dotnetHandle >= 0 ) { - handle->GetComponent().ExecuteScript( MonoUtils::MonoStringToUTF8( inString ) ); + m_savedFields = ScriptEngine::GetFieldsJson( m_dotnetHandle ); } -} - -MonoString* ScriptComponent::HTTP_DownloadFile( MonoString* inURL, MonoString* inDirectory ) -{ - char* str = mono_string_to_utf8( inURL ); - char* inDirectoryMono = mono_string_to_utf8( inDirectory ); - Path outPath = Path( inDirectoryMono ); - if( Web::DownloadFile( str, outPath ) ) + if( !m_savedFields.empty() ) { - return mono_string_new( mono_domain_get(), File( outPath ).Read().c_str() ); + outJson["ScriptFields"] = m_savedFields; } - return nullptr; +#endif } -bool ScriptComponent::Entity_HasComponent( EntityID id, MonoReflectionType* inType ) +void ScriptComponent::OnDeserialize( const json& inJson ) { - if( id.IsNull() ) - { - return false; - } - - EntityHandle handle( id, ScriptEngine::sScriptData.worldPtr ); - - MonoType* managedType = mono_reflection_type_get_type( inType ); - return s_EntityHasComponentFuncs.at( managedType )( handle ); -} - + ScriptName = inJson["ScriptName"]; -void ScriptComponent::Entity_AddComponent( EntityID id, MonoReflectionType* inType ) -{ - if( id.IsNull() ) +#if USING( ME_SCRIPTING ) + if( inJson.contains( "ScriptFields" ) ) { - return; + m_savedFields = inJson["ScriptFields"].get(); } - - EntityHandle handle( id, ScriptEngine::sScriptData.worldPtr ); - - MonoType* managedType = mono_reflection_type_get_type( inType ); - s_EntityAddComponentFuncs.at( managedType )( handle ); - ScriptEngine::sScriptData.worldPtr.lock()->Simulate(); -} - - -bool ScriptComponent::Input_IsKeyDown( KeyCode key ) -{ - return GetEngine().GetInput().IsKeyDown( key ); -} - #endif +} \ No newline at end of file diff --git a/Source/Components/Scripting/ScriptComponent.h b/Source/Components/Scripting/ScriptComponent.h index d071f855..e9e9ed26 100644 --- a/Source/Components/Scripting/ScriptComponent.h +++ b/Source/Components/Scripting/ScriptComponent.h @@ -4,12 +4,6 @@ #include "ECS/Component.h" #include "Scripting/ScriptEngine.h" -// TODO: this should go -#include "Engine/Input.h" - -#if USING( ME_SCRIPTING ) -#include -#endif class ScriptComponent : public Component @@ -21,10 +15,6 @@ class ScriptComponent void Init() override; -#if USING( ME_SCRIPTING ) - void DrawValues( const ScriptClass& scriptClass ); -#endif - #if USING( ME_EDITOR ) void OnEditorInspect() override; #endif @@ -33,24 +23,12 @@ class ScriptComponent void OnSerialize( json& outJson ) override; void OnDeserialize( const json& inJson ) override; - #if USING( ME_SCRIPTING ) - - // this should go - static void Transform_GetTranslation( EntityID id, Vector3* outPosition ); - static void Transform_SetTranslation( EntityID id, Vector3* inPos ); - static void Transform_GetScale( EntityID id, Vector3* outPosition ); - static void Transform_SetScale( EntityID id, Vector3* inPos ); - static void Camera_GetClearColor( EntityID id, Vector3* outPosition ); - static void Camera_SetClearColor( EntityID id, Vector3* inPos ); - static bool Entity_HasComponent( EntityID id, MonoReflectionType* inType ); - static void Entity_AddComponent( EntityID id, MonoReflectionType* inType ); - static bool Input_IsKeyDown( KeyCode key ); - static void BasicUIView_ExecuteJS( EntityID id, MonoString* inString ); - static MonoString* HTTP_DownloadFile( MonoString* inURL, MonoString* inDirectory ); - - SharedPtr Instance = nullptr; + int m_dotnetHandle = -1; + // saved variables from scene or entity. + std::string m_savedFields; #endif + std::string ScriptName; }; diff --git a/Source/Components/Transform.cpp b/Source/Components/Transform.cpp index 67b160cd..eed95aeb 100644 --- a/Source/Components/Transform.cpp +++ b/Source/Components/Transform.cpp @@ -209,14 +209,14 @@ void Transform::SetWorldTransform( Matrix4& NewWorldTransform, bool InIsDirty ) const bool Transform::IsDirty() const { - return true;// IsLocalToWorldDirty || IsWorldToLocalDirty; + return IsLocalToWorldDirty || IsWorldToLocalDirty; } const Matrix4& Transform::GetLocalToWorldMatrix() { - OPTICK_CATEGORY( "GetLocalToWorldMatrix", Optick::Category::Scene ); if( FuncIsLocalToWorldDirty() ) { + //OPTICK_CATEGORY( "DIRTY: GetLocalToWorldMatrix", Optick::Category::Scene ); glm::mat4 T = glm::translate( glm::mat4( 1.0f ), GetPosition().InternalVector ); glm::quat R = GetRotation().InternalQuat; glm::mat4 S = glm::scale( glm::mat4( 1.0f ), GetScale().InternalVector ); @@ -230,12 +230,12 @@ const Matrix4& Transform::GetLocalToWorldMatrix() } bool Transform::FuncIsLocalToWorldDirty() { - return true;// IsLocalToWorldDirty || ( ParentTransform && ParentTransform->FuncIsLocalToWorldDirty() ); + return IsLocalToWorldDirty; } const Matrix4& Transform::GetWorldToLocalMatrix() { - OPTICK_CATEGORY( "GetWorldToLocalMatrix", Optick::Category::Scene ); + //OPTICK_CATEGORY( "GetWorldToLocalMatrix", Optick::Category::Scene ); if( IsWorldToLocalDirty ) { WorldToLocalMatrix = GetLocalToWorldMatrix().Inverse(); @@ -246,20 +246,27 @@ const Matrix4& Transform::GetWorldToLocalMatrix() void Transform::SetDirty( bool Dirty ) { + if( Dirty && IsLocalToWorldDirty ) + { + return; + } + OPTICK_EVENT( "Transform::SetDirty" ); - if( Dirty && ( Dirty != m_isDirty ) ) + + IsLocalToWorldDirty = Dirty; + IsWorldToLocalDirty = Dirty; + m_isDirty = Dirty; + + if( Dirty ) { for( SharedPtr& Child : Children ) { if( Child ) { - Child->SetDirty( Dirty ); + Child->SetDirty( true ); } } } - IsWorldToLocalDirty = true; - IsLocalToWorldDirty = true; - m_isDirty = Dirty; } void Transform::LookAt( const Vector3& InDirection ) diff --git a/Source/Components/Transform.h b/Source/Components/Transform.h index 2049e097..ea1c285d 100644 --- a/Source/Components/Transform.h +++ b/Source/Components/Transform.h @@ -99,8 +99,8 @@ class Transform std::vector> Children; bool m_isDirty = true; - bool IsLocalToWorldDirty = false; - bool IsWorldToLocalDirty = false; + bool IsLocalToWorldDirty = true; + bool IsWorldToLocalDirty = true; void SetDirty( bool Dirty ); diff --git a/Source/Components/UI/BasicUIView.cpp b/Source/Components/UI/BasicUIView.cpp index a753360c..5858d0ea 100644 --- a/Source/Components/UI/BasicUIView.cpp +++ b/Source/Components/UI/BasicUIView.cpp @@ -31,7 +31,7 @@ BasicUIView::BasicUIView( const char* Name ) void BasicUIView::Init() { SourceFile = File( FilePath ); - if( SourceFile.Read().empty() ) + if( FilePath.IsFile && SourceFile.Read().empty() ) { // #TODO: do I only show this in a dev block? or do I display a blank html block... SourceFile = File( Path("Assets/UI/UIFuckup.html") ); diff --git a/Source/Cores/AudioCore.cpp b/Source/Cores/AudioCore.cpp index 58e43ba2..e78db1aa 100644 --- a/Source/Cores/AudioCore.cpp +++ b/Source/Cores/AudioCore.cpp @@ -99,40 +99,45 @@ void AudioCore::OnEntityRemoved( Entity& NewEntity ) bool AudioCore::OnEvent( const BaseEvent& InEvent ) { - if( InEvent.GetEventId() == PlayAudioEvent::GetEventId() ) - { - const PlayAudioEvent& evt = static_cast( InEvent ); - Path soundPath = Path( evt.SourceName ); - auto sound = soundPath.GetLocalPath(); - if( m_cachedSounds.find( sound.data() ) == m_cachedSounds.end() ) - { - auto& source = m_cachedSounds[sound.data()] = MakeShared( sound.data() ); - InitComponent( *source ); - } - auto& cachedSound = m_cachedSounds[sound.data()]; - cachedSound->Play( false ); - cachedSound->SetVolume( evt.Volume ); - cachedSound->SetPositionMs( cachedSound->GetLength() * evt.StartPercent ); - - if( evt.Callback ) - { - evt.Callback( m_cachedSounds[sound.data()] ); - } + if( InEvent.GetEventId() == PlayAudioEvent::GetEventId() ) + { + const PlayAudioEvent& evt = static_cast( InEvent ); + Path soundPath = Path( evt.SourceName ); + std::string sound = soundPath.GetLocalPathString(); + if( sound.empty() ) + { + return true; + } + + if( m_cachedSounds.find( sound ) == m_cachedSounds.end() ) + { + auto& source = m_cachedSounds[sound] = MakeShared( sound ); + InitComponent( *source ); + } + auto& cachedSound = m_cachedSounds[sound]; + cachedSound->Play( false ); + cachedSound->SetVolume( evt.Volume ); + cachedSound->SetPositionMs( cachedSound->GetLength() * evt.StartPercent ); + + if( evt.Callback ) + { + evt.Callback( m_cachedSounds[sound] ); + } return true; } - if( InEvent.GetEventId() == StopAudioEvent::GetEventId() ) - { - const StopAudioEvent& evt = static_cast( InEvent ); - Path soundPath = Path( evt.SourceName ); - auto sound = soundPath.GetLocalPath(); - if( m_cachedSounds.find( sound.data() ) != m_cachedSounds.end() ) - { - m_cachedSounds.erase( sound.data() ); - //auto& source = m_cachedSounds[sound.data()] = MakeShared( sound.data() ); - //InitComponent( *source ); - } + if( InEvent.GetEventId() == StopAudioEvent::GetEventId() ) + { + const StopAudioEvent& evt = static_cast( InEvent ); + Path soundPath = Path( evt.SourceName ); + std::string sound = soundPath.GetLocalPathString(); + if( m_cachedSounds.find( sound ) != m_cachedSounds.end() ) + { + m_cachedSounds.erase( sound ); + //auto& source = m_cachedSounds[sound.data()] = MakeShared( sound.data() ); + //InitComponent( *source ); + } } return false; @@ -177,4 +182,4 @@ FMOD::System* AudioCore::GetSystem() const ME_ASSERT_MSG( false, "Trying to get FMOD when it's not compiled." ); return nullptr; #endif -} \ No newline at end of file +} diff --git a/Source/Cores/Rendering/RenderCore.cpp b/Source/Cores/Rendering/RenderCore.cpp index d2d83615..6b943fa2 100644 --- a/Source/Cores/Rendering/RenderCore.cpp +++ b/Source/Cores/Rendering/RenderCore.cpp @@ -117,7 +117,7 @@ void RenderCore::Update( const UpdateContext& inUpdateContext ) OPTICK_CATEGORY( "Mesh Job", Optick::Category::Debug ); for( int entIndex = batchBegin; entIndex < batchEnd; ++entIndex ) { - OPTICK_CATEGORY( "Update Transform", Optick::Category::Scene ); + //OPTICK_CATEGORY( "Update Transform", Optick::Category::Scene ); auto& InEntity = Renderables[entIndex]; { Transform& transform = InEntity.GetComponent(); @@ -126,7 +126,7 @@ void RenderCore::Update( const UpdateContext& inUpdateContext ) const glm::mat4& meshMatrix = transform.GetLocalToWorldMatrix().GetInternalMatrix(); { - OPTICK_CATEGORY( "Culling", Optick::Category::Visibility ); + //OPTICK_CATEGORY( "Culling", Optick::Category::Visibility ); glm::vec4 point = glm::vec4( meshMatrix[3] ); for( Moonlight::CameraData& cam : cameras.Commands ) { @@ -158,7 +158,7 @@ void RenderCore::Update( const UpdateContext& inUpdateContext ) if( isVisible ) { - OPTICK_CATEGORY( "Submit", Optick::Category::Rendering ); + //OPTICK_CATEGORY( "Submit", Optick::Category::Rendering ); Moonlight::MeshCommand command; command.SingleMesh = model.MeshReferece; command.MeshMaterial = model.MeshMaterial; @@ -166,6 +166,19 @@ void RenderCore::Update( const UpdateContext& inUpdateContext ) command.Type = model.GetType(); command.VisibilityIndex = entIndex; command.ID = InEntity.GetId().Value(); + + if( model.MeshMaterial ) + { + command.IsTransparent = model.MeshMaterial->IsTransparent(); + command.SupportsInstancing = model.MeshMaterial->SupportsInstancing; + command.BatchKey = model.MeshMaterial->GetInstanceBatchKey(); + } + if( model.MeshReferece ) + { + command.VertexBufferIdx = model.MeshReferece->GetVertexBuffer().idx; + command.IndexBufferIdx = model.MeshReferece->GetIndexuffer().idx; + } + renderer.GetMeshCache().Update( model.GetId(), command); } } @@ -217,6 +230,10 @@ void RenderCore::OnEditorInspect() { GetEngine().GetRenderer().SetMSAALevel( BGFXRenderer::MSAALevel::None ); } + if( ImGui::Button( "MSAA X8" ) ) + { + GetEngine().GetRenderer().SetMSAALevel( BGFXRenderer::MSAALevel::X8 ); + } if( ImGui::Button( "MSAA X16" ) ) { GetEngine().GetRenderer().SetMSAALevel( BGFXRenderer::MSAALevel::X16 ); diff --git a/Source/Cores/Scripting/ScriptCore.cpp b/Source/Cores/Scripting/ScriptCore.cpp index 037e7de7..d2e43cec 100644 --- a/Source/Cores/Scripting/ScriptCore.cpp +++ b/Source/Cores/Scripting/ScriptCore.cpp @@ -3,16 +3,8 @@ #include "ScriptCore.h" #include "Components/Scripting/ScriptComponent.h" -#if USING( ME_SCRIPTING ) -#include -#include -#include -#include -#endif - #include "File.h" #include "Utils/PlatformUtils.h" -#include "Scripting/MonoUtils.h" #include "Scripting/ScriptEngine.h" #include "Events/SceneEvents.h" #include "ECS/Core.h" @@ -29,6 +21,7 @@ ScriptCore::ScriptCore() #endif } + ScriptCore::~ScriptCore() { } @@ -38,62 +31,45 @@ void ScriptCore::Init() { } + void ScriptCore::Update( const UpdateContext& inUpdateContext ) { #if USING( ME_SCRIPTING ) OPTICK_EVENT( "ScriptCore::Update" ); - auto& entities = GetEntities(); - for( auto& InEntity : entities ) + for( auto& entity : GetEntities() ) { - auto& scriptComponent = InEntity.GetComponent(); - - if( scriptComponent.Instance ) + auto& comp = entity.GetComponent(); + if( comp.m_dotnetHandle >= 0 ) { - scriptComponent.Instance->OnUpdate( inUpdateContext.GetDeltaTime() ); + ScriptEngine::ScriptOnUpdate( comp.m_dotnetHandle, inUpdateContext.GetDeltaTime() ); } } #endif } + void ScriptCore::LateUpdate( const UpdateContext& inUpdateContext ) { } + void ScriptCore::OnEntityAdded( Entity& NewEntity ) { -#if USING( ME_SCRIPTING ) - ScriptComponent& comp = NewEntity.GetComponent(); - if( comp.Instance ) - { - // could be possibly called before other entities are done - comp.Instance->OnCreate(); - } -#endif + // nothing to do - ScriptComponent::Init() already runs CreateScript + ScriptOnStart. + // #TODO: add a ScriptOnCreate binding here if we ever want an Awake-before-Start split. } + void ScriptCore::OnEntityRemoved( Entity& InEntity ) { #if USING( ME_SCRIPTING ) - EntityID entityId = InEntity.GetId(); - - auto it = ScriptEngine::entityInstanceCache.find( entityId ); - if( it != ScriptEngine::entityInstanceCache.end() ) - { - mono_gchandle_free( it->second ); // Free the GC handle explicitly - ScriptEngine::entityInstanceCache.erase( it ); - BRUH_FMT( "Removed GC handle for Entity ID: %u", entityId.Value() ); - } - - // Also handle the entity instances if needed - auto instIt = ScriptEngine::sScriptData.EntityInstances.find( entityId.Value() ); - if( instIt != ScriptEngine::sScriptData.EntityInstances.end() ) + auto& comp = InEntity.GetComponent(); + if( comp.m_dotnetHandle >= 0 ) { - ScriptEngine::sScriptData.EntityInstances.erase( instIt ); + ScriptEngine::ScriptOnDestroy( comp.m_dotnetHandle ); + comp.m_dotnetHandle = -1; } - - // Clear script fields associated with entity, if tracked - ScriptEngine::sScriptData.EntityScriptFields.erase( entityId.Value() ); #endif } @@ -104,33 +80,18 @@ void ScriptCore::OnEditorInspect() { #if USING( ME_SCRIPTING ) OPTICK_EVENT( "ScriptCore::OnEditorInspect" ); - //float value; - //mono_field_get_value( ScriptEngine::testClassInstance.ClassObject, ScriptEngine::floatField, &value ); - //ImGui::DragFloat( "C# Float", &value ); - //mono_field_set_value( ScriptEngine::testClassInstance.ClassObject, ScriptEngine::floatField, &value ); - // - //ScriptEngine::testClassInstance.InvokeFull("PrintFloatVar"); + // debug: dump the scriptable classes the game dll handed us. + // #TODO: the old "All Classes" dump needs a new binding to come back. if( ImGui::CollapsingHeader( "Entity Classes" ) ) { - for( auto& it : ScriptEngine::LoadedEntityScripts ) + int count = ScriptEngine::GetScriptCount(); + for( int i = 0; i < count; ++i ) { - ImGui::Text( "%s %s", it.Namespace.c_str(), it.Name.c_str() ); + std::string name = ScriptEngine::GetScriptName( i ); + ImGui::Text( "%s", name.c_str() ); } } - - if( ImGui::CollapsingHeader( "All Classes" ) ) - { - for( auto& it : ScriptEngine::LoadedClasses ) - { - ImGui::Text( "%s %s", it.Namespace.c_str(), it.Name.c_str() ); - } - } - - if( ImGui::Button( "Start Debugging" ) ) - { - ScriptEngine::InitDebug(); - } #endif } diff --git a/Source/Cores/Scripting/ScriptCore.h b/Source/Cores/Scripting/ScriptCore.h index 1eac0250..7cccbd8d 100644 --- a/Source/Cores/Scripting/ScriptCore.h +++ b/Source/Cores/Scripting/ScriptCore.h @@ -1,7 +1,6 @@ #pragma once #include "ECS/Core.h" -#include "Scripting/MonoFwd.h" #include "Path.h" #include "Events/EventReceiver.h" diff --git a/Source/Cores/UI/UICore.cpp b/Source/Cores/UI/UICore.cpp index 323659b3..a0833ce5 100644 --- a/Source/Cores/UI/UICore.cpp +++ b/Source/Cores/UI/UICore.cpp @@ -40,6 +40,10 @@ UICore::UICore( IWindow* window, BGFXRenderer* renderer ) m_renderer = renderer; +#if USING( ME_UI ) + YIKES("UICORE CREATE"); +#endif + UIProgram = Moonlight::LoadProgram( "Assets/Shaders/UI.vert", "Assets/Shaders/UI.frag" ); s_texUI = bgfx::createUniform( "s_texUI", bgfx::UniformType::Sampler ); @@ -63,9 +67,10 @@ UICore::UICore( IWindow* window, BGFXRenderer* renderer ) #if USING( ME_PLATFORM_WINDOWS ) ultralight::Platform::instance().set_font_loader( new FontLoaderWin() ); -#endif -#if USING( ME_PLATFORM_MACOS ) +#elif USING( ME_PLATFORM_MACOS ) ultralight::Platform::instance().set_font_loader( new FontLoaderMac() ); +#elif USING( ME_PLATFORM_LINUX ) + ultralight::Platform::instance().set_font_loader( ultralight::GetPlatformFontLoader() ); #endif m_driver = new UIDriver(); @@ -215,48 +220,45 @@ void UICore::Update( const UpdateContext& inUpdateContext ) //Havana* editor = static_cast( GetEngine().GetWorld().lock()->GetCore( EditorCore::GetTypeId() ) )->GetEditor(); - Vector2 windowPosition = GetEngine().GetWindow()->GetPosition(); + const ImGuiViewport* mainViewport = ImGui::GetMainViewport(); + Vector2 windowPosition = Vector2( mainViewport->Pos.x, mainViewport->Pos.y ); Vector2 offset = gameInput.GetMouseOffset(); - mouseEvent.x = ( windowPosition.x + mousePosition.x ) - offset.x;// + windowPosition.x + offset.x; - mouseEvent.y = ( windowPosition.y + mousePosition.y ) - offset.y;// + windowPosition.y - offset.y; + mouseEvent.x = ( windowPosition.x + mousePosition.x ) - offset.x; + mouseEvent.y = ( windowPosition.y + mousePosition.y ) - offset.y; - if( mousePosition.IsZero() ) - { - return; - } + const bool fireMouseEvents = !mousePosition.IsZero(); #else mouseEvent.x = mousePosition.x; mouseEvent.y = mousePosition.y; + const bool fireMouseEvents = true; #endif - // This sucks - static bool hasPressed = false; - if( gameInput.WasMouseButtonPressed( MouseButton::Left ) && !hasPressed ) + if( fireMouseEvents ) { - mouseEvent.button = ultralight::MouseEvent::Button::kButton_Left; - mouseEvent.type = ultralight::MouseEvent::kType_MouseDown; - hasPressed = true; - } - else if( gameInput.IsMouseButtonDown( MouseButton::Left ) ) - { - mouseEvent.button = ultralight::MouseEvent::Button::kButton_Left; - mouseEvent.type = ultralight::MouseEvent::kType_MouseMoved; - } - else if( !gameInput.WasMouseButtonPressed( MouseButton::Left ) && hasPressed ) - { - mouseEvent.button = ultralight::MouseEvent::Button::kButton_Left; - mouseEvent.type = ultralight::MouseEvent::kType_MouseUp; - hasPressed = false; - } - else - { - mouseEvent.button = ultralight::MouseEvent::Button::kButton_None; - } + // This sucks + static bool hasPressed = false; + if( gameInput.WasMouseButtonPressed( MouseButton::Left ) && !hasPressed ) + { + mouseEvent.button = ultralight::MouseEvent::Button::kButton_Left; + mouseEvent.type = ultralight::MouseEvent::kType_MouseDown; + hasPressed = true; + } + else if( gameInput.IsMouseButtonDown( MouseButton::Left ) ) + { + mouseEvent.button = ultralight::MouseEvent::Button::kButton_Left; + mouseEvent.type = ultralight::MouseEvent::kType_MouseMoved; + } + else if( !gameInput.WasMouseButtonPressed( MouseButton::Left ) && hasPressed ) + { + mouseEvent.button = ultralight::MouseEvent::Button::kButton_Left; + mouseEvent.type = ultralight::MouseEvent::kType_MouseUp; + hasPressed = false; + } + else + { + mouseEvent.button = ultralight::MouseEvent::Button::kButton_None; + } -#if USING( ME_EDITOR ) - //if (m_renderer->GetViewportMode() == ViewportMode::Game) -#endif - { OPTICK_EVENT( "UI Input Update", Optick::Category::UI ); for( auto& view : m_views ) { @@ -281,6 +283,7 @@ void UICore::Render() { OPTICK_EVENT( "Ultralight Render", Optick::Category::UI ); + m_uiRenderer->RefreshDisplay( 0 ); m_uiRenderer->Render(); } m_driver->RenderCommandList(); @@ -297,9 +300,9 @@ void UICore::Render() ultralight::RenderTarget surface = (ultralight::RenderTarget)( ent.GetComponent().ViewRef->render_target() ); bgfx::ViewId view = 10; + if( bgfx::isValid( m_uiFrameBuffer ) ) { - bgfx::setViewName( view, "UI BLIT" ); - const bgfx::RendererType::Enum renderer = bgfx::getRendererType(); + bgfx::setViewName( view, "UI Render Target" ); float m_texelHalf = 0.0f; float orthoProj[16]; bx::mtxOrtho( orthoProj, 0.0f, 1.0f, 1.0f, 0.0f, 0.0f, 1.0f, 0.0f, bgfx::getCaps()->homogeneousDepth ); @@ -310,19 +313,18 @@ void UICore::Render() bgfx::setTransform( identity ); } + // Composite the Ultralight render-target into m_uiTexture (a separate + // render target). Rendering into the RT's own framebuffer while sampling + // the same texture is a read-after-write hazard that corrupts on Vulkan. bgfx::setViewRect( view, 0, 0, uint16_t( surface.texture_width ), uint16_t( surface.texture_height ) ); bgfx::setViewTransform( view, NULL, orthoProj ); - bgfx::setViewFrameBuffer( view, m_driver->m_buffers[surface.render_buffer_id].BufferHandle ); - bgfx::setState( 0 - | BGFX_STATE_WRITE_RGB - //| BGFX_STATE_BLEND_ALPHA // - Not it, creates artifacts - //| BGFX_STATE_BLEND_FUNC(BGFX_STATE_BLEND_ONE, BGFX_STATE_BLEND_INV_SRC_ALPHA) // - Almost there - | BGFX_STATE_BLEND_FUNC_SEPARATE( BGFX_STATE_BLEND_ONE, BGFX_STATE_BLEND_INV_SRC_ALPHA, BGFX_STATE_BLEND_INV_DST_ALPHA, BGFX_STATE_BLEND_ONE ) - ); + bgfx::setViewFrameBuffer( view, m_uiFrameBuffer ); + bgfx::setViewClear( view, BGFX_CLEAR_COLOR, 0x00000000 ); + // Straight overwrite copy (RT content is already premultiplied alpha). + bgfx::setState( BGFX_STATE_WRITE_RGB | BGFX_STATE_WRITE_A ); bgfx::setTexture( 0, s_texUI, m_driver->m_buffers[surface.render_buffer_id].TexHandle ); Moonlight::screenSpaceQuad( surface.texture_width, surface.texture_height, m_texelHalf, bgfx::getCaps()->originBottomLeft ); bgfx::submit( view, UIProgram ); - bgfx::blit( view, m_uiTexture, 0, 0, m_driver->m_buffers[surface.render_buffer_id].TexHandle ); } if( !surface.is_empty )//&& !surface->dirty_bounds().IsEmpty() ) { @@ -342,7 +344,7 @@ void UICore::Render() void UICore::PostRender( const UpdateContext& inUpdateContext ) { #if USING( ME_UI ) - m_uiRenderer->RefreshDisplay( 0 ); + // RefreshDisplay now happens before Render() (see UICore::Render). #endif } @@ -356,6 +358,11 @@ void UICore::OnResize( const Vector2& NewSize ) if( NewSize != UISize ) { + if( bgfx::isValid( m_uiFrameBuffer ) ) + { + bgfx::destroy( m_uiFrameBuffer ); + m_uiFrameBuffer = BGFX_INVALID_HANDLE; + } if( bgfx::isValid( m_uiTexture ) ) { bgfx::destroy( m_uiTexture ); @@ -366,8 +373,10 @@ void UICore::OnResize( const Vector2& NewSize ) , false , 1 , bgfx::TextureFormat::BGRA8 - , BGFX_SAMPLER_MIN_POINT | BGFX_SAMPLER_MAG_POINT | BGFX_SAMPLER_MIP_POINT | BGFX_TEXTURE_BLIT_DST + , BGFX_TEXTURE_RT | BGFX_SAMPLER_MIN_POINT | BGFX_SAMPLER_MAG_POINT | BGFX_SAMPLER_MIP_POINT ); + bgfx::TextureHandle fbTex[] = { m_uiTexture }; + m_uiFrameBuffer = bgfx::createFrameBuffer( BX_COUNTOF( fbTex ), fbTex, false ); UISize = NewSize; #if USING( ME_UI ) @@ -420,8 +429,8 @@ void UICore::InitUIView( BasicUIView& view ) else { // the file doesn't exist so display the raw html (error screen) - ultralight::String str = ultralight::String(view.SourceFile.Read().c_str()); - newView->LoadHTML(str); + ultralight::String str = "file:///" + ultralight::String( view.SourceFile.FilePath.FullPath.c_str() ); + newView->LoadURL( str ); } } diff --git a/Source/Cores/UI/UICore.h b/Source/Cores/UI/UICore.h index 6f8d70b4..41506886 100644 --- a/Source/Cores/UI/UICore.h +++ b/Source/Cores/UI/UICore.h @@ -63,6 +63,7 @@ class UICore final virtual void OnEditorInspect() final; #endif bgfx::TextureHandle m_uiTexture; + bgfx::FrameBufferHandle m_uiFrameBuffer = BGFX_INVALID_HANDLE; Vector2 UISize; private: diff --git a/Source/ECS/Core.cpp b/Source/ECS/Core.cpp index 88573a27..0a521ecf 100644 --- a/Source/ECS/Core.cpp +++ b/Source/ECS/Core.cpp @@ -3,12 +3,33 @@ #include #include #include "Core/Assert.h" +#if defined( __GNUC__ ) || defined( __clang__ ) +#include +#endif + +static std::string CleanTypeName( const char* rawName ) +{ +#if defined( __GNUC__ ) || defined( __clang__ ) + int status = 0; + char* demangled = abi::__cxa_demangle( rawName, nullptr, nullptr, &status ); + std::string result = ( status == 0 && demangled ) ? demangled : rawName; + free( demangled ); + + auto pos = result.rfind( "::" ); + if( pos != std::string::npos ) + result = result.substr( pos + 2 ); + return result; +#else + std::string name( rawName ); + auto pos = name.find( ' ' ); + return pos != std::string::npos ? name.substr( pos + 1 ) : name; +#endif +} BaseCore::BaseCore( const char* CompName, const ComponentFilter& Filter ) - : Name( CompName ) + : Name( CleanTypeName( CompName ) ) , CompFilter( Filter ) { - Name = Name.substr( Name.find( ' ' ) + 1 ); } World& BaseCore::GetWorld() const diff --git a/Source/ECS/EntityID.h b/Source/ECS/EntityID.h index b0897176..86d3c063 100644 --- a/Source/ECS/EntityID.h +++ b/Source/ECS/EntityID.h @@ -29,7 +29,7 @@ struct EntityID inline IntType Value() const { - return ( Counter << MITCH_ENTITY_ID_COUNTER_BIT_COUNT ) | Index; + return ( ( Counter & 0xFFFFULL ) << MITCH_ENTITY_ID_INDEX_BIT_COUNT ) | ( Index & 0x0000FFFFFFFFFFFFULL ); } void Clear() @@ -50,7 +50,7 @@ namespace std { std::size_t operator()( const EntityID& eid ) const noexcept { - return std::hash()( eid.Value() ); + return std::hash()( eid.Value() ); } }; } diff --git a/Source/Engine/Engine.cpp b/Source/Engine/Engine.cpp index 06cd2689..e2edffbc 100644 --- a/Source/Engine/Engine.cpp +++ b/Source/Engine/Engine.cpp @@ -62,9 +62,12 @@ Engine::~Engine() extern bool ImGui_ImplSDL2_InitForD3D( SDL_Window* window ); extern bool ImGui_ImplSDL2_InitForMetal( SDL_Window* window ); +extern bool ImGui_ImplSDL2_InitForOpenGL(SDL_Window* window, void* sdl_gl_context); +extern bool ImGui_ImplSDL2_InitForVulkan( SDL_Window* window ); extern bool ImGui_ImplWin32_Init( void* window ); void Engine::Init( Game* game ) { + OPTICK_EVENT( "Engine::Init" ); if( m_isInitialized || !game ) { return; @@ -113,10 +116,16 @@ void Engine::Init( Game* game ) evt.Fire(); }; - engineConfig = EngineConfig( engineCfg ); - engineConfig.OnLoadConfig( engineConfig.Root ); -#if USING( ME_PLATFORM_WIN64 ) || USING( ME_PLATFORM_MACOS ) - GameWindow = new SDLWindow( engineConfig.GetValue( "Title" ), ResizeFunc, engineConfig.WindowPosition.x, engineConfig.WindowPosition.y, engineConfig.WindowSize ); + { + OPTICK_EVENT( "Engine::Init::LoadConfig" ); + engineConfig = EngineConfig( engineCfg ); + engineConfig.OnLoadConfig( engineConfig.Root ); + } +#if USING( ME_PLATFORM_WIN64 ) || USING( ME_PLATFORM_MACOS ) || USING( ME_PLATFORM_LINUX ) + { + OPTICK_EVENT( "Engine::Init::CreateWindow" ); + GameWindow = new SDLWindow( engineConfig.GetValue( "Title" ), ResizeFunc, engineConfig.WindowPosition.x, engineConfig.WindowPosition.y, engineConfig.WindowSize ); + } #endif #if USING( ME_PLATFORM_UWP ) @@ -129,34 +138,41 @@ void Engine::Init( Game* game ) GameWindow->SetBorderless( true ); #endif - NewRenderer = new BGFXRenderer(); - RendererCreationSettings settings; - settings.WindowPtr = GameWindow->GetWindowPtr(); - settings.InitialSize = engineConfig.WindowSize; - NewRenderer->Create( settings ); + CLog::GetInstance().Log( CLog::LogType::Info, "Starting the Renderer." ); + { + OPTICK_EVENT( "Engine::Init::RendererCreate" ); + NewRenderer = new BGFXRenderer(); + RendererCreationSettings settings; + settings.WindowPtr = GameWindow->GetWindowPtr(); +#if USING( ME_PLATFORM_LINUX ) + settings.DisplayPtr = static_cast( GameWindow )->GetDisplayPtr(); + settings.WindowType = static_cast( GameWindow )->GetWindowType(); +#endif + settings.InitialSize = engineConfig.WindowSize; + NewRenderer->Create( settings ); + } + CLog::GetInstance().Log( CLog::LogType::Info, "After the Renderer." ); #if USING( ME_IMGUI ) #if USING( ME_PLATFORM_WIN64 ) ImGui_ImplSDL2_InitForD3D( static_cast( GameWindow )->WindowHandle ); -#endif -#if USING( ME_PLATFORM_MACOS ) +#elif USING( ME_PLATFORM_MACOS ) ImGui_ImplSDL2_InitForMetal( static_cast( GameWindow )->WindowHandle ); +#elif USING( ME_PLATFORM_LINUX ) + ImGui_ImplSDL2_InitForVulkan( static_cast( GameWindow )->WindowHandle ); #endif #endif //m_renderer = new Moonlight::Renderer(); //m_renderer->WindowResized(GameWindow->GetSize()); - GameWorld = MakeShared(); - - Cameras = new CameraCore(); - - SceneNodes = new SceneCore(); - - ModelRenderer = new RenderCore(); - AudioThread = new AudioCore(); - - //m_renderer->Init(); - - UI = new UICore( GameWindow, NewRenderer ); + { + OPTICK_EVENT( "Engine::Init::CreateCores" ); + GameWorld = MakeShared(); + Cameras = new CameraCore(); + SceneNodes = new SceneCore(); + ModelRenderer = new RenderCore(); + AudioThread = new AudioCore(); + UI = new UICore( GameWindow, NewRenderer ); + } NewRenderer->SetGuizmoDrawCallback( [this]( DebugDrawer* drawer ) { @@ -188,13 +204,21 @@ void Engine::Init( Game* game ) void Engine::InitGame() { - GameWorld->AddCore( *Cameras ); - GameWorld->AddCore( *SceneNodes ); - GameWorld->AddCore( *ModelRenderer ); - GameWorld->AddCore( *AudioThread ); - GameWorld->AddCore( *UI ); + OPTICK_EVENT( "Engine::InitGame" ); + { + OPTICK_EVENT( "Engine::InitGame::AddCores" ); + GameWorld->AddCore( *Cameras ); + GameWorld->AddCore( *SceneNodes ); + GameWorld->AddCore( *ModelRenderer ); + GameWorld->AddCore( *AudioThread ); + GameWorld->AddCore( *UI ); + } - m_game->OnInitialize(); + YIKES("Engine::InitGame"); + { + OPTICK_EVENT( "Engine::InitGame::OnInitialize" ); + m_game->OnInitialize(); + } } void Engine::StopGame() @@ -346,8 +370,9 @@ void Engine::Run() } } - // Late Update + // Late Update { + OPTICK_EVENT( "LateUpdate" ); GameWorld->LateUpdateLoadedCores( updateContext ); Cameras->Update( updateContext ); SceneNodes->LateUpdate( updateContext ); @@ -359,6 +384,7 @@ void Engine::Run() // Render { + OPTICK_EVENT( "Render" ); m_game->PreRender(); #if !USING( ME_EDITOR ) EditorCamera.OutputSize = GetWindow()->GetSize(); @@ -481,27 +507,35 @@ SimpleJobSystem& Engine::GetJobSystem() void Engine::LoadScene( const std::string& SceneFile ) { + OPTICK_EVENT( "Engine::LoadScene" ); Cameras->Init(); if( CurrentScene ) { + OPTICK_EVENT( "Engine::LoadScene::UnloadPrevious" ); CurrentScene->UnLoad(); delete CurrentScene; CurrentScene = nullptr; } - GameWorld->Unload(); + { + OPTICK_EVENT( "Engine::LoadScene::WorldUnload" ); + GameWorld->Unload(); + } SceneNodes->Init(); CurrentScene = new Scene( SceneFile ); - if( !CurrentScene->Load( GameWorld ) && !CurrentScene->IsNewScene() ) { - ME_ASSERT_MSG( false, "Failed to load scene." ); + OPTICK_EVENT( "Engine::LoadScene::ParseJSON" ); + if( !CurrentScene->Load( GameWorld ) && !CurrentScene->IsNewScene() ) + { + ME_ASSERT_MSG( false, "Failed to load scene." ); + } } #if USING( ME_SCRIPTING ) - ScriptEngine::sScriptData.worldPtr = GetWorld(); - ScriptEngine::sScriptData.enginePtr = this; + ScriptEngine::SetWorld( GetWorld() ); #endif + GameWorld->AddCore(*UI); GameWorld->Simulate(); diff --git a/Source/Engine/Input.cpp b/Source/Engine/Input.cpp index 16eced10..3da0e3c9 100644 --- a/Source/Engine/Input.cpp +++ b/Source/Engine/Input.cpp @@ -72,9 +72,8 @@ void Input::Resume() void Input::Stop() { RelativeMousePosition = Vector2(); - //SDL_CaptureMouse(SDL_FALSE); - //SDL_SetRelativeMouseMode(SDL_FALSE); - //SDL_ShowCursor(SDL_ENABLE); + SDL_SetRelativeMouseMode( SDL_FALSE ); + SDL_ShowCursor( SDL_ENABLE ); CaptureInput = false; } diff --git a/Source/Engine/World.cpp b/Source/Engine/World.cpp index 81a4ccb1..01f71c4b 100644 --- a/Source/Engine/World.cpp +++ b/Source/Engine/World.cpp @@ -418,7 +418,7 @@ Entity* World::GetEntityRaw( const EntityID& InEntity ) return nullptr; } -EntityHandle World::FindEntityByIDValue( uint32_t id ) +EntityHandle World::FindEntityByIDValue( uint64_t id ) { for (auto& alive : EntityCache.Alive) { diff --git a/Source/Engine/World.h b/Source/Engine/World.h index a70f5388..e8a6c16a 100644 --- a/Source/Engine/World.h +++ b/Source/Engine/World.h @@ -75,7 +75,7 @@ class World std::size_t GetEntityCount() const; EntityHandle GetEntity( const EntityID& id ); Entity* GetEntityRaw( const EntityID& id ); - EntityHandle FindEntityByIDValue( uint32_t id ); + EntityHandle FindEntityByIDValue( uint64_t id ); const bool EntityExists( const EntityID& InEntity ) const; World(); World( std::size_t InEntityPoolSize ); diff --git a/Source/Physics/ICollisionEventReciever.cpp b/Source/Physics/ICollisionEventReciever.cpp index ff7a29c0..01981024 100644 --- a/Source/Physics/ICollisionEventReciever.cpp +++ b/Source/Physics/ICollisionEventReciever.cpp @@ -2,6 +2,7 @@ #include "ICollisionEventReciever.h" #include "RigidBodyWithCollisionEvents.h" +#if USING( ME_PHYSICS_3D ) void ICollisionEvents::updateAction( btCollisionWorld* collisionWorld, btScalar deltaTimeStep ) { const bool forceADiscreteCollisionDetection = false; // true is useless @@ -17,4 +18,5 @@ void ICollisionEvents::SetInstance( ICollisionEvents* instance, btDynamicsWorld* btAssert( instance && btWorld ); btRigidBodyWithEventsEventDelegates::eventDispatcher = instance; btWorld->addAction( instance ); -} \ No newline at end of file +} +#endif \ No newline at end of file diff --git a/Source/Physics/ICollisionEventReciever.h b/Source/Physics/ICollisionEventReciever.h index c2e68715..74e9c553 100644 --- a/Source/Physics/ICollisionEventReciever.h +++ b/Source/Physics/ICollisionEventReciever.h @@ -4,6 +4,7 @@ class btRigidBodyWithEventsEventDelegates; +#if USING( ME_PHYSICS_3D ) class ICollisionEvents : public btActionInterface { @@ -19,4 +20,5 @@ class ICollisionEvents virtual void debugDraw( btIDebugDraw* debugDrawer ) {} virtual ~ICollisionEvents() {} -}; \ No newline at end of file +}; +#endif \ No newline at end of file diff --git a/Source/Physics/RigidBodyWithCollisionEvents.cpp b/Source/Physics/RigidBodyWithCollisionEvents.cpp index db9d2dda..2eda5dbc 100644 --- a/Source/Physics/RigidBodyWithCollisionEvents.cpp +++ b/Source/Physics/RigidBodyWithCollisionEvents.cpp @@ -7,10 +7,7 @@ From: https://pybullet.org/Bullet/phpBB3/viewtopic.php?f=9&t=1691&start=0&hilit= #include "RigidBodyWithCollisionEvents.h" - -ICollisionEvents* btRigidBodyWithEventsEventDelegates::eventDispatcher = NULL; - -btAlignedObjectArray< btRigidBodyWithEventsEventDelegates* > btRigidBodyWithEventsEventDelegates::monitorCollisionsBodies; // This list is the list of bodies for which to monitor collisions +#if USING( ME_PHYSICS_3D ) void btRigidBodyWithEventsEventDelegates::setMonitorCollisions( bool flag ) { _monitorCollisions = flag; @@ -326,3 +323,5 @@ void btRigidBodyWithEventsEventDelegates::_SendCollisionEvents() #endif } + +#endif \ No newline at end of file diff --git a/Source/Physics/RigidBodyWithCollisionEvents.h b/Source/Physics/RigidBodyWithCollisionEvents.h index 7e707489..dfa0ac90 100644 --- a/Source/Physics/RigidBodyWithCollisionEvents.h +++ b/Source/Physics/RigidBodyWithCollisionEvents.h @@ -32,6 +32,7 @@ Created: 11/10/2009 /// TODO: Clean up and refactor this huge mess a bit, otherwise in a pair of weeks I won't be able to understand it anymore myself... +#if USING( ME_PHYSICS_3D ) // This is just a partial part of btRigidBodyWithEvents (i.e. could just be merged to it): ///TODO: instead port everything we can from btRigidBodyWithEvents to this class, so that users @@ -40,7 +41,7 @@ Created: 11/10/2009 class btRigidBodyWithEventsEventDelegates { protected: - static ICollisionEvents* eventDispatcher; + inline static ICollisionEvents* eventDispatcher = nullptr; friend class ICollisionEvents; friend class btRigidBodyWithEvents; @@ -149,7 +150,7 @@ class btRigidBodyWithEventsEventDelegates } //endregion - static btAlignedObjectArray< btRigidBodyWithEventsEventDelegates* > monitorCollisionsBodies; // This list is the list of bodies for which to monitor collisions + inline static btAlignedObjectArray< btRigidBodyWithEventsEventDelegates* > monitorCollisionsBodies; void setMonitorCollisions( bool flag = true ); static void PerformCollisionDetection( btDynamicsWorld* btWorld, bool processContactPointWithPositiveDistancesToo = false, bool averageAllContactPointsInDifferentManifolds = false ); static void _SendCollisionEvents(); @@ -194,4 +195,5 @@ class btPairCachingGhostObjectWithEvents : public btPairCachingGhostObject, publ virtual ~btPairCachingGhostObjectWithEvents() {} -}; \ No newline at end of file +}; +#endif \ No newline at end of file diff --git a/Source/Scripting/Bindings/BindingContext.cpp b/Source/Scripting/Bindings/BindingContext.cpp new file mode 100644 index 00000000..19780c4e --- /dev/null +++ b/Source/Scripting/Bindings/BindingContext.cpp @@ -0,0 +1,56 @@ +#include "PCH.h" +#include "BindingContext.h" + +#if USING( ME_SCRIPTING ) + +#include + +namespace ScriptBindings +{ + static WeakPtr gScriptWorld; + static std::unordered_map> gHasComponent; + static std::unordered_map> gAddComponent; + + void SetWorld( WeakPtr inWorld ) + { + gScriptWorld = inWorld; + } + + + WeakPtr GetWorld() + { + return gScriptWorld; + } + + + EntityHandle MakeHandle( EntityID inId ) + { + return EntityHandle( inId, gScriptWorld ); + } + + + void RegisterComponentOps( const std::string& inName, std::function inHas, std::function inAdd ) + { + gHasComponent[inName] = std::move( inHas ); + gAddComponent[inName] = std::move( inAdd ); + } + + + bool HasComponentNamed( EntityHandle inHandle, const char* inName ) + { + auto it = gHasComponent.find( inName ); + return it != gHasComponent.end() && it->second( inHandle ); + } + + + bool AddComponentNamed( EntityHandle inHandle, const char* inName ) + { + auto it = gAddComponent.find( inName ); + if( it == gAddComponent.end() ) + return false; + it->second( inHandle ); + return true; + } +} + +#endif diff --git a/Source/Scripting/Bindings/BindingContext.h b/Source/Scripting/Bindings/BindingContext.h new file mode 100644 index 00000000..c9a7d229 --- /dev/null +++ b/Source/Scripting/Bindings/BindingContext.h @@ -0,0 +1,30 @@ +#pragma once +#include "ECS/EntityHandle.h" +#include "ECS/Entity.h" +#include "ECS/EntityID.h" +#include "Pointers.h" +#include +#include + +class World; + +namespace ScriptBindings +{ + void SetWorld( WeakPtr inWorld ); + WeakPtr GetWorld(); + + EntityHandle MakeHandle( EntityID inId ); + + void RegisterComponentOps( const std::string& inName, std::function inHas, std::function inAdd ); + + template + void RegisterComponent( const std::string& inName ) + { + RegisterComponentOps( inName, + []( EntityHandle e ) { return e->HasComponent(); }, + []( EntityHandle e ) { e->AddComponent(); } ); + } + + bool HasComponentNamed( EntityHandle inHandle, const char* inName ); + bool AddComponentNamed( EntityHandle inHandle, const char* inName ); +} diff --git a/Source/Scripting/Bindings/Components/BasicUIView.bindings.cpp b/Source/Scripting/Bindings/Components/BasicUIView.bindings.cpp new file mode 100644 index 00000000..01c38210 --- /dev/null +++ b/Source/Scripting/Bindings/Components/BasicUIView.bindings.cpp @@ -0,0 +1,29 @@ +#include "PCH.h" +#include "BasicUIView.bindings.h" + +#if USING( ME_SCRIPTING ) + +#include +#include "ECS/Entity.h" +#include "Scripting/Bindings/BindingContext.h" + +using ScriptBindings::MakeHandle; + +static void Eng_BasicUIView_ExecuteJS( EntityID inId, const uint8_t* inJS ) +{ + EntityHandle handle = MakeHandle( inId ); + if( handle ) + { + handle->GetComponent().ExecuteScript( reinterpret_cast( inJS ) ); + } +} + + +void Register_BasicUIViewBindings( ScriptEngineAPI& inAPI ) +{ + ScriptBindings::RegisterComponent( "BasicUIView" ); + + inAPI.BasicUIView_ExecuteJS = Eng_BasicUIView_ExecuteJS; +} + +#endif diff --git a/Source/Scripting/Bindings/Components/BasicUIView.bindings.h b/Source/Scripting/Bindings/Components/BasicUIView.bindings.h new file mode 100644 index 00000000..0fc78c82 --- /dev/null +++ b/Source/Scripting/Bindings/Components/BasicUIView.bindings.h @@ -0,0 +1,4 @@ +#pragma once +#include "Scripting/Generated/ScriptEngineAPI.generated.h" + +void Register_BasicUIViewBindings( ScriptEngineAPI& inAPI ); diff --git a/Source/Scripting/Bindings/Components/Camera.bindings.cpp b/Source/Scripting/Bindings/Components/Camera.bindings.cpp new file mode 100644 index 00000000..450548e8 --- /dev/null +++ b/Source/Scripting/Bindings/Components/Camera.bindings.cpp @@ -0,0 +1,40 @@ +#include "PCH.h" +#include "Camera.bindings.h" + +#if USING( ME_SCRIPTING ) + +#include +#include "ECS/Entity.h" +#include "Scripting/Bindings/BindingContext.h" + +using ScriptBindings::MakeHandle; + +static void Eng_Camera_GetClearColor( EntityID inId, Vector3* outColor ) +{ + EntityHandle handle = MakeHandle( inId ); + if( handle ) + { + *outColor = handle->GetComponent().ClearColor; + } +} + + +static void Eng_Camera_SetClearColor( EntityID inId, const Vector3* inColor ) +{ + EntityHandle handle = MakeHandle( inId ); + if( handle ) + { + handle->GetComponent().ClearColor = *inColor; + } +} + + +void Register_CameraBindings( ScriptEngineAPI& inAPI ) +{ + ScriptBindings::RegisterComponent( "Camera" ); + + inAPI.Camera_GetClearColor = Eng_Camera_GetClearColor; + inAPI.Camera_SetClearColor = Eng_Camera_SetClearColor; +} + +#endif diff --git a/Source/Scripting/Bindings/Components/Camera.bindings.h b/Source/Scripting/Bindings/Components/Camera.bindings.h new file mode 100644 index 00000000..9a0f1328 --- /dev/null +++ b/Source/Scripting/Bindings/Components/Camera.bindings.h @@ -0,0 +1,4 @@ +#pragma once +#include "Scripting/Generated/ScriptEngineAPI.generated.h" + +void Register_CameraBindings( ScriptEngineAPI& inAPI ); diff --git a/Source/Scripting/Bindings/Components/Transform.bindings.cpp b/Source/Scripting/Bindings/Components/Transform.bindings.cpp new file mode 100644 index 00000000..75d5913b --- /dev/null +++ b/Source/Scripting/Bindings/Components/Transform.bindings.cpp @@ -0,0 +1,84 @@ +#include "PCH.h" +#include "Transform.bindings.h" + +#if USING( ME_SCRIPTING ) + +#include +#include "ECS/Entity.h" +#include "Scripting/Bindings/BindingContext.h" + +using ScriptBindings::MakeHandle; + +static void Eng_Transform_GetTranslation( EntityID inId, Vector3* outTranslation ) +{ + EntityHandle handle = MakeHandle( inId ); + if( handle ) + { + *outTranslation = handle->GetComponent().GetPosition(); + } +} + + +static void Eng_Transform_SetTranslation( EntityID inId, const Vector3* inTranslation ) +{ + EntityHandle handle = MakeHandle( inId ); + if( handle ) + { + handle->GetComponent().SetPosition( *inTranslation ); + } +} + + +static void Eng_Transform_GetScale( EntityID inId, Vector3* outScale ) +{ + EntityHandle handle = MakeHandle( inId ); + if( handle ) + { + *outScale = handle->GetComponent().GetScale(); + } +} + + +static void Eng_Transform_SetScale( EntityID inId, const Vector3* inScale ) +{ + EntityHandle handle = MakeHandle( inId ); + if( handle ) + { + handle->GetComponent().SetScale( *inScale ); + } +} + + +static void Eng_Transform_GetRotation( EntityID inId, Vector3* outEuler ) +{ + EntityHandle handle = MakeHandle( inId ); + if( handle ) + { + *outEuler = handle->GetComponent().GetRotationEuler(); + } +} + + +static void Eng_Transform_SetRotation( EntityID inId, const Vector3* inEuler ) +{ + EntityHandle handle = MakeHandle( inId ); + if( handle ) + { + handle->GetComponent().SetRotation( *inEuler ); + } +} + + +void Register_TransformBindings( ScriptEngineAPI& inAPI ) +{ + ScriptBindings::RegisterComponent( "Transform" ); + + inAPI.Transform_GetTranslation = Eng_Transform_GetTranslation; + inAPI.Transform_SetTranslation = Eng_Transform_SetTranslation; + inAPI.Transform_GetScale = Eng_Transform_GetScale; + inAPI.Transform_SetScale = Eng_Transform_SetScale; + inAPI.Transform_GetRotation = Eng_Transform_GetRotation; + inAPI.Transform_SetRotation = Eng_Transform_SetRotation; +} + +#endif diff --git a/Source/Scripting/Bindings/Components/Transform.bindings.h b/Source/Scripting/Bindings/Components/Transform.bindings.h new file mode 100644 index 00000000..2adb8ab7 --- /dev/null +++ b/Source/Scripting/Bindings/Components/Transform.bindings.h @@ -0,0 +1,4 @@ +#pragma once +#include "Scripting/Generated/ScriptEngineAPI.generated.h" + +void Register_TransformBindings( ScriptEngineAPI& inAPI ); \ No newline at end of file diff --git a/Source/Scripting/Bindings/Entity.bindings.cpp b/Source/Scripting/Bindings/Entity.bindings.cpp new file mode 100644 index 00000000..4d7aa2a4 --- /dev/null +++ b/Source/Scripting/Bindings/Entity.bindings.cpp @@ -0,0 +1,59 @@ +#include "PCH.h" +#include "Entity.bindings.h" + +#if USING( ME_SCRIPTING ) + +#include "ECS/Entity.h" +#include "Engine/World.h" +#include "BindingContext.h" + +using ScriptBindings::MakeHandle; + +static bool Eng_Entity_IsAlive( EntityID inId ) +{ + return static_cast( MakeHandle( inId ) ); +} + + +static bool Eng_Entity_HasComponent( EntityID inId, const uint8_t* inComponent ) +{ + EntityHandle handle = MakeHandle( inId ); + if( !handle ) + { + return false; + } + + return ScriptBindings::HasComponentNamed( handle, reinterpret_cast( inComponent ) ); +} + + +static void Eng_Entity_AddComponent( EntityID inId, const uint8_t* inComponent ) +{ + EntityHandle handle = MakeHandle( inId ); + if( !handle ) + { + return; + } + + if( !ScriptBindings::AddComponentNamed( handle, reinterpret_cast( inComponent ) ) ) + { + BRUH_NEW( "dotnet: AddComponent for unknown type '{}'", reinterpret_cast( inComponent ) ); + return; + } + + // create the entity created NOW, I should do the OW thing where entities are created at the end of the frame. + if( auto world = ScriptBindings::GetWorld().lock() ) + { + world->Simulate(); + } +} + + +void Register_EntityBindings( ScriptEngineAPI& inAPI ) +{ + inAPI.Entity_IsAlive = Eng_Entity_IsAlive; + inAPI.Entity_HasComponent = Eng_Entity_HasComponent; + inAPI.Entity_AddComponent = Eng_Entity_AddComponent; +} + +#endif diff --git a/Source/Scripting/Bindings/Entity.bindings.h b/Source/Scripting/Bindings/Entity.bindings.h new file mode 100644 index 00000000..5a64e479 --- /dev/null +++ b/Source/Scripting/Bindings/Entity.bindings.h @@ -0,0 +1,4 @@ +#pragma once +#include "Scripting/Generated/ScriptEngineAPI.generated.h" + +void Register_EntityBindings( ScriptEngineAPI& inAPI ); diff --git a/Source/Scripting/Bindings/ImGui.bindings.cpp b/Source/Scripting/Bindings/ImGui.bindings.cpp index 64d72542..9b3aaf8a 100644 --- a/Source/Scripting/Bindings/ImGui.bindings.cpp +++ b/Source/Scripting/Bindings/ImGui.bindings.cpp @@ -2,61 +2,95 @@ #include "ImGui.bindings.h" #if USING( ME_SCRIPTING ) - -#include #include "imgui.h" -static bool ImGui_Begin( MonoString* inString ) +static bool Eng_ImGui_Float( const uint8_t* inLabel, float* inOutValue ) +{ +#if USING( ME_EDITOR ) + return HavanaUtils::Float( reinterpret_cast( inLabel ), *inOutValue ); +#else + return false; +#endif +} + + +static bool Eng_ImGui_Int( const uint8_t* inLabel, int* inOutValue ) +{ +#if USING( ME_EDITOR ) + return HavanaUtils::Int( reinterpret_cast( inLabel ), *inOutValue ); +#else + return false; +#endif +} + + +static bool Eng_ImGui_Bool( const uint8_t* inLabel, uint8_t* inOutValue ) +{ +#if USING( ME_EDITOR ) + bool b = ( *inOutValue != 0 ); + bool changed = ImGui::Checkbox( reinterpret_cast( inLabel ), &b ); + *inOutValue = b ? 1 : 0; + return changed; +#else + return false; +#endif +} + + +static bool Eng_ImGui_Vec3( const uint8_t* inLabel, Vector3* inOutValue ) +{ +#if USING( ME_EDITOR ) + return HavanaUtils::EditableVector3( reinterpret_cast( inLabel ), *inOutValue ); +#else + return false; +#endif +} + + +static bool Eng_ImGui_Begin( const uint8_t* inLabel ) { - char* str = mono_string_to_utf8( inString ); - bool ret = ImGui::Begin( str ); - mono_free( str ); - return ret; + return ImGui::Begin( reinterpret_cast( inLabel ) ); } -static void ImGui_End() +static void Eng_ImGui_End() { ImGui::End(); } -static void ImGui_Text( MonoString* inString ) +static void Eng_ImGui_Text( const uint8_t* inText ) { - char* str = mono_string_to_utf8( inString ); - ImGui::Text( str ); - mono_free( str ); + ImGui::TextUnformatted( reinterpret_cast( inText ) ); } -static void ImGui_Checkbox( MonoString* inString, MonoBoolean* inValue ) +static bool Eng_ImGui_Checkbox( const uint8_t* inLabel, uint8_t* inOutValue ) { - char* str = mono_string_to_utf8( inString ); - bool checkbox = *inValue; - if( ImGui::Checkbox( str, &checkbox ) ) - { - *inValue = checkbox; - } - mono_free( str ); + bool b = ( *inOutValue != 0 ); + bool changed = ImGui::Checkbox( reinterpret_cast( inLabel ), &b ); + *inOutValue = b ? 1 : 0; + return changed; } -static bool ImGui_Button( MonoString* inString, MonoBoolean* inValue ) +static bool Eng_ImGui_Button( const uint8_t* inLabel ) { - char* str = mono_string_to_utf8( inString ); - bool result = ImGui::Button( str ); - mono_free( str ); - return result; + return ImGui::Button( reinterpret_cast( inLabel ) ); } -void Register_ImGuiBindings() +void Register_ImGuiBindings( ScriptEngineAPI& inAPI ) { - mono_add_internal_call( "ImGui::ImGui_Begin", (void*)ImGui_Begin ); - mono_add_internal_call( "ImGui::ImGui_End", (void*)ImGui_End ); - mono_add_internal_call( "ImGui::ImGui_Text", (void*)ImGui_Text ); - mono_add_internal_call( "ImGui::ImGui_Checkbox", (void*)ImGui_Checkbox ); - mono_add_internal_call( "ImGui::ImGui_Button", (void*)ImGui_Button ); + inAPI.ImGui_Float = Eng_ImGui_Float; + inAPI.ImGui_Int = Eng_ImGui_Int; + inAPI.ImGui_Bool = Eng_ImGui_Bool; + inAPI.ImGui_Vec3 = Eng_ImGui_Vec3; + inAPI.ImGui_Begin = Eng_ImGui_Begin; + inAPI.ImGui_Text = Eng_ImGui_Text; + inAPI.ImGui_Checkbox = Eng_ImGui_Checkbox; + inAPI.ImGui_Button = Eng_ImGui_Button; + inAPI.ImGui_End = Eng_ImGui_End; } -#endif \ No newline at end of file +#endif diff --git a/Source/Scripting/Bindings/ImGui.bindings.h b/Source/Scripting/Bindings/ImGui.bindings.h index 72915e1b..5acff87d 100644 --- a/Source/Scripting/Bindings/ImGui.bindings.h +++ b/Source/Scripting/Bindings/ImGui.bindings.h @@ -1,3 +1,4 @@ #pragma once +#include "Scripting/Generated/ScriptEngineAPI.generated.h" -void Register_ImGuiBindings(); \ No newline at end of file +void Register_ImGuiBindings( ScriptEngineAPI& inAPI ); \ No newline at end of file diff --git a/Source/Scripting/Bindings/Log.bindings.cpp b/Source/Scripting/Bindings/Log.bindings.cpp deleted file mode 100644 index 17262d98..00000000 --- a/Source/Scripting/Bindings/Log.bindings.cpp +++ /dev/null @@ -1,58 +0,0 @@ -#include "PCH.h" -#include "Log.bindings.h" - -#if USING( ME_SCRIPTING ) - -#include - -static void Log( MonoString* inString ) -{ - char* str = mono_string_to_utf8( inString ); - - BRUH( str ); - - mono_free( str ); -} - -static void LogError( MonoString* inString ) -{ - char* str = mono_string_to_utf8( inString ); - - YIKES( str ); - - mono_free( str ); -} - -static void NativeLog( MonoString* inString, int number ) -{ - char* str = mono_string_to_utf8( inString ); - - std::cout << str << std::to_string( number ) << std::endl; - - mono_free( str ); -} - -static void NativeLog_Vector( Vector3* inVector, Vector3* outVec ) -{ - Vector3 vec = *inVector; - std::cout << "CPP: " << std::to_string( vec.x ) << ", " << std::to_string( vec.y ) << ", " << std::to_string( vec.z ) << std::endl; - inVector->Normalize(); - *outVec = *inVector; -} - -static float Native_VectorLength( Vector3* inVector ) -{ - return inVector->Length(); -} - - -void Register_LogBindings() -{ - mono_add_internal_call( "Debug::Log", (void*)Log ); - mono_add_internal_call( "Debug::Error", (void*)LogError ); - mono_add_internal_call( "TestScript::NativeLog", (void*)NativeLog ); - mono_add_internal_call( "TestScript::NativeLog_Vector", (void*)NativeLog_Vector ); - mono_add_internal_call( "TestScript::Native_VectorLength", (void*)Native_VectorLength ); -} - -#endif \ No newline at end of file diff --git a/Source/Scripting/Bindings/Log.bindings.h b/Source/Scripting/Bindings/Log.bindings.h deleted file mode 100644 index 813d079f..00000000 --- a/Source/Scripting/Bindings/Log.bindings.h +++ /dev/null @@ -1,4 +0,0 @@ -#pragma once - - -void Register_LogBindings(); \ No newline at end of file diff --git a/Source/Scripting/Bindings/Systems/Input.bindings.cpp b/Source/Scripting/Bindings/Systems/Input.bindings.cpp new file mode 100644 index 00000000..d4032430 --- /dev/null +++ b/Source/Scripting/Bindings/Systems/Input.bindings.cpp @@ -0,0 +1,22 @@ +#include "PCH.h" +#include "Input.bindings.h" + +#if USING( ME_SCRIPTING ) + +#include "Engine/Engine.h" +#include "Engine/Input.h" + + +static bool Eng_Input_IsKeyDown( int inKey ) +{ + return GetEngine().GetInput().IsKeyDown( static_cast( inKey ) ); +} + + +void Register_InputBindings( ScriptEngineAPI& inAPI ) +{ + inAPI.Input_IsKeyDown = Eng_Input_IsKeyDown; +} + + +#endif diff --git a/Source/Scripting/Bindings/Systems/Input.bindings.h b/Source/Scripting/Bindings/Systems/Input.bindings.h new file mode 100644 index 00000000..560b1759 --- /dev/null +++ b/Source/Scripting/Bindings/Systems/Input.bindings.h @@ -0,0 +1,4 @@ +#pragma once +#include "Scripting/Generated/ScriptEngineAPI.generated.h" + +void Register_InputBindings( ScriptEngineAPI& inAPI ); diff --git a/Source/Scripting/Bindings/Systems/World.bindings.cpp b/Source/Scripting/Bindings/Systems/World.bindings.cpp new file mode 100644 index 00000000..da7cbeb8 --- /dev/null +++ b/Source/Scripting/Bindings/Systems/World.bindings.cpp @@ -0,0 +1,59 @@ +#include "PCH.h" +#include "World.bindings.h" + +#if USING( ME_SCRIPTING ) + +#include "Engine/Engine.h" +#include "Engine/World.h" +#include "Cores/SceneCore.h" +#include "Components/Transform.h" +#include "ECS/Entity.h" +#include "Scripting/Bindings/BindingContext.h" + +static void Eng_World_CreateEntity( const uint8_t* inName, EntityID* outId ) +{ + *outId = EntityID{}; + auto world = ScriptBindings::GetWorld().lock(); + if( !world ) + { + return; + } + + EntityHandle newEntity = world->CreateEntity(); + Transform& transform = newEntity->AddComponent(); + transform.SetName( reinterpret_cast( inName ) ); + world->Simulate(); + *outId = newEntity.GetID(); +} + + +static void Eng_World_FindByName( const uint8_t* inName, EntityID* outId ) +{ + *outId = EntityID{}; + // #TODO: FIX - this shit is busted. only scans the scene root's direct children, so anything + // nested deeper never gets found. needs a proper recursive walk (or a name->entity lookup). + Transform* root = GetEngine().SceneNodes->GetRootTransform(); + if( !root ) + { + return; + } + + const std::string wanted = reinterpret_cast( inName ); + for( auto& child : root->GetChildren() ) + { + if( child->GetName() == wanted ) + { + *outId = child->Parent.GetID(); + return; + } + } +} + + +void Register_WorldBindings( ScriptEngineAPI& inAPI ) +{ + inAPI.World_CreateEntity = Eng_World_CreateEntity; + inAPI.World_FindByName = Eng_World_FindByName; +} + +#endif diff --git a/Source/Scripting/Bindings/Systems/World.bindings.h b/Source/Scripting/Bindings/Systems/World.bindings.h new file mode 100644 index 00000000..7df43828 --- /dev/null +++ b/Source/Scripting/Bindings/Systems/World.bindings.h @@ -0,0 +1,4 @@ +#pragma once +#include "Scripting/Generated/ScriptEngineAPI.generated.h" + +void Register_WorldBindings( ScriptEngineAPI& inAPI ); diff --git a/Source/Scripting/Bindings/World.bindings.cpp b/Source/Scripting/Bindings/World.bindings.cpp deleted file mode 100644 index 84194be3..00000000 --- a/Source/Scripting/Bindings/World.bindings.cpp +++ /dev/null @@ -1,61 +0,0 @@ -#include "PCH.h" - -#if USING( ME_SCRIPTING ) - -#include -#include -#include -#include "Engine/Engine.h" -#include "Cores/SceneCore.h" - - -static const Transform* World_GetTransformByName_InternalRecursive( Transform* inParent, const std::string& inString ) -{ - for( auto& transform : inParent->GetChildren() ) - { - if( transform->GetName() == inString ) - { - return transform.get(); - } - } - return nullptr; -} - - -static MonoObject* World_GetTransformByName( MonoString* inString ) -{ - char* str = mono_string_to_utf8( inString ); - const Transform* found = World_GetTransformByName_InternalRecursive( ScriptEngine::sScriptData.enginePtr->SceneNodes->GetRootTransform(), str ); - - mono_free( str ); - if( !found ) - { - return nullptr; - } - - return ScriptEngine::ReturnEntityID( found->Parent ); -} - - -static MonoObject* World_CreateEntity( MonoString* inString ) -{ - char* str = mono_string_to_utf8( inString ); - - auto world = ScriptEngine::sScriptData.worldPtr.lock(); - auto newEntity = world->CreateEntity(); - Transform* found = &newEntity->AddComponent(); - found->SetName( str ); - - mono_free( str ); - - return ScriptEngine::ReturnEntityID( newEntity ); -} - - -void Register_WorldBindings() -{ - mono_add_internal_call( "World::World_GetTransformByName", (void*)World_GetTransformByName ); - mono_add_internal_call( "World::World_CreateEntity", (void*)World_CreateEntity ); -} - -#endif \ No newline at end of file diff --git a/Source/Scripting/Bindings/World.bindings.h b/Source/Scripting/Bindings/World.bindings.h deleted file mode 100644 index bf550c93..00000000 --- a/Source/Scripting/Bindings/World.bindings.h +++ /dev/null @@ -1,4 +0,0 @@ -#pragma once - - -void Register_WorldBindings(); \ No newline at end of file diff --git a/Source/Scripting/Generated/ScriptEngineAPI.generated.h b/Source/Scripting/Generated/ScriptEngineAPI.generated.h new file mode 100644 index 00000000..550cee07 --- /dev/null +++ b/Source/Scripting/Generated/ScriptEngineAPI.generated.h @@ -0,0 +1,51 @@ +// not actually auto generated, but could be a fun project for the future +#pragma once +#include + +#include "ECS/EntityID.h" +#include "Math/Vector3.h" + +struct ScriptEngineAPI +{ + // Core + void ( *Log )( const uint8_t* inMsg ); + float ( *GetTime )( ); + + // Entity + bool ( *Entity_IsAlive )( EntityID inId ); + bool ( *Entity_HasComponent )( EntityID inId, const uint8_t* inComponent ); + void ( *Entity_AddComponent )( EntityID inId, const uint8_t* inComponent ); + void ( *Transform_GetTranslation )( EntityID inId, Vector3* outTranslation ); + void ( *Transform_SetTranslation )( EntityID inId, const Vector3* inTranslation ); + + // ImGui ( inOutValue is read for display, written back on edit ) + bool ( *ImGui_Float )( const uint8_t* inLabel, float* inOutValue ); + bool ( *ImGui_Int )( const uint8_t* inLabel, int* inOutValue ); + bool ( *ImGui_Bool )( const uint8_t* inLabel, uint8_t* inOutValue ); + bool ( *ImGui_Vec3 )( const uint8_t* inLabel, Vector3* inOutValue ); + bool ( *ImGui_Begin )( const uint8_t* inLabel ); + void ( *ImGui_Text )( const uint8_t* inText ); + bool ( *ImGui_Checkbox )( const uint8_t* inLabel, uint8_t* inOutValue ); + bool ( *ImGui_Button )( const uint8_t* inLabel ); + void ( *ImGui_End )( ); + + // Input + bool ( *Input_IsKeyDown )( int inKey ); + + // World + void ( *World_CreateEntity )( const uint8_t* inName, EntityID* outId ); + void ( *World_FindByName )( const uint8_t* inName, EntityID* outId ); + + // Camera + void ( *Camera_GetClearColor )( EntityID inId, Vector3* outColor ); + void ( *Camera_SetClearColor )( EntityID inId, const Vector3* inColor ); + + // Transform + void ( *Transform_GetScale )( EntityID inId, Vector3* outScale ); + void ( *Transform_SetScale )( EntityID inId, const Vector3* inScale ); + void ( *Transform_GetRotation )( EntityID inId, Vector3* outEuler ); + void ( *Transform_SetRotation )( EntityID inId, const Vector3* inEuler ); + + // UI + void ( *BasicUIView_ExecuteJS )( EntityID inId, const uint8_t* inJS ); +}; \ No newline at end of file diff --git a/Source/Scripting/MonoFwd.h b/Source/Scripting/MonoFwd.h deleted file mode 100644 index 6994c30e..00000000 --- a/Source/Scripting/MonoFwd.h +++ /dev/null @@ -1,20 +0,0 @@ -#pragma once -#include "Dementia.h" - -#if USING( ME_SCRIPTING ) - -extern "C" { - typedef struct _MonoClass MonoClass; - typedef struct _MonoDomain MonoDomain; - typedef struct _MonoImage MonoImage; - typedef struct _MonoObject MonoObject; - typedef struct _MonoType MonoType; - typedef struct _MonoMethod MonoMethod; - typedef struct _MonoClassField MonoClassField; - typedef struct _MonoProperty MonoProperty; - typedef struct _MonoAssembly MonoAssembly; - typedef union _MonoError MonoError; - typedef struct _MonoString MonoString; -} - -#endif \ No newline at end of file diff --git a/Source/Scripting/MonoUtils.cpp b/Source/Scripting/MonoUtils.cpp deleted file mode 100644 index 06a77997..00000000 --- a/Source/Scripting/MonoUtils.cpp +++ /dev/null @@ -1,263 +0,0 @@ -#include "PCH.h" -#include "MonoUtils.h" - -#if USING( ME_SCRIPTING ) - -#include -#include -#include -#include "Utils/PlatformUtils.h" -#include -#include -#include - -namespace MonoUtils -{ - static std::unordered_map s_scriptFieldTypeMap = - { - { "System.Single" , ScriptFieldType::Float }, - { "System.Double" , ScriptFieldType::Double }, - { "System.Boolean" , ScriptFieldType::Bool }, - { "System.Char" , ScriptFieldType::Char }, - { "System.Int16" , ScriptFieldType::Short }, - { "System.Int32" , ScriptFieldType::Int }, - { "System.Int64" , ScriptFieldType::Long }, - { "System.Byte" , ScriptFieldType::Byte }, - { "System.UInt16" , ScriptFieldType::UShort }, - { "System.UInt32" , ScriptFieldType::UInt }, - { "System.UInt64" , ScriptFieldType::ULong }, - { "Vector2" , ScriptFieldType::Vector2 }, - { "Vector3" , ScriptFieldType::Vector3 }, - { "Vector4" , ScriptFieldType::Vector4 }, - { "Entity" , ScriptFieldType::Entity }, - }; - - - ScriptFieldType MonoTypeToScriptFieldType( MonoType* type ) - { - std::string typeName = mono_type_get_name( type ); - if( s_scriptFieldTypeMap.find( typeName ) == s_scriptFieldTypeMap.end() ) - return ScriptFieldType::None; - return s_scriptFieldTypeMap.at( typeName ); - } - - - std::string ScriptFieldTypeToString( ScriptFieldType type ) - { - switch( type ) - { - case MonoUtils::ScriptFieldType::None: return "None"; - case MonoUtils::ScriptFieldType::Float: return "Float"; - case MonoUtils::ScriptFieldType::Double: return "Double"; - case MonoUtils::ScriptFieldType::Bool: return "Bool"; - case MonoUtils::ScriptFieldType::Char: return "Char"; - case MonoUtils::ScriptFieldType::Byte: return "Byte"; - case MonoUtils::ScriptFieldType::Short: return "Short"; - case MonoUtils::ScriptFieldType::Int: return "Int"; - case MonoUtils::ScriptFieldType::Long: return "Long"; - case MonoUtils::ScriptFieldType::UByte: return "UByte"; - case MonoUtils::ScriptFieldType::UShort: return "UShort"; - case MonoUtils::ScriptFieldType::UInt: return "UInt"; - case MonoUtils::ScriptFieldType::ULong: return "ULong"; - case MonoUtils::ScriptFieldType::Vector2: return "Vector2"; - case MonoUtils::ScriptFieldType::Vector3: return "Vector3"; - case MonoUtils::ScriptFieldType::Vector4: return "Vector4"; - case MonoUtils::ScriptFieldType::Entity: return "Entity"; - default: - return "None"; - } - } - - uint8_t GetFieldAccessibility( MonoClassField* field ) - { - uint8_t accessibility = Accessibility::None; - uint32_t accessFlag = mono_field_get_flags( field ) & MONO_FIELD_ATTR_FIELD_ACCESS_MASK; - - switch( accessFlag ) - { - case MONO_FIELD_ATTR_PRIVATE: - { - accessibility = Accessibility::Private; - break; - } - case MONO_FIELD_ATTR_FAM_AND_ASSEM: - { - accessibility |= Accessibility::Protected; - accessibility |= Accessibility::Internal; - break; - } - case MONO_FIELD_ATTR_ASSEMBLY: - { - accessibility = Accessibility::Internal; - break; - } - case MONO_FIELD_ATTR_FAMILY: - { - accessibility = Accessibility::Protected; - break; - } - case MONO_FIELD_ATTR_FAM_OR_ASSEM: - { - accessibility |= Accessibility::Private; - accessibility |= Accessibility::Protected; - break; - } - case MONO_FIELD_ATTR_PUBLIC: - { - accessibility = Accessibility::Public; - break; - } - default: - YIKES( "Unhandled MonoClassField*" ); - break; - } - - return accessibility; - } - - - uint8_t GetPropertyAccessibility( MonoProperty* property ) - { - uint8_t accessibility = Accessibility::None; - - // Get a reference to the property's getter method - MonoMethod* propertyGetter = mono_property_get_get_method( property ); - if( propertyGetter != nullptr ) - { - // Extract the access flags from the getters flags - uint32_t accessFlag = mono_method_get_flags( propertyGetter, nullptr ) & MONO_METHOD_ATTR_ACCESS_MASK; - - switch( accessFlag ) - { - case MONO_FIELD_ATTR_PRIVATE: - { - accessibility = Accessibility::Private; - break; - } - case MONO_FIELD_ATTR_FAM_AND_ASSEM: - { - accessibility |= Accessibility::Protected; - accessibility |= Accessibility::Internal; - break; - } - case MONO_FIELD_ATTR_ASSEMBLY: - { - accessibility = Accessibility::Internal; - break; - } - case MONO_FIELD_ATTR_FAMILY: - { - accessibility = Accessibility::Protected; - break; - } - case MONO_FIELD_ATTR_FAM_OR_ASSEM: - { - accessibility |= Accessibility::Private; - accessibility |= Accessibility::Protected; - break; - } - case MONO_FIELD_ATTR_PUBLIC: - { - accessibility = Accessibility::Public; - break; - } - default: - YIKES( "Unhandled MonoProperty*" ); - break; - } - } - - // Get a reference to the property's setter method - MonoMethod* propertySetter = mono_property_get_set_method( property ); - if( propertySetter != nullptr ) - { - // Extract the access flags from the setters flags - uint32_t accessFlag = mono_method_get_flags( propertySetter, nullptr ) & MONO_METHOD_ATTR_ACCESS_MASK; - if( accessFlag != MONO_FIELD_ATTR_PUBLIC ) - accessibility = Accessibility::Private; - } - else - { - accessibility = Accessibility::Private; - } - - return accessibility; - } - - - bool CheckMonoError( MonoError& error ) - { - bool hasError = !mono_error_ok( &error ); - if( hasError ) - { - unsigned short errorCode = mono_error_get_error_code( &error ); - const char* errorMessage = mono_error_get_message( &error ); - printf( "Mono Error!\n" ); - printf( "\tError Code: %hu\n", errorCode ); - printf( "\tError Message: %s\n", errorMessage ); - mono_error_cleanup( &error ); - } - return hasError; - } - - std::string MonoStringToUTF8( MonoString* monoString ) - { - if( monoString == nullptr || mono_string_length( monoString ) == 0 ) - return ""; - - MonoError error; - char* utf8 = mono_string_to_utf8_checked( monoString, &error ); - if( CheckMonoError( error ) ) - return ""; - std::string result( utf8 ); - mono_free( utf8 ); - return result; - } - - MonoAssembly* LoadMonoAssembly( const Path& path, bool loadPDB ) - { - Buffer fileData = PlatformUtils::ReadBytes( path ); - - MonoImageOpenStatus status; - MonoImage* image = mono_image_open_from_data_full( (char*)fileData.Data, fileData.Size, 1, &status, 0 ); - - - if( status != MONO_IMAGE_OK ) - { - const char* errorMessage = mono_image_strerror( status ); - YIKES( errorMessage ); - return nullptr; - } - - MonoAssembly* assembly = mono_assembly_load_from_full( image, path.FullPath.c_str(), &status, 0 ); - - if( !assembly ) - { - YIKES( "mono_assembly_load_from_full failed" ); - return nullptr; - } - - mono_image_close( image ); - fileData.Release(); - - // #TODO: Write a file extension replacement function. -#if !USING( ME_PLATFORM_UWP ) - if( loadPDB ) - { - std::filesystem::path pdbPath = path.FullPath; - pdbPath.replace_extension( ".dll.mdb" ); - - if( std::filesystem::exists( pdbPath ) ) - { - Buffer pdbBuff = PlatformUtils::ReadBytes( Path( pdbPath.generic_string() ) ); - mono_debug_open_image_from_memory( image, (mono_byte*)pdbBuff.Data, pdbBuff.Size ); - pdbBuff.Release(); - } - } -#endif - - return assembly; - } -} - -#endif diff --git a/Source/Scripting/MonoUtils.h b/Source/Scripting/MonoUtils.h deleted file mode 100644 index 2ffe0f04..00000000 --- a/Source/Scripting/MonoUtils.h +++ /dev/null @@ -1,57 +0,0 @@ -#pragma once - -#if USING( ME_SCRIPTING ) - -#include "MonoFwd.h" -#include -#include "Path.h" - -namespace MonoUtils -{ - enum class ScriptFieldType - { - None = 0, - Float, - Double, - Bool, - Char, - Byte, - Short, - Int, - Long, - UByte, - UShort, - UInt, - ULong, - Vector2, - Vector3, - Vector4, - Entity - }; - - enum Accessibility : uint8_t - { - None = 0, - Private = ( 1 << 0 ), - Internal = ( 1 << 1 ), - Protected = ( 1 << 2 ), - Public = ( 1 << 3 ) - }; - - ScriptFieldType MonoTypeToScriptFieldType( MonoType* type ); - std::string ScriptFieldTypeToString( ScriptFieldType type ); - - // Gets the accessibility level of the given field - uint8_t GetFieldAccessibility( MonoClassField* field ); - - // Gets the accessibility level of the given property - uint8_t GetPropertyAccessibility( MonoProperty* property ); - - bool CheckMonoError( MonoError& error ); - - std::string MonoStringToUTF8( MonoString* monoString ); - - MonoAssembly* LoadMonoAssembly( const Path& path, bool loadPDB ); -}; - -#endif diff --git a/Source/Scripting/ScriptCore.runtimeconfig.json b/Source/Scripting/ScriptCore.runtimeconfig.json new file mode 100644 index 00000000..6aa9566c --- /dev/null +++ b/Source/Scripting/ScriptCore.runtimeconfig.json @@ -0,0 +1,12 @@ +{ + "runtimeOptions": { + "tfm": "net8.0", + "framework": { + "name": "Microsoft.NETCore.App", + "version": "8.0.0" + }, + "configProperties": { + "System.Runtime.Serialization.EnableUnsafeBinaryFormatterSerialization": false + } + } +} diff --git a/Source/Scripting/ScriptEngine.cpp b/Source/Scripting/ScriptEngine.cpp index d4acb402..a19324bf 100644 --- a/Source/Scripting/ScriptEngine.cpp +++ b/Source/Scripting/ScriptEngine.cpp @@ -1,536 +1,269 @@ #include "PCH.h" #include "ScriptEngine.h" +#include "ScriptHost.h" #if USING( ME_SCRIPTING ) -#include -#include -#include -#include -#include "Utils/PlatformUtils.h" -#include "MonoUtils.h" -#include -#include -#include "ECS/Entity.h" -#include "Engine/Engine.h" -#include "Cores/SceneCore.h" - -#include -#include -#include -#include -#include +#include // Eng_GetTime: clock() / CLOCKS_PER_SEC +#include "Generated/ScriptEngineAPI.generated.h" +// per-domain binding registrars +#include "Bindings/BindingContext.h" +#include "Bindings/Entity.bindings.h" #include "Bindings/ImGui.bindings.h" -#include "Bindings/World.bindings.h" -#include "Bindings/Log.bindings.h" - -//// forward declare internal Mono debugger agent functions -//extern "C" { -// void mono_debugger_agent_send_assembly_load( MonoAssembly* assembly ); -// void mono_debugger_agent_send_type_load( MonoClass* klass ); -// void mono_debugger_agent_send_method( MonoMethod* method ); -//} - - -ScriptEngine::ScriptData ScriptEngine::sScriptData; - -std::vector ScriptEngine::LoadedClasses; - -std::vector ScriptEngine::LoadedEntityScripts; - -std::unordered_map ScriptEngine::entityInstanceCache; - - -//void ResendDebugInfo( MonoAssembly* monoAssembly ) -//{ -// //for( MonoAssembly* asm : allLoadedAssemblies ) -// { -// mono_debugger_agent_send_assembly_load( monoAssembly ); -// -// MonoImage* img = mono_assembly_get_image( monoAssembly ); -// int typeCount = mono_image_get_table_rows( img, MONO_TABLE_TYPEDEF ); -// -// for( int i = 1; i < typeCount; ++i ) -// { -// MonoClass* klass = mono_class_get( img, ( i + 1 ) | MONO_TOKEN_TYPE_DEF ); -// if( !klass ) continue; -// -// mono_debugger_agent_send_type_load( klass ); -// -// void* iter = nullptr; -// while( MonoMethod* method = mono_class_get_methods( klass, &iter ) ) -// { -// mono_debugger_agent_send_method( method ); -// } -// } -// } -//} -// -//void ResendDebugInfo() -//{ -// ResendDebugInfo( ScriptEngine::sScriptData.CoreAssembly ); -// ResendDebugInfo( ScriptEngine::sScriptData.AppAssembly ); -//} - - - -MonoObject* ScriptEngine::ReturnEntityID( const EntityHandle& inEntity ) -{ - if( !inEntity ) - { - return nullptr; - } - - EntityID id = inEntity.GetID(); - auto it = ScriptEngine::entityInstanceCache.find( id ); - if( it != ScriptEngine::entityInstanceCache.end() ) - { - MonoObject* entityObj = mono_gchandle_get_target( it->second ); - if( entityObj == nullptr ) - { - YIKES( "MonoObject reference was lost (collected by GC)" ); - return nullptr; - } - return entityObj; - } +#include "Bindings/Components/Transform.bindings.h" +#include "Bindings/Components/Camera.bindings.h" +#include "Bindings/Components/BasicUIView.bindings.h" +#include "Bindings/Systems/World.bindings.h" +#include "Bindings/Systems/Input.bindings.h" - MonoClass* entityClass = mono_class_from_name( ScriptEngine::sScriptData.CoreAssemblyImage, "", "Entity" ); - MonoObject* entityObj = mono_object_new( mono_domain_get(), entityClass ); - - MonoMethod* ctor = mono_class_get_method_from_name( entityClass, ".ctor", 1 ); - void* args[] = { &id }; - mono_runtime_invoke( ctor, entityObj, args, nullptr ); - // Create a GC handle to ensure object isn't collected - uint32_t gcHandle = mono_gchandle_new( entityObj, /*pinned=*/false ); - ScriptEngine::entityInstanceCache[id] = gcHandle; +#if USING( ME_EDITOR ) +#define build_prefix "editor_" +#define build_platform "" +#else +#define build_prefix "game_" + +#if USING( ME_PLATFORM_WINDOWS ) +#define build_platform "win64_" +#elif USING( ME_PLATFORM_LINUX ) +#define build_platform "linux_" +#elif USING( ME_PLATFORM_MACOS ) +#define build_platform "macos_" +#endif - return entityObj; -} +#endif -ScriptClass::ScriptClass( const std::string& inNameSpace, const std::string& inName, bool isCore ) -{ #if USING( ME_DEBUG ) - Name = inName; - Namespace = inNameSpace; +#define build_postfix "debug" +#else +#define build_postfix "release" #endif - Class = mono_class_from_name( isCore ? ScriptEngine::sScriptData.CoreAssemblyImage : ScriptEngine::sScriptData.AppAssemblyImage, inNameSpace.c_str(), inName.c_str() ); -} - - -MonoObject* ScriptClass::Instantiate() -{ - MonoObject* instance = mono_object_new( ScriptEngine::sScriptData.RootDomain, Class ); - if( !instance ) - { - YIKES( "mono_object_new failed" ); - return nullptr; - } +static ScriptHost gScriptHost; - return instance; -} -MonoMethod* ScriptClass::GetMethod( const std::string& inFuncName, int params ) const +static void Eng_Log( const uint8_t* inMsg ) { - MonoMethod* method = mono_class_get_method_from_name( Class, inFuncName.c_str(), params ); - - if( method == nullptr ) - { - YIKES( "mono_class_get_method_from_name failed" ); - return nullptr; - } - return method; + DBG( "{}", reinterpret_cast( inMsg ) ); } - -void ScriptClass::InvokeMethod( MonoObject* inInstance, MonoMethod* inMethod, void** inParams ) +static float Eng_GetTime() { - MonoObject* exception = nullptr; - ME_ASSERT_MSG( inInstance != nullptr, "ScriptClass::InvokeMethod instance is bad!!" ); - mono_runtime_invoke( inMethod, inInstance, inParams, &exception ); + return static_cast( clock() ) / CLOCKS_PER_SEC; } -void ScriptEngine::Init() +// script bindings +using FnLoadGameAssembly = int ( * )( const uint8_t* ); +using FnReloadGameAssembly = int ( * )( const uint8_t* ); +using FnGetScriptCount = int ( * )( ); +using FnGetScriptName = void ( * )( int, uint8_t*, int ); +using FnGetFieldCount = int ( * )( const uint8_t* ); +using FnGetFieldInfo = void ( * )( const uint8_t*, int, uint8_t*, int, uint8_t*, int ); +using FnGetFieldValue = void ( * )( int, int, uint8_t*, int ); +using FnSetFieldValue = int ( * )( int, int, const uint8_t* ); +using FnGetInstanceCount = int ( * )( ); +using FnGetInstanceHandle = int ( * )( int ); +using FnGetInstanceTypeName = void ( * )( int, uint8_t*, int ); +using FnCreateScript = int ( * )( const uint8_t*, EntityID ); +using FnScriptOnStart = void ( * )( int ); +using FnScriptOnUpdate = void ( * )( int, float ); +using FnScriptOnDestroy = void ( * )( int ); +using FnGetMethodCount = int ( * )( const uint8_t* ); +using FnGetMethodName = void ( * )( const uint8_t*, int, uint8_t*, int ); +using FnSetEngineAPI = int ( * )( const ScriptEngineAPI*, int ); +using FnRestoreScript = int ( * )( const uint8_t*, int ); +using FnOnEditorInspect = void ( * )( int ); +using FnGetFieldsJson = void ( * )( int, uint8_t*, int ); +using FnSetFieldsJson = void ( * )( int, const uint8_t* ); + +struct ScriptAPI { - if( sScriptData.RootDomain ) - { - return; - } - - InitMono(); - - // Register funcs - RegisterFunctions(); - - Path path( "ScriptCore.dll" ); - Path appPath( "Game.Script.dll" ); - // todo: fix path -#if USING( ME_EDITOR ) -#if USING( ME_RELEASE ) - if( !path.Exists ) - { - path = Path( ".build/editor_release/ScriptCore.dll" ); - } - if( !appPath.Exists ) - { - appPath = Path( ".build/editor_release/Game.Script.dll" ); - } -#else - if( !path.Exists ) - { - path = Path( ".build/editor_debug/ScriptCore.dll" ); - } - if( !appPath.Exists ) - { - appPath = Path( ".build/editor_debug/Game.Script.dll" ); - } -#endif -#else - if( !path.Exists ) - { - path = Path( ".build/editor_debug/ScriptCore.dll" ); - } - if( !appPath.Exists ) + FnLoadGameAssembly LoadGameAssembly = nullptr; + FnReloadGameAssembly ReloadGameAssembly = nullptr; + FnGetScriptCount GetScriptCount = nullptr; + FnGetScriptName GetScriptName = nullptr; + FnGetFieldCount GetFieldCount = nullptr; + FnGetFieldInfo GetFieldInfo = nullptr; + FnGetFieldValue GetFieldValue = nullptr; + FnSetFieldValue SetFieldValue = nullptr; + FnGetInstanceCount GetInstanceCount = nullptr; + FnGetInstanceHandle GetInstanceHandle = nullptr; + FnGetInstanceTypeName GetInstanceTypeName = nullptr; + FnCreateScript CreateScript = nullptr; + FnScriptOnStart ScriptOnStart = nullptr; + FnScriptOnUpdate ScriptOnUpdate = nullptr; + FnScriptOnDestroy ScriptOnDestroy = nullptr; + FnGetMethodCount GetMethodCount = nullptr; + FnGetMethodName GetMethodName = nullptr; + FnSetEngineAPI SetEngineAPI = nullptr; + FnRestoreScript RestoreScript = nullptr; + FnOnEditorInspect ScriptOnEditorInspect = nullptr; + FnGetFieldsJson GetFieldsJson = nullptr; + FnSetFieldsJson SetFieldsJson = nullptr; + + bool IsValid() const { - appPath = Path( ".build/editor_debug/Game.Script.dll" ); + return LoadGameAssembly && SetEngineAPI + && GetScriptCount && GetScriptName + && CreateScript && ScriptOnStart && ScriptOnUpdate && ScriptOnDestroy; } -#endif // else +}; - LoadAssembly( path ); - LoadAppAssembly( appPath ); +static ScriptAPI gDotnetAPI; - CacheAssemblyTypes(); - - sScriptData.entityClass = ScriptClass( "", "Entity", true ); - - // Tests - Tests(); -} - -void ScriptEngine::InitDebug() +static bool LoadAPI( ScriptHost& inHost, const std::string& inCoreDll, ScriptAPI& outApi ) { - if( sScriptData.EnableDebugging ) - { - mono_debug_domain_create( sScriptData.RootDomain ); - } + const std::string bridgeType = "ScriptCore.ScriptBridge, ScriptCore"; + bool ok = true; + ok &= inHost.LoadFunction( inCoreDll, bridgeType, "LoadGameAssembly", (void**)&outApi.LoadGameAssembly ); + ok &= inHost.LoadFunction( inCoreDll, bridgeType, "SetEngineAPI", (void**)&outApi.SetEngineAPI ); + ok &= inHost.LoadFunction( inCoreDll, bridgeType, "GetScriptCount", (void**)&outApi.GetScriptCount ); + ok &= inHost.LoadFunction( inCoreDll, bridgeType, "GetScriptName", (void**)&outApi.GetScriptName ); + ok &= inHost.LoadFunction( inCoreDll, bridgeType, "CreateScript", (void**)&outApi.CreateScript ); + ok &= inHost.LoadFunction( inCoreDll, bridgeType, "ScriptOnStart", (void**)&outApi.ScriptOnStart ); + ok &= inHost.LoadFunction( inCoreDll, bridgeType, "ScriptOnUpdate", (void**)&outApi.ScriptOnUpdate ); + ok &= inHost.LoadFunction( inCoreDll, bridgeType, "ScriptOnDestroy", (void**)&outApi.ScriptOnDestroy ); + ok &= inHost.LoadFunction( inCoreDll, bridgeType, "ScriptOnEditorInspect", (void**)&outApi.ScriptOnEditorInspect ); + ok &= inHost.LoadFunction( inCoreDll, bridgeType, "GetFieldsJson", (void**)&outApi.GetFieldsJson ); + ok &= inHost.LoadFunction( inCoreDll, bridgeType, "SetFieldsJson", (void**)&outApi.SetFieldsJson ); + //ok &= inHost.LoadFunction( inCoreDll, bridgeType, "ReloadGameAssembly", (void**)&outApi.ReloadGameAssembly ); + //ok &= inHost.LoadFunction( inCoreDll, bridgeType, "GetFieldCount", (void**)&outApi.GetFieldCount ); + //ok &= inHost.LoadFunction( inCoreDll, bridgeType, "GetFieldInfo", (void**)&outApi.GetFieldInfo ); + //ok &= inHost.LoadFunction( inCoreDll, bridgeType, "GetFieldValue", (void**)&outApi.GetFieldValue ); + //ok &= inHost.LoadFunction( inCoreDll, bridgeType, "SetFieldValue", (void**)&outApi.SetFieldValue ); + //ok &= inHost.LoadFunction( inCoreDll, bridgeType, "GetInstanceCount", (void**)&outApi.GetInstanceCount ); + //ok &= inHost.LoadFunction( inCoreDll, bridgeType, "GetInstanceHandle", (void**)&outApi.GetInstanceHandle ); + //ok &= inHost.LoadFunction( inCoreDll, bridgeType, "GetInstanceTypeName", (void**)&outApi.GetInstanceTypeName ); + //ok &= inHost.LoadFunction( inCoreDll, bridgeType, "GetMethodCount", (void**)&outApi.GetMethodCount ); + //ok &= inHost.LoadFunction( inCoreDll, bridgeType, "GetMethodName", (void**)&outApi.GetMethodName ); + //ok &= inHost.LoadFunction( inCoreDll, bridgeType, "RestoreScript", (void**)&outApi.RestoreScript ); + return ok; } -void ScriptEngine::InitMono() +int ScriptEngine::Init() { - mono_set_assemblies_path( MONO_PATH ); - BRUH_FMT( "Mono version: %s", mono_get_runtime_build_info() ); - - - if( sScriptData.EnableDebugging ) + if( gScriptHost.IsInitialized() ) { - const char* argv[2] = { - "--debugger-agent=transport=dt_socket,address=127.0.0.1:55555,server=y,suspend=n,loglevel=3,logfile=MonoDebugger.log", - "--soft-breakpoints", - }; - mono_jit_parse_options( 2, (char**)argv ); - mono_debug_init( MONO_DEBUG_FORMAT_MONO ); + DBG( "dotnet already up, skipping reinit" ); + return 0; } - //mono_set_dirs( MONO_HOME "/lib", MONO_HOME "/etc" ); - sScriptData.RootDomain = mono_jit_init_version( "MEMonoRuntime", "v4.8" ); - if( !sScriptData.RootDomain ) - { - YIKES( "mono_jit_init failed" ); - } - InitDebug(); - - mono_thread_set_main( mono_thread_current() ); -} - -void ScriptEngine::RegisterFunctions() -{ - Register_ImGuiBindings(); - Register_WorldBindings(); - Register_LogBindings(); -} - - -void ScriptEngine::Tests() -{ -#if 0 - testClassInstance = ScriptClass( "", "TestScript" ); - testClassInstance.Instantiate(); - - testClassInstance.InvokeFull( "PrintFloatVar" ); + // TODO: make this less ugly, maybe derive from sharpmake or a config + const std::string buildDir = ".build/" + std::string( build_prefix ) + std::string( build_platform ) + std::string( build_postfix ); + const std::string coreDll = buildDir + "/ScriptCore.dll"; + const std::string gameDll = buildDir + "/Game.Script.dll"; + const std::string runtimeConfig = "ScriptCore.runtimeconfig.json"; // lives in the root, not the build dir - float increment = 5.0f; - void* params[] = + if( !gScriptHost.Init( runtimeConfig ) ) { - &increment - }; - testClassInstance.InvokeFull( "IncrementFloatVar", 1, params ); - - testClassInstance.InvokeFull( "PrintFloatVar" ); - MonoClass* testingClass = testClassInstance.Class; - - // float property accessibility - floatField = mono_class_get_field_from_name( testingClass, "MyPublicFloatVar" ); - uint8_t floatFieldAccessibility = MonoUtils::GetFieldAccessibility( floatField ); + YIKES( "failed to init .NET runtime, scripting is dead" ); + return 1; + } - if( floatFieldAccessibility & MonoUtils::Accessibility::Public ) + if( !LoadAPI( gScriptHost, coreDll, gDotnetAPI ) || !gDotnetAPI.IsValid() ) { - std::cout << "PUBLIC: MyPublicFloatVar" << std::endl; + YIKES( "failed to load ScriptBridge API" ); + return 1; } - // string field accessibility - MonoClassField* nameField = mono_class_get_field_from_name( testingClass, "m_Name" ); - uint8_t nameFieldAccessibility = MonoUtils::GetFieldAccessibility( nameField ); - - if( nameFieldAccessibility & MonoUtils::Accessibility::Private ) + // bind the engine side before any script can call into it + ScriptEngineAPI engineApi{}; + engineApi.Log = Eng_Log; + engineApi.GetTime = Eng_GetTime; + Register_EntityBindings( engineApi ); + Register_TransformBindings( engineApi ); + Register_CameraBindings( engineApi ); + Register_BasicUIViewBindings( engineApi ); + Register_ImGuiBindings( engineApi ); + Register_InputBindings( engineApi ); + Register_WorldBindings( engineApi ); + if( gDotnetAPI.SetEngineAPI( &engineApi, sizeof( engineApi ) ) != 0 ) { - std::cout << "PRIVATE: m_Name" << std::endl; + YIKES( "C# rejected our engine API, size mismatch? check EngineAPI vs EngineAPIBindings" ); + return 1; } - // string property accessibility - MonoProperty* nameProperty = mono_class_get_property_from_name( testingClass, "Name" ); - uint8_t namePropertyAccessibility = MonoUtils::GetPropertyAccessibility( nameProperty ); - - if( namePropertyAccessibility & MonoUtils::Accessibility::Public ) + if( gDotnetAPI.LoadGameAssembly( reinterpret_cast( gameDll.c_str() ) ) != 0 ) { - std::cout << "PUBLIC: Name" << std::endl; + YIKES_NEW( "failed to load game scripts from {}", gameDll ); + return 1; } - // float field - float value; - mono_field_get_value( testClassInstance.ClassObject, floatField, &value ); - - value += 10.0f; - mono_field_set_value( testClassInstance.ClassObject, floatField, &value ); - - // string property - MonoString* nameValue = (MonoString*)mono_property_get_value( nameProperty, testClassInstance.ClassObject, nullptr, nullptr ); - std::string nameStr = MonoUtils::MonoStringToUTF8( nameValue ); - - nameStr += ", World!"; - nameValue = mono_string_new( sScriptData.RootDomain, nameStr.c_str() ); - mono_property_set_value( nameProperty, testClassInstance.ClassObject, (void**)&nameValue, nullptr ); - - - // float property - MonoProperty* floatProperty = mono_class_get_property_from_name( testingClass, "TestFloatProperty" ); - - MonoObject* floatValueObj = mono_property_get_value( floatProperty, testClassInstance.ClassObject, nullptr, nullptr ); - float floatValue = *(float*)mono_object_unbox( floatValueObj ); - floatValue += 10.0f; + int scriptCount = gDotnetAPI.GetScriptCount(); + DBG( "dotnet ready: {} script(s) available", scriptCount ); - void* data[] = { &floatValue }; - mono_property_set_value( nameProperty, testClassInstance.ClassObject, data, nullptr ); -#endif -} - - -ScriptClass& ScriptEngine::GetEntityClass( const std::string& name ) -{ - return sScriptData.EntityClasses.at( name ); -} - -const ScriptFieldMap& ScriptEngine::GetScriptFieldMap( Entity ent ) -{ - return sScriptData.EntityScriptFields.at( ent.GetId().Value() ); + return 0; } -MonoImage* ScriptEngine::GetCoreImage() +void ScriptEngine::SetWorld( WeakPtr inWorld ) { - return sScriptData.CoreAssemblyImage; + ScriptBindings::SetWorld( inWorld ); } -SharedPtr ScriptEngine::CreateScriptInstance( ScriptClass& script, EntityHandle entity ) +int ScriptEngine::CreateScript( const std::string& inName, EntityID inEntity ) { - sScriptData.EntityInstances[entity->GetId().Value()] = MakeShared( script, entity ); - return sScriptData.EntityInstances[entity->GetId().Value()]; + return gDotnetAPI.CreateScript( reinterpret_cast( inName.c_str() ), inEntity ); } -bool ScriptEngine::LoadAssembly( const Path& assemblyPath ) +std::string ScriptEngine::GetFieldsJson( int inHandle ) { - char name[30] = "MEScriptRuntime\n"; - sScriptData.AppDomain = mono_domain_create_appdomain( &name[0], nullptr ); - mono_domain_set( sScriptData.AppDomain, true ); - - sScriptData.CoreAssembly = MonoUtils::LoadMonoAssembly( assemblyPath, sScriptData.EnableDebugging ); - sScriptData.CoreAssemblyFilePath = assemblyPath; - - sScriptData.CoreAssemblyImage = mono_assembly_get_image( sScriptData.CoreAssembly ); - - if( !sScriptData.CoreAssemblyImage ) + if( inHandle < 0 || !gDotnetAPI.GetFieldsJson ) { - YIKES( "mono_assembly_get_image failed" ); - return false; + return {}; } - return true; -} - -void ScriptEngine::ReloadAssembly() -{ - mono_domain_set( mono_get_root_domain(), false ); - mono_domain_unload( sScriptData.AppDomain ); - - LoadAssembly( sScriptData.CoreAssemblyFilePath ); - LoadAppAssembly( sScriptData.AppAssemblyFilePath ); - CacheAssemblyTypes(); - - sScriptData.entityClass = ScriptClass( "", "Entity", true ); + // #TODO: fixed buffer, fine for small shit + uint8_t buf[4096] = {}; + gDotnetAPI.GetFieldsJson( inHandle, buf, sizeof( buf ) ); + return reinterpret_cast( buf ); } -bool ScriptEngine::LoadAppAssembly( const Path& assemblyPath ) +void ScriptEngine::SetFieldsJson( int inHandle, const std::string& inJson ) { - sScriptData.AppAssembly = MonoUtils::LoadMonoAssembly( assemblyPath, sScriptData.EnableDebugging ); - sScriptData.AppAssemblyFilePath = assemblyPath; - - sScriptData.AppAssemblyImage = mono_assembly_get_image( sScriptData.AppAssembly ); - if( !sScriptData.AppAssemblyImage ) + if( inHandle < 0 || inJson.empty() || !gDotnetAPI.SetFieldsJson ) { - YIKES( "mono_assembly_get_image failed" ); - return false; + return; } - //#TODO: Listen for dll changes - - return true; + gDotnetAPI.SetFieldsJson( inHandle, reinterpret_cast( inJson.c_str() ) ); } -void ScriptEngine::CacheAssemblyTypes() +void ScriptEngine::ScriptOnStart( int inHandle ) { - sScriptData.EntityClasses.clear(); - - const MonoTableInfo* typeDefinitionsTable = mono_image_get_table_info( sScriptData.AppAssemblyImage, MONO_TABLE_TYPEDEF ); - int32_t numTypes = mono_table_info_get_rows( typeDefinitionsTable ); - - MonoClass* monoBase = mono_class_from_name( sScriptData.CoreAssemblyImage, "", "MEObject" ); - for( int32_t i = 0; i < numTypes; i++ ) - { - uint32_t cols[MONO_TYPEDEF_SIZE]; - mono_metadata_decode_row( typeDefinitionsTable, i, cols, MONO_TYPEDEF_SIZE ); - - std::string nameSpace = mono_metadata_string_heap( sScriptData.AppAssemblyImage, cols[MONO_TYPEDEF_NAMESPACE] ); - std::string name = mono_metadata_string_heap( sScriptData.AppAssemblyImage, cols[MONO_TYPEDEF_NAME] ); - std::string fullName; - if( !nameSpace.empty() ) - { - fullName = std::string( nameSpace + "." + name ); - } - else - { - fullName = name; - } - - LoadedClassInfo loadedClass; - loadedClass.Namespace = nameSpace; - loadedClass.Name = name; - - MonoClass* monoClass = mono_class_from_name( sScriptData.AppAssemblyImage, nameSpace.c_str(), name.c_str() ); - //if( monoClass == monoBase ) - // continue; - - bool isEntity = mono_class_is_subclass_of( monoClass, monoBase, false ); - if( isEntity ) - { - sScriptData.EntityClasses[fullName] = ScriptClass( loadedClass.Namespace, loadedClass.Name ); - ScriptClass& scriptClass = sScriptData.EntityClasses[fullName]; - int fieldCount = mono_class_num_fields( monoClass ); - void* it = nullptr; - while( MonoClassField* field = mono_class_get_fields( monoClass, &it ) ) - { - const char* fieldName = mono_field_get_name( field ); - uint32_t flags = mono_field_get_flags( field ); - if( flags & MONO_FIELD_ATTR_PUBLIC ) - { - MonoType* type = mono_field_get_type( field ); - MonoUtils::ScriptFieldType fieldType = MonoUtils::MonoTypeToScriptFieldType( type ); - //BRUH_FMT( "%s, %i", MonoUtils::ScriptFieldTypeToString( fieldType ).c_str(), fieldType ); - scriptClass.m_fields[fieldName] = { fieldType, fieldName, field }; - } - } - LoadedEntityScripts.push_back( loadedClass ); - } - LoadedClasses.push_back( loadedClass ); - } + gDotnetAPI.ScriptOnStart( inHandle ); } -MonoClass* ScriptInstance::GetMonoClass() const +void ScriptEngine::ScriptOnUpdate( int inHandle, float inDt ) { - return mono_object_get_class( GetMonoObjectInstance() ); -} - -void ScriptInstance::OnCreate() -{ - MonoClass* klass = GetMonoClass(); - MonoClassField* parentField = nullptr; - - while( klass != nullptr ) - { - parentField = mono_class_get_field_from_name( klass, "_parent" ); - if( parentField != nullptr ) - break; - - klass = mono_class_get_parent( klass ); // walk up to base class - } - - if( parentField ) - { - MonoObject* managedEntity = ScriptEngine::ReturnEntityID( Owner ); - if( managedEntity == nullptr ) - { - YIKES( "MonoObject reference was lost (collected by GC)" ); - } - - if( managedEntity ) - mono_field_set_value( GetMonoObject(), parentField, managedEntity ); - } - - if( OnCreateMethod ) - { - ScriptRef.InvokeMethod( GetMonoObjectInstance(), OnCreateMethod, nullptr ); - } + gDotnetAPI.ScriptOnUpdate( inHandle, inDt ); } -MonoObject* ScriptInstance::GetMonoObjectInstance() const +void ScriptEngine::ScriptOnDestroy( int inHandle ) { - return mono_gchandle_get_target( GCHandle ); + gDotnetAPI.ScriptOnDestroy( inHandle ); } - -void ScriptInstance::Init( int numParams /*= 0*/, void** params /*= nullptr*/ ) +void ScriptEngine::ScriptOnEditorInspect( int inHandle ) { - if( numParams <= 0 ) - { - mono_runtime_object_init( GetMonoObjectInstance() ); - } - else - { - auto method = ScriptEngine::sScriptData.entityClass.GetMethod( ".ctor", numParams ); - ScriptRef.InvokeMethod( GetMonoObjectInstance(), method, params ); - } + gDotnetAPI.ScriptOnEditorInspect( inHandle ); } -bool ScriptInstance::GetFieldValueInternal( const std::string& name, void* outValue ) +int ScriptEngine::GetScriptCount() { - const auto& fields = GetScriptClass().m_fields; - auto it = fields.find( name ); - if( it == fields.end() ) - return false; - - mono_field_get_value( GetMonoObjectInstance(), it->second.Field, outValue ); - return true; + return gDotnetAPI.GetScriptCount ? gDotnetAPI.GetScriptCount() : 0; } -bool ScriptInstance::SetFieldValueInternal( const std::string& name, void* inValue ) +std::string ScriptEngine::GetScriptName( int inIndex ) { - const auto& fields = GetScriptClass().m_fields; - auto it = fields.find( name ); - if( it == fields.end() ) - return false; + uint8_t buf[256] = {}; + if( gDotnetAPI.GetScriptName ) + { + gDotnetAPI.GetScriptName( inIndex, buf, sizeof( buf ) ); + } - mono_field_set_value( GetMonoObjectInstance(), it->second.Field, inValue ); - return true; + return reinterpret_cast( buf ); } -#endif +#endif \ No newline at end of file diff --git a/Source/Scripting/ScriptEngine.h b/Source/Scripting/ScriptEngine.h index 9b310596..e7fd2c48 100644 --- a/Source/Scripting/ScriptEngine.h +++ b/Source/Scripting/ScriptEngine.h @@ -1,251 +1,34 @@ #pragma once -#if USING( ME_SCRIPTING ) - -#include "Scripting/MonoFwd.h" #include "Path.h" -#include "ECS/EntityHandle.h" -#include "Engine/World.h" -#include "MonoUtils.h" -#include "ECS/Entity.h" -#include - -class Engine; - -struct ScriptField -{ - MonoUtils::ScriptFieldType Type; - std::string Name; - - MonoClassField* Field = nullptr; -}; - - -struct ScriptFieldInstance -{ - ScriptField Instance; - - const char* GetBuffer() const - { - return Buffer; - } - - template - T GetValue() - { - static_assert( sizeof( T ) <= 32, "Field type is too large for buffer." ); - return *(T*)Buffer; - } - - template - void SetValue( T value ) - { - static_assert( sizeof( T ) <= 32, "Field type is too large for buffer." ); - memcpy( Buffer, value ); - } - -private: - char Buffer[32]; - friend class ScriptComponent; -}; - -using ScriptFieldMap = std::unordered_map; - -class ScriptClass -{ - friend class ScriptComponent; -public: - ScriptClass() = default; - ScriptClass( const std::string& inNameSpace, const std::string& inName, bool isCore = false ); - - // maybe have a create instance that returns ScriptClass - MonoObject* Instantiate(); - - MonoMethod* GetMethod( const std::string& inFuncName, int inParamCount ) const; - void InvokeMethod( MonoObject* inInstance, MonoMethod* inMethod, void** inParams ); - - std::unordered_map m_fields; - - MonoClass* Class = nullptr; - -#if USING( ME_DEBUG ) - std::string Name; - std::string Namespace; -#endif -}; - - -class ScriptInstance -{ -public: - ScriptInstance( ScriptClass& inClass, EntityHandle inOwner ) - : ScriptRef( inClass ) - , Owner( inOwner ) - { - GCHandle = mono_gchandle_new( inClass.Instantiate(), false ); - - OnCreateMethod = inClass.GetMethod( "OnCreate", 0 ); - OnUpdateMethod = inClass.GetMethod( "OnUpdate", 1 ); - void* entID = &inOwner; - Init( 0, nullptr ); - } - - ~ScriptInstance() - { - mono_gchandle_free( GCHandle ); - } - - //explicit ScriptInstance( ScriptInstance& inClass ) - // : ScriptRef( inClass.ScriptRef ) - // , Owner( inClass.Owner ) - // , Instance( inClass.Instance ) - // , OnCreateMethod( inClass.OnCreateMethod ) - // , OnUpdateMethod( inClass.OnUpdateMethod ) - //{ - //} - - MonoObject* GetMonoObject() const - { - return GetMonoObjectInstance(); - } - - MonoClass* GetMonoClass() const; - - void OnCreate(); - - void OnUpdate( float deltaTime ) - { -#if USING( ME_DEBUG ) - OPTICK_EVENT( ScriptRef.Name.c_str() ); -#endif - if( !OnUpdateMethod ) - { - return; - } - void* param = &deltaTime; - ScriptRef.InvokeMethod( GetMonoObjectInstance(), OnUpdateMethod, ¶m); - } - - template - T GetFieldValue( const std::string& name ); - - template - void SetFieldValue( const std::string& name, T& value ); - - MonoObject* GetMonoObjectInstance() const; - - uint32_t GCHandle = 0; - MonoMethod* OnCreateMethod = nullptr; - MonoMethod* OnUpdateMethod = nullptr; - - const ScriptClass& GetScriptClass() const - { - return ScriptRef; - } - -private: - void Init( int numParams = 0, void** params = nullptr ); - bool GetFieldValueInternal( const std::string& name, void* outValue ); - - bool SetFieldValueInternal( const std::string& name, void* inValue ); - - ScriptClass& ScriptRef; - EntityHandle Owner; - inline static char sFieldValueBuffer[32]; - friend class ScriptComponent; -}; +#if USING( ME_SCRIPTING ) -template -T ScriptInstance::GetFieldValue( const std::string& name ) -{ - void* value = nullptr; - if( !GetFieldValueInternal( name, sFieldValueBuffer ) ) - { - return T(); - } +#include +#include "Pointers.h" +#include "ECS/EntityID.h" - return *( (T*)sFieldValueBuffer ); -} - -template -void ScriptInstance::SetFieldValue( const std::string& name, T& value ) -{ - SetFieldValueInternal( name, &value ); -} +class World; class ScriptEngine { public: - struct LoadedClassInfo - { - std::string Namespace; - std::string Name; - }; - - struct ScriptData - { - MonoDomain* RootDomain = nullptr; - MonoDomain* AppDomain = nullptr; - - MonoAssembly* CoreAssembly = nullptr; - MonoImage* CoreAssemblyImage = nullptr; - Path CoreAssemblyFilePath; - - MonoAssembly* AppAssembly = nullptr; - MonoImage* AppAssemblyImage = nullptr; - Path AppAssemblyFilePath; - - bool EnableDebugging = true; - - WeakPtr worldPtr; - Engine* enginePtr = nullptr; - - ScriptClass entityClass; - - std::unordered_map EntityClasses; - - std::unordered_map> EntityInstances; - std::unordered_map EntityScriptFields; - }; - - static void Init(); - - static void InitDebug(); - - static void RegisterFunctions(); - static void Tests(); - - static ScriptClass& GetEntityClass( const std::string& name ); - static const ScriptFieldMap& GetScriptFieldMap( Entity ent ); - - static MonoObject* ReturnEntityID( const EntityHandle& inEntity ); - - static MonoImage* GetCoreImage(); - - static SharedPtr CreateScriptInstance( ScriptClass& script, EntityHandle entity ); - - static MonoObject* GetManagedEntity( EntityHandle entity ); - static void RegisterManagedEntity( EntityHandle entity, MonoObject* obj ); -private: - static void InitMono(); - static bool LoadAssembly( const Path& assemblyPath ); - static void ReloadAssembly(); - static bool LoadAppAssembly( const Path& assemblyPath ); - static void CacheAssemblyTypes(); - -public: - static ScriptData sScriptData; - - // Parsed class - static std::vector LoadedClasses; - - // Successful class loaded - static std::vector LoadedEntityScripts; - - - static std::unordered_map entityInstanceCache; + static int Init(); + + // active world + static void SetWorld( WeakPtr inWorld ); + + static int CreateScript( const std::string& inName, EntityID inEntity ); + + // public-field serialization + static std::string GetFieldsJson( int inHandle ); + static void SetFieldsJson( int inHandle, const std::string& inJson ); + static void ScriptOnStart( int inHandle ); + static void ScriptOnUpdate( int inHandle, float inDt ); + static void ScriptOnDestroy( int inHandle ); + static void ScriptOnEditorInspect( int inHandle ); + static int GetScriptCount(); + static std::string GetScriptName( int inIndex ); }; - -#endif +#endif \ No newline at end of file diff --git a/Source/Scripting/ScriptHost.cpp b/Source/Scripting/ScriptHost.cpp new file mode 100644 index 00000000..6ac71c97 --- /dev/null +++ b/Source/Scripting/ScriptHost.cpp @@ -0,0 +1,200 @@ +#include "PCH.h" +#include "ScriptHost.h" + +#if USING( ME_SCRIPTING ) +#include + +#include +#include +#include + +#if USING( ME_PLATFORM_WINDOWS ) +#include + +// hostfxr uses wide strings on Windows +static std::wstring ToWide( const std::string& inStr ) +{ + return std::wstring( inStr.begin(), inStr.end() ); +} + +#elif USING( ME_PLATFORM_LINUX ) +#include +#include +#endif + + +bool ScriptHost::Init( const std::string& inRuntimeConfigPath ) +{ +#if USING( ME_PLATFORM_WINDOWS ) + wchar_t buffer[MAX_PATH]; + size_t bufferSize = sizeof( buffer ) / sizeof( wchar_t ); + int rc = get_hostfxr_path( buffer, &bufferSize, nullptr ); + if( rc != 0 ) + { + YIKES_NEW( "get_hostfxr_path failed: 0x{:x}", rc ); + return false; + } + + m_hostfxrLib = ( void* )::LoadLibraryW( buffer ); + if( !m_hostfxrLib ) + { + YIKES( "LoadLibraryW(hostfxr) failed" ); + return false; + } + + auto initFptr = ( hostfxr_initialize_for_runtime_config_fn ) + ::GetProcAddress( (HMODULE)m_hostfxrLib, "hostfxr_initialize_for_runtime_config" ); + auto getDelegateFptr = ( hostfxr_get_runtime_delegate_fn ) + ::GetProcAddress( (HMODULE)m_hostfxrLib, "hostfxr_get_runtime_delegate" ); + m_closeFptr = ( void( * )( void* ) ) + ::GetProcAddress( (HMODULE)m_hostfxrLib, "hostfxr_close" ); + + if( !initFptr || !getDelegateFptr || !m_closeFptr ) + { + YIKES( "failed to get hostfxr exports - is .NET installed?" ); + return false; + } + + auto wConfig = ToWide( inRuntimeConfigPath ); + rc = initFptr( wConfig.c_str(), nullptr, reinterpret_cast( &m_hostfxrCtx ) ); + if( rc != 0 || !m_hostfxrCtx ) + { + YIKES_NEW( "hostfxr_initialize_for_runtime_config failed: 0x{:x} - runtimeconfig path correct?", rc ); + return false; + } + + load_assembly_and_get_function_pointer_fn loadFn = nullptr; + rc = getDelegateFptr( + reinterpret_cast( m_hostfxrCtx ), + hdt_load_assembly_and_get_function_pointer, + reinterpret_cast( &loadFn ) ); + if( rc != 0 || !loadFn ) + { + YIKES_NEW( "failed to get load_assembly delegate: 0x{:x}", rc ); + return false; + } + m_loadAssemblyFn = (void*)loadFn; + +#elif USING( ME_PLATFORM_LINUX ) + char_t buffer[PATH_MAX]; + size_t bufferSize = sizeof( buffer ) / sizeof( char_t ); + int rc = get_hostfxr_path( buffer, &bufferSize, nullptr ); + if( rc != 0 ) + { + YIKES_NEW( "get_hostfxr_path failed: 0x{:x}", rc ); + return false; + } + + m_hostfxrLib = dlopen( buffer, RTLD_LAZY | RTLD_LOCAL ); + if( !m_hostfxrLib ) + { + YIKES( "dlopen(hostfxr) failed" ); + return false; + } + + auto initFptr = ( hostfxr_initialize_for_runtime_config_fn ) + dlsym( m_hostfxrLib, "hostfxr_initialize_for_runtime_config" ); + auto getDelegateFptr = ( hostfxr_get_runtime_delegate_fn ) + dlsym( m_hostfxrLib, "hostfxr_get_runtime_delegate" ); + m_closeFptr = ( void( * )( void* ) ) + dlsym( m_hostfxrLib, "hostfxr_close" ); + + if( !initFptr || !getDelegateFptr || !m_closeFptr ) + { + YIKES( "failed to get hostfxr exports - is .NET installed?" ); + return false; + } + + rc = initFptr( inRuntimeConfigPath.c_str(), nullptr, reinterpret_cast( &m_hostfxrCtx ) ); + if( rc != 0 || !m_hostfxrCtx ) + { + YIKES_NEW( "hostfxr_initialize_for_runtime_config failed: 0x{:x} - runtimeconfig path correct?", rc ); + return false; + } + + load_assembly_and_get_function_pointer_fn loadFn = nullptr; + rc = getDelegateFptr( + reinterpret_cast( m_hostfxrCtx ), + hdt_load_assembly_and_get_function_pointer, + reinterpret_cast( &loadFn ) ); + if( rc != 0 || !loadFn ) + { + YIKES_NEW( "failed to get load_assembly delegate: 0x{:x}", rc ); + return false; + } + m_loadAssemblyFn = (void*)loadFn; +#endif + + DBG( "ScriptHost .NET runtime initialised" ); + return true; +} + + +void ScriptHost::Shutdown() +{ + if( m_hostfxrCtx && m_closeFptr ) + { + m_closeFptr( m_hostfxrCtx ); + m_hostfxrCtx = nullptr; + } +#if USING( ME_PLATFORM_WINDOWS ) + if( m_hostfxrLib ) + { + ::FreeLibrary( (HMODULE)m_hostfxrLib ); + m_hostfxrLib = nullptr; + } +#elif USING( ME_PLATFORM_LINUX ) + if( m_hostfxrLib ) + { + dlclose( m_hostfxrLib ); + m_hostfxrLib = nullptr; + } +#endif + m_loadAssemblyFn = nullptr; +} + + +bool ScriptHost::LoadFunction( const std::string& inAssemblyPath, + const std::string& inTypeName, + const std::string& inMethodName, + void** outFnPtr ) +{ + if( !m_loadAssemblyFn ) + { + YIKES( "ScriptHost not initialised" ); + return false; + } + + auto fn = reinterpret_cast( m_loadAssemblyFn ); + +#if USING( ME_PLATFORM_WINDOWS ) + auto wAssembly = ToWide( inAssemblyPath ); + auto wType = ToWide( inTypeName ); + auto wMethod = ToWide( inMethodName ); + + int rc = fn( + wAssembly.c_str(), + wType.c_str(), + wMethod.c_str(), + UNMANAGEDCALLERSONLY_METHOD, + nullptr, + outFnPtr ); +#elif USING( ME_PLATFORM_LINUX ) + int rc = fn( + inAssemblyPath.c_str(), + inTypeName.c_str(), + inMethodName.c_str(), + UNMANAGEDCALLERSONLY_METHOD, + nullptr, + outFnPtr ); +#endif + + if( rc != 0 ) + { + YIKES_NEW( "LoadFunction failed for {}.{} (0x{:x})", inTypeName, inMethodName, rc ); + return false; + } + return true; +} + +#endif \ No newline at end of file diff --git a/Source/Scripting/ScriptHost.h b/Source/Scripting/ScriptHost.h new file mode 100644 index 00000000..583a01b0 --- /dev/null +++ b/Source/Scripting/ScriptHost.h @@ -0,0 +1,34 @@ +#pragma once +#include + +class ScriptHost +{ +public: + ScriptHost() = default; + ~ScriptHost() + { + Shutdown(); + } + + bool Init( const std::string& inRuntimeConfigPath ); + void Shutdown(); + + // get [UnmanagedCallersOnly] function pointer. + // inTypeName - "Namespace.Class, AssemblyName" + bool LoadFunction( const std::string& inAssemblyPath, + const std::string& inTypeName, + const std::string& inMethodName, + void** outFnPtr ); + + inline bool IsInitialized() const + { + return m_loadAssemblyFn != nullptr; + } + + +private: + void* m_hostfxrLib = nullptr; + void* m_hostfxrCtx = nullptr; + void ( *m_closeFptr )( void* ) = nullptr; + void* m_loadAssemblyFn = nullptr; +}; diff --git a/Source/UI/FileSystemBasic.cpp b/Source/UI/FileSystemBasic.cpp index d10853cd..d28cee5a 100644 --- a/Source/UI/FileSystemBasic.cpp +++ b/Source/UI/FileSystemBasic.cpp @@ -46,11 +46,19 @@ namespace ultralight String8 utf8 = String( path ).utf8(); std::string relPath( utf8.data(), utf8.length() ); - relPath = Path( relPath ).GetLocalPathString(); + Path resolved( relPath ); + if( resolved.Exists ) + { + std::string full = resolved.FullPath; + NormalizePath( full ); + return full; + } + + relPath = resolved.GetLocalPathString(); NormalizePath( relPath ); // Strip any slash from beginning of path: - if( relPath[0] == '/' ) + if( !relPath.empty() && relPath[0] == '/' ) relPath = relPath.substr( 1 ); return baseDir_ + relPath; @@ -98,6 +106,11 @@ namespace ultralight RefPtr FileSystemBasic::OpenFile( const String& file_path ) { Path relativePath( getRelative( file_path ) ); + if( !relativePath.IsFile ) + { + return nullptr; + } + if( !relativePath.Exists ) { String8 utf8 = file_path.utf8(); diff --git a/Source/UI/FontLoaderLinux.cpp b/Source/UI/FontLoaderLinux.cpp new file mode 100644 index 00000000..bccb89a6 --- /dev/null +++ b/Source/UI/FontLoaderLinux.cpp @@ -0,0 +1,405 @@ +#include "PCH.h" + +#if USING( ME_PLATFORM_LINUX ) + +#include "FontLoaderLinux.h" +#include +#include +#include +#include +#include +#include +#include +#include + + +namespace ultralight { + +FontLoaderLinux::FontLoaderLinux() { + FcInit(); +} + +FontLoaderLinux::~FontLoaderLinux() {} + +template +struct FcPtrDeleter { + void operator()(T* ptr) const = delete; +}; + +template +using FcUniquePtr = std::unique_ptr>; + +template<> struct FcPtrDeleter { + void operator()(FcCharSet* ptr) const { FcCharSetDestroy(ptr); } +}; + +template<> struct FcPtrDeleter { + void operator()(FcFontSet* ptr) const { FcFontSetDestroy(ptr); } +}; + +template<> struct FcPtrDeleter { + void operator()(FcLangSet* ptr) const { FcLangSetDestroy(ptr); } +}; + +template<> struct FcPtrDeleter { + void operator()(FcObjectSet* ptr) const { FcObjectSetDestroy(ptr); } +}; + +template<> struct FcPtrDeleter { + void operator()(FcPattern* ptr) const { FcPatternDestroy(ptr); } +}; + +template<> struct FcPtrDeleter { + void operator()(FcConfig* ptr) const { FcConfigDestroy(ptr); } +}; + +static int fontWeightToFontconfigWeight(int weight) +{ + if (weight < (150)) + return FC_WEIGHT_THIN; + if (weight < (250)) + return FC_WEIGHT_ULTRALIGHT; + if (weight < (350)) + return FC_WEIGHT_LIGHT; + if (weight < (450)) + return FC_WEIGHT_REGULAR; + if (weight < (550)) + return FC_WEIGHT_MEDIUM; + if (weight < (650)) + return FC_WEIGHT_SEMIBOLD; + if (weight < (750)) + return FC_WEIGHT_BOLD; + if (weight < (850)) + return FC_WEIGHT_EXTRABOLD; + return FC_WEIGHT_ULTRABLACK; +} + + +static bool configurePatternForFontDescription(FcPattern* pattern, int weight, bool italic, float size) +{ + if (!FcPatternAddInteger(pattern, FC_SLANT, italic ? FC_SLANT_ITALIC : FC_SLANT_ROMAN)) + return false; + if (!FcPatternAddInteger(pattern, FC_WEIGHT, fontWeightToFontconfigWeight(weight))) + return false; + if (!FcPatternAddDouble(pattern, FC_PIXEL_SIZE, (double)size)) + return false; + return true; +} + +static inline bool EqualsIgnoringCase(const char * s1, const char * s2) { + const unsigned char *p1 = (const unsigned char *) s1; + const unsigned char *p2 = (const unsigned char *) s2; + int result; + if (p1 == p2) + return true; + while ((result = tolower (*p1) - tolower (*p2++)) == 0) + if (*p1++ == '\0') + break; + return result == 0; +} + +static inline std::string ToAscii(const String& str) { + std::string result; + String8 str8 = str.utf8(); + for (size_t i = 0; i < str8.size(); i++) { + if (str8.data()[i] < 0x7F) + result += static_cast(str8.data()[i]); + } + return result; +} + +static inline bool isCommonlyUsedGenericFamily(const char* familyNameString) +{ + return EqualsIgnoringCase(familyNameString, "sans") + || EqualsIgnoringCase(familyNameString, "sans-serif") + || EqualsIgnoringCase(familyNameString, "serif") + || EqualsIgnoringCase(familyNameString, "monospace") + || EqualsIgnoringCase(familyNameString, "fantasy") + || EqualsIgnoringCase(familyNameString, "-webkit-system-font") + || EqualsIgnoringCase(familyNameString, "-webkit-system-ui") + || EqualsIgnoringCase(familyNameString, "cursive"); +} + +static inline std::vector SplitString(const std::string& input, char delimiter) { + std::stringstream stream(input); + std::string token; + std::vector result; + while(std::getline(stream, token, delimiter)) + result.push_back(token); + + return result; +} + +static std::vector patternToFamilies(FcPattern& pattern) { + char* patternChars = reinterpret_cast(FcPatternFormat(&pattern, reinterpret_cast("%{family}"))); + std::string patternString(patternChars); + free(patternChars); + + return SplitString(patternString, ','); +} + +// This is based on Chromium BSD code from Skia (src/ports/SkFontMgr_fontconfig.cpp). It is a +// hack for lack of API in Fontconfig: https://bugs.freedesktop.org/show_bug.cgi?id=19375 +// FIXME: This is horrible. It should be deleted once Fontconfig can do this itself. +enum class AliasStrength { + Weak, + Strong, + Done +}; + +static AliasStrength strengthOfFirstAlias(const FcPattern& original) +{ + // Ideally there would exist a call like + // FcResult FcPatternIsWeak(pattern, object, id, FcBool* isWeak); + // + // However, there is no such call and as of Fc 2.11.0 even FcPatternEquals ignores the weak bit. + // Currently, the only reliable way of finding the weak bit is by its effect on matching. + // The weak bit only affects the matching of FC_FAMILY and FC_POSTSCRIPT_NAME object values. + // A element with the weak bit is scored after FC_LANG, without the weak bit is scored before. + // Note that the weak bit is stored on the element, not on the value it holds. + FcValue value; + FcResult result = FcPatternGet(&original, FC_FAMILY, 0, &value); + if (result != FcResultMatch) + return AliasStrength::Done; + + FcUniquePtr pattern(FcPatternDuplicate(&original)); + FcBool hasMultipleFamilies = true; + while (hasMultipleFamilies) + hasMultipleFamilies = FcPatternRemove(pattern.get(), FC_FAMILY, 1); + + // Create a font set with two patterns. + // 1. the same FC_FAMILY as pattern and a lang object with only 'nomatchlang'. + // 2. a different FC_FAMILY from pattern and a lang object with only 'matchlang'. + FcUniquePtr fontSet(FcFontSetCreate()); + + FcUniquePtr strongLangSet(FcLangSetCreate()); + FcLangSetAdd(strongLangSet.get(), reinterpret_cast("nomatchlang")); + // Ownership of this FcPattern will be transferred with FcFontSetAdd. + FcPattern* strong = FcPatternDuplicate(pattern.get()); + FcPatternAddLangSet(strong, FC_LANG, strongLangSet.get()); + + FcUniquePtr weakLangSet(FcLangSetCreate()); + FcLangSetAdd(weakLangSet.get(), reinterpret_cast("matchlang")); + // Ownership of this FcPattern will be transferred via FcFontSetAdd. + FcPattern* weak = FcPatternCreate(); + FcPatternAddString(weak, FC_FAMILY, reinterpret_cast("nomatchstring")); + FcPatternAddLangSet(weak, FC_LANG, weakLangSet.get()); + + FcFontSetAdd(fontSet.get(), strong); + FcFontSetAdd(fontSet.get(), weak); + + // Add 'matchlang' to the copy of the pattern. + FcPatternAddLangSet(pattern.get(), FC_LANG, weakLangSet.get()); + + // Run a match against the copy of the pattern. + // If the first element was weak, then we should match the pattern with 'matchlang'. + // If the first element was strong, then we should match the pattern with 'nomatchlang'. + + // Note that this config is only used for FcFontRenderPrepare, which we don't even want. + // However, there appears to be no way to match/sort without it. + FcUniquePtr config(FcConfigCreate()); + FcFontSet* fontSets[1] = { fontSet.get() }; + FcUniquePtr match(FcFontSetMatch(config.get(), fontSets, 1, pattern.get(), &result)); + + FcLangSet* matchLangSet; + FcPatternGetLangSet(match.get(), FC_LANG, 0, &matchLangSet); + return FcLangEqual == FcLangSetHasLang(matchLangSet, reinterpret_cast("matchlang")) + ? AliasStrength::Weak : AliasStrength::Strong; +} + +static std::vector strongAliasesForFamily(const char* family) +{ + FcUniquePtr pattern(FcPatternCreate()); + if (!FcPatternAddString(pattern.get(), FC_FAMILY, reinterpret_cast(family))) + return std::vector(); + + FcConfigSubstitute(nullptr, pattern.get(), FcMatchPattern); + FcDefaultSubstitute(pattern.get()); + + FcUniquePtr familiesOnly(FcObjectSetBuild(FC_FAMILY, nullptr)); + FcUniquePtr minimal(FcPatternFilter(pattern.get(), familiesOnly.get())); + + // We really want to match strong (preferred) and same (acceptable) only here. + // If a family name was specified, assume that any weak matches after the last strong match + // are weak (default) and ignore them. + // The reason for is that after substitution the pattern for 'sans-serif' looks like + // "wwwwwwwwwwwwwwswww" where there are many weak but preferred names, followed by defaults. + // So it is possible to have weakly matching but preferred names. + // In aliases, bindings are weak by default, so this is easy and common. + // If no family name was specified, we'll probably only get weak matches, but that's ok. + int lastStrongId = -1; + int numIds = 0; + for (int id = 0; ; ++id) { + AliasStrength result = strengthOfFirstAlias(*minimal); + if (result == AliasStrength::Done) { + numIds = id; + break; + } + if (result == AliasStrength::Strong) + lastStrongId = id; + if (!FcPatternRemove(minimal.get(), FC_FAMILY, 0)) + return std::vector(); + } + + // If they were all weak, then leave the pattern alone. + if (lastStrongId < 0) + return std::vector(); + + // Remove everything after the last strong. + for (int id = lastStrongId + 1; id < numIds; ++id) { + if (!FcPatternRemove(pattern.get(), FC_FAMILY, lastStrongId + 1)) { + //ASSERT_NOT_REACHED(); + return std::vector(); + } + } + + return patternToFamilies(*pattern); +} + +static bool areStronglyAliased(const char* familyA, const char* familyB) +{ + for (auto& family : strongAliasesForFamily(familyA)) { + if (EqualsIgnoringCase(family.c_str(), familyB)) + return true; + } + return false; +} + +FcUniquePtr GetPatternForDescription(const std::string& family, int weight, bool italic, float size) { + FcInit(); + + // The CSS font matching algorithm (http://www.w3.org/TR/css3-fonts/#font-matching-algorithm) + // says that we must find an exact match for font family, slant (italic or oblique can be used) + // and font weight (we only match bold/non-bold here). + FcUniquePtr pattern(FcPatternCreate()); + // Never choose unscalable fonts, as they pixelate when displayed at different sizes. + FcPatternAddBool(pattern.get(), FC_SCALABLE, FcTrue); + + // TODO: handle -webkit-system-font + + const char* familyNameString = family.c_str(); + if (!FcPatternAddString(pattern.get(), FC_FAMILY, reinterpret_cast(familyNameString))) + return nullptr; + + if (!configurePatternForFontDescription(pattern.get(), weight, italic, size)) + return nullptr; + + // The strategy is originally from Skia (src/ports/SkFontHost_fontconfig.cpp): + // + // We do not normally allow fontconfig to substitute one font family for another, since this + // would break CSS font family fallback: the website should be in control of fallback. During + // normal font matching, the only font family substitution permitted is for generic families + // (sans, serif, monospace) or for strongly-aliased fonts (which are to be treated as + // effectively identical). This is because the font matching step is designed to always find a + // match for the font, which we don't want. + // + // Fontconfig is used in two stages: (1) configuration and (2) matching. During the + // configuration step, before any matching occurs, we allow arbitrary family substitutions, + // since this is an exact matter of respecting the user's font configuration. + FcConfigSubstitute(nullptr, pattern.get(), FcMatchPattern); + FcDefaultSubstitute(pattern.get()); + + FcChar8* fontConfigFamilyNameAfterConfiguration; + FcPatternGetString(pattern.get(), FC_FAMILY, 0, &fontConfigFamilyNameAfterConfiguration); + const char* familyNameAfterConfiguration = reinterpret_cast(fontConfigFamilyNameAfterConfiguration); + + FcResult fontConfigResult; + FcUniquePtr resultPattern(FcFontMatch(nullptr, pattern.get(), &fontConfigResult)); + if (!resultPattern) // No match. + return nullptr; + + // Loop through each font family of the result to see if it fits the one we requested. + bool matchedFontFamily = false; + FcChar8* fontConfigFamilyNameAfterMatching; + for (int i = 0; FcPatternGetString(resultPattern.get(), FC_FAMILY, i, &fontConfigFamilyNameAfterMatching) == FcResultMatch; ++i) { + // If Fontconfig gave us a different font family than the one we requested, we should ignore it + // and allow WebCore to give us the next font on the CSS fallback list. The exceptions are if + // this family name is a commonly-used generic family, or if the families are strongly-aliased. + // Checking for a strong alias comes last, since it is slow. + const char* familyNameAfterMatching = reinterpret_cast(fontConfigFamilyNameAfterMatching); + if (EqualsIgnoringCase(familyNameAfterConfiguration, familyNameAfterMatching) || + isCommonlyUsedGenericFamily(familyNameString) || + areStronglyAliased(familyNameAfterConfiguration, familyNameAfterMatching)) { + matchedFontFamily = true; + break; + } + } + + if (!matchedFontFamily) + return nullptr; + + // Verify that this font has an encoding compatible with Fontconfig. Fontconfig currently + // supports three encodings in FcFreeTypeCharIndex: Unicode, Symbol and AppleRoman. + // If this font doesn't have one of these three encodings, don't select it. + //auto platformData = std::make_unique(resultPattern.get(), fontDescription); + //if (!platformData->hasCompatibleCharmap()) + // return nullptr; + + return std::move(resultPattern); +} + +String FontLoaderLinux::fallback_font() const { return "sans"; } + +String FontLoaderLinux::fallback_font_for_characters(const String& characters, int weight, bool italic) const { + FcUniquePtr charset(FcCharSetCreate()); + + // Obtain UTF-32 representation of the input string + const char32_t* utf32_characters = characters.utf32().data(); + size_t utf32_length = characters.utf32().length(); + + // Add UTF-32 characters to the charset + for (size_t i = 0; i < utf32_length; i++) { + FcCharSetAddChar(charset.get(), static_cast(utf32_characters[i])); + } + + // Create a pattern + FcUniquePtr pat(FcPatternCreate()); + FcPatternAddCharSet(pat.get(), FC_CHARSET, charset.get()); + + // Set weight and italic properties + configurePatternForFontDescription(pat.get(), weight, italic, 12.0); + + // Match the pattern + FcResult result; + FcUniquePtr matched(FcFontMatch(nullptr, pat.get(), &result)); + + String fallback = fallback_font(); // Use existing fallback font logic + + if (matched) { + // Extract font family + FcChar8* font_family; + if (FcPatternGetString(matched.get(), FC_FAMILY, 0, &font_family) == FcResultMatch) { + String matched_family(reinterpret_cast(font_family)); + if (!matched_family.empty() && !isCommonlyUsedGenericFamily(matched_family.utf8().data())) { + // If the matched family is not a commonly-used generic family, use it as the fallback. + fallback = matched_family; + } + } + } + + // FontConfig resources will be automatically released when FcUniquePtr goes out of scope + + return fallback; +} + +RefPtr FontLoaderLinux::Load(const String& family, int weight, bool italic) { + FcUniquePtr pattern = GetPatternForDescription(ToAscii(family), weight, italic, 12.0); + + if (pattern) { + FcChar8* filepath = NULL; + if (FcPatternGetString(pattern.get(), FC_FILE, 0, &filepath) == FcResultMatch) { + return FontFile::Create(String((const char*)filepath)); + } + } + + return nullptr; +} + +// Called from Platform.cpp +FontLoader* CreatePlatformFontLoader() { + return new FontLoaderLinux(); +} + +} // namespace ultralight + +#endif // USING( ME_PLATFORM_LINUX ) \ No newline at end of file diff --git a/Source/UI/FontLoaderLinux.h b/Source/UI/FontLoaderLinux.h new file mode 100644 index 00000000..d118706c --- /dev/null +++ b/Source/UI/FontLoaderLinux.h @@ -0,0 +1,25 @@ +#pragma once + +#if USING( ME_PLATFORM_LINUX ) + +#include + +#include +#include + +namespace ultralight { + +class FontLoaderLinux : public FontLoader { +public: + FontLoaderLinux(); + virtual ~FontLoaderLinux(); + virtual String fallback_font() const override; + virtual String fallback_font_for_characters(const String& characters, int weight, bool italic) const override; + virtual RefPtr Load(const String& family, int weight, bool italic) override; +protected: + std::map> fonts_; +}; + +} // namespace ultralight + +#endif // USING( ME_PLATFORM_LINUX ) \ No newline at end of file diff --git a/Source/Web/HttpDownload.cpp b/Source/Web/HttpDownload.cpp index 50b1dad5..b87f0fc2 100644 --- a/Source/Web/HttpDownload.cpp +++ b/Source/Web/HttpDownload.cpp @@ -8,8 +8,11 @@ #include #endif -#if USING( ME_PLATFORM_MACOS ) +#if USING( ME_PLATFORM_MACOS ) || USING( ME_PLATFORM_LINUX ) #include +#include +#include +#include #endif #include @@ -18,9 +21,13 @@ namespace Web { -#if USING( ME_PLATFORM_WINDOWS ) +#if USING( ME_PLATFORM_MACOS ) || USING( ME_PLATFORM_LINUX ) + bool DownloadFileCurl( const std::string& inURL, const Path& outPath ); +#endif + bool DownloadFile( const std::string& inURL, const Path& outPath ) { +#if USING( ME_PLATFORM_WINDOWS ) std::string fileServer, filePath; bool isSecure = false; @@ -169,8 +176,14 @@ namespace Web BRUH( "File downloaded successfully." ); return true; - } +#elif USING( ME_PLATFORM_MACOS ) || USING( ME_PLATFORM_LINUX ) + return DownloadFileCurl( inURL, outPath ); +#else + YIKES_FMT( "Web::DownloadFile is not implemented on this platform; cannot download '%s'", inURL.c_str() ); + (void)outPath; + return false; #endif + } bool SplitUrl( std::string url, std::string& baseUrl, std::string& path, bool& isSecure ) { @@ -212,7 +225,7 @@ namespace Web return true; } -#if USING( ME_PLATFORM_MACOS ) +#if USING( ME_PLATFORM_MACOS ) || USING( ME_PLATFORM_LINUX ) size_t WriteToFileCallback( char* ptr, size_t size, size_t nmemb, void* userdata ) { // 'userdata' is our ofstream pointer @@ -225,7 +238,37 @@ namespace Web return size * nmemb; } - bool DownloadFile( const std::string& inURL, const Path& outPath ) + std::string NormalizeDownloadUrl( const std::string& inURL ) + { + std::string scheme = "https://"; + std::string rest = inURL; + size_t schemeEnd = inURL.find( "://" ); + if( schemeEnd != std::string::npos ) + { + scheme = inURL.substr( 0, schemeEnd + 3 ); + rest = inURL.substr( schemeEnd + 3 ); + } + + std::string encoded; + encoded.reserve( rest.size() ); + for( unsigned char c : rest ) + { + if( std::isalnum( c ) || std::strchr( "/-_.~:@%?=&", c ) != nullptr ) + { + encoded += static_cast( c ); + } + else + { + char buf[4]; + std::snprintf( buf, sizeof( buf ), "%%%02X", c ); + encoded += buf; + } + } + + return scheme + encoded; + } + + bool DownloadFileCurl( const std::string& inURL, const Path& outPath ) { // Ensure directory exists (similar logic to your WinHTTP version) std::string directory = outPath.GetDirectoryString(); @@ -246,7 +289,8 @@ namespace Web } // Configure URL - curl_easy_setopt( curlHandle, CURLOPT_URL, inURL.c_str() ); + const std::string url = NormalizeDownloadUrl( inURL ); + curl_easy_setopt( curlHandle, CURLOPT_URL, url.c_str() ); // If you need HTTPS ignoring invalid certificates (similar to your WinHTTP code), // you can disable cert verification here. @@ -274,20 +318,21 @@ namespace Web // Perform the request CURLcode res = curl_easy_perform( curlHandle ); - // Clean up - curl_easy_cleanup( curlHandle ); - outfile.close(); - if( res != CURLE_OK ) { - std::cerr << "Download failed with error: " - << curl_easy_strerror( res ) << std::endl; + std::cerr << "Download failed with error: " << curl_easy_strerror( res ) << std::endl; + curl_easy_cleanup( curlHandle ); + outfile.close(); return false; } // Optionally check the HTTP response code long http_code = 0; curl_easy_getinfo( curlHandle, CURLINFO_RESPONSE_CODE, &http_code ); + + curl_easy_cleanup( curlHandle ); + outfile.close(); + if( http_code != 200 ) { std::cerr << "Non-200 status code received: " << http_code << std::endl; diff --git a/Source/Window/PlatformWindow.cpp b/Source/Window/PlatformWindow.cpp index fbee4ef7..2144d2a0 100644 --- a/Source/Window/PlatformWindow.cpp +++ b/Source/Window/PlatformWindow.cpp @@ -2,7 +2,28 @@ #include "PlatformWindow.h" #include + +#if USING( ME_PLATFORM_LINUX ) +#define KeyCode X11KeyCode +#define Window X11Window + +#ifndef SDL_VIDEO_DRIVER_WAYLAND +#define SDL_VIDEO_DRIVER_WAYLAND 1 +#endif + +#ifndef SDL_VIDEO_DRIVER_X11 +#define SDL_VIDEO_DRIVER_X11 1 +#endif +#endif + #include + +#if USING( ME_PLATFORM_LINUX ) +#undef KeyCode +#undef Window +#undef None +#endif + #include #include @@ -28,6 +49,13 @@ void PlatformWindow::Create() void PlatformWindow::Destroy() { +#if USING( ME_PLATFORM_LINUX ) + if (GLContext) + { + SDL_GL_DeleteContext(GLContext); + GLContext = nullptr; + } +#endif if( bgfx::isValid( Buffer ) ) { bgfx::destroy( Buffer ); @@ -56,6 +84,26 @@ void PlatformWindow::SetWindow( SDL_Window* window ) #if USING( ME_PLATFORM_MACOS ) PlatformInfo.ndt = nullptr; PlatformInfo.nwh = wmi.info.cocoa.window; +#endif +#if USING( ME_PLATFORM_LINUX ) + switch (wmi.subsystem) + { + case SDL_SYSWM_WAYLAND: + // Wayland: ndt = wl_display*, nwh = wl_surface* + PlatformInfo.ndt = wmi.info.wl.display; + PlatformInfo.nwh = (void*)wmi.info.wl.egl_window; + break; + + case SDL_SYSWM_X11: + // X11: ndt = Display*, nwh = Window + PlatformInfo.ndt = wmi.info.x11.display; + PlatformInfo.nwh = (void*)(uintptr_t)wmi.info.x11.window; + break; + + default: + printf("Unhandled SDL WM subsystem: %d\n", (int)wmi.subsystem); + break; + } #endif PlatformInfo.context = nullptr; PlatformInfo.backBuffer = nullptr; diff --git a/Source/Window/PlatformWindow.h b/Source/Window/PlatformWindow.h index 3356a6f3..36051815 100644 --- a/Source/Window/PlatformWindow.h +++ b/Source/Window/PlatformWindow.h @@ -3,6 +3,7 @@ #include #include #include +#include struct SDL_Window; struct ImGuiViewport; @@ -69,6 +70,11 @@ struct PlatformWindow return ViewId; } +#if USING( ME_PLATFORM_LINUX ) + void* GetGLContext() const { return GLContext; } + SDL_GLContext GLContext = nullptr; +#endif + PlatformWindowParams Params; SDL_Window* WindowPtr = nullptr; ImGuiViewport* Viewport = nullptr; diff --git a/Source/Window/SDLWindow.cpp b/Source/Window/SDLWindow.cpp index 1784e5d4..b486d6ee 100644 --- a/Source/Window/SDLWindow.cpp +++ b/Source/Window/SDLWindow.cpp @@ -1,5 +1,36 @@ #include "PCH.h" #include + +// SDL headers +#include + +#if USING( ME_PLATFORM_LINUX ) +// Avoid conflicts with X11's KeyCode / Window typedefs. +#define KeyCode X11KeyCode +#define Window X11Window + +// Make sure wl/x11 fields in SDL_SysWMinfo are available on this build. +#ifndef SDL_VIDEO_DRIVER_WAYLAND +#define SDL_VIDEO_DRIVER_WAYLAND 1 +#endif + +#ifndef SDL_VIDEO_DRIVER_X11 +#define SDL_VIDEO_DRIVER_X11 1 +#endif + +#include +#include +// Clean up X11 name pollution so the rest of this TU is sane. +#undef KeyCode +#undef Window +#undef None // X.h defines `#define None 0L` which breaks enum values like eKeyState::None + +#else +#include +#endif + +#include + #include "bgfx/platform.h" #include "CLog.h" #include "Engine/Input.h" @@ -68,13 +99,22 @@ SDLWindow::SDLWindow( const std::string& title, std::function( windowSize.x ), static_cast( windowSize.y ), SDL_WINDOW_SHOWN | SDL_WINDOW_RESIZABLE ); - + Uint32 windowFlags = SDL_WINDOW_SHOWN | SDL_WINDOW_RESIZABLE; +#if USING( ME_PLATFORM_LINUX ) + windowFlags |= SDL_WINDOW_VULKAN; +#endif + WindowHandle = SDL_CreateWindow( title.c_str(), xPos, yPos, static_cast( windowSize.x ), static_cast( windowSize.y ), windowFlags ); if( WindowHandle == nullptr ) { printf( "Window could not be created. SDL_Error: %s\n", SDL_GetError() ); } SetWindow( WindowHandle ); + int numDrivers = SDL_GetNumVideoDrivers(); + printf("SDL video drivers: %d\n", numDrivers); + for (int i = 0; i < numDrivers; ++i) + printf(" %s\n", SDL_GetVideoDriver(i)); + printf("Current video driver: %s\n", SDL_GetCurrentVideoDriver()); + /*SharedPtr tex = ResourceCache::GetInstance().Get(Path("Assets/Havana/ME.png")); tex-> SDL_Surface* surface = SDL_CreateRGBSurfaceFrom()*/ @@ -715,6 +755,23 @@ SDLWindow::SDLWindow( const std::string& title, std::function -#include -#include "bgfx/bgfx.h" +#include #include #include -class SDLWindow - : public IWindow +class SDLWindow : public IWindow { public: - SDLWindow( const std::string& title, std::function resizeFunc, int X, int Y, Vector2 windowSize ); - bool ShouldClose() override; + SDLWindow(const std::string& title, + std::function resizeFunc, + int X, int Y, + Vector2 windowSize); + ~SDLWindow(); + bool ShouldClose() override; void ParseMessageQueue() override; Vector2 GetSize() const override; - Vector2 GetPosition() override; Vector2 GetClientPosition() override; bool IsFullscreen() override; - void Maximize() override; - void Minimize() override; - void ExitMaximize() override; - void SetTitle( const std::string& title ) override; - + void SetTitle(const std::string& title) override; void Exit() override; void* GetWindowPtr() override; - void CanMoveWindow( bool param1 ); - - void SetBorderless( bool isBorderless ) final; - + void CanMoveWindow(bool param1); + void SetBorderless(bool isBorderless) final; bool IsMaximized() final; - void SetCustomDragCallback( std::function( const Vector2& )> cb ); - std::function( const Vector2& )> CustomDragCB; + void SetCustomDragCallback(std::function(const Vector2&)> cb); + std::function(const Vector2&)> CustomDragCB; + SDL_Window* WindowHandle = nullptr; Vector2 GetClientSize() override; -private: +#if USING( ME_PLATFORM_LINUX ) + void* GetGLContext() const { return GLContext; } + void* GetDisplayPtr() const { return PlatformInfo.ndt; } + bgfx::NativeWindowHandleType::Enum GetWindowType() const { return PlatformInfo.type; } +#endif +private: bgfx::PlatformData PlatformInfo; - std::function ResizeCB; - void SetWindow( SDL_Window* window ); + std::function ResizeCB; - void HandleWindowEvent( const SDL_WindowEvent& event ); + void SetWindow(SDL_Window* window); + void HandleWindowEvent(const SDL_WindowEvent& event); bool CloseRequested = false; bool isMaximized = false; - //SDL_HitTestResult HitTestCallback(SDL_Window* window, const SDL_Point* area, void* data); -}; \ No newline at end of file +#if USING( ME_PLATFORM_LINUX ) + SDL_GLContext GLContext = nullptr; + struct wl_egl_window* m_waylandEglWindow = nullptr; +#endif +}; diff --git a/Source/World/Scene.cpp b/Source/World/Scene.cpp index de14810d..edf2e1a6 100644 --- a/Source/World/Scene.cpp +++ b/Source/World/Scene.cpp @@ -38,6 +38,11 @@ void Scene::LoadSceneObject( const json& obj, Transform* parent ) { continue; } + + const std::string compType = comp["Type"].get(); + const std::string evDeser = "Deserialize::" + compType; + const std::string evInit = "Init::" + compType; + BaseComponent* addedComp = ent->AddComponentByName( comp["Type"] ); if( comp["Type"] == "Transform" ) { @@ -50,8 +55,8 @@ void Scene::LoadSceneObject( const json& obj, Transform* parent ) } if( addedComp ) { - addedComp->Deserialize( comp ); - addedComp->Init(); + { OPTICK_EVENT( evDeser.c_str() ); addedComp->Deserialize( comp ); } + { OPTICK_EVENT( evInit.c_str() ); addedComp->Init(); } } } ent->SetActive( true ); @@ -74,11 +79,13 @@ void Scene::LoadSceneObject( const json& obj, Transform* parent ) bool Scene::Load( SharedPtr InWorld ) { + OPTICK_EVENT( "Scene::Load" ); GameWorld = InWorld; GameWorld->IsLoading = true; if( CurrentLevel.FilePath.GetLocalPath().size() > 0 ) { + OPTICK_EVENT( "Scene::Load::ReadFile" ); CurrentLevel.Read(); } @@ -86,18 +93,27 @@ bool Scene::Load( SharedPtr InWorld ) { json level; - level = json::parse( CurrentLevel.Data ); + { + OPTICK_EVENT( "Scene::Load::JSONParse" ); + level = json::parse( CurrentLevel.Data ); + } - json& cores = level["Cores"]; - for( json& core : cores ) { - LoadCore( core ); + OPTICK_EVENT( "Scene::Load::Cores" ); + json& cores = level["Cores"]; + for( json& core : cores ) + { + LoadCore( core ); + } } - json& scene = level["Scene"]; - for( json& ent : scene ) { - LoadSceneObject( ent, nullptr ); + OPTICK_EVENT( "Scene::Load::Entities" ); + json& scene = level["Scene"]; + for( json& ent : scene ) + { + LoadSceneObject( ent, nullptr ); + } } } else diff --git a/ThirdParty/ChromeTrace/optick.h b/ThirdParty/ChromeTrace/optick.h new file mode 100644 index 00000000..2d00a2c9 --- /dev/null +++ b/ThirdParty/ChromeTrace/optick.h @@ -0,0 +1,167 @@ +#pragma once + +// Drop-in Optick replacement that writes Chrome Trace JSON (chrome://tracing / Perfetto) +// Outputs .json instead of .opt + +#include +#include +#include +#include +#include +#include +#include + +// Stub Optick::Category so OPTICK_CATEGORY("name", Optick::Category::Foo) compiles unchanged +namespace Optick +{ + namespace Category + { + enum Type + { + None, GameLogic, Rendering, IO, Physics, Animation, Cloth, Debug, + Scene, Input, Camera, Visibility, Wait, WaitEmpty, Testing, + Audio, UI, GPU_Scene + }; + } +} + +namespace ChromeTrace +{ + +inline int64_t NowUs() +{ + return std::chrono::duration_cast( + std::chrono::steady_clock::now().time_since_epoch() ).count(); +} + +inline int ThreadIndex() +{ + static thread_local int s_id = -1; + if( s_id == -1 ) + { + static std::atomic s_next{ 0 }; + s_id = s_next.fetch_add( 1, std::memory_order_relaxed ); + } + return s_id; +} + +struct Event +{ + std::string name; // owned copy — safe against dangling const char* from temporaries + const char* cat; // always a string literal from the macro, safe as pointer + int64_t ts; + int64_t dur; + int tid; +}; + +class Tracer +{ +public: + static Tracer& Get() + { + static Tracer inst; + return inst; + } + + void Start() + { + std::lock_guard lock( m_mutex ); + m_events.clear(); + m_recording.store( true, std::memory_order_release ); + } + + void Stop() + { + m_recording.store( false, std::memory_order_release ); + } + + bool IsRecording() const + { + return m_recording.load( std::memory_order_acquire ); + } + + void Push( const char* name, const char* cat, int64_t ts, int64_t dur ) + { + if( !IsRecording() ) return; + std::lock_guard lock( m_mutex ); + m_events.push_back( { name, cat, ts, dur, ThreadIndex() } ); + } + + // JSON-escape a string (handles quotes, backslashes, and control chars) + static std::string JsonEscape( const std::string& s ) + { + std::string out; + out.reserve( s.size() ); + for( unsigned char c : s ) + { + if ( c == '"' ) out += "\\\""; + else if ( c == '\\' ) out += "\\\\"; + else if ( c == '\n' ) out += "\\n"; + else if ( c == '\r' ) out += "\\r"; + else if ( c == '\t' ) out += "\\t"; + else if ( c < 0x20 ) { char buf[8]; snprintf(buf,sizeof(buf),"\\u%04x",c); out+=buf; } + else out += c; + } + return out; + } + + void Save( const char* path ) + { + std::string out( path ? path : "trace" ); + auto dot = out.rfind( '.' ); + if( dot != std::string::npos ) out = out.substr( 0, dot ); + out += ".json"; + + std::lock_guard lock( m_mutex ); + FILE* f = fopen( out.c_str(), "w" ); + if( !f ) + { + fprintf( stderr, "[ChromeTrace] Failed to open %s\n", out.c_str() ); + return; + } + + fprintf( f, "{\"traceEvents\":[\n" ); + bool first = true; + for( const auto& e : m_events ) + { + if( !first ) fputc( ',', f ); + fprintf( f, + "{\"name\":\"%s\",\"cat\":\"%s\",\"ph\":\"X\",\"ts\":%.3f,\"dur\":%.3f,\"pid\":1,\"tid\":%d}\n", + JsonEscape( e.name ).c_str(), e.cat, (double)e.ts, (double)e.dur, e.tid ); + first = false; + } + fprintf( f, "]}\n" ); + fclose( f ); + fprintf( stdout, "[ChromeTrace] Saved %zu events -> %s\n", m_events.size(), out.c_str() ); + } + +private: + std::atomic m_recording{ false }; + std::mutex m_mutex; + std::vector m_events; +}; + +struct Scope +{ + std::string name; // copied at construction so temporaries are safe + const char* cat; + int64_t start; + + Scope( const char* n, const char* c ) : name( n ? n : "" ), cat( c ), start( NowUs() ) {} + ~Scope() { Tracer::Get().Push( name.c_str(), cat, start, NowUs() - start ); } +}; + +} // namespace ChromeTrace + +// OPTICK_EVENT accepts 1 or 2 args: (name) or (name, category) +#define _CT_EVENT_1( name ) ChromeTrace::Scope _ct_##__LINE__( name, "event" ) +#define _CT_EVENT_2( name, cat ) ChromeTrace::Scope _ct_##__LINE__( name, #cat ) +#define _CT_EVENT_SEL( _1, _2, X, ... ) X +#define OPTICK_EVENT( ... ) _CT_EVENT_SEL( __VA_ARGS__, _CT_EVENT_2, _CT_EVENT_1 )( __VA_ARGS__ ); + +#define OPTICK_CATEGORY( name, cat ) ChromeTrace::Scope _ct_##__LINE__( name, #cat ); +#define OPTICK_FRAME( name ) ChromeTrace::Scope _ct_##__LINE__( name, "frame" ); +#define OPTICK_THREAD( name ) ( (void)0 ) +#define OPTICK_START_CAPTURE() ChromeTrace::Tracer::Get().Start() +#define OPTICK_STOP_CAPTURE() ChromeTrace::Tracer::Get().Stop() +#define OPTICK_SAVE_CAPTURE( path ) ChromeTrace::Tracer::Get().Save( path ) diff --git a/ThirdParty/GenerateSolutions.command b/ThirdParty/GenerateSolutions.command index c1a36c75..d8b32110 100644 --- a/ThirdParty/GenerateSolutions.command +++ b/ThirdParty/GenerateSolutions.command @@ -1,8 +1,22 @@ -#!/bin/bash -# Some headers need to be generated through cmake +#!/usr/bin/env bash +set -euo pipefail -cd Assimp; -cmake . -G "Xcode" -DBUILD_SHARED_LIBS=false -DASSIMP_BUILD_ZLIB=true -DASSIMP_BUILD_ALL_IMPORTERS_BY_DEFAULT=false -DASSIMP_BUILD_ALL_EXPORTERS_BY_DEFAULT=false -DASSIMP_BUILD_FBX_IMPORTER=true -DASSIMP_BUILD_OBJ_IMPORTER=true -DASSIMP_BUILD_ASSBIN_IMPORTER=true -DASSIMP_BUILD_ASSBIN_EXPORTER=true -cd ../Bullet; -cmake . -G "Xcode" -DUSE_MSVC_RUNTIME_LIBRARY_DLL=true -cd ../ \ No newline at end of file +cd Assimp +cmake . \ + -G "Xcode" \ + -DBUILD_SHARED_LIBS=false \ + -DASSIMP_BUILD_ZLIB=true \ + -DASSIMP_BUILD_ALL_IMPORTERS_BY_DEFAULT=false \ + -DASSIMP_BUILD_ALL_EXPORTERS_BY_DEFAULT=false \ + -DASSIMP_BUILD_FBX_IMPORTER=true \ + -DASSIMP_BUILD_OBJ_IMPORTER=true \ + -DASSIMP_BUILD_ASSBIN_IMPORTER=true \ + -DASSIMP_BUILD_ASSBIN_EXPORTER=true + +cd ../Bullet +cmake . \ + -G "Xcode" \ + -DUSE_MSVC_RUNTIME_LIBRARY_DLL=true \ + -DCMAKE_POLICY_VERSION_MINIMUM=3.5 + +cd .. \ No newline at end of file diff --git a/ThirdParty/GenerateSolutions.sh b/ThirdParty/GenerateSolutions.sh new file mode 100755 index 00000000..645d92bf --- /dev/null +++ b/ThirdParty/GenerateSolutions.sh @@ -0,0 +1,55 @@ +#!/usr/bin/env bash +# Generates the third-party build files needed to compile the engine on Linux. +# +# The engine links the prebuilt static libraries committed under ThirdParty/Lib +# (BGFX, Bullet, Assimp — see Tools/BaseProject.sharpmake.cs ConfigureLinux), so +# a normal project setup only needs the cmake configure step below to produce +# the generated headers (assimp/config.h and friends) in the submodule trees. +# +# Pass --build-bgfx to also rebuild the bgfx toolchain and libraries from +# source; use that when refreshing the archives in ThirdParty/Lib/BGFX/linux +# after a bgfx submodule bump (copy the .a files out of bgfx/.build/linux64_gcc/bin). +set -e +cd "$(dirname "$0")" + +# CMAKE_POLICY_VERSION_MINIMUM: Bullet's cmake_minimum_required(2.4.3) predates +# what cmake 4.x accepts; the flag is ignored (with a warning) on older cmake. +( + cd Assimp + cmake . -G "Unix Makefiles" \ + -DCMAKE_POLICY_VERSION_MINIMUM=3.5 \ + -DBUILD_SHARED_LIBS=false \ + -DASSIMP_BUILD_ZLIB=true \ + -DASSIMP_BUILD_TESTS=false \ + -DASSIMP_BUILD_ALL_IMPORTERS_BY_DEFAULT=false \ + -DASSIMP_BUILD_ALL_EXPORTERS_BY_DEFAULT=false \ + -DASSIMP_BUILD_FBX_IMPORTER=true \ + -DASSIMP_BUILD_OBJ_IMPORTER=true \ + -DASSIMP_BUILD_ASSBIN_IMPORTER=true \ + -DASSIMP_BUILD_ASSBIN_EXPORTER=true +) + +( + cd Bullet + cmake . -G "Unix Makefiles" \ + -DCMAKE_POLICY_VERSION_MINIMUM=3.5 \ + -DUSE_MSVC_RUNTIME_LIBRARY_DLL=true +) + +if [ "$1" = "--build-bgfx" ]; then + if [ ! -d genie ]; then + git clone https://github.com/bkaradzic/genie + fi + make -C genie + + cd bgfx + ../genie/bin/linux/genie \ + --with-tools \ + --gcc=linux-gcc \ + gmake + + CFLAGS="-march=x86-64-v2" CXXFLAGS="-march=x86-64-v2" \ + make linux-gcc-debug64 -j"$(nproc)" + CFLAGS="-march=x86-64-v2" CXXFLAGS="-march=x86-64-v2" \ + make linux-gcc-release64 -j"$(nproc)" +fi diff --git a/ThirdParty/Lib/Assimp/linux/Release/libassimp.a b/ThirdParty/Lib/Assimp/linux/Release/libassimp.a new file mode 100644 index 00000000..71e12de2 Binary files /dev/null and b/ThirdParty/Lib/Assimp/linux/Release/libassimp.a differ diff --git a/ThirdParty/Lib/Assimp/linux/Release/libzlibstatic.a b/ThirdParty/Lib/Assimp/linux/Release/libzlibstatic.a new file mode 100644 index 00000000..2a7b255c Binary files /dev/null and b/ThirdParty/Lib/Assimp/linux/Release/libzlibstatic.a differ diff --git a/ThirdParty/Lib/BGFX/Win64/Debug/bgfxDebug.lib b/ThirdParty/Lib/BGFX/Win64/Debug/bgfxDebug.lib index 06bd7188..e7d92c12 100644 Binary files a/ThirdParty/Lib/BGFX/Win64/Debug/bgfxDebug.lib and b/ThirdParty/Lib/BGFX/Win64/Debug/bgfxDebug.lib differ diff --git a/ThirdParty/Lib/BGFX/Win64/Debug/bgfxDebug.pdb b/ThirdParty/Lib/BGFX/Win64/Debug/bgfxDebug.pdb index 67c17d7a..a14428ff 100644 Binary files a/ThirdParty/Lib/BGFX/Win64/Debug/bgfxDebug.pdb and b/ThirdParty/Lib/BGFX/Win64/Debug/bgfxDebug.pdb differ diff --git a/ThirdParty/Lib/BGFX/Win64/Debug/bimgDebug.lib b/ThirdParty/Lib/BGFX/Win64/Debug/bimgDebug.lib index a756c865..0d73ed6a 100644 Binary files a/ThirdParty/Lib/BGFX/Win64/Debug/bimgDebug.lib and b/ThirdParty/Lib/BGFX/Win64/Debug/bimgDebug.lib differ diff --git a/ThirdParty/Lib/BGFX/Win64/Debug/bimgDebug.pdb b/ThirdParty/Lib/BGFX/Win64/Debug/bimgDebug.pdb index 547f8c55..c4703ba6 100644 Binary files a/ThirdParty/Lib/BGFX/Win64/Debug/bimgDebug.pdb and b/ThirdParty/Lib/BGFX/Win64/Debug/bimgDebug.pdb differ diff --git a/ThirdParty/Lib/BGFX/Win64/Debug/bimg_decodeDebug.lib b/ThirdParty/Lib/BGFX/Win64/Debug/bimg_decodeDebug.lib index fc071f45..96978df3 100644 Binary files a/ThirdParty/Lib/BGFX/Win64/Debug/bimg_decodeDebug.lib and b/ThirdParty/Lib/BGFX/Win64/Debug/bimg_decodeDebug.lib differ diff --git a/ThirdParty/Lib/BGFX/Win64/Debug/bimg_decodeDebug.pdb b/ThirdParty/Lib/BGFX/Win64/Debug/bimg_decodeDebug.pdb index 9908b60b..31b096ea 100644 Binary files a/ThirdParty/Lib/BGFX/Win64/Debug/bimg_decodeDebug.pdb and b/ThirdParty/Lib/BGFX/Win64/Debug/bimg_decodeDebug.pdb differ diff --git a/ThirdParty/Lib/BGFX/Win64/Debug/bimg_encodeDebug.lib b/ThirdParty/Lib/BGFX/Win64/Debug/bimg_encodeDebug.lib index 4c0ac21c..6436e90e 100644 Binary files a/ThirdParty/Lib/BGFX/Win64/Debug/bimg_encodeDebug.lib and b/ThirdParty/Lib/BGFX/Win64/Debug/bimg_encodeDebug.lib differ diff --git a/ThirdParty/Lib/BGFX/Win64/Debug/bimg_encodeDebug.pdb b/ThirdParty/Lib/BGFX/Win64/Debug/bimg_encodeDebug.pdb index 4242d720..1cde5558 100644 Binary files a/ThirdParty/Lib/BGFX/Win64/Debug/bimg_encodeDebug.pdb and b/ThirdParty/Lib/BGFX/Win64/Debug/bimg_encodeDebug.pdb differ diff --git a/ThirdParty/Lib/BGFX/Win64/Debug/bxDebug.lib b/ThirdParty/Lib/BGFX/Win64/Debug/bxDebug.lib index 3f6861ca..55fa21ef 100644 Binary files a/ThirdParty/Lib/BGFX/Win64/Debug/bxDebug.lib and b/ThirdParty/Lib/BGFX/Win64/Debug/bxDebug.lib differ diff --git a/ThirdParty/Lib/BGFX/Win64/Debug/bxDebug.pdb b/ThirdParty/Lib/BGFX/Win64/Debug/bxDebug.pdb index e8eadfbb..a7cd1ce0 100644 Binary files a/ThirdParty/Lib/BGFX/Win64/Debug/bxDebug.pdb and b/ThirdParty/Lib/BGFX/Win64/Debug/bxDebug.pdb differ diff --git a/ThirdParty/Lib/BGFX/Win64/Release/bgfxRelease.lib b/ThirdParty/Lib/BGFX/Win64/Release/bgfxRelease.lib index a2db826c..def18935 100644 Binary files a/ThirdParty/Lib/BGFX/Win64/Release/bgfxRelease.lib and b/ThirdParty/Lib/BGFX/Win64/Release/bgfxRelease.lib differ diff --git a/ThirdParty/Lib/BGFX/Win64/Release/bgfxRelease.pdb b/ThirdParty/Lib/BGFX/Win64/Release/bgfxRelease.pdb index d7cc64d7..2c6716e2 100644 Binary files a/ThirdParty/Lib/BGFX/Win64/Release/bgfxRelease.pdb and b/ThirdParty/Lib/BGFX/Win64/Release/bgfxRelease.pdb differ diff --git a/ThirdParty/Lib/BGFX/Win64/Release/bimgRelease.lib b/ThirdParty/Lib/BGFX/Win64/Release/bimgRelease.lib index 2fd31b13..a6dbffa9 100644 Binary files a/ThirdParty/Lib/BGFX/Win64/Release/bimgRelease.lib and b/ThirdParty/Lib/BGFX/Win64/Release/bimgRelease.lib differ diff --git a/ThirdParty/Lib/BGFX/Win64/Release/bimgRelease.pdb b/ThirdParty/Lib/BGFX/Win64/Release/bimgRelease.pdb index 7577d54f..b98e1760 100644 Binary files a/ThirdParty/Lib/BGFX/Win64/Release/bimgRelease.pdb and b/ThirdParty/Lib/BGFX/Win64/Release/bimgRelease.pdb differ diff --git a/ThirdParty/Lib/BGFX/Win64/Release/bimg_decodeRelease.lib b/ThirdParty/Lib/BGFX/Win64/Release/bimg_decodeRelease.lib index 7333885b..f2afd826 100644 Binary files a/ThirdParty/Lib/BGFX/Win64/Release/bimg_decodeRelease.lib and b/ThirdParty/Lib/BGFX/Win64/Release/bimg_decodeRelease.lib differ diff --git a/ThirdParty/Lib/BGFX/Win64/Release/bimg_decodeRelease.pdb b/ThirdParty/Lib/BGFX/Win64/Release/bimg_decodeRelease.pdb index a7997cf2..70375440 100644 Binary files a/ThirdParty/Lib/BGFX/Win64/Release/bimg_decodeRelease.pdb and b/ThirdParty/Lib/BGFX/Win64/Release/bimg_decodeRelease.pdb differ diff --git a/ThirdParty/Lib/BGFX/Win64/Release/bimg_encodeRelease.lib b/ThirdParty/Lib/BGFX/Win64/Release/bimg_encodeRelease.lib index 78599d20..4495a011 100644 Binary files a/ThirdParty/Lib/BGFX/Win64/Release/bimg_encodeRelease.lib and b/ThirdParty/Lib/BGFX/Win64/Release/bimg_encodeRelease.lib differ diff --git a/ThirdParty/Lib/BGFX/Win64/Release/bimg_encodeRelease.pdb b/ThirdParty/Lib/BGFX/Win64/Release/bimg_encodeRelease.pdb index 0e8f0ca9..f98d6860 100644 Binary files a/ThirdParty/Lib/BGFX/Win64/Release/bimg_encodeRelease.pdb and b/ThirdParty/Lib/BGFX/Win64/Release/bimg_encodeRelease.pdb differ diff --git a/ThirdParty/Lib/BGFX/Win64/Release/bxRelease.lib b/ThirdParty/Lib/BGFX/Win64/Release/bxRelease.lib index b97537b3..8505c20b 100644 Binary files a/ThirdParty/Lib/BGFX/Win64/Release/bxRelease.lib and b/ThirdParty/Lib/BGFX/Win64/Release/bxRelease.lib differ diff --git a/ThirdParty/Lib/BGFX/Win64/Release/bxRelease.pdb b/ThirdParty/Lib/BGFX/Win64/Release/bxRelease.pdb index 7c037e9e..aa65da2e 100644 Binary files a/ThirdParty/Lib/BGFX/Win64/Release/bxRelease.pdb and b/ThirdParty/Lib/BGFX/Win64/Release/bxRelease.pdb differ diff --git a/ThirdParty/Lib/BGFX/linux/Debug/libbgfxDebug.a b/ThirdParty/Lib/BGFX/linux/Debug/libbgfxDebug.a new file mode 100644 index 00000000..ead8b978 Binary files /dev/null and b/ThirdParty/Lib/BGFX/linux/Debug/libbgfxDebug.a differ diff --git a/ThirdParty/Lib/BGFX/linux/Debug/libbimgDebug.a b/ThirdParty/Lib/BGFX/linux/Debug/libbimgDebug.a new file mode 100644 index 00000000..331c6366 Binary files /dev/null and b/ThirdParty/Lib/BGFX/linux/Debug/libbimgDebug.a differ diff --git a/ThirdParty/Lib/BGFX/linux/Debug/libbimg_decodeDebug.a b/ThirdParty/Lib/BGFX/linux/Debug/libbimg_decodeDebug.a new file mode 100644 index 00000000..3fd5164e Binary files /dev/null and b/ThirdParty/Lib/BGFX/linux/Debug/libbimg_decodeDebug.a differ diff --git a/ThirdParty/Lib/BGFX/linux/Debug/libbimg_encodeDebug.a b/ThirdParty/Lib/BGFX/linux/Debug/libbimg_encodeDebug.a new file mode 100644 index 00000000..8ded9acb Binary files /dev/null and b/ThirdParty/Lib/BGFX/linux/Debug/libbimg_encodeDebug.a differ diff --git a/ThirdParty/Lib/BGFX/linux/Debug/libbxDebug.a b/ThirdParty/Lib/BGFX/linux/Debug/libbxDebug.a new file mode 100644 index 00000000..ddaf14cd Binary files /dev/null and b/ThirdParty/Lib/BGFX/linux/Debug/libbxDebug.a differ diff --git a/ThirdParty/Lib/BGFX/linux/Debug/libexample-commonDebug.a b/ThirdParty/Lib/BGFX/linux/Debug/libexample-commonDebug.a new file mode 100644 index 00000000..92510cad Binary files /dev/null and b/ThirdParty/Lib/BGFX/linux/Debug/libexample-commonDebug.a differ diff --git a/ThirdParty/Lib/BGFX/linux/Debug/libexample-glueDebug.a b/ThirdParty/Lib/BGFX/linux/Debug/libexample-glueDebug.a new file mode 100644 index 00000000..e392f514 Binary files /dev/null and b/ThirdParty/Lib/BGFX/linux/Debug/libexample-glueDebug.a differ diff --git a/ThirdParty/Lib/BGFX/linux/Debug/libfcppDebug.a b/ThirdParty/Lib/BGFX/linux/Debug/libfcppDebug.a new file mode 100644 index 00000000..dfc2dd34 Binary files /dev/null and b/ThirdParty/Lib/BGFX/linux/Debug/libfcppDebug.a differ diff --git a/ThirdParty/Lib/BGFX/linux/Debug/libglsl-optimizerDebug.a b/ThirdParty/Lib/BGFX/linux/Debug/libglsl-optimizerDebug.a new file mode 100644 index 00000000..7c61e79f Binary files /dev/null and b/ThirdParty/Lib/BGFX/linux/Debug/libglsl-optimizerDebug.a differ diff --git a/ThirdParty/Lib/BGFX/linux/Debug/libtint-apiDebug.a b/ThirdParty/Lib/BGFX/linux/Debug/libtint-apiDebug.a new file mode 100644 index 00000000..5dfc7032 Binary files /dev/null and b/ThirdParty/Lib/BGFX/linux/Debug/libtint-apiDebug.a differ diff --git a/ThirdParty/Lib/BGFX/linux/Debug/texturecDebug b/ThirdParty/Lib/BGFX/linux/Debug/texturecDebug new file mode 100755 index 00000000..d744c902 Binary files /dev/null and b/ThirdParty/Lib/BGFX/linux/Debug/texturecDebug differ diff --git a/ThirdParty/Lib/BGFX/linux/Debug/texturevDebug b/ThirdParty/Lib/BGFX/linux/Debug/texturevDebug new file mode 100755 index 00000000..ad1652dd Binary files /dev/null and b/ThirdParty/Lib/BGFX/linux/Debug/texturevDebug differ diff --git a/ThirdParty/Lib/BGFX/linux/Release/geometrycRelease b/ThirdParty/Lib/BGFX/linux/Release/geometrycRelease new file mode 100755 index 00000000..9a641716 Binary files /dev/null and b/ThirdParty/Lib/BGFX/linux/Release/geometrycRelease differ diff --git a/ThirdParty/Lib/BGFX/linux/Release/geometryvRelease b/ThirdParty/Lib/BGFX/linux/Release/geometryvRelease new file mode 100755 index 00000000..af5784ea Binary files /dev/null and b/ThirdParty/Lib/BGFX/linux/Release/geometryvRelease differ diff --git a/ThirdParty/Lib/BGFX/linux/Release/libbgfxRelease.a b/ThirdParty/Lib/BGFX/linux/Release/libbgfxRelease.a new file mode 100644 index 00000000..93b13fac Binary files /dev/null and b/ThirdParty/Lib/BGFX/linux/Release/libbgfxRelease.a differ diff --git a/ThirdParty/Lib/BGFX/linux/Release/libbimgRelease.a b/ThirdParty/Lib/BGFX/linux/Release/libbimgRelease.a new file mode 100644 index 00000000..3befd890 Binary files /dev/null and b/ThirdParty/Lib/BGFX/linux/Release/libbimgRelease.a differ diff --git a/ThirdParty/Lib/BGFX/linux/Release/libbimg_decodeRelease.a b/ThirdParty/Lib/BGFX/linux/Release/libbimg_decodeRelease.a new file mode 100644 index 00000000..9ee2a656 Binary files /dev/null and b/ThirdParty/Lib/BGFX/linux/Release/libbimg_decodeRelease.a differ diff --git a/ThirdParty/Lib/BGFX/linux/Release/libbimg_encodeRelease.a b/ThirdParty/Lib/BGFX/linux/Release/libbimg_encodeRelease.a new file mode 100644 index 00000000..a07efb0b Binary files /dev/null and b/ThirdParty/Lib/BGFX/linux/Release/libbimg_encodeRelease.a differ diff --git a/ThirdParty/Lib/BGFX/linux/Release/libbxRelease.a b/ThirdParty/Lib/BGFX/linux/Release/libbxRelease.a new file mode 100644 index 00000000..52a77564 Binary files /dev/null and b/ThirdParty/Lib/BGFX/linux/Release/libbxRelease.a differ diff --git a/ThirdParty/Lib/BGFX/linux/Release/libexample-commonRelease.a b/ThirdParty/Lib/BGFX/linux/Release/libexample-commonRelease.a new file mode 100644 index 00000000..8127bb89 Binary files /dev/null and b/ThirdParty/Lib/BGFX/linux/Release/libexample-commonRelease.a differ diff --git a/ThirdParty/Lib/BGFX/linux/Release/libexample-glueRelease.a b/ThirdParty/Lib/BGFX/linux/Release/libexample-glueRelease.a new file mode 100644 index 00000000..c19985ae Binary files /dev/null and b/ThirdParty/Lib/BGFX/linux/Release/libexample-glueRelease.a differ diff --git a/ThirdParty/Lib/BGFX/linux/Release/libfcppRelease.a b/ThirdParty/Lib/BGFX/linux/Release/libfcppRelease.a new file mode 100644 index 00000000..f754eff0 Binary files /dev/null and b/ThirdParty/Lib/BGFX/linux/Release/libfcppRelease.a differ diff --git a/ThirdParty/Lib/BGFX/linux/Release/libglsl-optimizerRelease.a b/ThirdParty/Lib/BGFX/linux/Release/libglsl-optimizerRelease.a new file mode 100644 index 00000000..7ca1be68 Binary files /dev/null and b/ThirdParty/Lib/BGFX/linux/Release/libglsl-optimizerRelease.a differ diff --git a/ThirdParty/Lib/BGFX/linux/Release/libglslangRelease.a b/ThirdParty/Lib/BGFX/linux/Release/libglslangRelease.a new file mode 100644 index 00000000..5c968cd7 Binary files /dev/null and b/ThirdParty/Lib/BGFX/linux/Release/libglslangRelease.a differ diff --git a/ThirdParty/Lib/BGFX/linux/Release/libspirv-crossRelease.a b/ThirdParty/Lib/BGFX/linux/Release/libspirv-crossRelease.a new file mode 100644 index 00000000..b7085113 Binary files /dev/null and b/ThirdParty/Lib/BGFX/linux/Release/libspirv-crossRelease.a differ diff --git a/ThirdParty/Lib/BGFX/linux/Release/shadercRelease b/ThirdParty/Lib/BGFX/linux/Release/shadercRelease new file mode 100755 index 00000000..c3ca9634 Binary files /dev/null and b/ThirdParty/Lib/BGFX/linux/Release/shadercRelease differ diff --git a/ThirdParty/Lib/BGFX/linux/Release/texturecRelease b/ThirdParty/Lib/BGFX/linux/Release/texturecRelease new file mode 100755 index 00000000..f885d081 Binary files /dev/null and b/ThirdParty/Lib/BGFX/linux/Release/texturecRelease differ diff --git a/ThirdParty/Lib/BGFX/linux/Release/texturevRelease b/ThirdParty/Lib/BGFX/linux/Release/texturevRelease new file mode 100755 index 00000000..9fe8c119 Binary files /dev/null and b/ThirdParty/Lib/BGFX/linux/Release/texturevRelease differ diff --git a/ThirdParty/Lib/Bullet/linux/Debug/libBulletCollision.a b/ThirdParty/Lib/Bullet/linux/Debug/libBulletCollision.a new file mode 100644 index 00000000..eef0b58f Binary files /dev/null and b/ThirdParty/Lib/Bullet/linux/Debug/libBulletCollision.a differ diff --git a/ThirdParty/Lib/Bullet/linux/Debug/libBulletDynamics.a b/ThirdParty/Lib/Bullet/linux/Debug/libBulletDynamics.a new file mode 100644 index 00000000..bdab4222 Binary files /dev/null and b/ThirdParty/Lib/Bullet/linux/Debug/libBulletDynamics.a differ diff --git a/ThirdParty/Lib/Bullet/linux/Debug/libLinearMath.a b/ThirdParty/Lib/Bullet/linux/Debug/libLinearMath.a new file mode 100644 index 00000000..6eab5a23 Binary files /dev/null and b/ThirdParty/Lib/Bullet/linux/Debug/libLinearMath.a differ diff --git a/ThirdParty/Lib/Bullet/linux/Release/libBulletCollision.a b/ThirdParty/Lib/Bullet/linux/Release/libBulletCollision.a new file mode 100644 index 00000000..582dfd09 Binary files /dev/null and b/ThirdParty/Lib/Bullet/linux/Release/libBulletCollision.a differ diff --git a/ThirdParty/Lib/Bullet/linux/Release/libBulletDynamics.a b/ThirdParty/Lib/Bullet/linux/Release/libBulletDynamics.a new file mode 100644 index 00000000..1c0f03ed Binary files /dev/null and b/ThirdParty/Lib/Bullet/linux/Release/libBulletDynamics.a differ diff --git a/ThirdParty/Lib/Bullet/linux/Release/libLinearMath.a b/ThirdParty/Lib/Bullet/linux/Release/libLinearMath.a new file mode 100644 index 00000000..2b8c4c06 Binary files /dev/null and b/ThirdParty/Lib/Bullet/linux/Release/libLinearMath.a differ diff --git a/ThirdParty/Lib/SDL/linux/Debug/libSDL2d.a b/ThirdParty/Lib/SDL/linux/Debug/libSDL2d.a new file mode 100644 index 00000000..1b384de5 Binary files /dev/null and b/ThirdParty/Lib/SDL/linux/Debug/libSDL2d.a differ diff --git a/ThirdParty/Lib/SDL/linux/Debug/libSDL2maind.a b/ThirdParty/Lib/SDL/linux/Debug/libSDL2maind.a new file mode 100644 index 00000000..a9c7042d Binary files /dev/null and b/ThirdParty/Lib/SDL/linux/Debug/libSDL2maind.a differ diff --git a/ThirdParty/Lib/SDL/linux/Release/libSDL2.a b/ThirdParty/Lib/SDL/linux/Release/libSDL2.a new file mode 100644 index 00000000..d1ffb034 Binary files /dev/null and b/ThirdParty/Lib/SDL/linux/Release/libSDL2.a differ diff --git a/ThirdParty/Lib/SDL/linux/Release/libSDL2main.a b/ThirdParty/Lib/SDL/linux/Release/libSDL2main.a new file mode 100644 index 00000000..06abfc63 Binary files /dev/null and b/ThirdParty/Lib/SDL/linux/Release/libSDL2main.a differ diff --git a/ThirdParty/SDL b/ThirdParty/SDL index 11cb53d2..5d249570 160000 --- a/ThirdParty/SDL +++ b/ThirdParty/SDL @@ -1 +1 @@ -Subproject commit 11cb53d2a54cfd105e30242aa364b23c77998984 +Subproject commit 5d249570393f7a37e037abf22cd6012a4cc56a71 diff --git a/ThirdParty/UltralightSDK b/ThirdParty/UltralightSDK index 3185d02b..037d1d87 160000 --- a/ThirdParty/UltralightSDK +++ b/ThirdParty/UltralightSDK @@ -1 +1 @@ -Subproject commit 3185d02b03919f55aeb71f7b6bf5a329f34e0f38 +Subproject commit 037d1d87c40358f2042ad813d2bb19fc60dc79b8 diff --git a/ThirdParty/bgfx b/ThirdParty/bgfx index b927f9e1..9849fe96 160000 --- a/ThirdParty/bgfx +++ b/ThirdParty/bgfx @@ -1 +1 @@ -Subproject commit b927f9e187a145c242f40d171d35b6822bfc2e18 +Subproject commit 9849fe96cba81355352e5355ee2d333ea70857ac diff --git a/ThirdParty/bimg b/ThirdParty/bimg index 964a5b85..5c7eabb1 160000 --- a/ThirdParty/bimg +++ b/ThirdParty/bimg @@ -1 +1 @@ -Subproject commit 964a5b85483cdf59a30dc006e9bd8bbdde6cb2be +Subproject commit 5c7eabb1d73cb0c1a3c23c0268dd70e8dca972f7 diff --git a/ThirdParty/bx b/ThirdParty/bx index 67dfdf34..217823bc 160000 --- a/ThirdParty/bx +++ b/ThirdParty/bx @@ -1 +1 @@ -Subproject commit 67dfdf34f642a4a807b75eb600f82f4f04027963 +Subproject commit 217823bc0a05a7dcf29e5166708b82910cda0623 diff --git a/Tools/BaseProject.sharpmake.cs b/Tools/BaseProject.sharpmake.cs index aa4ab1cd..29206f48 100644 --- a/Tools/BaseProject.sharpmake.cs +++ b/Tools/BaseProject.sharpmake.cs @@ -123,6 +123,14 @@ public virtual void ConfigureAll(Project.Configuration conf, CommonTarget target conf.EventPostBuildExe.Add(copyDirBuildStep); } } + else if (target.SubPlatform == SubPlatformType.linux) + { + conf.Defines.Add("USE_OPTICK=0"); + } + else + { + conf.Defines.Add("USE_OPTICK=0"); + } } conf.Options.Add(Options.Vc.General.WarningLevel.Level3); @@ -136,10 +144,11 @@ public virtual void ConfigureAll(Project.Configuration conf, CommonTarget target [Configure(SubPlatformType.Win64)] public virtual void ConfigureWin64(Configuration conf, CommonTarget target) { - conf.Options.Add(Options.Vc.Compiler.CppLanguageStandard.CPP17); + conf.Options.Add(Options.Vc.Compiler.CppLanguageStandard.CPP20); conf.Options.Add(Options.Vc.Compiler.RTTI.Enable); conf.Options.Add(Options.Vc.General.CharacterSet.Unicode); conf.Options.Add(Options.Vc.Compiler.Exceptions.Enable); + conf.AdditionalCompilerOptions.Add("/Zc:preprocessor"); // Hot-Reloading { @@ -153,7 +162,9 @@ public virtual void ConfigureWin64(Configuration conf, CommonTarget target) conf.Options.Add( new Options.Vc.Compiler.DisableSpecificWarnings( "4201", - "4100" + "4100", + "5104", + "5105" ) ); @@ -161,9 +172,9 @@ public virtual void ConfigureWin64(Configuration conf, CommonTarget target) { conf.Defines.Add("DEFINE_ME_FMOD"); } - if (Directory.Exists(Globals.MONO_Win64_Dir)) + if (Directory.Exists(Globals.DOTNET_Win64_Dir)) { - conf.Defines.Add("DEFINE_ME_MONO"); + conf.Defines.Add("DEFINE_ME_DOTNET"); } } @@ -171,7 +182,7 @@ public virtual void ConfigureWin64(Configuration conf, CommonTarget target) [Configure(SubPlatformType.UWP)] public virtual void ConfigureUWP(Configuration conf, CommonTarget target) { - conf.Options.Add(Options.Vc.Compiler.CppLanguageStandard.CPP17); + conf.Options.Add(Options.Vc.Compiler.CppLanguageStandard.CPP20); conf.Options.Add(Options.Vc.Compiler.RTTI.Enable); conf.Options.Add(Options.Vc.General.CharacterSet.Unicode); conf.Options.Add(Options.Vc.Compiler.Exceptions.Enable); @@ -191,9 +202,9 @@ public virtual void ConfigureUWP(Configuration conf, CommonTarget target) { conf.Defines.Add("DEFINE_ME_FMOD"); } - if (Directory.Exists(Globals.MONO_Win64_Dir)) + if (Directory.Exists(Globals.DOTNET_Win64_Dir)) { - conf.Defines.Add("DEFINE_ME_MONO"); + conf.Defines.Add("DEFINE_ME_DOTNET"); } } @@ -212,10 +223,126 @@ public virtual void ConfigureMac(Configuration conf, CommonTarget target) conf.Options.Add(new Options.XCode.Compiler.OnlyActiveArch()); conf.Defines.Add("DEFINE_ME_PLATFORM_MACOS"); + } + + [ConfigurePriority(ConfigurePriorities.Platform)] + [Configure(SubPlatformType.linux)] + public virtual void ConfigureLinux(Configuration conf, CommonTarget target) + { + conf.Options.Add(Options.Makefile.Compiler.CppLanguageStandard.GnuCpp2a); + conf.Options.Add(Options.Makefile.Compiler.TreatWarningsAsErrors.Disable); + conf.Options.Add(Options.Makefile.Compiler.Rtti.Enable); + conf.Options.Add(Options.Makefile.Compiler.Exceptions.Enable); + //conf.AdditionalCompilerOptions.Add("-Wall"); + // Wrap all of LDLIBS in -Wl,--start-group/--end-group so ld re-scans the archives + // until every cross-reference resolves — this removes ld.bfd's left-to-right + // ordering fragility, letting the modules/libs come in via the dependency graph and + // LibraryFiles in any order. Requires IsLinkerInvokedViaCompiler=true (set in + // SharpmakeMain) so the group flags are emitted as -Wl,-- and not bare (see the + // Sharpmake 0.20.0 regression noted there). + conf.Options.Add(Options.Makefile.Linker.LibGroup.Enable); + conf.AdditionalCompilerOptions.Add("`pkg-config --cflags sdl2`"); + conf.AdditionalLinkerOptions.Add("`pkg-config --libs sdl2`"); + conf.AdditionalCompilerOptions.Add("`pkg-config --cflags libcurl`"); + conf.AdditionalLinkerOptions.Add("`pkg-config --libs libcurl`"); + + conf.Defines.Add("DEFINE_ME_PLATFORM_LINUX"); + conf.Defines.Add("BGFX_PLATFORM_SUPPORTS_DXBC=0"); + conf.Defines.Add("BGFX_PLATFORM_SUPPORTS_WGSL=0"); + conf.Defines.Add("UNICODE"); + conf.Defines.Add("_UNICODE"); + + conf.AdditionalCompilerOptions.Add("-fPIC"); + conf.AdditionalCompilerOptions.Add("-frtti"); + //conf.AdditionalCompilerOptions.Add("-fexceptions"); + //conf.AdditionalCompilerOptions.Add("-Wextra"); + //conf.AdditionalCompilerOptions.Add("-Werror"); + conf.AdditionalCompilerOptions.Add("-Wno-unused-parameter"); + conf.AdditionalCompilerOptions.Add("-Wno-format-security"); + + if (target.Optimization == Optimization.Debug) + { + conf.AdditionalCompilerOptions.Add("-g3"); // full debug info + macros + conf.AdditionalCompilerOptions.Add("-fno-omit-frame-pointer"); // GDB stack unwinding + conf.AdditionalCompilerOptions.Add("-fno-inline-functions"); // don't inline, step cleanly + conf.AdditionalCompilerOptions.Add("-O0"); // no optimisation + } + + if (Directory.Exists(Globals.FMOD_Linux_Dir)) + { + conf.Defines.Add("DEFINE_ME_FMOD"); + // Bake the fmod lib dir into the binary's RPATH so it loads without LD_LIBRARY_PATH + string fmodLibDir = Path.Combine(Globals.FMOD_Linux_Dir, "api/core/lib/x86_64"); + conf.AdditionalLinkerOptions.Add($"-Wl,-rpath,{fmodLibDir}"); + } + + if (Globals.IsUltralightEnabled) + { + string ultralightLibDir = Path.Combine(Globals.RootDir, "Engine/ThirdParty/UltralightSDK/lib/linux"); + conf.LibraryPaths.Add(ultralightLibDir); + conf.AdditionalLinkerOptions.Add($"-Wl,-rpath,{ultralightLibDir}"); - if (Directory.Exists(Globals.MONO_macOS_Dir)) + var copyDirBuildStep = new Configuration.BuildStepCopy( + Path.Combine(Globals.RootDir, "Engine/ThirdParty/UltralightSDK/lib/linux"), + Globals.RootDir + "/.build/[target.Name]"); + copyDirBuildStep.IsFileCopy = false; + copyDirBuildStep.CopyPattern = "*.so"; + conf.EventPostBuildExe.Add(copyDirBuildStep); + } + if (Directory.Exists(Globals.MONO_Linux_Dir)) + { + //conf.Defines.Add("DEFINE_ME_MONO"); + } + + if (Directory.Exists(Globals.DOTNET_Linux_Dir)) + { + System.Console.WriteLine(Globals.DOTNET_Linux_Dir); + conf.Defines.Add("DEFINE_ME_DOTNET"); + } + // existing LibraryPaths, etc. + conf.LibraryPaths.Add(Path.Combine( + "[project.SharpmakeCsPath]", + "ThirdParty/Lib/Assimp/linux/Release" + )); + conf.LibraryPaths.Add(Path.Combine( + "[project.SharpmakeCsPath]", + $"ThirdParty/Lib/BGFX/linux/{CommonTarget.GetThirdPartyOptimization(target.Optimization)}" + )); + //conf.LibraryPaths.Add(Path.Combine( + // "[project.SharpmakeCsPath]", + // $"ThirdParty/Lib/SDL/linux/Release" + //)); + conf.LibraryPaths.Add(Path.Combine( + "[project.SharpmakeCsPath]", + $"ThirdParty/Lib/Bullet/linux/{CommonTarget.GetThirdPartyOptimization(target.Optimization)}" + )); + // Optick library path removed — ChromeTrace is header-only on Linux + + // The prebuilt Bullet archives were built without -fPIC, so their R_X86_64_32S + // relocations cannot be linked into a PIE (the default). Link non-PIE instead. + conf.AdditionalLinkerOptions.Add("-no-pie"); + + // Libraries that aren't carried in by the dependency graph on Linux. The engine + // modules (Dementia/ImGui/MitchEngine/Moonlight) plus bgfx/bimg/bx/assimp/zlib + // already reach LDLIBS via AddPublicDependency / module LibraryFiles, so we only + // add the rest here. LibGroup (enabled in ConfigureLinux) wraps all of LDLIBS in a + // linker group, so order is irrelevant. Bare names become -l:lib.a; the + // shared libs need their full .so filename to avoid the forced .a suffix. + conf.LibraryFiles.Add("BulletDynamics"); + conf.LibraryFiles.Add("BulletCollision"); + conf.LibraryFiles.Add("LinearMath"); + conf.LibraryFiles.Add("libwayland-egl.so"); + if (Directory.Exists(Globals.FMOD_Linux_Dir)) + { + conf.LibraryFiles.Add("libfmodL.so"); + } + if (Globals.IsUltralightEnabled) { - conf.Defines.Add("DEFINE_ME_MONO"); + conf.LibraryFiles.Add("libUltralight.so"); + conf.LibraryFiles.Add("libUltralightCore.so"); + conf.LibraryFiles.Add("libWebCore.so"); + conf.LibraryFiles.Add("libAppCore.so"); + conf.LibraryFiles.Add("libfontconfig.so"); } } @@ -284,4 +411,4 @@ public virtual void ConfigureRetail(Configuration conf, CommonTarget target) } #endregion -} \ No newline at end of file +} diff --git a/Tools/CommonTarget.sharpmake.cs b/Tools/CommonTarget.sharpmake.cs index 4670c60c..6e41bc81 100644 --- a/Tools/CommonTarget.sharpmake.cs +++ b/Tools/CommonTarget.sharpmake.cs @@ -31,6 +31,7 @@ public enum SubPlatformType Win64 = 1 << 0, macOS = 1 << 1, UWP = 1 << 2, + linux = 1 << 3, } public SubPlatformType SubPlatform = SubPlatformType.Win64; @@ -69,7 +70,7 @@ public static CommonTarget[] GetDefaultTargets() Platform.win64, DevEnv.vs2022, Optimization.Debug | Optimization.Release | Optimization.Retail, - DotNetFramework.v4_8, + DotNetFramework.net8_0, dotNetOS: 0); baseTarget.SubPlatform = SubPlatformType.Win64; @@ -80,7 +81,7 @@ public static CommonTarget[] GetDefaultTargets() Platform.win64, DevEnv.vs2022, Optimization.Debug | Optimization.Release | Optimization.Retail, - DotNetFramework.v4_8, + DotNetFramework.net8_0, dotNetOS: 0); uwpTarget.SubPlatform = SubPlatformType.UWP; } @@ -89,7 +90,7 @@ public static CommonTarget[] GetDefaultTargets() Platform.win64, DevEnv.vs2022, Optimization.Debug | Optimization.Release | Optimization.Retail, - DotNetFramework.v4_8, + DotNetFramework.net8_0, dotNetOS: 0); editorTarget.SubPlatform = SubPlatformType.Win64; editorTarget.SelectedMode = Mode.Editor; @@ -120,6 +121,26 @@ public static CommonTarget[] GetDefaultTargets() return new[] { macOSTarget, macEditor }; } + case Platform.linux: + { + var linuxTarget = new CommonTarget( + Platform.linux, + DevEnv.make, + Optimization.Debug | Optimization.Release, + DotNetFramework.v4_8, + dotNetOS: 0); + linuxTarget.SubPlatform = SubPlatformType.linux; + var linuxEditor = new CommonTarget( + Platform.linux, + DevEnv.make, + Optimization.Debug | Optimization.Release, + DotNetFramework.v4_8, + dotNetOS: 0); + linuxEditor.SelectedMode = Mode.Editor; + linuxEditor.SubPlatform = SubPlatformType.linux; + + return new[] { linuxTarget, linuxEditor }; + } default: { throw new NotImplementedException("The platform (" + Util.GetExecutingPlatform() + ") is not currently supported!"); diff --git a/Tools/HUB/Source/ProjectCache.cpp b/Tools/HUB/Source/ProjectCache.cpp index 70bdfb58..2c37d717 100644 --- a/Tools/HUB/Source/ProjectCache.cpp +++ b/Tools/HUB/Source/ProjectCache.cpp @@ -1,7 +1,7 @@ #include "ProjectCache.h" #include #include -#include "Resource\ResourceCache.h" +#include "Resource/ResourceCache.h" #include "ProjectFileConfig.h" void ProjectCache::Load() diff --git a/Tools/HUB/Source/ProjectCache.h b/Tools/HUB/Source/ProjectCache.h index ed8c8c69..4b69c156 100644 --- a/Tools/HUB/Source/ProjectCache.h +++ b/Tools/HUB/Source/ProjectCache.h @@ -3,7 +3,7 @@ #include #include #include -#include "Graphics\Texture.h" +#include "Graphics/Texture.h" #include "ProjectFileConfig.h" namespace Moonlight { class Texture; } diff --git a/Tools/NewProjectSetup.command b/Tools/NewProjectSetup.command index f46275ea..4533a30a 100644 --- a/Tools/NewProjectSetup.command +++ b/Tools/NewProjectSetup.command @@ -9,7 +9,7 @@ fi id=$1; if [[ $1 == "" ]] then -echo Enter a project name \(Used for the project files\): +echo Enter a project name \(Used for the project files\): read id fi @@ -18,10 +18,16 @@ then id="EmptyProject"; fi +branch=$2; +if [[ $branch == "" ]] +then +branch="master"; +fi + echo $id echo 2> .gitmodules -git submodule add --force --name Engine https://github.com/wobbier/MitchEngine Engine +git submodule add -b $branch --force --name Engine https://github.com/wobbier/MitchEngine Engine git submodule init git submodule update diff --git a/Tools/NewProjectSetup.sh b/Tools/NewProjectSetup.sh new file mode 100755 index 00000000..a6a8ba09 --- /dev/null +++ b/Tools/NewProjectSetup.sh @@ -0,0 +1,50 @@ +#!/usr/bin/env bash +# Creates a new MitchEngine project in the current folder. +# Run this from either an already checked out git repo or an empty folder. +# +# Usage: NewProjectSetup.sh [ProjectName] [EngineBranch] +set -e + +if [ ! -e .git ]; then + git init +fi + +id=$1 +branch=$2 + +if [ -z "$id" ]; then + read -r -p "Enter a project name (Used for the project files): " id +fi + +if [ -z "$id" ]; then + id="EmptyProject" +fi + +if [ -z "$branch" ]; then + branch="master" +fi + +echo "$id" +: > .gitmodules + +git submodule add -b "$branch" --force --name Engine https://github.com/wobbier/MitchEngine Engine + +git submodule update --init +git -C Engine submodule update --init + +cp -a Engine/Tools/ProjectTemplate/. ./ + +# Stage the template so `nix develop` (which only sees files known to git) can +# pick up the flake in the fresh repo. +git add -A + +# Generation needs cmake + dotnet. When nix is available (and we aren't already +# inside a shell), run those steps through the project's dev shell. +if [ -z "$IN_NIX_SHELL" ] && command -v nix >/dev/null 2>&1; then + nix() { command nix --extra-experimental-features "nix-command flakes" "$@"; } + nix develop --command bash Engine/ThirdParty/GenerateSolutions.sh + nix develop --command bash Project/GenerateSolution.sh +else + bash Engine/ThirdParty/GenerateSolutions.sh + bash Project/GenerateSolution.sh +fi diff --git a/Tools/PackageLinuxBuild.sh b/Tools/PackageLinuxBuild.sh new file mode 100755 index 00000000..d74bd246 --- /dev/null +++ b/Tools/PackageLinuxBuild.sh @@ -0,0 +1,59 @@ +#!/usr/bin/env bash +# Packages a Linux build folder into a relocatable tar.gz (the usual way to +# ship a Linux game outside a store: binary + assets + bundled libs + launcher). +# +# Usage (from the project root, inside `nix develop` so ldd can resolve libs): +# Engine/Tools/PackageLinuxBuild.sh [Output.tar.gz] +# e.g. Engine/Tools/PackageLinuxBuild.sh Game_linux_Release Game_EntryPoint_x64 +# +# Bundled next to the binary in lib/: +# - shared libs resolved from the engine checkout (Ultralight, FMOD) — their +# baked rpaths point at the build machine and are dead on any other box +# - libSDL2 / libstdc++ / libgcc_s from the toolchain, so the game doesn't +# depend on the target distro's versions +# Left to the host system: glibc, the GL/EGL/Vulkan driver stack, X11/Wayland, +# GTK3/fontconfig/ALSA/curl — bundling those breaks more than it fixes. +set -e + +builddir=".build/${1:?Usage: PackageLinuxBuild.sh [Output.tar.gz]}" +binary="${2:?Usage: PackageLinuxBuild.sh [Output.tar.gz]}" +output="${3:-${1}.tar.gz}" + +if [ ! -x "$builddir/$binary" ]; then + echo "error: $builddir/$binary not found (or not executable)" >&2 + exit 1 +fi + +mkdir -p "$builddir/lib" + +ldd "$builddir/$binary" | awk '$3 ~ /^\// { print $3 }' | while read -r lib; do + case "$(basename "$lib")" in + libSDL2*|libstdc++*|libgcc_s*) ;; + *) + case "$lib" in + */ThirdParty/*) ;; # UltralightSDK / FMOD out of the engine tree + *) continue ;; + esac + ;; + esac + cp -Ln "$lib" "$builddir/lib/" 2>/dev/null || true +done + +cat > "$builddir/run.sh" < $output" diff --git a/Tools/ProjectTemplate/.gitignore b/Tools/ProjectTemplate/.gitignore index c368ea0d..06620a11 100644 --- a/Tools/ProjectTemplate/.gitignore +++ b/Tools/ProjectTemplate/.gitignore @@ -208,4 +208,16 @@ FakesAssemblies/ engine.txt imgui.ini -!ThirdParty/Lib/**/*.* \ No newline at end of file +!ThirdParty/Lib/**/*.* + +# Generated build files (Sharpmake) — never commit these +.build/ +.tmp/ +Makefile +*.make +compile_commands.json + +# Runtime logs / dumps +Engine.txt +fmod_log.txt +startup.json \ No newline at end of file diff --git a/Tools/ProjectTemplate/CopyAssets.sh b/Tools/ProjectTemplate/CopyAssets.sh new file mode 100755 index 00000000..f2cb3d58 --- /dev/null +++ b/Tools/ProjectTemplate/CopyAssets.sh @@ -0,0 +1,13 @@ +#!/usr/bin/env bash +# Copies the engine + project assets into a build folder (the Linux counterpart +# of CopyAssets.bat). +# +# Usage: CopyAssets.sh e.g. CopyAssets.sh Editor_Release +set -e +cd "$(dirname "$0")" + +dest=".build/${1:?Usage: CopyAssets.sh (e.g. Editor_Release)}/Assets" + +mkdir -p "$dest" +cp -a Engine/Assets/. "$dest"/ +cp -a Assets/. "$dest"/ diff --git a/Tools/ProjectTemplate/Project/GenerateSolution.command b/Tools/ProjectTemplate/Project/GenerateSolution.command index 55c43437..b271768b 100644 --- a/Tools/ProjectTemplate/Project/GenerateSolution.command +++ b/Tools/ProjectTemplate/Project/GenerateSolution.command @@ -1 +1,5 @@ -"../Engine/Tools/Sharpmake/macOS/Sharpmake.Application" "/sources('../Game.sharpmake.cs')" \ No newline at end of file +#!/usr/bin/env bash +set -euo pipefail + +dotnet "../Engine/Tools/Sharpmake/macOS/Sharpmake.Application.dll" \ + "/sources('../Game.sharpmake.cs')" \ No newline at end of file diff --git a/Tools/ProjectTemplate/Project/GenerateSolution.sh b/Tools/ProjectTemplate/Project/GenerateSolution.sh new file mode 100755 index 00000000..1811ce6c --- /dev/null +++ b/Tools/ProjectTemplate/Project/GenerateSolution.sh @@ -0,0 +1,5 @@ +#!/usr/bin/env bash +set -e +cd "$(dirname "$0")" + +dotnet "../Engine/Tools/Sharpmake/Sharpmake.Application.dll" "/sources('../Game.sharpmake.cs')" diff --git a/Tools/ProjectTemplate/flake.lock b/Tools/ProjectTemplate/flake.lock new file mode 100644 index 00000000..225d4a91 --- /dev/null +++ b/Tools/ProjectTemplate/flake.lock @@ -0,0 +1,61 @@ +{ + "nodes": { + "flake-utils": { + "inputs": { + "systems": "systems" + }, + "locked": { + "lastModified": 1731533236, + "narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "11707dc2f618dd54ca8739b309ec4fc024de578b", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, + "nixpkgs": { + "locked": { + "lastModified": 1781577229, + "narHash": "sha256-lrp67w8AulE9Ks53n27I45ADSzbOCn4H+CNW1Ck8B+8=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "567a49d1913ce81ac6e9582e3553dd90a955875f", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "root": { + "inputs": { + "flake-utils": "flake-utils", + "nixpkgs": "nixpkgs" + } + }, + "systems": { + "locked": { + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default", + "type": "github" + } + } + }, + "root": "root", + "version": 7 +} diff --git a/Tools/ProjectTemplate/flake.nix b/Tools/ProjectTemplate/flake.nix new file mode 100644 index 00000000..17f16fc0 --- /dev/null +++ b/Tools/ProjectTemplate/flake.nix @@ -0,0 +1,144 @@ +{ + description = "MitchEngine project dev environment"; + + inputs = { + # Track a recent nixpkgs channel: graphics is impure (apps load the + # driver from the host's /run/opengl-driver on NixOS). A skew between this + # and the host means the dev-shell glibc/wayland can't load the host Mesa + # ICDs -> "Vulkan doesn't implement VK_KHR_surface". + nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; + flake-utils.url = "github:numtide/flake-utils"; + }; + + outputs = { self, nixpkgs, flake-utils, ... }: + flake-utils.lib.eachDefaultSystem (system: + let + pkgs = import nixpkgs { + inherit system; + config.allowUnfree = true; + }; + dotnet = pkgs.dotnet-sdk_8; + in + { + # ---------------------------------------------------------- + # MitchEngine Dev Shell + # + # - bgfx loads GL/EGL dynamically with dlopen() + # - Mesa + libglvnd MUST be in LD_LIBRARY_PATH so bgfx finds + # 64-bit libEGL.so.1 instead of Steam's 32-bit version. + # - ALWAYS enter this shell with: nix develop + # ---------------------------------------------------------- + devShells.default = pkgs.mkShell { + name = "mitchengine-devshell"; + + buildInputs = with pkgs; [ + # Core build tools + gcc + gdb + gnumake + cmake + pkg-config + + # SDL2 from Nix + SDL2 + + # GL/EGL libs + mesa # GL + EGL + DRI drivers + libglvnd # GL/Vulkan dispatch loader + + # Wayland (wl_egl_window_create for native Wayland + Vulkan) + wayland + + dotnet + + python3 + + # X11 dev headers (needed by SDL_syswm.h and XWayland support) + libX11 + libXcursor + libXext + libXrandr + libXinerama + libXxf86vm + libXfixes + libxcb + + bzip2 # For decompressing .tar.bz2 files from bgfx releases + alsa-lib + curl + # Optional Vulkan support for bgfx + vulkan-loader + + # Required by Ultralight AppCore on Linux + fontconfig + + # Ultralight (latest) links against the system GTK3 stack + gtk3 + glib + pango + cairo + atk + gdk-pixbuf + harfbuzz + ]; + + # Provide GL/EGL so bgfx's dlopen("libEGL.so.1") succeeds. + # makeLibraryPath only adds each listed package's own lib dir + # (not transitive deps), so every Ultralight/GTK dependency is + # listed explicitly. + LD_LIBRARY_PATH = pkgs.lib.makeLibraryPath [ + pkgs.libglvnd + pkgs.mesa + pkgs.SDL2 + pkgs.vulkan-loader + + # X11/XCB runtime libs. These are in buildInputs for compiling, but + # makeLibraryPath is non-transitive and SDL2 needs libX11 at load + # time, so they must be listed here too. + pkgs.xorg.libX11 + pkgs.xorg.libXcursor + pkgs.xorg.libXext + pkgs.xorg.libXrandr + pkgs.xorg.libXinerama + pkgs.xorg.libXxf86vm + pkgs.xorg.libXfixes + pkgs.xorg.libxcb + + # Wayland EGL backend (libwayland-egl.so.1) — in buildInputs for + # compiling, but needed at load time too now that the binary links it. + pkgs.wayland + + # Ultralight (latest) GTK3 runtime deps + pkgs.gtk3 + pkgs.glib + pkgs.pango + pkgs.cairo + pkgs.atk + pkgs.gdk-pixbuf + pkgs.harfbuzz + pkgs.fontconfig # libfontconfig.so.1 (Ultralight font rendering) + pkgs.bzip2 # libbz2.so.1.0 + + pkgs.alsa-lib + pkgs.curl + ]; + + shellHook = '' + export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$(pwd)/Engine/ThirdParty/Optick:$(pwd)/Engine/ThirdParty/FMOD/api/core/lib/x86_64:$(pwd)/Engine/ThirdParty/fmod/api/core/lib/x86_64" + export DOTNET_ROOT="${dotnet}/share/dotnet" + + _DOTNET_NATIVE=$(find ${dotnet}/share/dotnet/packs/Microsoft.NETCore.App.Host.linux-x64 -mindepth 3 -maxdepth 3 -name "native" -type d 2>/dev/null | head -1) + if [ -n "$_DOTNET_NATIVE" ]; then + export DOTNET_LINUX_NATIVE_DIR="$_DOTNET_NATIVE" + fi + unset _DOTNET_NATIVE + + echo "🍉 Shell Ready!" + echo " Generate: (cd Project && sh GenerateSolution.sh)" + echo " Build: make -f .make Havana config=editor_debug -j\$(nproc)" + echo " Run: ./.build/Editor_Debug/Havana" + echo " Optional: SDL_VIDEODRIVER=wayland ..." + ''; + }; + }); +} diff --git a/Tools/Sharpmake/macOS/Basic.Reference.Assemblies.Net50.dll b/Tools/Sharpmake/macOS/Basic.Reference.Assemblies.Net50.dll deleted file mode 100755 index e20eb201..00000000 Binary files a/Tools/Sharpmake/macOS/Basic.Reference.Assemblies.Net50.dll and /dev/null differ diff --git a/Tools/Sharpmake/macOS/Basic.Reference.Assemblies.Net80.dll b/Tools/Sharpmake/macOS/Basic.Reference.Assemblies.Net80.dll new file mode 100644 index 00000000..47c23038 Binary files /dev/null and b/Tools/Sharpmake/macOS/Basic.Reference.Assemblies.Net80.dll differ diff --git a/Tools/Sharpmake/macOS/Microsoft.CodeAnalysis.CSharp.dll b/Tools/Sharpmake/macOS/Microsoft.CodeAnalysis.CSharp.dll old mode 100755 new mode 100644 index 581191da..5031a0b0 Binary files a/Tools/Sharpmake/macOS/Microsoft.CodeAnalysis.CSharp.dll and b/Tools/Sharpmake/macOS/Microsoft.CodeAnalysis.CSharp.dll differ diff --git a/Tools/Sharpmake/macOS/Microsoft.CodeAnalysis.dll b/Tools/Sharpmake/macOS/Microsoft.CodeAnalysis.dll old mode 100755 new mode 100644 index c653dc88..ea8d7a3a Binary files a/Tools/Sharpmake/macOS/Microsoft.CodeAnalysis.dll and b/Tools/Sharpmake/macOS/Microsoft.CodeAnalysis.dll differ diff --git a/Tools/Sharpmake/macOS/Microsoft.VisualStudio.Setup.Configuration.Interop.dll b/Tools/Sharpmake/macOS/Microsoft.VisualStudio.Setup.Configuration.Interop.dll old mode 100755 new mode 100644 index 6d7fa39e..55fc91d0 Binary files a/Tools/Sharpmake/macOS/Microsoft.VisualStudio.Setup.Configuration.Interop.dll and b/Tools/Sharpmake/macOS/Microsoft.VisualStudio.Setup.Configuration.Interop.dll differ diff --git a/Tools/Sharpmake/macOS/Sharpmake.Application b/Tools/Sharpmake/macOS/Sharpmake.Application index 54362b3a..0a4f7d3d 100755 Binary files a/Tools/Sharpmake/macOS/Sharpmake.Application and b/Tools/Sharpmake/macOS/Sharpmake.Application differ diff --git a/Tools/Sharpmake/macOS/Sharpmake.Application.deps.json b/Tools/Sharpmake/macOS/Sharpmake.Application.deps.json index 0be1c37d..80d13b57 100644 --- a/Tools/Sharpmake/macOS/Sharpmake.Application.deps.json +++ b/Tools/Sharpmake/macOS/Sharpmake.Application.deps.json @@ -1,12 +1,12 @@ { "runtimeTarget": { - "name": ".NETCoreApp,Version=v5.0", + "name": ".NETCoreApp,Version=v8.0", "signature": "" }, "compilationOptions": {}, "targets": { - ".NETCoreApp,Version=v5.0": { - "Sharpmake.Application/1.0.0": { + ".NETCoreApp,Version=v8.0": { + "Sharpmake.Application/1.5.0": { "dependencies": { "Sharpmake": "1.0.0", "Sharpmake.CommonPlatforms": "1.0.0", @@ -16,170 +16,137 @@ "Sharpmake.Application.dll": {} } }, - "Basic.Reference.Assemblies.Net50/1.2.4": { + "Basic.Reference.Assemblies.Net80/1.8.8": { "dependencies": { - "Microsoft.CodeAnalysis.Common": "4.0.1" + "Microsoft.CodeAnalysis.Common": "4.13.0" }, "runtime": { - "lib/netstandard2.0/Basic.Reference.Assemblies.Net50.dll": { + "lib/netstandard2.0/Basic.Reference.Assemblies.Net80.dll": { "assemblyVersion": "1.0.0.0", "fileVersion": "1.0.0.0" } } }, - "Microsoft.CodeAnalysis.Analyzers/3.3.2": {}, - "Microsoft.CodeAnalysis.Common/4.0.1": { - "dependencies": { - "Microsoft.CodeAnalysis.Analyzers": "3.3.2", - "System.Collections.Immutable": "5.0.0", - "System.Memory": "4.5.4", - "System.Reflection.Metadata": "5.0.0", - "System.Runtime.CompilerServices.Unsafe": "5.0.0", - "System.Text.Encoding.CodePages": "4.5.1", - "System.Threading.Tasks.Extensions": "4.5.4" - }, + "Microsoft.CodeAnalysis.Common/4.13.0": { "runtime": { - "lib/netcoreapp3.1/Microsoft.CodeAnalysis.dll": { - "assemblyVersion": "4.0.0.0", - "fileVersion": "4.0.121.55815" + "lib/net8.0/Microsoft.CodeAnalysis.dll": { + "assemblyVersion": "4.13.0.0", + "fileVersion": "4.1300.25.12011" } }, "resources": { - "lib/netcoreapp3.1/cs/Microsoft.CodeAnalysis.resources.dll": { + "lib/net8.0/cs/Microsoft.CodeAnalysis.resources.dll": { "locale": "cs" }, - "lib/netcoreapp3.1/de/Microsoft.CodeAnalysis.resources.dll": { + "lib/net8.0/de/Microsoft.CodeAnalysis.resources.dll": { "locale": "de" }, - "lib/netcoreapp3.1/es/Microsoft.CodeAnalysis.resources.dll": { + "lib/net8.0/es/Microsoft.CodeAnalysis.resources.dll": { "locale": "es" }, - "lib/netcoreapp3.1/fr/Microsoft.CodeAnalysis.resources.dll": { + "lib/net8.0/fr/Microsoft.CodeAnalysis.resources.dll": { "locale": "fr" }, - "lib/netcoreapp3.1/it/Microsoft.CodeAnalysis.resources.dll": { + "lib/net8.0/it/Microsoft.CodeAnalysis.resources.dll": { "locale": "it" }, - "lib/netcoreapp3.1/ja/Microsoft.CodeAnalysis.resources.dll": { + "lib/net8.0/ja/Microsoft.CodeAnalysis.resources.dll": { "locale": "ja" }, - "lib/netcoreapp3.1/ko/Microsoft.CodeAnalysis.resources.dll": { + "lib/net8.0/ko/Microsoft.CodeAnalysis.resources.dll": { "locale": "ko" }, - "lib/netcoreapp3.1/pl/Microsoft.CodeAnalysis.resources.dll": { + "lib/net8.0/pl/Microsoft.CodeAnalysis.resources.dll": { "locale": "pl" }, - "lib/netcoreapp3.1/pt-BR/Microsoft.CodeAnalysis.resources.dll": { + "lib/net8.0/pt-BR/Microsoft.CodeAnalysis.resources.dll": { "locale": "pt-BR" }, - "lib/netcoreapp3.1/ru/Microsoft.CodeAnalysis.resources.dll": { + "lib/net8.0/ru/Microsoft.CodeAnalysis.resources.dll": { "locale": "ru" }, - "lib/netcoreapp3.1/tr/Microsoft.CodeAnalysis.resources.dll": { + "lib/net8.0/tr/Microsoft.CodeAnalysis.resources.dll": { "locale": "tr" }, - "lib/netcoreapp3.1/zh-Hans/Microsoft.CodeAnalysis.resources.dll": { + "lib/net8.0/zh-Hans/Microsoft.CodeAnalysis.resources.dll": { "locale": "zh-Hans" }, - "lib/netcoreapp3.1/zh-Hant/Microsoft.CodeAnalysis.resources.dll": { + "lib/net8.0/zh-Hant/Microsoft.CodeAnalysis.resources.dll": { "locale": "zh-Hant" } } }, - "Microsoft.CodeAnalysis.CSharp/4.0.1": { + "Microsoft.CodeAnalysis.CSharp/4.13.0": { "dependencies": { - "Microsoft.CodeAnalysis.Common": "4.0.1" + "Microsoft.CodeAnalysis.Common": "4.13.0" }, "runtime": { - "lib/netcoreapp3.1/Microsoft.CodeAnalysis.CSharp.dll": { - "assemblyVersion": "4.0.0.0", - "fileVersion": "4.0.121.55815" + "lib/net8.0/Microsoft.CodeAnalysis.CSharp.dll": { + "assemblyVersion": "4.13.0.0", + "fileVersion": "4.1300.25.12011" } }, "resources": { - "lib/netcoreapp3.1/cs/Microsoft.CodeAnalysis.CSharp.resources.dll": { + "lib/net8.0/cs/Microsoft.CodeAnalysis.CSharp.resources.dll": { "locale": "cs" }, - "lib/netcoreapp3.1/de/Microsoft.CodeAnalysis.CSharp.resources.dll": { + "lib/net8.0/de/Microsoft.CodeAnalysis.CSharp.resources.dll": { "locale": "de" }, - "lib/netcoreapp3.1/es/Microsoft.CodeAnalysis.CSharp.resources.dll": { + "lib/net8.0/es/Microsoft.CodeAnalysis.CSharp.resources.dll": { "locale": "es" }, - "lib/netcoreapp3.1/fr/Microsoft.CodeAnalysis.CSharp.resources.dll": { + "lib/net8.0/fr/Microsoft.CodeAnalysis.CSharp.resources.dll": { "locale": "fr" }, - "lib/netcoreapp3.1/it/Microsoft.CodeAnalysis.CSharp.resources.dll": { + "lib/net8.0/it/Microsoft.CodeAnalysis.CSharp.resources.dll": { "locale": "it" }, - "lib/netcoreapp3.1/ja/Microsoft.CodeAnalysis.CSharp.resources.dll": { + "lib/net8.0/ja/Microsoft.CodeAnalysis.CSharp.resources.dll": { "locale": "ja" }, - "lib/netcoreapp3.1/ko/Microsoft.CodeAnalysis.CSharp.resources.dll": { + "lib/net8.0/ko/Microsoft.CodeAnalysis.CSharp.resources.dll": { "locale": "ko" }, - "lib/netcoreapp3.1/pl/Microsoft.CodeAnalysis.CSharp.resources.dll": { + "lib/net8.0/pl/Microsoft.CodeAnalysis.CSharp.resources.dll": { "locale": "pl" }, - "lib/netcoreapp3.1/pt-BR/Microsoft.CodeAnalysis.CSharp.resources.dll": { + "lib/net8.0/pt-BR/Microsoft.CodeAnalysis.CSharp.resources.dll": { "locale": "pt-BR" }, - "lib/netcoreapp3.1/ru/Microsoft.CodeAnalysis.CSharp.resources.dll": { + "lib/net8.0/ru/Microsoft.CodeAnalysis.CSharp.resources.dll": { "locale": "ru" }, - "lib/netcoreapp3.1/tr/Microsoft.CodeAnalysis.CSharp.resources.dll": { + "lib/net8.0/tr/Microsoft.CodeAnalysis.CSharp.resources.dll": { "locale": "tr" }, - "lib/netcoreapp3.1/zh-Hans/Microsoft.CodeAnalysis.CSharp.resources.dll": { + "lib/net8.0/zh-Hans/Microsoft.CodeAnalysis.CSharp.resources.dll": { "locale": "zh-Hans" }, - "lib/netcoreapp3.1/zh-Hant/Microsoft.CodeAnalysis.CSharp.resources.dll": { + "lib/net8.0/zh-Hant/Microsoft.CodeAnalysis.CSharp.resources.dll": { "locale": "zh-Hant" } } }, - "Microsoft.NETCore.Platforms/5.0.0": {}, - "Microsoft.VisualStudio.Setup.Configuration.Interop/3.0.4492": { + "Microsoft.VisualStudio.Setup.Configuration.Interop/3.14.2075": { "runtime": { "lib/netstandard2.1/Microsoft.VisualStudio.Setup.Configuration.Interop.dll": { "assemblyVersion": "1.0.0.0", - "fileVersion": "3.0.4492.23473" + "fileVersion": "3.14.2075.50697" } } }, - "Microsoft.Win32.Registry/5.0.0": { - "dependencies": { - "System.Security.AccessControl": "5.0.0", - "System.Security.Principal.Windows": "5.0.0" - } - }, - "System.Collections.Immutable/5.0.0": {}, - "System.Memory/4.5.4": {}, - "System.Reflection.Metadata/5.0.0": {}, - "System.Runtime.CompilerServices.Unsafe/5.0.0": {}, - "System.Security.AccessControl/5.0.0": { - "dependencies": { - "Microsoft.NETCore.Platforms": "5.0.0", - "System.Security.Principal.Windows": "5.0.0" - } - }, - "System.Security.Principal.Windows/5.0.0": {}, - "System.Text.Encoding.CodePages/4.5.1": { - "dependencies": { - "Microsoft.NETCore.Platforms": "5.0.0", - "System.Runtime.CompilerServices.Unsafe": "5.0.0" - } - }, - "System.Threading.Tasks.Extensions/4.5.4": {}, "Sharpmake/1.0.0": { "dependencies": { - "Basic.Reference.Assemblies.Net50": "1.2.4", - "Microsoft.CodeAnalysis.CSharp": "4.0.1", - "Microsoft.VisualStudio.Setup.Configuration.Interop": "3.0.4492", - "Microsoft.Win32.Registry": "5.0.0" + "Basic.Reference.Assemblies.Net80": "1.8.8", + "Microsoft.CodeAnalysis.CSharp": "4.13.0", + "Microsoft.VisualStudio.Setup.Configuration.Interop": "3.14.2075" }, "runtime": { - "Sharpmake.dll": {} + "Sharpmake.dll": { + "assemblyVersion": "1.5.0.0", + "fileVersion": "1.5.0.0" + } } }, "Sharpmake.CommonPlatforms/1.0.0": { @@ -188,7 +155,10 @@ "Sharpmake.Generators": "1.0.0" }, "runtime": { - "Sharpmake.CommonPlatforms.dll": {} + "Sharpmake.CommonPlatforms.dll": { + "assemblyVersion": "1.5.0.0", + "fileVersion": "1.5.0.0" + } } }, "Sharpmake.Generators/1.0.0": { @@ -196,121 +166,47 @@ "Sharpmake": "1.0.0" }, "runtime": { - "Sharpmake.Generators.dll": {} + "Sharpmake.Generators.dll": { + "assemblyVersion": "1.5.0.0", + "fileVersion": "1.5.0.0" + } } } } }, "libraries": { - "Sharpmake.Application/1.0.0": { + "Sharpmake.Application/1.5.0": { "type": "project", "serviceable": false, "sha512": "" }, - "Basic.Reference.Assemblies.Net50/1.2.4": { - "type": "package", - "serviceable": true, - "sha512": "sha512-dkLNEHjI1vkoE86PrsXfErPFkp5x3ycRO25NwDBcTmd/k354Il3eTqfarbseXKb4cRomPgjDfZwI6FMBWWEuxw==", - "path": "basic.reference.assemblies.net50/1.2.4", - "hashPath": "basic.reference.assemblies.net50.1.2.4.nupkg.sha512" - }, - "Microsoft.CodeAnalysis.Analyzers/3.3.2": { - "type": "package", - "serviceable": true, - "sha512": "sha512-7xt6zTlIEizUgEsYAIgm37EbdkiMmr6fP6J9pDoKEpiGM4pi32BCPGr/IczmSJI9Zzp0a6HOzpr9OvpMP+2veA==", - "path": "microsoft.codeanalysis.analyzers/3.3.2", - "hashPath": "microsoft.codeanalysis.analyzers.3.3.2.nupkg.sha512" - }, - "Microsoft.CodeAnalysis.Common/4.0.1": { - "type": "package", - "serviceable": true, - "sha512": "sha512-SMREwaVD5SzatlWhh9aahQAtSWdb63NcE//f+bQzgHSECU6xtDtaxk0kwV+asdFfr6HtW38UeO6jvqdfzudg3w==", - "path": "microsoft.codeanalysis.common/4.0.1", - "hashPath": "microsoft.codeanalysis.common.4.0.1.nupkg.sha512" - }, - "Microsoft.CodeAnalysis.CSharp/4.0.1": { - "type": "package", - "serviceable": true, - "sha512": "sha512-Q9RxxydPpUElj/x1/qykDTUGsRoKbJG8H5XUSeMGmMu54fBiuX1xyanom9caa1oQfh5JIW1BgLxobSaWs4WyHQ==", - "path": "microsoft.codeanalysis.csharp/4.0.1", - "hashPath": "microsoft.codeanalysis.csharp.4.0.1.nupkg.sha512" - }, - "Microsoft.NETCore.Platforms/5.0.0": { - "type": "package", - "serviceable": true, - "sha512": "sha512-VyPlqzH2wavqquTcYpkIIAQ6WdenuKoFN0BdYBbCWsclXacSOHNQn66Gt4z5NBqEYW0FAPm5rlvki9ZiCij5xQ==", - "path": "microsoft.netcore.platforms/5.0.0", - "hashPath": "microsoft.netcore.platforms.5.0.0.nupkg.sha512" - }, - "Microsoft.VisualStudio.Setup.Configuration.Interop/3.0.4492": { - "type": "package", - "serviceable": true, - "sha512": "sha512-BfkqM96P8+N+cz4T+pxKrIKk2ZD1YMxCXH2ivtBDj5tx6Mc2YQLK1+3h+C6Qebper0RBipuHVn51lb9SZH6bKQ==", - "path": "microsoft.visualstudio.setup.configuration.interop/3.0.4492", - "hashPath": "microsoft.visualstudio.setup.configuration.interop.3.0.4492.nupkg.sha512" - }, - "Microsoft.Win32.Registry/5.0.0": { - "type": "package", - "serviceable": true, - "sha512": "sha512-dDoKi0PnDz31yAyETfRntsLArTlVAVzUzCIvvEDsDsucrl33Dl8pIJG06ePTJTI3tGpeyHS9Cq7Foc/s4EeKcg==", - "path": "microsoft.win32.registry/5.0.0", - "hashPath": "microsoft.win32.registry.5.0.0.nupkg.sha512" - }, - "System.Collections.Immutable/5.0.0": { - "type": "package", - "serviceable": true, - "sha512": "sha512-FXkLXiK0sVVewcso0imKQoOxjoPAj42R8HtjjbSjVPAzwDfzoyoznWxgA3c38LDbN9SJux1xXoXYAhz98j7r2g==", - "path": "system.collections.immutable/5.0.0", - "hashPath": "system.collections.immutable.5.0.0.nupkg.sha512" - }, - "System.Memory/4.5.4": { - "type": "package", - "serviceable": true, - "sha512": "sha512-1MbJTHS1lZ4bS4FmsJjnuGJOu88ZzTT2rLvrhW7Ygic+pC0NWA+3hgAen0HRdsocuQXCkUTdFn9yHJJhsijDXw==", - "path": "system.memory/4.5.4", - "hashPath": "system.memory.4.5.4.nupkg.sha512" - }, - "System.Reflection.Metadata/5.0.0": { - "type": "package", - "serviceable": true, - "sha512": "sha512-5NecZgXktdGg34rh1OenY1rFNDCI8xSjFr+Z4OU4cU06AQHUdRnIIEeWENu3Wl4YowbzkymAIMvi3WyK9U53pQ==", - "path": "system.reflection.metadata/5.0.0", - "hashPath": "system.reflection.metadata.5.0.0.nupkg.sha512" - }, - "System.Runtime.CompilerServices.Unsafe/5.0.0": { - "type": "package", - "serviceable": true, - "sha512": "sha512-ZD9TMpsmYJLrxbbmdvhwt9YEgG5WntEnZ/d1eH8JBX9LBp+Ju8BSBhUGbZMNVHHomWo2KVImJhTDl2hIgw/6MA==", - "path": "system.runtime.compilerservices.unsafe/5.0.0", - "hashPath": "system.runtime.compilerservices.unsafe.5.0.0.nupkg.sha512" - }, - "System.Security.AccessControl/5.0.0": { + "Basic.Reference.Assemblies.Net80/1.8.8": { "type": "package", "serviceable": true, - "sha512": "sha512-dagJ1mHZO3Ani8GH0PHpPEe/oYO+rVdbQjvjJkBRNQkX4t0r1iaeGn8+/ybkSLEan3/slM0t59SVdHzuHf2jmw==", - "path": "system.security.accesscontrol/5.0.0", - "hashPath": "system.security.accesscontrol.5.0.0.nupkg.sha512" + "sha512": "sha512-223ylqyq909CG7BYNpAcplO2sp545nB4MXb41r8NO6WyoMzEnN7vH29NXAqDIFRHGg02EQJxP+QyVsCTbVKVRw==", + "path": "basic.reference.assemblies.net80/1.8.8", + "hashPath": "basic.reference.assemblies.net80.1.8.8.nupkg.sha512" }, - "System.Security.Principal.Windows/5.0.0": { + "Microsoft.CodeAnalysis.Common/4.13.0": { "type": "package", "serviceable": true, - "sha512": "sha512-t0MGLukB5WAVU9bO3MGzvlGnyJPgUlcwerXn1kzBRjwLKixT96XV0Uza41W49gVd8zEMFu9vQEFlv0IOrytICA==", - "path": "system.security.principal.windows/5.0.0", - "hashPath": "system.security.principal.windows.5.0.0.nupkg.sha512" + "sha512": "sha512-T8nRl4mAUY4mhdYM4U2ra2vP2EL+ol8Yqwo0gwC/V55vmlXq9NxdIkZJynTpTL1uX/jHijJ90AeOEx4lf7OwzQ==", + "path": "microsoft.codeanalysis.common/4.13.0", + "hashPath": "microsoft.codeanalysis.common.4.13.0.nupkg.sha512" }, - "System.Text.Encoding.CodePages/4.5.1": { + "Microsoft.CodeAnalysis.CSharp/4.13.0": { "type": "package", "serviceable": true, - "sha512": "sha512-4J2JQXbftjPMppIHJ7IC+VXQ9XfEagN92vZZNoG12i+zReYlim5dMoXFC1Zzg7tsnKDM7JPo5bYfFK4Jheq44w==", - "path": "system.text.encoding.codepages/4.5.1", - "hashPath": "system.text.encoding.codepages.4.5.1.nupkg.sha512" + "sha512": "sha512-BsH7Vijbj9IL7Fj4k/ysZSVyLGFqr75wmdFGwCKWJvSjnA1xwPaQ3hkB2BQdHOt5CpEYA6Q0I6Oo5sDTDHqHsg==", + "path": "microsoft.codeanalysis.csharp/4.13.0", + "hashPath": "microsoft.codeanalysis.csharp.4.13.0.nupkg.sha512" }, - "System.Threading.Tasks.Extensions/4.5.4": { + "Microsoft.VisualStudio.Setup.Configuration.Interop/3.14.2075": { "type": "package", "serviceable": true, - "sha512": "sha512-zteT+G8xuGu6mS+mzDzYXbzS7rd3K6Fjb9RiZlYlJPam2/hU7JCBZBVEcywNuR+oZ1ncTvc/cq0faRr3P01OVg==", - "path": "system.threading.tasks.extensions/4.5.4", - "hashPath": "system.threading.tasks.extensions.4.5.4.nupkg.sha512" + "sha512": "sha512-SH4pYl7XBUjL6sRAk+l2jsK7B9VbiKPEKkzJdmNxgexeHpAP7T+VlZk0w3NHgPG1UGQ3fxnhc427cM2o9GUYYA==", + "path": "microsoft.visualstudio.setup.configuration.interop/3.14.2075", + "hashPath": "microsoft.visualstudio.setup.configuration.interop.3.14.2075.nupkg.sha512" }, "Sharpmake/1.0.0": { "type": "project", diff --git a/Tools/Sharpmake/macOS/Sharpmake.Application.dll b/Tools/Sharpmake/macOS/Sharpmake.Application.dll index dda684bb..2c7f4e29 100644 Binary files a/Tools/Sharpmake/macOS/Sharpmake.Application.dll and b/Tools/Sharpmake/macOS/Sharpmake.Application.dll differ diff --git a/Tools/Sharpmake/macOS/Sharpmake.Application.dll.config b/Tools/Sharpmake/macOS/Sharpmake.Application.dll.config deleted file mode 100644 index bd5bc510..00000000 --- a/Tools/Sharpmake/macOS/Sharpmake.Application.dll.config +++ /dev/null @@ -1,590 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/Tools/Sharpmake/macOS/Sharpmake.Application.runtimeconfig.dev.json b/Tools/Sharpmake/macOS/Sharpmake.Application.runtimeconfig.dev.json deleted file mode 100644 index 9b64c28c..00000000 --- a/Tools/Sharpmake/macOS/Sharpmake.Application.runtimeconfig.dev.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "runtimeOptions": { - "additionalProbingPaths": [ - "/Users/mitchellandrews/.dotnet/store/|arch|/|tfm|", - "/Users/mitchellandrews/.nuget/packages" - ] - } -} \ No newline at end of file diff --git a/Tools/Sharpmake/macOS/Sharpmake.Application.runtimeconfig.json b/Tools/Sharpmake/macOS/Sharpmake.Application.runtimeconfig.json index 10e6f64b..85dceee0 100644 --- a/Tools/Sharpmake/macOS/Sharpmake.Application.runtimeconfig.json +++ b/Tools/Sharpmake/macOS/Sharpmake.Application.runtimeconfig.json @@ -1,12 +1,17 @@ { "runtimeOptions": { - "tfm": "net5.0", + "tfm": "net8.0", + "rollForward": "Major", "framework": { "name": "Microsoft.NETCore.App", - "version": "5.0.0" + "version": "8.0.0" }, "configProperties": { - "System.Globalization.Invariant": true + "System.GC.Server": true, + "System.Globalization.Invariant": true, + "System.Globalization.PredefinedCulturesOnly": true, + "System.Reflection.Metadata.MetadataUpdater.IsSupported": false, + "System.Runtime.Serialization.EnableUnsafeBinaryFormatterSerialization": false } } } \ No newline at end of file diff --git a/Tools/Sharpmake/macOS/Sharpmake.CommonPlatforms.deps.json b/Tools/Sharpmake/macOS/Sharpmake.CommonPlatforms.deps.json deleted file mode 100644 index ec50d36b..00000000 --- a/Tools/Sharpmake/macOS/Sharpmake.CommonPlatforms.deps.json +++ /dev/null @@ -1,316 +0,0 @@ -{ - "runtimeTarget": { - "name": ".NETCoreApp,Version=v5.0", - "signature": "" - }, - "compilationOptions": {}, - "targets": { - ".NETCoreApp,Version=v5.0": { - "Sharpmake.CommonPlatforms/1.0.0": { - "dependencies": { - "Sharpmake": "1.0.0", - "Sharpmake.Generators": "1.0.0" - }, - "runtime": { - "Sharpmake.CommonPlatforms.dll": {} - } - }, - "Basic.Reference.Assemblies.Net50/1.2.4": { - "dependencies": { - "Microsoft.CodeAnalysis.Common": "4.0.1" - }, - "runtime": { - "lib/netstandard2.0/Basic.Reference.Assemblies.Net50.dll": { - "assemblyVersion": "1.0.0.0", - "fileVersion": "1.0.0.0" - } - } - }, - "Microsoft.CodeAnalysis.Analyzers/3.3.2": {}, - "Microsoft.CodeAnalysis.Common/4.0.1": { - "dependencies": { - "Microsoft.CodeAnalysis.Analyzers": "3.3.2", - "System.Collections.Immutable": "5.0.0", - "System.Memory": "4.5.4", - "System.Reflection.Metadata": "5.0.0", - "System.Runtime.CompilerServices.Unsafe": "5.0.0", - "System.Text.Encoding.CodePages": "4.5.1", - "System.Threading.Tasks.Extensions": "4.5.4" - }, - "runtime": { - "lib/netcoreapp3.1/Microsoft.CodeAnalysis.dll": { - "assemblyVersion": "4.0.0.0", - "fileVersion": "4.0.121.55815" - } - }, - "resources": { - "lib/netcoreapp3.1/cs/Microsoft.CodeAnalysis.resources.dll": { - "locale": "cs" - }, - "lib/netcoreapp3.1/de/Microsoft.CodeAnalysis.resources.dll": { - "locale": "de" - }, - "lib/netcoreapp3.1/es/Microsoft.CodeAnalysis.resources.dll": { - "locale": "es" - }, - "lib/netcoreapp3.1/fr/Microsoft.CodeAnalysis.resources.dll": { - "locale": "fr" - }, - "lib/netcoreapp3.1/it/Microsoft.CodeAnalysis.resources.dll": { - "locale": "it" - }, - "lib/netcoreapp3.1/ja/Microsoft.CodeAnalysis.resources.dll": { - "locale": "ja" - }, - "lib/netcoreapp3.1/ko/Microsoft.CodeAnalysis.resources.dll": { - "locale": "ko" - }, - "lib/netcoreapp3.1/pl/Microsoft.CodeAnalysis.resources.dll": { - "locale": "pl" - }, - "lib/netcoreapp3.1/pt-BR/Microsoft.CodeAnalysis.resources.dll": { - "locale": "pt-BR" - }, - "lib/netcoreapp3.1/ru/Microsoft.CodeAnalysis.resources.dll": { - "locale": "ru" - }, - "lib/netcoreapp3.1/tr/Microsoft.CodeAnalysis.resources.dll": { - "locale": "tr" - }, - "lib/netcoreapp3.1/zh-Hans/Microsoft.CodeAnalysis.resources.dll": { - "locale": "zh-Hans" - }, - "lib/netcoreapp3.1/zh-Hant/Microsoft.CodeAnalysis.resources.dll": { - "locale": "zh-Hant" - } - } - }, - "Microsoft.CodeAnalysis.CSharp/4.0.1": { - "dependencies": { - "Microsoft.CodeAnalysis.Common": "4.0.1" - }, - "runtime": { - "lib/netcoreapp3.1/Microsoft.CodeAnalysis.CSharp.dll": { - "assemblyVersion": "4.0.0.0", - "fileVersion": "4.0.121.55815" - } - }, - "resources": { - "lib/netcoreapp3.1/cs/Microsoft.CodeAnalysis.CSharp.resources.dll": { - "locale": "cs" - }, - "lib/netcoreapp3.1/de/Microsoft.CodeAnalysis.CSharp.resources.dll": { - "locale": "de" - }, - "lib/netcoreapp3.1/es/Microsoft.CodeAnalysis.CSharp.resources.dll": { - "locale": "es" - }, - "lib/netcoreapp3.1/fr/Microsoft.CodeAnalysis.CSharp.resources.dll": { - "locale": "fr" - }, - "lib/netcoreapp3.1/it/Microsoft.CodeAnalysis.CSharp.resources.dll": { - "locale": "it" - }, - "lib/netcoreapp3.1/ja/Microsoft.CodeAnalysis.CSharp.resources.dll": { - "locale": "ja" - }, - "lib/netcoreapp3.1/ko/Microsoft.CodeAnalysis.CSharp.resources.dll": { - "locale": "ko" - }, - "lib/netcoreapp3.1/pl/Microsoft.CodeAnalysis.CSharp.resources.dll": { - "locale": "pl" - }, - "lib/netcoreapp3.1/pt-BR/Microsoft.CodeAnalysis.CSharp.resources.dll": { - "locale": "pt-BR" - }, - "lib/netcoreapp3.1/ru/Microsoft.CodeAnalysis.CSharp.resources.dll": { - "locale": "ru" - }, - "lib/netcoreapp3.1/tr/Microsoft.CodeAnalysis.CSharp.resources.dll": { - "locale": "tr" - }, - "lib/netcoreapp3.1/zh-Hans/Microsoft.CodeAnalysis.CSharp.resources.dll": { - "locale": "zh-Hans" - }, - "lib/netcoreapp3.1/zh-Hant/Microsoft.CodeAnalysis.CSharp.resources.dll": { - "locale": "zh-Hant" - } - } - }, - "Microsoft.NETCore.Platforms/5.0.0": {}, - "Microsoft.VisualStudio.Setup.Configuration.Interop/3.0.4492": { - "runtime": { - "lib/netstandard2.1/Microsoft.VisualStudio.Setup.Configuration.Interop.dll": { - "assemblyVersion": "1.0.0.0", - "fileVersion": "3.0.4492.23473" - } - } - }, - "Microsoft.Win32.Registry/5.0.0": { - "dependencies": { - "System.Security.AccessControl": "5.0.0", - "System.Security.Principal.Windows": "5.0.0" - } - }, - "System.Collections.Immutable/5.0.0": {}, - "System.Memory/4.5.4": {}, - "System.Reflection.Metadata/5.0.0": {}, - "System.Runtime.CompilerServices.Unsafe/5.0.0": {}, - "System.Security.AccessControl/5.0.0": { - "dependencies": { - "Microsoft.NETCore.Platforms": "5.0.0", - "System.Security.Principal.Windows": "5.0.0" - } - }, - "System.Security.Principal.Windows/5.0.0": {}, - "System.Text.Encoding.CodePages/4.5.1": { - "dependencies": { - "Microsoft.NETCore.Platforms": "5.0.0", - "System.Runtime.CompilerServices.Unsafe": "5.0.0" - } - }, - "System.Threading.Tasks.Extensions/4.5.4": {}, - "Sharpmake/1.0.0": { - "dependencies": { - "Basic.Reference.Assemblies.Net50": "1.2.4", - "Microsoft.CodeAnalysis.CSharp": "4.0.1", - "Microsoft.VisualStudio.Setup.Configuration.Interop": "3.0.4492", - "Microsoft.Win32.Registry": "5.0.0" - }, - "runtime": { - "Sharpmake.dll": {} - } - }, - "Sharpmake.Generators/1.0.0": { - "dependencies": { - "Sharpmake": "1.0.0" - }, - "runtime": { - "Sharpmake.Generators.dll": {} - } - } - } - }, - "libraries": { - "Sharpmake.CommonPlatforms/1.0.0": { - "type": "project", - "serviceable": false, - "sha512": "" - }, - "Basic.Reference.Assemblies.Net50/1.2.4": { - "type": "package", - "serviceable": true, - "sha512": "sha512-dkLNEHjI1vkoE86PrsXfErPFkp5x3ycRO25NwDBcTmd/k354Il3eTqfarbseXKb4cRomPgjDfZwI6FMBWWEuxw==", - "path": "basic.reference.assemblies.net50/1.2.4", - "hashPath": "basic.reference.assemblies.net50.1.2.4.nupkg.sha512" - }, - "Microsoft.CodeAnalysis.Analyzers/3.3.2": { - "type": "package", - "serviceable": true, - "sha512": "sha512-7xt6zTlIEizUgEsYAIgm37EbdkiMmr6fP6J9pDoKEpiGM4pi32BCPGr/IczmSJI9Zzp0a6HOzpr9OvpMP+2veA==", - "path": "microsoft.codeanalysis.analyzers/3.3.2", - "hashPath": "microsoft.codeanalysis.analyzers.3.3.2.nupkg.sha512" - }, - "Microsoft.CodeAnalysis.Common/4.0.1": { - "type": "package", - "serviceable": true, - "sha512": "sha512-SMREwaVD5SzatlWhh9aahQAtSWdb63NcE//f+bQzgHSECU6xtDtaxk0kwV+asdFfr6HtW38UeO6jvqdfzudg3w==", - "path": "microsoft.codeanalysis.common/4.0.1", - "hashPath": "microsoft.codeanalysis.common.4.0.1.nupkg.sha512" - }, - "Microsoft.CodeAnalysis.CSharp/4.0.1": { - "type": "package", - "serviceable": true, - "sha512": "sha512-Q9RxxydPpUElj/x1/qykDTUGsRoKbJG8H5XUSeMGmMu54fBiuX1xyanom9caa1oQfh5JIW1BgLxobSaWs4WyHQ==", - "path": "microsoft.codeanalysis.csharp/4.0.1", - "hashPath": "microsoft.codeanalysis.csharp.4.0.1.nupkg.sha512" - }, - "Microsoft.NETCore.Platforms/5.0.0": { - "type": "package", - "serviceable": true, - "sha512": "sha512-VyPlqzH2wavqquTcYpkIIAQ6WdenuKoFN0BdYBbCWsclXacSOHNQn66Gt4z5NBqEYW0FAPm5rlvki9ZiCij5xQ==", - "path": "microsoft.netcore.platforms/5.0.0", - "hashPath": "microsoft.netcore.platforms.5.0.0.nupkg.sha512" - }, - "Microsoft.VisualStudio.Setup.Configuration.Interop/3.0.4492": { - "type": "package", - "serviceable": true, - "sha512": "sha512-BfkqM96P8+N+cz4T+pxKrIKk2ZD1YMxCXH2ivtBDj5tx6Mc2YQLK1+3h+C6Qebper0RBipuHVn51lb9SZH6bKQ==", - "path": "microsoft.visualstudio.setup.configuration.interop/3.0.4492", - "hashPath": "microsoft.visualstudio.setup.configuration.interop.3.0.4492.nupkg.sha512" - }, - "Microsoft.Win32.Registry/5.0.0": { - "type": "package", - "serviceable": true, - "sha512": "sha512-dDoKi0PnDz31yAyETfRntsLArTlVAVzUzCIvvEDsDsucrl33Dl8pIJG06ePTJTI3tGpeyHS9Cq7Foc/s4EeKcg==", - "path": "microsoft.win32.registry/5.0.0", - "hashPath": "microsoft.win32.registry.5.0.0.nupkg.sha512" - }, - "System.Collections.Immutable/5.0.0": { - "type": "package", - "serviceable": true, - "sha512": "sha512-FXkLXiK0sVVewcso0imKQoOxjoPAj42R8HtjjbSjVPAzwDfzoyoznWxgA3c38LDbN9SJux1xXoXYAhz98j7r2g==", - "path": "system.collections.immutable/5.0.0", - "hashPath": "system.collections.immutable.5.0.0.nupkg.sha512" - }, - "System.Memory/4.5.4": { - "type": "package", - "serviceable": true, - "sha512": "sha512-1MbJTHS1lZ4bS4FmsJjnuGJOu88ZzTT2rLvrhW7Ygic+pC0NWA+3hgAen0HRdsocuQXCkUTdFn9yHJJhsijDXw==", - "path": "system.memory/4.5.4", - "hashPath": "system.memory.4.5.4.nupkg.sha512" - }, - "System.Reflection.Metadata/5.0.0": { - "type": "package", - "serviceable": true, - "sha512": "sha512-5NecZgXktdGg34rh1OenY1rFNDCI8xSjFr+Z4OU4cU06AQHUdRnIIEeWENu3Wl4YowbzkymAIMvi3WyK9U53pQ==", - "path": "system.reflection.metadata/5.0.0", - "hashPath": "system.reflection.metadata.5.0.0.nupkg.sha512" - }, - "System.Runtime.CompilerServices.Unsafe/5.0.0": { - "type": "package", - "serviceable": true, - "sha512": "sha512-ZD9TMpsmYJLrxbbmdvhwt9YEgG5WntEnZ/d1eH8JBX9LBp+Ju8BSBhUGbZMNVHHomWo2KVImJhTDl2hIgw/6MA==", - "path": "system.runtime.compilerservices.unsafe/5.0.0", - "hashPath": "system.runtime.compilerservices.unsafe.5.0.0.nupkg.sha512" - }, - "System.Security.AccessControl/5.0.0": { - "type": "package", - "serviceable": true, - "sha512": "sha512-dagJ1mHZO3Ani8GH0PHpPEe/oYO+rVdbQjvjJkBRNQkX4t0r1iaeGn8+/ybkSLEan3/slM0t59SVdHzuHf2jmw==", - "path": "system.security.accesscontrol/5.0.0", - "hashPath": "system.security.accesscontrol.5.0.0.nupkg.sha512" - }, - "System.Security.Principal.Windows/5.0.0": { - "type": "package", - "serviceable": true, - "sha512": "sha512-t0MGLukB5WAVU9bO3MGzvlGnyJPgUlcwerXn1kzBRjwLKixT96XV0Uza41W49gVd8zEMFu9vQEFlv0IOrytICA==", - "path": "system.security.principal.windows/5.0.0", - "hashPath": "system.security.principal.windows.5.0.0.nupkg.sha512" - }, - "System.Text.Encoding.CodePages/4.5.1": { - "type": "package", - "serviceable": true, - "sha512": "sha512-4J2JQXbftjPMppIHJ7IC+VXQ9XfEagN92vZZNoG12i+zReYlim5dMoXFC1Zzg7tsnKDM7JPo5bYfFK4Jheq44w==", - "path": "system.text.encoding.codepages/4.5.1", - "hashPath": "system.text.encoding.codepages.4.5.1.nupkg.sha512" - }, - "System.Threading.Tasks.Extensions/4.5.4": { - "type": "package", - "serviceable": true, - "sha512": "sha512-zteT+G8xuGu6mS+mzDzYXbzS7rd3K6Fjb9RiZlYlJPam2/hU7JCBZBVEcywNuR+oZ1ncTvc/cq0faRr3P01OVg==", - "path": "system.threading.tasks.extensions/4.5.4", - "hashPath": "system.threading.tasks.extensions.4.5.4.nupkg.sha512" - }, - "Sharpmake/1.0.0": { - "type": "project", - "serviceable": false, - "sha512": "" - }, - "Sharpmake.Generators/1.0.0": { - "type": "project", - "serviceable": false, - "sha512": "" - } - } -} \ No newline at end of file diff --git a/Tools/Sharpmake/macOS/Sharpmake.CommonPlatforms.dll b/Tools/Sharpmake/macOS/Sharpmake.CommonPlatforms.dll index 4bc92dd1..64e210d0 100644 Binary files a/Tools/Sharpmake/macOS/Sharpmake.CommonPlatforms.dll and b/Tools/Sharpmake/macOS/Sharpmake.CommonPlatforms.dll differ diff --git a/Tools/Sharpmake/macOS/Sharpmake.CommonPlatforms.xml b/Tools/Sharpmake/macOS/Sharpmake.CommonPlatforms.xml deleted file mode 100644 index a3235acb..00000000 --- a/Tools/Sharpmake/macOS/Sharpmake.CommonPlatforms.xml +++ /dev/null @@ -1,41 +0,0 @@ - - - - Sharpmake.CommonPlatforms - - - - - Android SDK path - - - - - Android NDK path - - - - - Java SE Development Kit path - - - - - Apache Ant path - - - - - Allows setting a custom provider for system paths - - - - - Generates position-independent code, suitable for shared libraries. - - - The corresponding clang flags is -fPIC. - - - - diff --git a/Tools/Sharpmake/macOS/Sharpmake.Generators.deps.json b/Tools/Sharpmake/macOS/Sharpmake.Generators.deps.json deleted file mode 100644 index c9bf9249..00000000 --- a/Tools/Sharpmake/macOS/Sharpmake.Generators.deps.json +++ /dev/null @@ -1,302 +0,0 @@ -{ - "runtimeTarget": { - "name": ".NETCoreApp,Version=v5.0", - "signature": "" - }, - "compilationOptions": {}, - "targets": { - ".NETCoreApp,Version=v5.0": { - "Sharpmake.Generators/1.0.0": { - "dependencies": { - "Sharpmake": "1.0.0" - }, - "runtime": { - "Sharpmake.Generators.dll": {} - } - }, - "Basic.Reference.Assemblies.Net50/1.2.4": { - "dependencies": { - "Microsoft.CodeAnalysis.Common": "4.0.1" - }, - "runtime": { - "lib/netstandard2.0/Basic.Reference.Assemblies.Net50.dll": { - "assemblyVersion": "1.0.0.0", - "fileVersion": "1.0.0.0" - } - } - }, - "Microsoft.CodeAnalysis.Analyzers/3.3.2": {}, - "Microsoft.CodeAnalysis.Common/4.0.1": { - "dependencies": { - "Microsoft.CodeAnalysis.Analyzers": "3.3.2", - "System.Collections.Immutable": "5.0.0", - "System.Memory": "4.5.4", - "System.Reflection.Metadata": "5.0.0", - "System.Runtime.CompilerServices.Unsafe": "5.0.0", - "System.Text.Encoding.CodePages": "4.5.1", - "System.Threading.Tasks.Extensions": "4.5.4" - }, - "runtime": { - "lib/netcoreapp3.1/Microsoft.CodeAnalysis.dll": { - "assemblyVersion": "4.0.0.0", - "fileVersion": "4.0.121.55815" - } - }, - "resources": { - "lib/netcoreapp3.1/cs/Microsoft.CodeAnalysis.resources.dll": { - "locale": "cs" - }, - "lib/netcoreapp3.1/de/Microsoft.CodeAnalysis.resources.dll": { - "locale": "de" - }, - "lib/netcoreapp3.1/es/Microsoft.CodeAnalysis.resources.dll": { - "locale": "es" - }, - "lib/netcoreapp3.1/fr/Microsoft.CodeAnalysis.resources.dll": { - "locale": "fr" - }, - "lib/netcoreapp3.1/it/Microsoft.CodeAnalysis.resources.dll": { - "locale": "it" - }, - "lib/netcoreapp3.1/ja/Microsoft.CodeAnalysis.resources.dll": { - "locale": "ja" - }, - "lib/netcoreapp3.1/ko/Microsoft.CodeAnalysis.resources.dll": { - "locale": "ko" - }, - "lib/netcoreapp3.1/pl/Microsoft.CodeAnalysis.resources.dll": { - "locale": "pl" - }, - "lib/netcoreapp3.1/pt-BR/Microsoft.CodeAnalysis.resources.dll": { - "locale": "pt-BR" - }, - "lib/netcoreapp3.1/ru/Microsoft.CodeAnalysis.resources.dll": { - "locale": "ru" - }, - "lib/netcoreapp3.1/tr/Microsoft.CodeAnalysis.resources.dll": { - "locale": "tr" - }, - "lib/netcoreapp3.1/zh-Hans/Microsoft.CodeAnalysis.resources.dll": { - "locale": "zh-Hans" - }, - "lib/netcoreapp3.1/zh-Hant/Microsoft.CodeAnalysis.resources.dll": { - "locale": "zh-Hant" - } - } - }, - "Microsoft.CodeAnalysis.CSharp/4.0.1": { - "dependencies": { - "Microsoft.CodeAnalysis.Common": "4.0.1" - }, - "runtime": { - "lib/netcoreapp3.1/Microsoft.CodeAnalysis.CSharp.dll": { - "assemblyVersion": "4.0.0.0", - "fileVersion": "4.0.121.55815" - } - }, - "resources": { - "lib/netcoreapp3.1/cs/Microsoft.CodeAnalysis.CSharp.resources.dll": { - "locale": "cs" - }, - "lib/netcoreapp3.1/de/Microsoft.CodeAnalysis.CSharp.resources.dll": { - "locale": "de" - }, - "lib/netcoreapp3.1/es/Microsoft.CodeAnalysis.CSharp.resources.dll": { - "locale": "es" - }, - "lib/netcoreapp3.1/fr/Microsoft.CodeAnalysis.CSharp.resources.dll": { - "locale": "fr" - }, - "lib/netcoreapp3.1/it/Microsoft.CodeAnalysis.CSharp.resources.dll": { - "locale": "it" - }, - "lib/netcoreapp3.1/ja/Microsoft.CodeAnalysis.CSharp.resources.dll": { - "locale": "ja" - }, - "lib/netcoreapp3.1/ko/Microsoft.CodeAnalysis.CSharp.resources.dll": { - "locale": "ko" - }, - "lib/netcoreapp3.1/pl/Microsoft.CodeAnalysis.CSharp.resources.dll": { - "locale": "pl" - }, - "lib/netcoreapp3.1/pt-BR/Microsoft.CodeAnalysis.CSharp.resources.dll": { - "locale": "pt-BR" - }, - "lib/netcoreapp3.1/ru/Microsoft.CodeAnalysis.CSharp.resources.dll": { - "locale": "ru" - }, - "lib/netcoreapp3.1/tr/Microsoft.CodeAnalysis.CSharp.resources.dll": { - "locale": "tr" - }, - "lib/netcoreapp3.1/zh-Hans/Microsoft.CodeAnalysis.CSharp.resources.dll": { - "locale": "zh-Hans" - }, - "lib/netcoreapp3.1/zh-Hant/Microsoft.CodeAnalysis.CSharp.resources.dll": { - "locale": "zh-Hant" - } - } - }, - "Microsoft.NETCore.Platforms/5.0.0": {}, - "Microsoft.VisualStudio.Setup.Configuration.Interop/3.0.4492": { - "runtime": { - "lib/netstandard2.1/Microsoft.VisualStudio.Setup.Configuration.Interop.dll": { - "assemblyVersion": "1.0.0.0", - "fileVersion": "3.0.4492.23473" - } - } - }, - "Microsoft.Win32.Registry/5.0.0": { - "dependencies": { - "System.Security.AccessControl": "5.0.0", - "System.Security.Principal.Windows": "5.0.0" - } - }, - "System.Collections.Immutable/5.0.0": {}, - "System.Memory/4.5.4": {}, - "System.Reflection.Metadata/5.0.0": {}, - "System.Runtime.CompilerServices.Unsafe/5.0.0": {}, - "System.Security.AccessControl/5.0.0": { - "dependencies": { - "Microsoft.NETCore.Platforms": "5.0.0", - "System.Security.Principal.Windows": "5.0.0" - } - }, - "System.Security.Principal.Windows/5.0.0": {}, - "System.Text.Encoding.CodePages/4.5.1": { - "dependencies": { - "Microsoft.NETCore.Platforms": "5.0.0", - "System.Runtime.CompilerServices.Unsafe": "5.0.0" - } - }, - "System.Threading.Tasks.Extensions/4.5.4": {}, - "Sharpmake/1.0.0": { - "dependencies": { - "Basic.Reference.Assemblies.Net50": "1.2.4", - "Microsoft.CodeAnalysis.CSharp": "4.0.1", - "Microsoft.VisualStudio.Setup.Configuration.Interop": "3.0.4492", - "Microsoft.Win32.Registry": "5.0.0" - }, - "runtime": { - "Sharpmake.dll": {} - } - } - } - }, - "libraries": { - "Sharpmake.Generators/1.0.0": { - "type": "project", - "serviceable": false, - "sha512": "" - }, - "Basic.Reference.Assemblies.Net50/1.2.4": { - "type": "package", - "serviceable": true, - "sha512": "sha512-dkLNEHjI1vkoE86PrsXfErPFkp5x3ycRO25NwDBcTmd/k354Il3eTqfarbseXKb4cRomPgjDfZwI6FMBWWEuxw==", - "path": "basic.reference.assemblies.net50/1.2.4", - "hashPath": "basic.reference.assemblies.net50.1.2.4.nupkg.sha512" - }, - "Microsoft.CodeAnalysis.Analyzers/3.3.2": { - "type": "package", - "serviceable": true, - "sha512": "sha512-7xt6zTlIEizUgEsYAIgm37EbdkiMmr6fP6J9pDoKEpiGM4pi32BCPGr/IczmSJI9Zzp0a6HOzpr9OvpMP+2veA==", - "path": "microsoft.codeanalysis.analyzers/3.3.2", - "hashPath": "microsoft.codeanalysis.analyzers.3.3.2.nupkg.sha512" - }, - "Microsoft.CodeAnalysis.Common/4.0.1": { - "type": "package", - "serviceable": true, - "sha512": "sha512-SMREwaVD5SzatlWhh9aahQAtSWdb63NcE//f+bQzgHSECU6xtDtaxk0kwV+asdFfr6HtW38UeO6jvqdfzudg3w==", - "path": "microsoft.codeanalysis.common/4.0.1", - "hashPath": "microsoft.codeanalysis.common.4.0.1.nupkg.sha512" - }, - "Microsoft.CodeAnalysis.CSharp/4.0.1": { - "type": "package", - "serviceable": true, - "sha512": "sha512-Q9RxxydPpUElj/x1/qykDTUGsRoKbJG8H5XUSeMGmMu54fBiuX1xyanom9caa1oQfh5JIW1BgLxobSaWs4WyHQ==", - "path": "microsoft.codeanalysis.csharp/4.0.1", - "hashPath": "microsoft.codeanalysis.csharp.4.0.1.nupkg.sha512" - }, - "Microsoft.NETCore.Platforms/5.0.0": { - "type": "package", - "serviceable": true, - "sha512": "sha512-VyPlqzH2wavqquTcYpkIIAQ6WdenuKoFN0BdYBbCWsclXacSOHNQn66Gt4z5NBqEYW0FAPm5rlvki9ZiCij5xQ==", - "path": "microsoft.netcore.platforms/5.0.0", - "hashPath": "microsoft.netcore.platforms.5.0.0.nupkg.sha512" - }, - "Microsoft.VisualStudio.Setup.Configuration.Interop/3.0.4492": { - "type": "package", - "serviceable": true, - "sha512": "sha512-BfkqM96P8+N+cz4T+pxKrIKk2ZD1YMxCXH2ivtBDj5tx6Mc2YQLK1+3h+C6Qebper0RBipuHVn51lb9SZH6bKQ==", - "path": "microsoft.visualstudio.setup.configuration.interop/3.0.4492", - "hashPath": "microsoft.visualstudio.setup.configuration.interop.3.0.4492.nupkg.sha512" - }, - "Microsoft.Win32.Registry/5.0.0": { - "type": "package", - "serviceable": true, - "sha512": "sha512-dDoKi0PnDz31yAyETfRntsLArTlVAVzUzCIvvEDsDsucrl33Dl8pIJG06ePTJTI3tGpeyHS9Cq7Foc/s4EeKcg==", - "path": "microsoft.win32.registry/5.0.0", - "hashPath": "microsoft.win32.registry.5.0.0.nupkg.sha512" - }, - "System.Collections.Immutable/5.0.0": { - "type": "package", - "serviceable": true, - "sha512": "sha512-FXkLXiK0sVVewcso0imKQoOxjoPAj42R8HtjjbSjVPAzwDfzoyoznWxgA3c38LDbN9SJux1xXoXYAhz98j7r2g==", - "path": "system.collections.immutable/5.0.0", - "hashPath": "system.collections.immutable.5.0.0.nupkg.sha512" - }, - "System.Memory/4.5.4": { - "type": "package", - "serviceable": true, - "sha512": "sha512-1MbJTHS1lZ4bS4FmsJjnuGJOu88ZzTT2rLvrhW7Ygic+pC0NWA+3hgAen0HRdsocuQXCkUTdFn9yHJJhsijDXw==", - "path": "system.memory/4.5.4", - "hashPath": "system.memory.4.5.4.nupkg.sha512" - }, - "System.Reflection.Metadata/5.0.0": { - "type": "package", - "serviceable": true, - "sha512": "sha512-5NecZgXktdGg34rh1OenY1rFNDCI8xSjFr+Z4OU4cU06AQHUdRnIIEeWENu3Wl4YowbzkymAIMvi3WyK9U53pQ==", - "path": "system.reflection.metadata/5.0.0", - "hashPath": "system.reflection.metadata.5.0.0.nupkg.sha512" - }, - "System.Runtime.CompilerServices.Unsafe/5.0.0": { - "type": "package", - "serviceable": true, - "sha512": "sha512-ZD9TMpsmYJLrxbbmdvhwt9YEgG5WntEnZ/d1eH8JBX9LBp+Ju8BSBhUGbZMNVHHomWo2KVImJhTDl2hIgw/6MA==", - "path": "system.runtime.compilerservices.unsafe/5.0.0", - "hashPath": "system.runtime.compilerservices.unsafe.5.0.0.nupkg.sha512" - }, - "System.Security.AccessControl/5.0.0": { - "type": "package", - "serviceable": true, - "sha512": "sha512-dagJ1mHZO3Ani8GH0PHpPEe/oYO+rVdbQjvjJkBRNQkX4t0r1iaeGn8+/ybkSLEan3/slM0t59SVdHzuHf2jmw==", - "path": "system.security.accesscontrol/5.0.0", - "hashPath": "system.security.accesscontrol.5.0.0.nupkg.sha512" - }, - "System.Security.Principal.Windows/5.0.0": { - "type": "package", - "serviceable": true, - "sha512": "sha512-t0MGLukB5WAVU9bO3MGzvlGnyJPgUlcwerXn1kzBRjwLKixT96XV0Uza41W49gVd8zEMFu9vQEFlv0IOrytICA==", - "path": "system.security.principal.windows/5.0.0", - "hashPath": "system.security.principal.windows.5.0.0.nupkg.sha512" - }, - "System.Text.Encoding.CodePages/4.5.1": { - "type": "package", - "serviceable": true, - "sha512": "sha512-4J2JQXbftjPMppIHJ7IC+VXQ9XfEagN92vZZNoG12i+zReYlim5dMoXFC1Zzg7tsnKDM7JPo5bYfFK4Jheq44w==", - "path": "system.text.encoding.codepages/4.5.1", - "hashPath": "system.text.encoding.codepages.4.5.1.nupkg.sha512" - }, - "System.Threading.Tasks.Extensions/4.5.4": { - "type": "package", - "serviceable": true, - "sha512": "sha512-zteT+G8xuGu6mS+mzDzYXbzS7rd3K6Fjb9RiZlYlJPam2/hU7JCBZBVEcywNuR+oZ1ncTvc/cq0faRr3P01OVg==", - "path": "system.threading.tasks.extensions/4.5.4", - "hashPath": "system.threading.tasks.extensions.4.5.4.nupkg.sha512" - }, - "Sharpmake/1.0.0": { - "type": "project", - "serviceable": false, - "sha512": "" - } - } -} \ No newline at end of file diff --git a/Tools/Sharpmake/macOS/Sharpmake.Generators.dll b/Tools/Sharpmake/macOS/Sharpmake.Generators.dll index 9b5ed51f..9cca5391 100644 Binary files a/Tools/Sharpmake/macOS/Sharpmake.Generators.dll and b/Tools/Sharpmake/macOS/Sharpmake.Generators.dll differ diff --git a/Tools/Sharpmake/macOS/Sharpmake.Generators.xml b/Tools/Sharpmake/macOS/Sharpmake.Generators.xml deleted file mode 100644 index ead72585..00000000 --- a/Tools/Sharpmake/macOS/Sharpmake.Generators.xml +++ /dev/null @@ -1,358 +0,0 @@ - - - - Sharpmake.Generators - - - - - Find the latest usable kit root - - - - - - - Method that allows to determine for a specified dependency if it's a library or an object list. if a dep is within - the list, the second condition check if objects is present which means that the current dependency is considered to be - a force objectlist. - - all the dependencies of a specific project configuration - additional dependency clear of additional suffix - return boolean value of presence of a dep within the containing dependencies list - - - - Format list options. Can combine many of them. - - - - - No formatting option - - - - - Quote Items ? - - - - - Use single element short format ? - - - - - Use Comma between each element ? - - - - - Build a list of string in the format of BFF array, on multiple lines if needed, indenting using spaceLength spaces. - - The list of values to put in the BFF array. - The indentation size, in spaces, in case multiple lines are generated. - output options - The formatted string, or if the list is empty. - - - - Augments the interface to provide services for platforms that - are based on Clang. - - - - - Augments the interface to provide services for Microsoft's - proprietary platforms. - - - - - Interface that exposes the required methods and properties to generate a .bff file for - FastBuild using Sharpmake. - - - - - Gets the main `#define` symbol for that platform in the BFF file. - - - Note that this is *NOT* the C or C++ define symbol. The BFF scripts support the - `#define` instruction, and this property returns a symbol that tells the scripts - whether we're dealing with a given platform. - - - - - Gets a configuration name for that platform in the .bff file for the code files that - are written in native C code. - - - - - Gets a configuration name for that platform in the .bff file for the code files that - are written in native C++ code. - - - - - Setups extra linker settings for linking with that platform. - - A for writing the file. - The project configuration - The file name of the build output. - - - - Get the extra list of build steps to execute for this platform. - - The project configuration - The file name of the build output. - The list of post build step to execute. - - - - Get the linker output name for this platform. - - The project output type - The original file name of the build output. - The final file name of the build output. - - - - Utilities for file generation. - - - - - A string that, when put on a line of a file during generation, will cause the line to - be removed from the generated files. - - - - - Compile command format. - - Command: Compilation command specified as a shell command - - Arguments: Compilation command specified as a list of arguments - - - - - - - - - - Validate that all solution configurations meet the requirements of the generator. - - The solution contains an invalid configuration. - - - - Validate that all project configurations meet the requirements of the generator. - - The project contains an invalid configuration. - - - - Interface that exposes facilities for generating text-based files. - - - - - Gets the instance that the generator uses to resolve - the symbols between square brackets `[...]` when and - are called. - - - - - Writes text to the file being generated, resolving the symbols between square brackets - `[...]` along the way. - - The text to write into the file. - - - - Writes text to the file being generated, resolving the symbols between square brackets - `[...]` along and way. Uses a default value when the resolve process fails. - - The text to write into the file. - A to use when the resolve fails - - - - Writes a line of text to the file being generated, resolving the symbols between square - brackets `[...]` along the way. - - The line of text to write into the file. - - - - Writes a line of text to the file being generated, resolving the symbols between square - brackets `[...]` along the way. Uses a default value when the resolve process fails. - - - - - - - Writes text to the file being generated as-is, without resolving anything. - - The text to write into the file. - - - - Writes a line of text to the file being generated as-is, without resolving anything. - - The text to write into the file. - - - - Declares one or several variables to be replaced while resolving. - - An array of instances that designate the variables to replace when resolving. - An object that implements and will automatically undefine the variable when it's method is invoked. - is null. - - - - Resolves environment variables in the generated file. - - The platform whose is going to be used by the implementation. - An array of containing the variables to resolve. - is null. - - - - Provides extension methods for . - - - - - Declares one or several variables to be replaced while resolving. - - The instance to use. - The symbol's identifier name. - The value of the symbol when resolving. - An object that implements and will automatically undefine the variable when it's method is invoked. - or is null. - - - - Add the template file and the generated file to the project - when requested by addGeneratedFile. - .cs, .xaml and other are threated as different items. - - - - - Generate a launchSettings.json in a Properties subfolder of the csproj from the conf.CsprojUserFile - - The builder to use - The project the conf belong to - The path of the csproj - The list of configurations to lookup for CsprojUserFile - Files written by the method - Files already up-to-date and skipped - The full path of the launchSettings.json - - - - Get the formatting properties of the json - - - - - Represents the json root node - - - - - The list of profiles, the key is the profile name - - - - - Represents an individual profile in the json - - - - - Identifies the debug target to run. - - - Mandatory argument. - - - - - The arguments to pass to the target being run. - - - - - An absolute or relative path to the executable. - - - - - Sets the working directory of the command. - - - - - Set to true to enable native code debugging. - - - Default: false - - - - - Convert a CsprojUserFileSettings.StartActionSetting to a Profile.Command - - The setting to convert - The converted setting - Some values are not supported, so we'll throw if that's the case - - - - Helper method to convert the value of a string from CsprojUserFileSettings to the expected format of Profile - - The value read from CsprojUserFileSettings - The converted value, or null if it was unset or empty - - - - Converts a CsprojUserFileSettings to a Profile - - The CsprojUserFileSettings to convert - The converted Profile - Throws in case an unsupported setting is passed - - - - Construct the list of profiles from the conf.CsprojUserFile from all configurations - - The project that the configurations belong to - The list of configurations to lookup - Will be set to true if the file is allowed to be overwritten - The list of profiles - - - - See : https://github.com/NuGet/Home/wiki/%5BSpec%5D-Managing-dependency-package-assets#suppress-parent - - - - - Base class for generating VS user files. - - - Path to the project file. The suffix ".user" will be appended to the file name. - - - - diff --git a/Tools/Sharpmake/macOS/Sharpmake.deps.json b/Tools/Sharpmake/macOS/Sharpmake.deps.json deleted file mode 100644 index 37f5bec0..00000000 --- a/Tools/Sharpmake/macOS/Sharpmake.deps.json +++ /dev/null @@ -1,289 +0,0 @@ -{ - "runtimeTarget": { - "name": ".NETCoreApp,Version=v5.0", - "signature": "" - }, - "compilationOptions": {}, - "targets": { - ".NETCoreApp,Version=v5.0": { - "Sharpmake/1.0.0": { - "dependencies": { - "Basic.Reference.Assemblies.Net50": "1.2.4", - "Microsoft.CodeAnalysis.CSharp": "4.0.1", - "Microsoft.VisualStudio.Setup.Configuration.Interop": "3.0.4492", - "Microsoft.Win32.Registry": "5.0.0" - }, - "runtime": { - "Sharpmake.dll": {} - } - }, - "Basic.Reference.Assemblies.Net50/1.2.4": { - "dependencies": { - "Microsoft.CodeAnalysis.Common": "4.0.1" - }, - "runtime": { - "lib/netstandard2.0/Basic.Reference.Assemblies.Net50.dll": { - "assemblyVersion": "1.0.0.0", - "fileVersion": "1.0.0.0" - } - } - }, - "Microsoft.CodeAnalysis.Analyzers/3.3.2": {}, - "Microsoft.CodeAnalysis.Common/4.0.1": { - "dependencies": { - "Microsoft.CodeAnalysis.Analyzers": "3.3.2", - "System.Collections.Immutable": "5.0.0", - "System.Memory": "4.5.4", - "System.Reflection.Metadata": "5.0.0", - "System.Runtime.CompilerServices.Unsafe": "5.0.0", - "System.Text.Encoding.CodePages": "4.5.1", - "System.Threading.Tasks.Extensions": "4.5.4" - }, - "runtime": { - "lib/netcoreapp3.1/Microsoft.CodeAnalysis.dll": { - "assemblyVersion": "4.0.0.0", - "fileVersion": "4.0.121.55815" - } - }, - "resources": { - "lib/netcoreapp3.1/cs/Microsoft.CodeAnalysis.resources.dll": { - "locale": "cs" - }, - "lib/netcoreapp3.1/de/Microsoft.CodeAnalysis.resources.dll": { - "locale": "de" - }, - "lib/netcoreapp3.1/es/Microsoft.CodeAnalysis.resources.dll": { - "locale": "es" - }, - "lib/netcoreapp3.1/fr/Microsoft.CodeAnalysis.resources.dll": { - "locale": "fr" - }, - "lib/netcoreapp3.1/it/Microsoft.CodeAnalysis.resources.dll": { - "locale": "it" - }, - "lib/netcoreapp3.1/ja/Microsoft.CodeAnalysis.resources.dll": { - "locale": "ja" - }, - "lib/netcoreapp3.1/ko/Microsoft.CodeAnalysis.resources.dll": { - "locale": "ko" - }, - "lib/netcoreapp3.1/pl/Microsoft.CodeAnalysis.resources.dll": { - "locale": "pl" - }, - "lib/netcoreapp3.1/pt-BR/Microsoft.CodeAnalysis.resources.dll": { - "locale": "pt-BR" - }, - "lib/netcoreapp3.1/ru/Microsoft.CodeAnalysis.resources.dll": { - "locale": "ru" - }, - "lib/netcoreapp3.1/tr/Microsoft.CodeAnalysis.resources.dll": { - "locale": "tr" - }, - "lib/netcoreapp3.1/zh-Hans/Microsoft.CodeAnalysis.resources.dll": { - "locale": "zh-Hans" - }, - "lib/netcoreapp3.1/zh-Hant/Microsoft.CodeAnalysis.resources.dll": { - "locale": "zh-Hant" - } - } - }, - "Microsoft.CodeAnalysis.CSharp/4.0.1": { - "dependencies": { - "Microsoft.CodeAnalysis.Common": "4.0.1" - }, - "runtime": { - "lib/netcoreapp3.1/Microsoft.CodeAnalysis.CSharp.dll": { - "assemblyVersion": "4.0.0.0", - "fileVersion": "4.0.121.55815" - } - }, - "resources": { - "lib/netcoreapp3.1/cs/Microsoft.CodeAnalysis.CSharp.resources.dll": { - "locale": "cs" - }, - "lib/netcoreapp3.1/de/Microsoft.CodeAnalysis.CSharp.resources.dll": { - "locale": "de" - }, - "lib/netcoreapp3.1/es/Microsoft.CodeAnalysis.CSharp.resources.dll": { - "locale": "es" - }, - "lib/netcoreapp3.1/fr/Microsoft.CodeAnalysis.CSharp.resources.dll": { - "locale": "fr" - }, - "lib/netcoreapp3.1/it/Microsoft.CodeAnalysis.CSharp.resources.dll": { - "locale": "it" - }, - "lib/netcoreapp3.1/ja/Microsoft.CodeAnalysis.CSharp.resources.dll": { - "locale": "ja" - }, - "lib/netcoreapp3.1/ko/Microsoft.CodeAnalysis.CSharp.resources.dll": { - "locale": "ko" - }, - "lib/netcoreapp3.1/pl/Microsoft.CodeAnalysis.CSharp.resources.dll": { - "locale": "pl" - }, - "lib/netcoreapp3.1/pt-BR/Microsoft.CodeAnalysis.CSharp.resources.dll": { - "locale": "pt-BR" - }, - "lib/netcoreapp3.1/ru/Microsoft.CodeAnalysis.CSharp.resources.dll": { - "locale": "ru" - }, - "lib/netcoreapp3.1/tr/Microsoft.CodeAnalysis.CSharp.resources.dll": { - "locale": "tr" - }, - "lib/netcoreapp3.1/zh-Hans/Microsoft.CodeAnalysis.CSharp.resources.dll": { - "locale": "zh-Hans" - }, - "lib/netcoreapp3.1/zh-Hant/Microsoft.CodeAnalysis.CSharp.resources.dll": { - "locale": "zh-Hant" - } - } - }, - "Microsoft.NETCore.Platforms/5.0.0": {}, - "Microsoft.VisualStudio.Setup.Configuration.Interop/3.0.4492": { - "runtime": { - "lib/netstandard2.1/Microsoft.VisualStudio.Setup.Configuration.Interop.dll": { - "assemblyVersion": "1.0.0.0", - "fileVersion": "3.0.4492.23473" - } - } - }, - "Microsoft.Win32.Registry/5.0.0": { - "dependencies": { - "System.Security.AccessControl": "5.0.0", - "System.Security.Principal.Windows": "5.0.0" - } - }, - "System.Collections.Immutable/5.0.0": {}, - "System.Memory/4.5.4": {}, - "System.Reflection.Metadata/5.0.0": {}, - "System.Runtime.CompilerServices.Unsafe/5.0.0": {}, - "System.Security.AccessControl/5.0.0": { - "dependencies": { - "Microsoft.NETCore.Platforms": "5.0.0", - "System.Security.Principal.Windows": "5.0.0" - } - }, - "System.Security.Principal.Windows/5.0.0": {}, - "System.Text.Encoding.CodePages/4.5.1": { - "dependencies": { - "Microsoft.NETCore.Platforms": "5.0.0", - "System.Runtime.CompilerServices.Unsafe": "5.0.0" - } - }, - "System.Threading.Tasks.Extensions/4.5.4": {} - } - }, - "libraries": { - "Sharpmake/1.0.0": { - "type": "project", - "serviceable": false, - "sha512": "" - }, - "Basic.Reference.Assemblies.Net50/1.2.4": { - "type": "package", - "serviceable": true, - "sha512": "sha512-dkLNEHjI1vkoE86PrsXfErPFkp5x3ycRO25NwDBcTmd/k354Il3eTqfarbseXKb4cRomPgjDfZwI6FMBWWEuxw==", - "path": "basic.reference.assemblies.net50/1.2.4", - "hashPath": "basic.reference.assemblies.net50.1.2.4.nupkg.sha512" - }, - "Microsoft.CodeAnalysis.Analyzers/3.3.2": { - "type": "package", - "serviceable": true, - "sha512": "sha512-7xt6zTlIEizUgEsYAIgm37EbdkiMmr6fP6J9pDoKEpiGM4pi32BCPGr/IczmSJI9Zzp0a6HOzpr9OvpMP+2veA==", - "path": "microsoft.codeanalysis.analyzers/3.3.2", - "hashPath": "microsoft.codeanalysis.analyzers.3.3.2.nupkg.sha512" - }, - "Microsoft.CodeAnalysis.Common/4.0.1": { - "type": "package", - "serviceable": true, - "sha512": "sha512-SMREwaVD5SzatlWhh9aahQAtSWdb63NcE//f+bQzgHSECU6xtDtaxk0kwV+asdFfr6HtW38UeO6jvqdfzudg3w==", - "path": "microsoft.codeanalysis.common/4.0.1", - "hashPath": "microsoft.codeanalysis.common.4.0.1.nupkg.sha512" - }, - "Microsoft.CodeAnalysis.CSharp/4.0.1": { - "type": "package", - "serviceable": true, - "sha512": "sha512-Q9RxxydPpUElj/x1/qykDTUGsRoKbJG8H5XUSeMGmMu54fBiuX1xyanom9caa1oQfh5JIW1BgLxobSaWs4WyHQ==", - "path": "microsoft.codeanalysis.csharp/4.0.1", - "hashPath": "microsoft.codeanalysis.csharp.4.0.1.nupkg.sha512" - }, - "Microsoft.NETCore.Platforms/5.0.0": { - "type": "package", - "serviceable": true, - "sha512": "sha512-VyPlqzH2wavqquTcYpkIIAQ6WdenuKoFN0BdYBbCWsclXacSOHNQn66Gt4z5NBqEYW0FAPm5rlvki9ZiCij5xQ==", - "path": "microsoft.netcore.platforms/5.0.0", - "hashPath": "microsoft.netcore.platforms.5.0.0.nupkg.sha512" - }, - "Microsoft.VisualStudio.Setup.Configuration.Interop/3.0.4492": { - "type": "package", - "serviceable": true, - "sha512": "sha512-BfkqM96P8+N+cz4T+pxKrIKk2ZD1YMxCXH2ivtBDj5tx6Mc2YQLK1+3h+C6Qebper0RBipuHVn51lb9SZH6bKQ==", - "path": "microsoft.visualstudio.setup.configuration.interop/3.0.4492", - "hashPath": "microsoft.visualstudio.setup.configuration.interop.3.0.4492.nupkg.sha512" - }, - "Microsoft.Win32.Registry/5.0.0": { - "type": "package", - "serviceable": true, - "sha512": "sha512-dDoKi0PnDz31yAyETfRntsLArTlVAVzUzCIvvEDsDsucrl33Dl8pIJG06ePTJTI3tGpeyHS9Cq7Foc/s4EeKcg==", - "path": "microsoft.win32.registry/5.0.0", - "hashPath": "microsoft.win32.registry.5.0.0.nupkg.sha512" - }, - "System.Collections.Immutable/5.0.0": { - "type": "package", - "serviceable": true, - "sha512": "sha512-FXkLXiK0sVVewcso0imKQoOxjoPAj42R8HtjjbSjVPAzwDfzoyoznWxgA3c38LDbN9SJux1xXoXYAhz98j7r2g==", - "path": "system.collections.immutable/5.0.0", - "hashPath": "system.collections.immutable.5.0.0.nupkg.sha512" - }, - "System.Memory/4.5.4": { - "type": "package", - "serviceable": true, - "sha512": "sha512-1MbJTHS1lZ4bS4FmsJjnuGJOu88ZzTT2rLvrhW7Ygic+pC0NWA+3hgAen0HRdsocuQXCkUTdFn9yHJJhsijDXw==", - "path": "system.memory/4.5.4", - "hashPath": "system.memory.4.5.4.nupkg.sha512" - }, - "System.Reflection.Metadata/5.0.0": { - "type": "package", - "serviceable": true, - "sha512": "sha512-5NecZgXktdGg34rh1OenY1rFNDCI8xSjFr+Z4OU4cU06AQHUdRnIIEeWENu3Wl4YowbzkymAIMvi3WyK9U53pQ==", - "path": "system.reflection.metadata/5.0.0", - "hashPath": "system.reflection.metadata.5.0.0.nupkg.sha512" - }, - "System.Runtime.CompilerServices.Unsafe/5.0.0": { - "type": "package", - "serviceable": true, - "sha512": "sha512-ZD9TMpsmYJLrxbbmdvhwt9YEgG5WntEnZ/d1eH8JBX9LBp+Ju8BSBhUGbZMNVHHomWo2KVImJhTDl2hIgw/6MA==", - "path": "system.runtime.compilerservices.unsafe/5.0.0", - "hashPath": "system.runtime.compilerservices.unsafe.5.0.0.nupkg.sha512" - }, - "System.Security.AccessControl/5.0.0": { - "type": "package", - "serviceable": true, - "sha512": "sha512-dagJ1mHZO3Ani8GH0PHpPEe/oYO+rVdbQjvjJkBRNQkX4t0r1iaeGn8+/ybkSLEan3/slM0t59SVdHzuHf2jmw==", - "path": "system.security.accesscontrol/5.0.0", - "hashPath": "system.security.accesscontrol.5.0.0.nupkg.sha512" - }, - "System.Security.Principal.Windows/5.0.0": { - "type": "package", - "serviceable": true, - "sha512": "sha512-t0MGLukB5WAVU9bO3MGzvlGnyJPgUlcwerXn1kzBRjwLKixT96XV0Uza41W49gVd8zEMFu9vQEFlv0IOrytICA==", - "path": "system.security.principal.windows/5.0.0", - "hashPath": "system.security.principal.windows.5.0.0.nupkg.sha512" - }, - "System.Text.Encoding.CodePages/4.5.1": { - "type": "package", - "serviceable": true, - "sha512": "sha512-4J2JQXbftjPMppIHJ7IC+VXQ9XfEagN92vZZNoG12i+zReYlim5dMoXFC1Zzg7tsnKDM7JPo5bYfFK4Jheq44w==", - "path": "system.text.encoding.codepages/4.5.1", - "hashPath": "system.text.encoding.codepages.4.5.1.nupkg.sha512" - }, - "System.Threading.Tasks.Extensions/4.5.4": { - "type": "package", - "serviceable": true, - "sha512": "sha512-zteT+G8xuGu6mS+mzDzYXbzS7rd3K6Fjb9RiZlYlJPam2/hU7JCBZBVEcywNuR+oZ1ncTvc/cq0faRr3P01OVg==", - "path": "system.threading.tasks.extensions/4.5.4", - "hashPath": "system.threading.tasks.extensions.4.5.4.nupkg.sha512" - } - } -} \ No newline at end of file diff --git a/Tools/Sharpmake/macOS/Sharpmake.dll b/Tools/Sharpmake/macOS/Sharpmake.dll index be16c437..31c917a3 100644 Binary files a/Tools/Sharpmake/macOS/Sharpmake.dll and b/Tools/Sharpmake/macOS/Sharpmake.dll differ diff --git a/Tools/Sharpmake/macOS/Sharpmake.xml b/Tools/Sharpmake/macOS/Sharpmake.xml deleted file mode 100644 index 86d00367..00000000 --- a/Tools/Sharpmake/macOS/Sharpmake.xml +++ /dev/null @@ -1,4628 +0,0 @@ - - - - Sharpmake - - - - - Contains methods for specific analysis on a sharpmake DLL - - - - - Analyzes configure methods to find all the Configure() dependent on the call order within the same priority - - a Functor creator of builder - - a collection of the method dependent on any other methods - - - - Typical wrapper for a Configure MethodInfo - Allows to keep a track of the dependency and the dependents of a configure method - - - - - Extra user assembly to use while compiling - - - - - Extra user assembly file name to use while compiling - - - - - Source attribute parser to use to add configuration based on source code - - - - - Parsing flow parsers to use to add configuration based on source code - - - - - Static constructor called at executable init time - - - - - This method is intended to be called at executable init time. - It let us avoid exceptions when executing sharpmake several times in loops(exception can occur in the cs compiler - when it tries to create pdb files and some already exists. Maybe that previous sharpmake sometimes still has some handles to the file?). - With this cleanup code active there is no exception anymore on my PC. Previously I had the exception almost 100% on the second or third iteration - of a stability test(executing sharpmake in loop to insure it always generate the same thing). - - - Was previously having the following exception when running stability tests(on subsequents sharpmake execution runs): - Unexpected error creating debug information file 'c:\Users\xxxx\AppData\Local\Temp\Sharpmake.Assembler_1.tmp.PDB' -- 'c:\Users\xxxx\AppData\Local\Temp\Sharpmake.Assembler_1.tmp.pdb: The process cannot access the file because it is being used by another process. - - - - - Get the base path of temporary assembly files. - - the base path - - - - Get the assembly files common prefixes for all temporary assemblies generated in this process. - - the prefix - - - - Get the next temporary assembly file path. - - path of next temporary assembly - - - - This method attribute is used to specify the execution order of Configure(...) within - a project or a solution generation - - If this attribute is not set a default value a 0 is used - - The configure methods using this property are sorted ascendingly. - ex: ... -1 before 0 before 1 ... - - See Configure method attribute and Configurable class for more details - - - - - Priority level of the configure method - - - - - Priority attribute of a configure method - - Priority level of the configure method - - - - Marks elements of fragments that should not be considered individual fragments. - - - When an enumeration is marked with , Sharpmake normally ensure that - each element sets 1 and only 1 bit. However, it is often useful in a bit enum to combine - multiple bits together to create sets that go well together. To prevent Sharpmake from - considering those errors, you must decorate these enum members with - . - - - - - Creates and enumerable of Configure(...) method info based on the given type. - Useful to have different sorts to support old Sharpmake versions or to analyze - dependencies between Configure functions. - - type on which to get the configure methods - an ordered enumeration of method info - - - - Tests a specific method to find it's closest dependency. - Doesn't find all dependencies. - - - - - Creates method test cases based on the information given - - Type of the project or solution to analyze - Priority group of the methods - Methods to analyze - The test cases to execute - - - - Creates method test cases based on the information given - Should be call if you know that the methods contains an error. - - Type of the project or solution to analyze - Priority group of the methods - Methods to analyze - [out] The methods suspected before processing if any - The test cases to execute - - - - Tests a specific priority if either is contains dependent methods or not. - - - - - Creates tests case for all given priority of needed. - - Source Type of the priorities and methods - Priorities to analyze - a list of test case to execute - - - - Creates the tests case to analyze a list of priority. - Must be used only if you are sure the type have dependent methods - - Type to analyze - Priorities to analyze - [out] the methods suspected before the first iteration - a list of test case to execute - - - - Tests a specific type if either is contains dependent methods or not. - - - - - First pass of the whole analysis. Builds and array of all the content to be analyzed - - - - - Put this attribute on a static method that match the name and signature of an Event in the Builder class, and it will be called automatically. - - - - - Scans a Sharpmake extension assembly for builder's event extension, and then hook them to the builder's events. - - The to scan. - - - - Default options is used to select an options if not set, default may be debug or release setting - see Sharpmake.Options class to know associated default setting to debug or release. - - - - - Orders the configure methods by the first definition of the configure. - With default order given by reflection: - http://pierrerebours.com/blog/order-returned-getmethods - The order can't be predicted. - - - - - Orders the configure methods by the first definition of the configure and the MetadataToken of the method. - e.g. - class A { virtual void foo() { } void bar() { } } - class B : A { override void foo() { } void buz() { } } - Assuming foo(), bar() and buz() are marked as configure methods, - if A is generated, foo() will be called then bar() will be called - if B is generated, the call sequence will be foo(), bar(), buz() - - - - - The DebugBreaks are used to help with debugging, allowing conditional breakpoints that are - built-in in code. Feel free to add more as you need them while debugging Sharpmake. - - - - - Generates debug projects and solutions - - - - - Generates debug projects and solutions - - - - - - - - Generates debug projects and solutions - - - - - - - - - Generates debug projects and solutions - - - - - - - - - - Set up debug configuration in user file - - - - - - - Provides a static utility object of methods and properties to interact - with enumerated types. - - - - - Sets a flag bit to 0 or 1 - - - - - Adds a flag to an enum - - - - - Removes a flag from an enum - - - - - Toggles a flag in an enum - - - - - Enumerates all flags set in the enum - - - - - Aggregates an enumerable of enum flags into one - - - - - Casts an generic Enum to a specific one - - - - - Casts an generic Enum to a specific one - - - - - Tries parsing a string as an enum type - - - - - Parses a string as an enum type. Returns the default value if it fails. - - - - - Enumerates the values of an enum - - - - - Helper for loading Sharpmake extensions. - - - Normally, this should be done using reflection-only load, but the problem is that you have - to resolve the dependencies yourself. Turns out that it's simpler to actually let the CLR - do a full load in a temporary that we can trash later. - - - - - Releases the remote if one was created. - - - - - Gets whether an assembly is a Sharpmake extension. - - The path of the assembly to check whether it's an extension. - `true` if it is an extension, `false` otherwise. - - This method will instantiate a remote if none was created. - - - - - Loads a Sharpmake extension assembly. - - The path of the assembly that contains the Sharpmake extension. - Whether this method should load the assembly remotely first. See remarks. - The loaded extension's . - - Because loading an extension in a remote assembly for validation is expensive, this - method provides the argument which, when `false`, will load - the extension in the current instead of doing so in a remote - , testing whether it contains - , and then loading it again in - . However, because it is impossible to unload a - loaded assembly from the CLR, if this method fail you have essentially polluted the - process' address space with an assembly that you may not need. - - - - - Loads all Sharpmake extensions in a directory. - - The path to the directory to scan for assemblies. - A that contains the loaded . - - - - Will return the name of the root directory in MSBuild under Microsoft/VC for a particular devenv, - since it uses yet another versioning pattern than the toolchain - - The visual studio version to convert - The name of the directory for that version - - - - Gets whether a is a Visual Studio version. - - The to check. - `true` if is a Visual Studio version, `false` otherwise. - - - - Gets whether two values generate ABI-compatible binaries with - their respective C++ compiler. - - The to check for ABI-compatibility. - The other to check for ABI-compatibility with. - `true` if ABI-compatible, `false` otherwise. - is not a Visual Studio version. - - Only works for Visual Studio versions because other DevEnvs (such as Eclipse) are not - shipped with a compiler version. - - - - - Gets the absolute path up to the intersection of two specified absolute paths. - - First absolute path. - Second absolute path. - Returns an absolute path up to the intersection of both specified paths. - - - - Returns path with drive letter in lower case. - - WSL mounts windows drive using lowercase letters: /mnt/c, /mnt/d... - - The path to be modified. - - - - - The input path got its beginning of path matching the inputHeadPath replaced by the replacementHeadPath. - - Throws if the fullInputPath doesn't start with inputHeadPath. - - Function is case insensitive but preserves path casing. - - The path to be modified. - The subpath in the head of fullInputPath to replace. - The subpath that will replace the inputHeadPath - - - - - This method will return a deterministic hash for a string. - - - With net core the regular GetHashCode() is now - seeded for security reasons. - - - The input string - A deterministic hash - - - - - - Search the call stack and return the info about the topmost frame from a file that is edited by the user (.sharpmake or .sharpmake.cs) - - Caller info in a format clickable in the output console if a .sharpmake frame is found. Otherwise return an empty string. - - - - Lookup the callstack and return the info about the 2nd topmost frame (topmost being where this method is called from) . - - Caller info in a format clickable in the output console. - - - - Build a fake Guid from input string value. - - String value to generate guid from. - - - - A simple json serializer. - Does not serialize objects properties using reflection, data must be prepared by the caller. - Supported types : IEnumerable, IDictionnary, string and system value types. - - - - The full list of products can be found here: https://docs.microsoft.com/en-us/visualstudio/install/workload-and-component-ids - - - - - This can be used to check and limit by specific installed workloads. - - What is a Workload? - In the VS installer, a 'Workload' is a section that you see in the UI such as 'Desktop development with C++' or '.NET desktop development'. - - The full list of products is here: https://docs.microsoft.com/en-us/visualstudio/install/workload-and-component-ids - - For each product, clicking it will bring up a page of all of the possible Workloads. - For example: https://docs.microsoft.com/en-us/visualstudio/install/workload-component-id-vs-professional - - - - - This can be used to check and limit by specific installed components. - What is a Component? - In the Visual Studio Installer, the 'Components' are individual components associated with each Workload (and some just on the side), - that you can see in the Summary on the right. - Each workflow contains a number of mandatory components, but also a list of optional ones. - An example would be: 'NuGet package manager' or 'C++/CLI support'. - - The full list of products is here: https://docs.microsoft.com/en-us/visualstudio/install/workload-and-component-ids - - For each product, clicking it will bring up a page of all of the possible Workloads. - For example: https://docs.microsoft.com/en-us/visualstudio/install/workload-component-id-vs-professional - - - - - The supported visual studio products, in order by priority in which Sharpmake will choose them. - We want to block products like the standalone Team Explorer, which is in the Visual Studio - family yet isn't a variant of Visual Studio proper. - - The list of Product IDs can be found here: https://docs.microsoft.com/en-us/visualstudio/install/workload-and-component-ids - - - - - Generate a pseudo Guid base on relative path from the Project GuidReference path to the generated files - Need to do it that way because many vcproj may be generated from the same Project. - - - - - Extension GetValueOrAdd gets the value at the given key or adds at the given key the value provided - - Type of the key - Type of the value - dictionary in which to search - key of the value - value created - the value at the given key (created or not in this call) - - - - Look up 2 callerInfo string. - - - - - 1.if they are both referring to file edited by sharpmake user (.sharpmake): concatenation of both separated by a line return - 2.if only callerInfo2 refer to file edited by sharpmake user (.sharpmake): callerInfo2 - 3.otherwise: callerInfo1 - - - - - Full path to the %WINDIR% directory. - Usually equals to `C:\WINDOWS`. - - - - - Full path to the system dll folder where the ucrtbase.dll and api-ms-win-*.dll can be found. - If left null, dlls will be searched in the Redist\ucrt\DLLs\x64 subfolder of the WinSDK10 indicated in the KitsRootPaths. - - - - - - Additional settings to add to the global settings node. - - - - - Path to the fastbuild plugin dll if any. This typically will be the path to the Ubisoft asset store plugin DLL but could be any other compatible implementation. - CachePath must also be set to an appropriate url. - - - - - Cache configuration type for targets allowing the cache - - - - - Allows retention of build state across BFF changes. Requires v0.97 - - - - - The path to the executable used to start a fastbuild compilation. This path is relative to the source tree root. - ex: @"tools\FastBuild\start-fbuild.bat" - - - - - Can be set to false to override all FastBuild settings and disable it - - - - - Include the .bff files in the visual studio project files. Some programmer don't like that as when they do finds in Visual Studio, this - adds useless results to their finds whenever the string they are searching matches the name of a .cpp file. - - - - - If true, activate PDB Support for FastLink. Instead of having a single .pdb file for a whole project, split in many smaller .pdb files. - This is incompatible with FastBuildSettings.EnablePrecompiledHeaders. - - - - - Adds an alias to the Master Bff containing all the configs - This section is used for example in the submit assistant on AC - - - - - link.exe on win64 executes rc.exe by itself on some occasions - if it doesn't find it, link errors can occur, like: - fatal error LNK1158: cannot run rc.exe! - - Setting this to true will have sharpmake detect if a rc.exe can - be found in the same folder as link.exe, and if not add the path - to one in the global settings Environment section, in the PATH variable - - - - - This is used to activate a workaround in fastbuild for the VS2012 preprocessor enum bug. - - Notes: Only win64 is affected by this bug it seems. - - - VS 2012 sometimes generates corrupted code when preprocessing an already preprocessed file when it encounters - enum definitions. - Example: - enum dateorder - { - no_order, dmy, mdy, ymd, ydm - }; - Become : - enummdateorder - { - no_order, dmy, mdy, ymd, ydm - }; - And then compilation fails. - - It seems that by adding a space between the enum keyword and the name it avoids that problem that looks like memory corruption in the compiler. - Also it seems that this doesn't occurs with VS2013. - - - - - FastBuild names of compilers to set the 'UseRelativePaths_Experimental' option for. - - - - - Additional settings to add to the Compiler node, keyed by compiler name. - - - - - - Additional Section referred by a compiler node, keyed by compiler name - - - - - Additional custom property groups. Only those referred will be written to the bff files. - - - - - Implementation of that switches between case-sensitive - to case-insensitive based on the operating system. - - - This class is a simple wrapper around either (if the - host operating system is Linux or Max OSX) or - (on Windows operating systems.) You should - use an instance of this class as the comparer when creating collections indexed on with - file names. - - - - - Creates a new instance whose case sensitivity is - the same as the case sensitivity of the host operating system's file system. - - - - - Creates a new . - - The case-sensitivity mode to use in file name comparisons. - - - - Interface for objects that expose additional command line interfaces for a given platform. - This allows platforms to extend the command line interface of Sharpmake. - - - - - Validates that the command line arguments are valid. - - - - - Interface for objects that describe the general properties of a platform. - - - - - Gets a simple string that describes the platform. - - - - - Gets whether this is a proprietary platform owned by Microsoft Corporation. - - - - - Gets whether this is a PC platform. (Mac, Windows, etc.) - - - - - Gets whether this platform supports Clang. - - - - - Gets whether this is a .NET platform. - - - - - Gets whether that platform supports shared libraries. (aka: dynamic link libraries.) - - - - - Gets whether precompiled headers are supported for that platform. - - - - - Gets an environment variable resolver suited for this platform. - - A list of that describe the environment variables to resolve. - An instance suited for the platform. - - - - This class contains some global msbuild settings - - - - - Allows overwriting the MSBuild platform folder used for a known sharpmake platform and Visual Studio version. - This is typically used if you want to put VS files in source control such as Perforce or nuget. - - Visual studio version affected - Platform affected - The location of the MSBuild platform folder. Warning: this *must* end with a trailing separator - - - - - Allows overwriting the MSBuild platform folder used for a custom platform passed as a string and Visual Studio version. - This is typically used if you want to put VS files in source control such as Perforce or nuget. - - Visual studio version affected - Platform affected - The location of the MSBuild platform folder. Warning: this *must* end with a trailing separator - - - - - Use to reset the override of a platform - - Visual studio version - Platform - - - - Get the overwritten MSBuild platform folder used for a known sharpmake platform and Visual studio version. - This is typically used if you want to put your VS files in source control such as Perforce or nuget. - - Visual studio version affected - Platform affected - the registered msbuild foldervalue for the requested pair. null if not found - - - - Get the overwritten MSBuild platform folder used for a custom platform passed as a string and Visual studio version. - This is typically used if you want to put your VS files in source control such as Perforce or nuget. - - Visual studio version affected - Platform affected - the registered msbuild foldervalue for the requested pair. null if not found - - - - Allows setting MSBuild vc targets path used for a known sharpmake platform and Visual Studio version. - This is typically used if you want to add platform specific files since vs2019 as the older _PlatformFolder way of doing it is deprecated. - - Visual studio version affected - Platform affected - The location of the MSBuild additional VC target path. Warning: this *must* end with a trailing separator - - - - - Allows setting MSBuild vc target path used for a custom platform passed as a string and Visual Studio version. - This is typically used if you want to add platform specific files with vs2019+ as the older way of doing it through _PlatformFolder is deprecated. - - Visual studio version affected - Platform affected - The location of the MSBuild additional VC target path. Warning: this *must* end with a trailing separator - - - - - Use to reset the set of AdditionalVCTargetsPath - - Visual studio version - Platform - - - - Get the MSBuild Additional VC targets path used for a known sharpmake platform and Visual studio version. - This is typically used if you want to add platform specific files with vs2019+ as the older way of doing it through _PlatformFolder is deprecated. - - Visual studio version affected - Platform affected - the registered msbuild additional VC targets path for the requested pair. null if not found - - - - Get the MSBuild Additional VC targets path used for a custom platform passed as a string and Visual studio version. - This is typically used if you want to add platform specific files with vs2019+ as the older way of doing it through _PlatformFolder is deprecated. - - Visual studio version affected - Platform affected - the registered msbuild additional VC targets for the requested pair. null if not found - - - - Android SDK path - If unset, will use Android.GlobalSettings.AndroidHome - - - - - Android NDK path - If unset, will use Android.GlobalSettings.NdkRoot - - - - - Java SE Development Kit path - If unset, will use Android.GlobalSettings.JavaHome - - - - - Apache Ant path - If unset, will use Android.GlobalSettings.AntHome - - - - - Path to the AndroidProj MSBuild files - Expected to contain the files found in MSBuild\Microsoft\MDD\Android\V150 - If unset, line won't be written - - - - - Application Type Revision - This must be a valid version string, of the form major.minor[.build[.revision]]. - Examples: 1.0, 10.0.0.0 - - - - - This is applicable for AGDE only - The full path to the directory containing the top-level build.gradle file. - - - - - Output Apk name for AGDE project which can be set per configuration. - - - - - Verbosity of the tasks (vcxproj only) - At the time of this writing, this only control if on build env variables values are printed - - - - - Suppressed specific warnings in a C# project. - - - This option generates a `NoWarn` element in the C# project XML. - - - - - Creates a new instance from a list of warning - code labels. - - The list of warning code labels to suppress. See remarks. - - If contains elements that are not C# compiler - warnings, those warning numbers *must* include the 2-letter prefix. For - example, NuGet warnings must be prefixed by `NU`. (ie: `NU1603`) - - - - - Prevent specific warnings from being treated as errors when is enabled - - - This option generates a `WarningsNotAsErrors` element in the C# project XML. - - - - - Creates a new instance from a list of warning - code labels. - - The list of warning code labels to avoid treating as errors. See remarks. - - If contains elements that are not C# compiler - warnings, those warning numbers *must* include the 2-letter prefix. For - example, NuGet warnings must be prefixed by `NU`. (ie: `NU1603`) - - - - - Exclude from SonarQube C# static analysis - - - - - Controls whether the project is published when running a publish command - Only affects processes that use the Publish target, such as the dotnet sdk projects - - - - - - Foce a platform toolset different from the devenv when using LLVM platform toolset - - The platform toolset option used to enable the LLVM toolchain doesn't allow choosing - the version of the toolset we want to mimic. By - - - - Platform Toolset - - - Specifies which build tools will be used. - - - - - Windows SDK Version - - - Specifies which version of the Windows SDK to use. - - - - - Translate Includes to Imports - - - Enables the compiler to translate #include directives into import directives for the available header units. (/translateInclude) - - - - - Character Set - - - Tells the compiler to use the specified character set; aids in localization issues. - - - - - Not Set - - - - - Use Unicode Character Set - - - - - Use Multi-Byte Character Set - - - - - Whole Program Optimization - - - Enables cross-module optimizations by delaying code generation to link time; requires that linker option 'Link Time Code Generation' be turned on. - - - - - No Whole Program Optimization - - - - - Use Link Time Code Generation - - - - - Profile Guided Optimization - Instrument - - - - - Profile Guided Optimization - Optimize - - - - - Profile Guided Optimization - Update - - - - - Debug Information Format - - - Specifies the type of debugging information generated by the compiler. This requires compatible linker settings. - - - - - None - - - Produces no debugging information, so compilation may be faster. - - - - - C7 compatible - - - Select the type of debugging information created for your program and whether this information is kept in object (.obj) files or in a program database (PDB). - - - - - Program Database - - - Produces a program database (PDB) that contains type information and symbolic debugging information for use with the debugger. The symbolic debugging information includes the names and types of variables, as well as functions and line numbers. - - - - - Program Database for Edit And Continue - - - Produces a program database, as described above, in a format that supports the Edit and Continue feature. - - - - - Use Debug Libraries - - - Specifies whether this configuration should use debug libraries and debug switches - - - - - Warning Level - - - Select how strict you want the compiler to be about code errors. - - - - - Turn Off All Warnings - - - Level 0 disables all warnings. - - - - - Level 1 displays severe warnings. Level 1 is the default warning level at the command line. - - - - - Level 2 displays all level 1 warnings and warnings less severe than level 1. - - - - - Level 3 displays all level 2 warnings and all other warnings recommended for production purposes. - - - - - Level 4 displays all level 3 warnings plus informational warnings, which in most cases can be safely ignored. - - - - - Enables all warnings, including those disabled by default. - - - - - Treat Warnings As Errors - - - Treats all compiler warnings as errors. For a new project, it may be best to use /WX in all compilations; resolving all warnings will ensure the fewest possible hard-to-find code defects. - - - - - Diagnostics Format - - - Enables rich diagnostics, with column information and source context in diagnostic messages. - - - - - Provides column information in the diagnostic message, as well as outputting the relevant line of source code with a caret indicating the offending column. - - - - - Additionally provides the column number within the line where the diagnostic is issued, where applicable. - - - - - Retains the prior, concise diagnostic messages with the line number. - - - - - Treat Files Included with Angle Brackets as External - - - Specifies whether to treat files included with angle brackets as external. (/external:anglebrackets) - - - - - External Header Warning Level - - - Select how strict you want the compiler to be about code errors in external headers. (/external:W0 - /external:W4) - - - - - Turn Off All Warnings - - - Level 0 disables all warnings. - - - - - Level 1 displays severe warnings. Level 1 is the default warning level at the command line. - - - - - Level 2 displays all level 1 warnings and warnings less severe than level 1. - - - - - Level 3 displays all level 2 warnings and all other warnings recommended for production purposes. - - - - - Level 4 displays all level 3 warnings plus informational warnings, which in most cases can be safely ignored. - - - - - Inherit Project Warning Level - - - - - Template Diagnostics in External Headers - - - Specifies whether to evaluate warning level across template instantiation chain. (/external:templates-) - - - - - Enable Managed Incremental Build - - - Enables managed incremental build scenarios using metagen. - - - - - Common Language RunTime Support - - - Use the .NET runtime service. This switch is incompatible with some other switches; see the documentation on the /clr family of switches for details. - - - - - No Common Language RunTime Support - - - - - Common Language RunTime Support - - - Creates metadata for your application that can be consumed by other CLR applications, and allows your application to consume types and data in the metadata of other CLR components. - - - - - Pure MSIL Common Language RunTime Support - - - Produces an MSIL-only output file with no native executable code, although it can contain native types compiled to MSIL. - - - - - Safe MSIL Common Language RunTime Support - - - Produces an MSIL-only (no native executable code) and verifiable output file. - - - - - Multi-processor Compilation - - - - - Select option for code optimization; choose Custom to use specific optimization options. - - - - - Disable optimization. - - - - - Maximum Optimization (Favor Size) - - - Equivalent to /Og /Os /Oy /Ob2 /Gs /GF /Gy - - - - - Maximum Optimization (Favor Speed) - - - Equivalent to /Og /Oi /Ot /Oy /Ob2 /Gs /GF /Gy - - - - - Optimizations (Favor Speed) - - - Equivalent to /Og /Oi /Ot /Oy /Ob2 - - - - - Inline Function Expansion - - - Select the level of inline function expansion for the build. - - - - - Only __inline - - - Expands only functions marked as inline, __inline, __forceinline or __inline or, in a C++ member function, defined within a class declaration. - - - - - Any Suitable - - - Expands functions marked as inline or __inline and any other function that the compiler chooses (expansion occurs at the compiler's discretion, often referred to as auto-inlining). - - - - - Disables inline expansion, which is on by default. - - - - - Enable Intrinsic Functions - - - Using intrinsic functions generates faster, but possibly larger, code. - - - - - Favor Size Or Speed - - - Whether to favor code size or code speed; 'Global Optimization' must be turned on. - - - - - No size nor speed optimization. - - - - - Favor Fast Code. Maximizes the speed of EXEs and DLLs by instructing the compiler to favor speed over size. (This is the default.) - - - - - Favor Small Code. Minimizes the size of EXEs and DLLs by instructing the compiler to favor size over speed. - - - - - Omit Frame Pointers - - - Suppresses creation of frame pointers on the call stack. - - - - - Enable Fiber-Safe Optimizations - - - Enables memory space optimization when using fibers and thread local storage access. - - - - - Ignore Standard Include Paths - - - Prevents the compiler from searching for include files in directories specified in the INCLUDE environment variables. - - - - - Preprocess to a File - - - Preprocesses C and C++ source files and writes the preprocessed output to a file. This option suppresses compilation, thus it does not produce an .obj file. - - - - - Preprocess without #line directives. - - - - - Suppresses comment strip from source code; requires that one of the 'Preprocessing' options be set. - - - - - Enables the compiler to create a single read-only copy of identical strings in the program image and in memory during execution, resulting in smaller programs, an optimization called string pooling. /O1, /O2, and /ZI automatically set /GF option. - - - - - Enables minimal rebuild, which determines whether C++ source files that include changed C++ class definitions (stored in header (.h) files) need to be recompiled. - - - - - Enable C++ Exceptions - - - Specifies the model of exception handling to be used by the compiler. - - - - - No exception handling. - - - - - The exception-handling model that catches C++ exceptions only and tells the compiler to assume that extern C functions never throw a C++ exception. (/EHsc) - - - - - The exception-handling model that catches C++ exceptions only and tells the compiler to assume that extern C functions do throw an exception. (/EHs) - - - - - The exception-handling model that catches asynchronous (structured) and synchronous (C++) exceptions. (/EHa) - - - - - Smaller Type Check - - - Enable checking for conversion to smaller types, incompatible with any optimization type other than debug. - - - - - Perform basic runtime error checks, incompatible with any optimization type other than debug. - - - - - Enables stack frame run-time error checking. - - - - - Reports when a variable is used without having been initialized. - - - - - Both (/RTC1, equiv. to /RTCsu) - - - - - Specify runtime library for linking. - - - - - Multi-threaded - - - Causes your application to use the multithread, static version of the run-time library. - - - - - Multi-threaded Debug - - - Defines _DEBUG and _MT. This option also causes the compiler to place the library name LIBCMTD.lib into the .obj file so that the linker will use LIBCMTD.lib to resolve external symbols. - - - - - Multi-threaded DLL - - - Causes your application to use the multithread- and DLL-specific version of the run-time library. Defines _MT and _DLL and causes the compiler to place the library name MSVCRT.lib into the .obj file. - - - - - Multi-threaded Debug DLL - - - Defines _DEBUG, _MT, and _DLL and causes your application to use the debug multithread- and DLL-specific version of the run-time library. It also causes the compiler to place the library name MSVCRTD.lib into the .obj file. - - - - - Struct Member Alignment - - - Specifies 1, 2, 4, or 8-byte boundaries for struct member alignment. - - - - - Default alignment settings. - - - - - 1 Byte - - - Packs structures on 1-byte boundaries. Same as /Zp. - - - - - 2 Bytes - - - Packs structures on 2-byte boundaries. - - - - - 4 Byte - - - Packs structures on 4-byte boundaries. - - - - - 8 Bytes - - - Packs structures on 8-byte boundaries (default). - - - - - 16 Bytes - - - Packs structures on 16-byte boundaries. - - - - - Security Check - - - The Security Check helps detect stack-buffer over-runs, a common attempted attack upon a program's security. - - - - - Disable Security Check. (/GS-) - - - - - Enable Security Check. (/GS) - - - - - Enable Function-Level Linking - - - Allows the compiler to package individual functions in the form of packaged functions (COMDATs). Required for edit and continue to work. - - - - - Enable Enhanced Instruction Set - - - Enable use of instructions found on processors that support enhanced instruction sets, e.g., the SSE, SSE2, AVX, AVX2 and AVX-512 enhancements to IA-32; AVX, AVX2 and AVX-512 to x64. Currently /arch:SSE and /arch:SSE2 are only available when building for the x86 architecture. If no option is specified, the compiler will use instructions found on processors that support SSE2. Use of enhanced instructions can be disabled with /arch:IA32. (/arch:SSE, /arch:SSE2, /arch:AVX, /arch:AVX2, /arch:AVX512, /arch:IA32) - - - - - Not Set - - - - - Streaming SIMD Extensions. (/arch:SSE) - - - - - Streaming SIMD Extensions 2. (/arch:SSE2) - - - - - Advanced Vector Extensions. (/arch:AVX) - - - - - Advanced Vector Extensions 2. (/arch:AVX2) - - - - - Advanced Vector Extensions 512. (/arch:AVX512) - - - - - No Enhanced Instructions. (/arch:IA32) - - - - - Floating Point Model - - - Sets the floating point model. - - - - - Improves the consistency of floating-point tests for equality and inequality. - - - - - The strictest floating-point model. /fp:strict causes fp_contract to be OFF and fenv_access to be ON. /fp:except is implied and can be disabled by explicitly specifying /fp:except-. When used with /fp:except-, /fp:strict enforces strict floating-point semantics but without respect for exceptional events. - - - - - Creates the fastest code in the majority of cases. - - - - - Enable Floating Point Exceptions - - - Reliable floating-point exception model. Exceptions will be raised immediately after they are triggered. - - - - - Create Hotpatchable Image - - - When hotpatching is on, the compiler ensures that first instruction of each function is two bytes, which is required for hot patching. - - - - - Conformance mode - - - Enables or suppresses conformance mode. (/permissive-, /permissive). - - - - - No - - - - - Yes - - - - - Disable Language Extensions - - - Suppresses or enables language extensions. - - - - - Remove unreferenced code and data - - - When specified, compiler no longer generates symbol information for unreferenced code and data. - - - - - Treat WChar_t As Built in Type - - - When specified, the type wchar_t becomes a native type that maps to __wchar_t in the same way that short maps to __int16. /Zc:wchar_t is on by default. - - - - - Force Conformance in For Loop Scope - - - Used to implement standard C++ behavior for the for statement loops with Microsoft extensions (/Za, /Ze (Disable Language Extensions)). /Zc:forScope is on by default. - - - - - Enable Run-Time Type Information - - - Adds code for checking C++ object types at run time (runtime type information). - - - - - Calling Convention - - - Select the default calling convention for your application (can be overridden by function). - - - - - __cdecl - - - Specifies the __cdecl calling convention for all functions except C++ member functions and functions marked __stdcall or __fastcall. - - - - - __fastcall - - - Specifies the __fastcall calling convention for all functions except C++ member sfunctions and functions marked __cdecl or __stdcall. All __fastcall functions must have prototypes. - - - - - __stdcall - - - Specifies the __stdcall calling convention for all functions except C++ member functions and functions marked __cdecl or __fastcall. All __stdcall functions must have prototypes. - - - - - __vectorcall - - - Specifies the __vectorcall calling convention for all functions except C++ member functions and functions marked __cdecl, __fastcall, or __stdcall. All __vectorcall functions must have prototypes. - - - - - Consume Windows Runtime Extension - - - Consume the Windows Run Time languages extensions. - - - - - Show Includes - - - Generates a list of include files with compiler output. - - - - - C++ Language Standard - - - Determines the C++ language standard the compiler will enforce. It is recommended to use the latest version when possible. (/std:c++14, /std:c++17, /std:c++20, /std:c++latest) - - - - - ISO C++14 Standard - - - - - ISO C++17 Standard - - - - - ISO C++20 Standard - - - - - Preview - Features from the Latest C++ Working Draft - - - - - C Language Standard - - - Determines the C language standard the compiler will enforce. It is recommended to use the latest version when possible. - - - - - Default (Legacy MSVC) - - - - - ISO C11 Standard - - - - - ISO C17 (2018) Standard - - - - - Support Just My Code Debugging - - - Adds supporting code for enabling Just My Code debugging in this compilation unit. - - - - - Spectre Mitigation - - - Spectre mitigations for CVE 2017-5753. - - - - - Enable Spectre mitigation feature for CVE 2017-5753 - - - - - All Loads - - - Enable Spectre mitigations for all load instructions - - - - - All Control Flow Loads - - - Enable Spectre mitigations for all control flow load instructions - - - - - Disabled - - - Not Set. - - - - - Enable Address Sanitizer - - - Compiles and links program with AddressSanitizer. Currently available for x86 and x64 builds. - - - - - Treat Lib Warning As Errors - - - Causes no output file to be generated if lib generates a warning. - - - - - Show Progress - - - Prints Linker Progress Messages - - - - - Not Set - - - No verbosity. - - - - - Display all progress messages - - - - - For Libraries Searched - - - Displays progress messages indicating just the libraries searched. - - - - - About COMDAT folding during optimized linking - - - Displays information about COMDAT folding during optimized linking. - - - - - About data removed during optimized linking - - - Displays information about functions and data removed during optimized linking. - - - - - About Modules incompatible with SEH - - - Displays information about modoules incompatible with Safe Exception Handling. - - - - - About linker activity related to managed code - - - Display information about linker activity related to managed code. - - - - - Enable Incremental Linking - - - - - Suppress Startup Banner - - - Prevents display of the copyright message and version number. - - - - - Link Library Dependencies - - - Specifies whether or not library outputs from project dependencies are automatically linked in. - - - - - Ignore Import Library - - - Specifies that the import library generated by this configuration should not be imported into dependent projects. - - - - - Use Library Dependency Inputs - - - Specifies whether or not the inputs to the librarian tool are used rather than the library file itself when linking in library outputs of project dependencies. - - - - - Ignore All Default Libraries - - - The /NODEFAULTLIB option tells the linker to remove one or more default libraries from the list of libraries it searches when resolving external references. - - - - - Generate Manifest - - - Specifies that the linker should create a side-by-side manifest file. - - - - - Generate Debug Info - - - This option enables creation of debugging information for the .exe file or the DLL. - - Enable will write /DEBUG, and let MS linker decide to use FastLink or Full PDBs - If you want to force DEBUG:FULL, set both GenerateDebugInformation - and GenerateFullProgramDatabaseFile to Enable - - - - - Generate Debug Information - - - Create a complete Program Database (PDB) ideal for distribution to Microsoft Symbol Server. - - - - - Generate Debug Information optimized for faster links - - - Produces a program database (PDB) ideal for edit-link-debug cycle. - - - - - No - - - Produces no debugging information. - - - - - Generate Full Program Database File - - - This option generates a full PDB from a partial PDB generated when /Debug:fastlink is specified. Full PDB allows sharing the binary and the PDB with others. - - - - - Generate Map File - - - The /MAP option tells the linker to create a mapfile. - - - - - Map Exports - - - The /MAPINFO option tells the linker to include the specified information in a mapfile, which is created if you specify the /MAP option. EXPORTS tells the linker to include exported functions. - - - - - Debuggable Assembly - - - /ASSEMBLYDEBUG emits the DebuggableAttribute attribute with debug information tracking and disables JIT optimizations. - - - - - The /SUBSYSTEM option tells the operating system how to run the .exe file.The choice of subsystem affects the entry point symbol (or entry point function) that the linker will choose. - - - - - Not Set - - - No subsystem set. - - - - - Win32 character-mode application. Console applications are given a console by the operating system. If main or wmain is defined, CONSOLE is the default. - - - - - Application does not require a console, probably because it creates its own windows for interaction with the user. If WinMain or wWinMain is defined, WINDOWS is the default. - - - - - Device drivers for Windows NT. If /DRIVER:WDM is specified, NATIVE is the default. - - - - - EFI Application. - - - - - EFI Boot Service Driver. - - - - - EFI ROM. - - - - - EFI Runtime. - - - - - Application that runs with the POSIX subsystem in Windows NT. - - - - - Enable Large Addresses - - - The /LARGEADDRESSAWARE option tells the linker that the application can handle addresses larger than 2 gigabytes. By default, /LARGEADDRESSAWARE:NO is enabled if /LARGEADDRESSAWARE is not otherwise specified on the linker line. - - - - - Allow Isolation - - - Specifies behavior for manifest lookup. - - - - - References - - - EliminateUnreferencedData (/OPT:REF) eliminates functions and/or data that are never referenced while KeepUnreferencedData (/OPT:NOREF) keeps functions and/or data that are never referenced. - - - - - Enable COMDAT Folding - - - - - Link Time Code Generation - - - Specifies link-time code generation. - - - - - Default LTCG setting. - - - - - Use Fast Link Time Code Generation - - - Use Link Time Code Generation. - - - - - Use Link Time Code Generation - - - Use Link Time Code Generation. - - - - - Profile Guided Optimization - Instrument - - - Specifies link-time code generation. - - - - - Profile Guided Optimization - Optimization - - - Specifies that the linker should use the profile data created after running the instrumented binary to create an optimized image. - - - - - Profile Guided Optimization - Update - - - Allows and tracks list of input files to be added or modified from what was specified in the :PGINSTRUMENT phase. - - - - - Randomized Base Address - - - - - Fixed Base Address - - - Creates a program that can be loaded only at its preferred base address. - - - - - Create Hot Patchable Image - - - Prepares an image for hotpatching. - - - - - Prepares an image for hotpatching. - - - - - X86 Image Only - - - Prepares an X86 image for hotpatching. - - - - - X64 Image Only - - - Prepares an X64 image for hotpatching. - - - - - Itanium Image Only - - - Prepares an Itanium image for hotpatching. - - - - - Force File Output - - - Tells the linker to create an .exe file or DLL even if a symbol is referenced but not defined or is multiply defined. It may create invalid exe file. - - - - - /FORCE with no arguments implies both multiple and unresolved. - - - - - Multiply Defined Symbol Only - - - Use /FORCE:MULTIPLE to create an output file whether or not LINK finds more than one definition for a symbol. - - - - - Undefined Symbol Only - - - Use /FORCE:UNRESOLVED to create an output file whether or not LINK finds an undefined symbol. /FORCE:UNRESOLVED is ignored if the entry point symbol is unresolved. - - - - - Generate Windows Metadata - - - Enables or disable generation of Windows Metadata. - - - - - Yes - - - Enable generation of Windows Metadata files. - - - - - No - - - Disable the generation of Windows Metadata files. - - - - - Treat Linker Warning As Errors - - - Causes no output file to be generated if the linker generates a warning. - - - - - Precompiled Header - - - Create/Use Precompiled Header : Enables creation or use of a precompiled header during the build. - - - - - Not Using Precompiled Headers - - - - - Instructs the compiler to create a precompiled header (.pch) file that represents the state of compilation at a certain point. - - - - - Instructs the compiler to use an existing precompiled header (.pch) file in the current compilation. - - - - - Use clang-cl for compiling. If this option is disabled, the Microsoft compiler (cl.exe) will be used instead. - - - - - Use lld-link for linking. If this option is disabled, the Microsoft linker (link.exe) will be used instead. - - - - - Used to hold an option that has a string value - A default value can be set by adding a `public static readonly string Default` field, ex: - public static readonly string Default = "3.0"; - - - - - Used to hold an option that's a path, either to a file or directory, that's gonna be resolved - - - - - Used to hold an option that has an untyped argument, could be another option - - - - - This method will retrieve a path option from all the configurations, ensuring it has the same value. - If none of the configurations have the option, it will return the fallback value - - The type of the option to lookup in the configurations. - The list of configurations to look into. - Optional: Fallback value to return in case none of the configurations have the option. - Optional: The rootpath to convert the path relative to. - - - - - This method will retrieve the values associated to a key in an enumerable of dictionaries, - ensuring that the value is identical in all of them, or doesn't exist at all. - If none of the dictionaries contain the key, it will return the fallback value - - The list of dictionaries to look into. - The list of dictionaries to look into. - Optional: Fallback value to return in case none of the dictionaries have the key. - - - - - See : https://docs.microsoft.com/en-us/nuget/consume-packages/package-references-in-project-files#controlling-dependency-assets - - - - - Marks a concrete class as an implementation of given interfaces for given platforms. This - class must have a default constructor. Obviously, it also needs to actually implement the - interface it pretends to! - - - - - Gets the list of platforms that the object implements. - - - As is a bitfield, it is possible to specify multiple supported - platforms. - - - - - Gets a collection of the of the interfaces that the object - implements and exposes. - - - - - Creates a new instance. - - The implemented platform. - An array that lists the of the interfaces that the object implements. - - - - Marks a concrete class as a default implementation of given interfaces. This class must - have a default constructor. Obviously, it also needs to actually implement the interface it - pretends to! - - - - - Gets the of the implemented interface. - - - - - Creates a new instance. - - An array that lists the of the interfaces that the object implements. - - - - Exception thrown by when - requesting an interface for an interface implementation that is not implemented for the - requested platform and has no default implementation either. - - - - - Exception thrown when finds two or more implementation of an - interface for a given platform. - - - - - Exception thrown when is unable to instantiate an interface - implementation object. This is usually because the type has no constructor, or the - constructor threw an exception. - - - - - Global registry that maps platform-specific implementations of interfaces with a concrete - implementation. This facility allows to add and remove platform-specific generators without - having to break any code. - - - This class searches for implementations using .NET reflection when the - type is loaded by looking for types marked with - in assemblies marked with . It may - also store default implementations to fall-back to when it does not find any implementation - for a requested platform and interface. Default implementations must be marked with - . - - - - - Occurs when an extension assembly containing platform implementations is loaded. - - - - - Scans a Sharpmake extension assembly for the platform implementations, and then - register those implementations. - - The to scan. - is `null`. - was loaded in reflection-only. - is a dynamically compiled assembly. - - - - Registers a platform implementation given an implementation class. - - The of the implementation class. - is `null`. - does not have a default constructor, or is an abstract class or an interface. - - This method will search through the on - to find what platform/interface pairs to register. - - - - - Registers a platform and an interface to a given implementation class. - - The to register to. - The interface to register to. - The of the implementing class. See remarks. - or are `null`. - does not implement , or does not have a default constructor, or is an abstract class or an interface. - - - This method ignores the attributes on and registers it for - and . - - - must have a default constructor because this method will - attempt to create an instance. - - - - - - Registers a platform and an interface to an object that implements the interface. - - The to register to. - The interface to register to. - An that implements . - or are `null`. - does not implement . - - This method ignores the attributes on 's - and registers it for and - . - - - - - Registers a platform implementation given an implementation class. - - The type of the implementation class. - - This method will search through the on - to find what platform/interface pairs to register. - - - - - Registers a platform and an interface to a given implementation class. - - The interface to register to. - The type of the implementing class. - The to register to. - - This method ignores the attributes on and - registers it for and . - - - - - Registers a platform and an interface to an object that implements the interface. - - The interface to register to. - The to register to. - A that provides the implementation. - is `null`. - - This method ignores the attributes on 's - and registers it for and - . - - - - - Checks if the registry contains an implementation of a given interface for a given - platform. - - The type of the interface needed. - The platform for which the interface must be implemented. - `true` if the interface is there, `false` otherwise. - - - - Gets the default implementation of a given interface. This is what is returned if an - interface is not implemented for any platform. - - The type of the interface to get. - The default interface, as a instance. - There is no default implementation of . - - - - Gets the default implementation of a given interface if it has one. Does not throw if - there is no default implementation. - - The type of the interface to get. - The default interface, as a instance, if such an interface exists. Returns `null` if there is no default interface. - - - - Gets the implementation of a given interface for a given platform. If no implementation - was defined for that platform, returns the default implementation instead, if one was - defined. - - The type of the interface to get. - The platform whose implementation is requested. - The implementation of for a given platform. - There is neither an implementation nor a default implementation of for that platform. - - - - Gets the implementation of a given interface for a given platform. If no implementation - was defined for that platform, returns the default implementation instead, if one was - defined. Does not throw an exception if no platform implementation is found. - - The type of the interface to get. - The platform whose implementation is requested. - The implementation of for a given platform, or `null` if no such implementation or default implementation exists for that platform. - - - - Gets the list of platforms for which a given interface is available. - - The type of the interface to check availability for. - The collection of available platforms. - - - - IParsingFlowParser classes must also implement ISourceParser. - Given the lines of a file, they can decide whether the other parsers should parse the current line or not. - - - - - Returns true if the line should be parsed by the other source parsers. - - - - - Called when a file is being parsed - - - - - Called when a file is done being parsed - - - - - The parsing flow parser that parses the #if, #elif, #else inside the Sharpmake files - Depending if the current block is defined (lets say #if SYMBOL, where SYMBOL has been passed in the application's parameters) - This parser is used to prevent parsing Includes and References from blocks are not defined. - - - - - All nested files analyzed - - - - - The current code block is defined if we are currently parsing a line that is inside a block where all nested conditions are defined. - - - - - Current nested file path. - - - - - All nested condition blocks parsed so far (#if inside #if) - - - - - The current code block is defined if we are currently parsing a line that is inside a block where all nested conditions are defined. - - - - - Did at least one branch of the (if, elif, else) branches has been resolved (did we entered one of the block) ? - - - - - Is the current block of code being defined (condition evaluated as true) ? - - - - - Name of the define being tested. - - - - - Options to specify the properties of the dependencies between projects. This is used with - and - . - - - - - The dependent project must be built after the dependency. - Otherwise the two files have no dependencies. - - - - - The dependent project inherits the library files of the dependency. - Valid only when the project is a C or a C++ project. - - - - - The dependent project inherits the library paths of the dependency. - Valid only when the project is a C or a C++ project. - - - - - The dependent project inherits the include paths of the dependency. - Valid only when the project is a C or a C++ project. - - - - - The dependent project inherits the defined symbols of the dependency. - Valid only when the project is a C or a C++ project. - - - - - The dependent project inherits the `using` paths of the dependency. - Valid only if the project is a C# project and uses Microsoft C++/CX extensions . - - - - - Specifies that the dependent project inherits the dependency's library files, library - paths, include paths and defined symbols. - - - - - Specifies that the dependent project inherits the dependency's include paths and - defined symbols, but not it's library files or library paths. Use this for header-only - C++ libraries. - - - - - Visibility types for inter-project dependency relationships. This setting is - usually only meaningful in cases where a library depends on another library because - one of its executables has an end-point in the other's dependency graph. - - - - - Specifies that the dependency relationship is private. The dependent project will not - expose the dependency's exported properties, such as it's include paths. - - - A library that has a private dependency relationship with another library will use that - library internally when compiled but will not expose the private dependency's - exported properties (library paths, include paths, etc.) when other projects link to - it. For example, if library B has a private dependency on C and A wants to link to B, - A will not inherit any of C's include paths, library paths, etc. - - - - - Specifies that the dependency relationship is public. The dependent project will expose - the dependency's exported properties as it's own. - - - A library that has a public dependency relationship with another library will expose - that dependency's include paths, library paths, etc. to any project that has a public - dependency on it. For example, if library B has a public dependency on C and A wants to - link to B, A will inherit all of C's include paths, library paths, etc. - - - - - - Interface for classes that implement platform-specific tasks for generating - configurations. An implementation of this interface is required when generating - for a platform. - - - Implementations can assume that they will only be called by Sharpmake, and that the - arguments are sane (ex: is passed valid (non-null) - configurations). - - - - - Sets up the library paths when adding a dependency on a dynamic library. - - The instance on which - to set the paths. - The bitflags - that specify the properties of the dependency relationship. - The instance of the dependency. - - - - Sets up the library paths when adding a dependency on a static library. - - The instance on which to - set the paths. - The bitflags - that specify the properties of the dependency relationship. - The instance of the dependency. - - - - Gets the default file extension for a given output type. - - The whose default file extension we are seeking. - A string, containing the file extension (could be empty on some platforms, like exe on linux). - - - - Gets the default file prefix for a given output type. - - The whose default file prefix we are seeking. - A string, containing the file prefix (for instance lib on linux). - - - - Gets the library paths native to the specified configuration's platform. - - The to get the paths for. - A list of library paths for the specified configuration and platform. - - - - Gets the number of generated instances. - - - - - Maps the .NET into its native counterpart. - - Specifies the to map. - Returns the mapped value. - - This method maps values of in the following way: - * and are mapped to . - * is mapped to . - * Other values are mapped to themselves. - - - - - Output types for the . - - - - - Output is an executable/>. - - - - - Output is a static library/>. - - - - - Output is a DLL(Dynamic Link library)/>. - - - - - The project does not produce any code. It is either a header-only library, or a - utility project that is used as part of the build system but does not produce - any code. - - - - - The output is an executable .NET program that opens a console window on - startup. The extension is always .exe. - - - - - The output is a .NET class library that can be added as a reference. The - extension is always .dll. - - - - - The output is an executable .NET program that does not display a console window - on startup. The extension is always .exe. - - - - - The output is an iOS app. - - - - - The output is an iOS test bundle. - - - - - Specifies no output. Do not use this. - - - - - Methods to list source files. - - - This is only used for FASTBuild generation. - - - - - Explicitly refer to files in FASTBuild configuration files using file lists. - - - - - Implicitly refer to files in FASTBuild configuration files using paths and - exclusion file lists. - - - - - FASTBuild deoptimization strategies for writable files. - - - - - No deoptimization. This is the default. - - - - - Deoptimize all files with a writable flag on the file system. - - - This is useful when using Perforce, since files that have not been modified are - typically read-only. That is, this option enables automatic deoptimization of modified files. - - - - - When the FASTBUILD_DEOPTIMIZE_OBJECT token is specified, - deoptimize files with writable status. - - - This is useful when using Perforce, since files that have not been modified are - typically read-only. That is, this enables automatic deoptimization of modified files. - - - - - When the output is an executable program, this lists the levels of privileges that - it can require upon execution, using Windows' User Account Control (UAC.) - - - - - UAC Execution Level: as invoker. - - - Use the same privileges as the process that created the program. - - - - - UAC Execution Level: highest available. - - - Use the highest privileges available to the current user. - - - - - UAC Execution Level: require administrator. - - - Always run with administrator privileges. This will usually open a UAC dialog - box for the user. - - - - - Gets or sets the output type of the current configuration, exe, lib or dll. - - - - - Gets or sets the project's output extension (ie: .dll, .self, .exe, .dlu). - - - - - Gets or sets whether to copy output files to the output directory. - - - This setting is provided for libraries, because they are usually intermediate - artifacts during the compilation process and do not need to be in the final output - directory unless it's necessary. - - The default is false. Setting this to true will force the generators - to copy the library artifacts. - - - If is set to a value that corresponds to an executable program - (ie: ), the generators disregard this property and - always copy the results. - - - - - - Gets or sets whether the configuration output dll file will be copied in the target path of the projects depending on it. - - - This setting only apply with - This setting is usefull for dlls that are dynamically loaded: - The dll do not need to be put along the executable. - - The default is true. Setting this to false will prevent the generators - to copy the library artifact in the exe directory. - - - - - - Gets or sets whether dependent projects will copy their dll debugging database to the - target path of their dependency projects. The default value is true. - - - - - Gets or sets whether dependent projects will copy their debugging database to the - target path of their dependency projects. The default value is false. - - - - - Command to execute . - - The relative path to the files. - The relative path to the target directory. - The path to the working directory. - The mapped value as a string. - - - - Setting this boolean to true forces Sharpmake to fill in the AD fields in the current static - library project. - - - Since Sharpmake handles all dependencies, using an AdditionalDependencies field in - your project is typically useless for static libraries. However, when dependents aren't - generated by Sharpmake, (that is, when a .sln contains Sharpmake generated projects as static - libraries as well as manually maintained dependent projects) this feature can be useful. - - The default is false. Set this boolean to true to make Sharpmake fill in the fields - for the current static library project. - - - - - - Gets or sets the name of the project, as viewed by the configuration. - - - Under normal circumstances, you should not need to edit this property. The name of - the project is set in and this is the default value. - - - - - Gets or sets the file name for the generated project, without any file extension. - (ex: `"MyProject"`) - - - - - Gets or sets the directory in which the project will be generated. - - - By default, this is set to the same directory that this Sharpmake script is running in. - - - - - Gets or sets the name of the generated .NET assembly. - - - Ignored in projects that are not built on the .NET framework. - - - - - Gets the full path of the project file, including the directory and the - file name. This doesn't include the file extension which depends on - the generator. - - - - - Gets or sets the solution folder that will hold the Visual Studio solution for this project. - - - Ignored unless building a Visual Studio project. - - To place the project in a sub-directory, use a `/` as a directory separator. - - - - - - Set the solution folder associated with a solution name - - - Ignored unless generating for Visual Studio - This property allows to get the same project being in different folder dependeng on the solution name. Ex. In Engine.sln the project Physic is at root, while in Tools.sln it is in a Engine/ directory - Use the property SolutionFolder if not found inside the dictionary. - - To place the project in a sub-directory, use a `/` as a directory separator. - - - - - - Gets the solution folder associated with a solution name. - - - - - Gets or sets the suffix to use in . - If unset, the pdb file names will be the target name with a suffix and the .pdb extension. - - - Always put a separate pdb for the compiler in the intermediate path to avoid - conflicts with the one from the linker. - This helps the following things: - 1. Makes the linker go faster - 2. Avoid pdbs for dlls and .exe(s) growing and growing at each link - 3. Makes incremental linking work better. - - - - - Gets or sets the directory and file name of the Visual Studio *linker* PDB file, - including the file extension. - - - Used only when generating a Visual Studio project. - - The default value is: - [conf.TargetPath]/[conf.TargetFileFullName][conf.LinkerPdbSuffix].pdb. - - - Always put a separate PDB for the compiler in the intermediate path to avoid - conflicts with the one from the linker. - - - - - - Gets or sets the suffix to use in . - - - Provided only as a convenience as it is only used in the default - value of to assign a suffix to the PDB. If you - change so that it doesn't use this property, - then it isn't used. - - - - - Gets or sets the directory and file name of the Visual Studio compiler PDB file, - including the file extension. - - - Used only when generating a Visual Studio project. - - The default value is - [conf.IntermediatePath]/[conf.TargetFileFullName][conf.CompilerPdbSuffix].pdb. - - - The default file name in in Sharpmake does not - match its default file name in Visual Studio for compiler PDB, which is VCx0.pdb. - See - /Fd (Program Database File Name) - https://msdn.microsoft.com/en-us/library/9wst99a9.aspx - . - If you mean to use Visual Studio's default value, you must set this property to null. - - - Always put a separate PDB for the compiler in the intermediate path to avoid - conflicts with the one from the linker. - - - - -

- Gets or sets whether and - are relative. - - - - - Gets or sets the suffix of the manifests when building a project that uses - Microsoft's C++/CX with the build option *Embed Manifest*. - - - - - Prefix for compiled embedded resource files - - - - - Gets or sets the directory where the compiler will place the intermediate files. - - - This corresponds to the Intermediate directory in the Visual Studio project - configuration. - - The default value is [conf.ProjectPath]/obj/[target.Platform]. - - - - - - Base Intermediate devEnv directory. Only used in csproj - - - - - Gets the list of defined symbols to use when compiling the project. - - - Generators are allowed to add new symbols to this list when needed. For example, - you don't need to explicitly add _WIN32 to the list when building for Windows. - - These symbols are defined during the compilation, not when the project is used as a library. - The symbols that need to be defined when this project is being consumed as a - library, must be added to instead. - - - - - - Gets the list of symbols that are exported when the project is being used as a - library. - - - Not used if the project is not a library. - - The symbols defined in this list are not defined when building the library. You - must define them in . - - - - - - Excludes the specified files from the build. Removes the files in this list from - project.SourceFiles and matches project.SourceFilesRegex. - - - - - Gets a list of regular expressions that are used to filter matching source files - out of the build. - - - - - Gets a list of regular expressions that are used to filter matching source files - into the build. - - - - - Source files that match this regex will be compiled as C Files. - - - - - Source files that match this regex will be compiled as CPP Files. - - - - - Source files that match this regex will be compiled as CLR Files. - - - - - Source files that match this regex will be excluded from the CLR Files list. - Used on C++ projects rather than C++/CLI projects. - - - - - Source files that match this regex will be explicitly not compiled as CLR files. - Used on C++/CLI projects to force certain files to be compiled without the /clr switch. - - - - - Gets a list of include paths for compiling C and C++ projects. - - - If the project is a library, the include paths are imported in dependent - projects. Use if you need to use include paths - that are only used to compile the library. - - - - - Gets a list of include paths for compiling C and C++ libraries that are not - shared with dependent projects. - - - - - - Include paths for resource compilation. - These paths will propagate via the IncludePaths DependencySetting, use ResourceIncludePrivatePaths if you want to avoid this - - - - - Include paths for resource compilation. - These paths are received from dependencies via the IncludePaths DependencySetting. - - - - - Include paths for resource compilation. - These paths will never propagate. - - - - - Gets a list of compiler options to send when calling the compiler. - - - Generators are allowed to transform the textual representation of the options added - here so that they work with the shell of the operating system or with the makefile - format. - - The values in this list are simply concatenated, separated with spaces, sanitized - for the shell, and then appended directly to the command that calls the compiler. - - - They are not translated from one compiler to the other. When you - use this property, you need to know which C++ compiler you're using. - - - - This property is for the compiler. Its counterpart for the linker is - . - - - - - - Compiler-specific options to pass when invoking the compiler to create PCHs. - - - Currently only respected by the BFF generator. - - - - - Compiler-specific options to pass when invoking the compiler telling it to use PCHs. - - - Currently only respected by the BFF generator. - - - - - Gets a list of file extensions that are added to a Visual Studio project with the - None build action. - - - Used only by the Visual Studio generators. - - - - - Adds commands for VS debugger - - - Used only by the Visual Studio generators. - - - - - Gets or sets the name of the source file for the precompiled header in C and C++ - projects, ie: stdafx.cpp. This property must be null for projects that don't - have a precompiled header. - - - Both and must be null if - the project doesn't have precompiled headers. - - Sharpmake assumes that a relative path here is relative to . - If that isn't correct, you must use an absolute path. - - - - - - Gets or sets the name of the precompiled header in C and C++ projects, - ie: stdafx.h. This property must be null for projects that do not have a - precompiled header. - - - Both and must be null if - the project doesn't have precompiled headers. - - Sharpmake assumes that any relative path entered here is relative to - . If that isn't correct, you must use an absolute path. - - - The source files must manually include this header or you will have - compiler errors. Sharpmake merely tells the compiler to expect a precompiled - header. The compiler doesn't implicitly include the header. - - - - - - Gets or sets the output directory for the precompiled header's binary file in C and C++ - projects. - - - If this property is set to null, Sharpmake will simply write the binary file to - , the same as the object file. - - If defined, precompiled headers are written to this directory instead of the intermediate directory. - - - - - - Gets a list of files that don't use the precompiled headers. - - - - - Gets a list of file extensions that don't use the precompiled headers. - - - - - Gets the list of directories that contain source files that don't use the - precompiled headers. - - - - - List of headers passed to the preprocessor to be parsed. - - - - - List of files that are built to consume WinRT Extensions. - - - - - Regex-based list of files that are built to consume WinRT Extensions. - - - - - List of files that are excluded from being built to consume WinRT Extensions. - - - - - Regex-based list of files that are excluded from being built to consume WinRT Extensions. - - - - - Gets a list of files that must be compiled using the compiler's default exception settings - and with exceptions enabled. - - - If the source file is compiled with WinRT extensions, it is implicitly added to - this list. - - - - - Gets a list of files that must be compiled with extern C exceptions enabled. - - - - - Gets a list of files that must be compiled with SEH exceptions enabled. - - - - - Enables (true) or disables (false) a dump of the dependency graph for this configuration. - - - - - Adds a C or C++ source file with a specific exception setting. - - The path of the source file. - The C++ exception setting. - is null. - is not a known value. - has already been added with a different exception mode. - - This is a utility method for selecting either - , - or - and for making sure that the file has - not already been included with another exception setting. - - - - - Gets which exception setting has been set for a given file in a C or C++ project. - - The path of the file to examine. - A value from the enumerated type that specifies which exception mode is used for the specified file. - is null. - - - - Gets a list of the search directories for static libraries. - - - - - Gets a list of the static libraries to link to. - - - This should only be used for third party libraries that are not part of the compiled - source code. Libraries that are part of the compiled source code should be included - by calling either - - or . - This makes things much easier because Sharpmake will automatically take care - of setting the library paths, library files, include paths, and build order - according to the dependency graph. - - Unless your library name contains a .(dot) in its file name, you don't need to add - the file extension of any library you add here. If you do, Sharpmake will - automatically remove it. - - - - - - Gets a list of "using" directories for compiling WinRT C++ extensions. - - - As WinRT is a Microsoft extension, this property is only used by the Visual Studio - generators. - - - - - Gets the list of public dependencies for .NET projects. - - - You should use - - instead of adding elements directly into this list. - - - - - Gets the list of private dependencies for .NET projects. - - - You should use - - instead of adding elements directly to this list. - - - - - Options passed to the librarian / archiver - - - - - Gets a list of linker options to send when calling the compiler. - - - Generators are allowed to transform the textual representation of the options added - here so that they work with the operating system's shell or with the makefile - format. - - The values in this list are simply concatenated, separated with spaces, sanitized - for the shell, and then appended directly to the command that calls the linker. - - - The options added here are not translated from one linker to the other. When you - use this property, you need to know which C++ compiler you're using. - - - This property is for the linker. Its counterpart for the compiler is - . - - - - - - Target path, where the output files will be compiled, ex: exe, dll, self, xex - - - - - Gets or sets whether a .NET class library generates an import library instead of a - managed assembly (DLL). - - - This property has no effect unless is set to - . - - - - - Gets or sets whether to skip generating a Visual Studio filter file for this project. - - - - - Gets or sets the path of the module definition file to be passed to the linker. - - - This is only used by the Visual Studio generators. - - - - - Gets or sets the path where the blob files will be generated. - - - - FASTBuild supports blobbing via it's "unity" files and the FASTBuild - generators use to determine where to put the unity files. - - - - - - How many static blob files would this configuration generate - - - - - Gets or sets the path of the unity files generated by the FASTBuild build system. - - - This property is only used when generating FASTBuild makefiles. When using the - usual compiler, use to set the location of the blob files. - - - - - If specified, overrides Project.DefaultBlobWorkFileHeader. - - - - - If specified, overrides Project.DefaultBlobWorkFileFooter. - - - - - If specified, overrides Project.BlobSize . - - - - - Gets or sets the number of "unity" files to generate when using FASTBuild. - - - - - Gets or sets whether to include blobs in the project. - - - - - Custom Actions to do before invoking FastBuildExecutable. - - - - - Gets or sets the name of the FASTBuild BFF file. - - - - - Gets the full file path of the FASTBuild BFF file. This includes the directory and - file name. - - - - - Whether to use relative paths in FASTBuild-generated Unity files. - - - - - Gets or sets whether to generate a FASTBuild (.bff) file when using FASTBuild. - - - For projects merging multiple targets, sometimes what is wanted is to not generate FastBuild - .bff files but, instead, include any existing .bff files from the appropriate targets. - - - - - Represents a build step that invokes an executable on the file system. - - - - - Creates a new instance. - - The executable file. - The command line option that specifies the input file. - The command line option that specifies the output file. - Any other command line arguments to pass to the executable. - The working directory of the executable. - ??? - If `true`, the output is to *stdout*. - - - - Gets or sets the name of the executable file. - - - - - Gets or sets the command line option that specifies the input file. - - - - - Gets or sets the command line option that specifies the output file. - - - - - Gets or sets any other command line option to pass to the executable. - - - - - Gets or sets the working directory to use when calling the executable. - - - - - Sets multiple files as executable input. Only supported by Bff generator. - - - - - Gets or sets whether the output is to *stdout*. - - - - - Gets or sets whether the step should be executed every time. - - - - - Settings for NMake projects with custom execution - - - - - Specifies a function with a relative source file path as input and an object file path as output. - - - - This will slow down your project's compile time! Overwrite the object file output path - only for the files that absolutely require it. Let the function return null or empty string - to skip the overwrite for the given source file. - - See a discussion of this in StackOverflow - http://stackoverflow.com/a/1999344 - . - - - - - - Gets or sets the name of the current configuration. - - - In Visual Studio, the name of the configuration is displayed in the drop-down list. - - - - - Gets or sets the base file name of the target. - - - Despite the name of the property, this is actually the base name. You can prepend - and append suffixes using and - . - - The default value is the name of the project. - - - - - - Gets or sets the suffix to append to the target name. - - - - - Gets or sets the prefix to prepend to the target name. - - - - - Gets or set the platform dependent file prefix (for instance "lib" for libraries on linux). - If left null, sharpmake will set it to the default for the platform - according to the output type when the conf is resolved. - - - - - Gets the full file name of the target, without the path but with the prefix and suffix, and without the extension - - - - - Gets or sets the project's full extension (ie: .dll, .self, .exe, .dlu). - Set to an empty string you don't want any. - If left null, sharpmake will set it to the default for the platform according to the output type, when the conf is resolved. - - - - - Gets the full file name of the target, without the path but with the suffix, and the extension - and the prefix. - - - - - Gets or sets the ordering index of the target when added as a library to another - project. - - - - - Gets or sets the ordering index of the library paths when added as a library to - another project. - - - - - Gets or sets the list of files to copy to the output directory. - - - - - Target copy files path, where the TargetCopyFiles files will be copied - - - - - Gets or sets the list of files to copy to a sub-directory of the output directory. - - - - - Gets or sets the list of files that the target depends on. - - - - - Gets or sets whether this configuration is included in or excluded from the build. - - - - - Gets or sets a custom that is used to copy - dependencies after a build. - - - This can be used to add a custom build tool on a dummy file to copy the - dependencies' DLLs and PDBs. Works better than a PostBuildStep. - - - - - Gets or sets a list of shell commands to add as a prebuild script. - - - - - Gets or sets the name of the prebuild script (that is written to the build - output). - - - - - Gets or sets whether the prebuild is excluded from the build. - - - - - Gets or sets a list of instances that call executables - at prebuild. - - - - - Gets or sets a list of instances that call executables - at prebuild. - - - - - Gets or sets a list of shell commands to execute before linking a C or C++ project. - - - - - Gets or sets a description to write to the build output before linking a C or C++ - project. - - - - - Gets or sets whether the pre-link is excluded from the build. - - - - - Gets or sets a list of shell commands to execute after linking to a C or C++ - project. - - - - - Gets or sets a description to write to the build output after linking to a C or C++ - project. - - - - - Gets or sets whether the post-link is excluded from the build. - - - - - Gets or sets a list of shell commands to execute after building the project. - - - - - Gets or sets a description to write to the build output after building the - project. - - - - - Gets or sets whether the post-build is excluded from the build. - - - - - This is all the data specific to a custom build step. - The ones stored in the project configuration use absolute paths - but we need relative paths when we're ready to export a specific - project file. - - - - - This lets us filter which type of project files should have this custom build step. - This is specifically used to deal with the limitations of different build systems. - - - Visual studio only supports one build action per file, so if you need both compilation and - some other build steps such as QT or Documentation generation on the same file, you need to put the rule - on a different input file that also depends on the real input file. - - FASTBuild is key based, not file based. So it can have two different operations on the same file. - If you need support for FASTBuild, you can make two different custom build rules with one specific to BFF - and the other excluding BFF. - - - - - - The custom build step is used for both project file and FASTBuild generation. - - - - - The custom build step excludes BFF. - - - - - The custom build step is specific to BFF - - - - - File custom builds are bound to a specific existing file. They run when the file is changed. - - - - - This is the executable for the custom build step. - - - - - These are the arguments to pass to the executable. - - - We support [input] and [output] tags in the executable arguments that will auto-resolve to the relative - paths to and . - - - - - This is what will appear in the project file under "description". It's also the key used - for FASTBuild, so it should be unique per build step if you want to use FASTBuild. - - - - - For FASTBuild compatibility, we can only have one input and one output per custom command. - This is what we tell the build system we're going to produce. - - - - - Not supported by FASTBuild. - Additional files that will cause a re-run of this custom build step can be be specified here. - - - - - Specifies whether this step should run in builds for project files or FASTBuild or both. - - - - - Specifies a list of custom build steps that will be executed when this configuration is active. - - - - - Gets or sets the working directory when a C# project is started from Visual Studio. - - - - - Defines where the compiler will generate an XML documentation file at compile time. - - - The compiler generated XML file can be distributed alongside your .NET assembly so that - Visual Studio and other IDEs can use IntelliSense to show quick information about types - or members. - Additionally, the XML file can be run through tools like DocFX and Sandcastle - to generate API reference websites - - The following will output an XML file in the target directory with the same root filename as the assembly - - conf.XmlDocumentationFile = @"[conf.TargetPath]\[project.AssemblyName].xml"; - - C# only - - - - Gets the that this - belongs to. - - - If this is a C# project, can be safely cast to - . - - - - - Gets or sets whether this project is deployed. - - - This property only applies to Visual Studio projects. - - - - - Gets or sets whether blobbing is enabled for this configuration. - - - Blobbing is only used for C and C++ projects. FASTBuild uses it's own blobbing - strategy (called unity files), which is enabled by setting FASTBuild properties. - - - - - Gets or sets the defined symbol that tells a C++ project that it is being built - using a blobbing strategy. - - - Blobbing is only used for C and C++ projects. FASTBuild uses it's own blobbing - strategy (called unity files), which is enabled by setting FASTBuild properties. - - - - - Gets or sets the Windows UAC permissions required to run the program. - - - - - Gets or sets the defined symbol that can be used from C and C++ projects to detect - that a Windows resource file (.rc) is being used. - - - - - Gets the file extension for executables. - - - - - Gets the file extension for compressed executables, such as bundles, game packages - for consoles, etc. - - - - - Gets the file extension for shared libraries. - - - - - Gets the file extension for program debug databases. - - - - - Gets or sets whether FASTBuild will be used to build the project. - - - - - List of the MasterBff files this project appears in. - This is populated from the solution generator - - - - - Gets or sets whether FASTBuild blobs (unities) will be used in the build. - - - - - Gets or sets whether FASTBuild tasks will be distributed on the network. - - - - - Gets or sets whether FASTBuild will use cached results to accelerate the build. - - - If caching is allowed, FASTBuild will use the value specified in - . - - - - - Gets or sets the strategy to use to select files that are blobbed. - - - - - Gets or sets the strategy to use to select files that are not blobbed. - - - - - Gets or sets the generic criteria by which files are deoptimized (compiled individually) - by FASTBuild. - - - - - Gets or sets custom command line arguments to pass to FASTBuild when building the - project with this configuration. - - - - - Gets the list of resolved files to copy. - - - - - Gets the list of resolved files to copy to a sub directory of the target directory. - - - - - Gets the list of resolved dependency files. - - - - - Gets the list of resolved pre-build executables. - - - - - Gets the list of resolved post-build executables. - - - - - Gets or sets the GUID of the Visual Studio project. - - - This is only relevant to Visual Studio generators. - - This property coerces any value set to it to use an uppercase - `00000000-0000-0000-0000-000000000000` format for the GUID. - - - - - - Gets or sets the full file name of the project. - - - - - Generate relative paths in places where it would be otherwise beneficial to use absolute paths. - - - - - Configuration OS version if not defined as Target fragment. - - This allow adding OS version to specific DotNetFramework during configuration without altering Target's matching system - - - - Optional OS version at the end of the TargetFramework, for example, net5.0-ios13.0. - - C# only, will throw if the target doesn't have a non-default DotNetOS fragment - - - - Gets the dependency settings configuration for the given project type of this configuration. - - The project type. - The specified project's dependency settings with related flags activated. - - - - - Adds a new ProjectReferencesByPath path, with optionally the guid. - Adding the guid allows to set the reference without opening the project. - - The project file path - An optional project guid - Reference options - An optional project type guid, one member of ProjectTypeGuids. Deduced from file extension if not provided. - - - - Adds a new XResourcesImg path, with an optional link - - The path - An optional link - - - maps relative source directory to a custom filter path for vcxproj.filter files - - - - This property controls the casing of includes within the generated blob files. - If true, the case will be fixed. Default is false. - - - - - Special constructor for utility projects generated internally, - since these projects must handle paths differently - - - - Indicates if the class is defined within Sharpmake - - - - Called before configuration - - - - - Validate that a configuration output type is supported by the current project type. - - The configuration output type to validate. - Returns true if the current project type supports the specified output type, otherwise false. - - - - If set to true. Will explicit the RestoreProjectStyle in the project file - - - - - Enable or disable the property [EnableDefaultItems] in NetCore Project Schema - - - - - Generate a file containing API documentation. - - - - - A package project for deployment on Android device. - - - - - The project type to lookup in the dependencies of the package to be used as the application library. - This library is the first to be loaded when the package is started. - - - It is an error if the specified type can't be found in the configuration dependencies. - - - - - - Enum value on attribute used to define reference alias - - - - - - - - Main AddReference method called by extensions. - This one is using aliasValue and call the proper add reference for sharpmake projet - - - - - - - - - Helper ReferenceAliasManager that allow to forward AddReference from one enum type to another, based on enum value name matching - This is used to match a publicly exposed enum to a private enum definition for example. - - Source enum type - Destination enum type - - - - Those extensions will let you use AddReference on conf object in your Configure - ex : - conf.AddReferences(MyEnum.Lib1, MyEnum.Lib2); - conf.AddReference(MyEnum.Lib3, target, project); - - - - Initial cache capacity. Should not be divisible by a small prime number. Justification here: https://docs.microsoft.com/en-us/dotnet/api/system.collections.concurrent.concurrentdictionary-2.-ctor?view=netcore-3.1. /// - - - Initial cache capacity. Should not be divisible by a small prime number. Justification here: https://docs.microsoft.com/en-us/dotnet/api/system.collections.concurrent.concurrentdictionary-2.-ctor?view=netcore-3.1. /// - - - - Returns size of cache ( i.e. the number of elements in the cache ). - - - - - - Marks a .NET assembly as a host of Sharpmake extension types (platform implementations for Sharpmake generators, builder...). - - - - - Gets the number of instances created so far during - Sharpmake's execution. - - - - - Creates a new instance. - - - - - Gets the instance that owns this configuration. - - - - - Name of this solution configuration. - - - This name will be displayed in Visual Studio's configuration drop down list. (Or - other development tools that support multiple configuration per workspace.) - - - - - File name (without extension) of the solution that this - configuration must be written into. - - - - - Directory of the solution that this configuration must be written into. - - - - - Gets the file name (without extension) of the solution that this configuration must - be written info. - - - - - File name (without extension) of the master BFF for this solution configuration. - - - - - Directory of the master BFF for this solution configuration. - - - - - Gets the file path (without extension) of the master BFF for this solution - configuration. - - - - - The solution folder to use for the project in this solution. It overrides - - - - - Holds the path references to projects that should be added in the solution - - - - - Allow to multi-thread the build of the executables when doing a Build Solution (Ctrl+Shift+B). - However, it will not be possible to build each executable individually. - - - - - In case we've generated a "FastBuildAll" project, this flag will determine if we generate it for all - the configurations, or only the ones that need it - - - - - For adding additional files/folders to the solution - Keys are names of the directories in the virtual solution hierarchy, values are paths - - - - - ISourceParser classes are tasked with parsing lines in a file. - They can add Sharpmake references through the AssemblerContext. - - - - - Parse the current line of the file and update the context if necessary. Parsers MUST NOT assume that the lines will be parsed sequentially. - - - - - A parser that parses C# Attributes, eg [Sharpmake.Include(...)] - - - - - Same as Strings but support to specify additionally an order number for every entry. - Every entry has by default the value 0. Putting negative values will result in the entries - to be first after a sort, putting positive will result in the entries to be last after a - sort. Order numbers are kept when copying container to another OrderableStrings. - It is forbidden to specify 2 different non-zero order numbers for the exact same string - in 2 merged together OrderableStrings. - - - - The collection to intersect with - Contains elements in both containers that are did not intersect - - - - The development environments supported by Sharpmake generators. - - - This fragment is mandatory in every target. - - - - - Visual Studio 2015 - - - - - Visual Studio 2017 - - - - - Visual Studio 2019 - - - - - Visual Studio 2022 - - - - - iOS project with Xcode. - - - - - Eclipse. - - - - - GNU Makefiles. - - - - - All supported Visual Studio versions. - - - - - This method will remove all the masks that were added, if any - - - - - The global fragment mask will add the mask or and it with previously existing masks - - - - - - Same as Strings with configurable type - - - - - the other container to intersect with - Contains elements in both containers that are did not intersect - - - - Simple class that wraps a variable name and it's assigned value. - - - - - Gets the name of the variable or parameter to assign the value to. - - - - - Gets the value to assign. - - - - - Creates a new instance. - - The name of the variable or parameter to assign. - The value to assign to . - is `null`. - - - diff --git a/Tools/Sharpmake/macOS/cs/Microsoft.CodeAnalysis.CSharp.resources.dll b/Tools/Sharpmake/macOS/cs/Microsoft.CodeAnalysis.CSharp.resources.dll old mode 100755 new mode 100644 index d0282cc6..63dfb929 Binary files a/Tools/Sharpmake/macOS/cs/Microsoft.CodeAnalysis.CSharp.resources.dll and b/Tools/Sharpmake/macOS/cs/Microsoft.CodeAnalysis.CSharp.resources.dll differ diff --git a/Tools/Sharpmake/macOS/cs/Microsoft.CodeAnalysis.resources.dll b/Tools/Sharpmake/macOS/cs/Microsoft.CodeAnalysis.resources.dll old mode 100755 new mode 100644 index fd3063e1..a5b7a3cf Binary files a/Tools/Sharpmake/macOS/cs/Microsoft.CodeAnalysis.resources.dll and b/Tools/Sharpmake/macOS/cs/Microsoft.CodeAnalysis.resources.dll differ diff --git a/Tools/Sharpmake/macOS/de/Microsoft.CodeAnalysis.CSharp.resources.dll b/Tools/Sharpmake/macOS/de/Microsoft.CodeAnalysis.CSharp.resources.dll old mode 100755 new mode 100644 index e079e05a..57e2ea2f Binary files a/Tools/Sharpmake/macOS/de/Microsoft.CodeAnalysis.CSharp.resources.dll and b/Tools/Sharpmake/macOS/de/Microsoft.CodeAnalysis.CSharp.resources.dll differ diff --git a/Tools/Sharpmake/macOS/de/Microsoft.CodeAnalysis.resources.dll b/Tools/Sharpmake/macOS/de/Microsoft.CodeAnalysis.resources.dll old mode 100755 new mode 100644 index 54aa47dd..ec9bbf49 Binary files a/Tools/Sharpmake/macOS/de/Microsoft.CodeAnalysis.resources.dll and b/Tools/Sharpmake/macOS/de/Microsoft.CodeAnalysis.resources.dll differ diff --git a/Tools/Sharpmake/macOS/es/Microsoft.CodeAnalysis.CSharp.resources.dll b/Tools/Sharpmake/macOS/es/Microsoft.CodeAnalysis.CSharp.resources.dll old mode 100755 new mode 100644 index 4afd9fad..2f9a83cc Binary files a/Tools/Sharpmake/macOS/es/Microsoft.CodeAnalysis.CSharp.resources.dll and b/Tools/Sharpmake/macOS/es/Microsoft.CodeAnalysis.CSharp.resources.dll differ diff --git a/Tools/Sharpmake/macOS/es/Microsoft.CodeAnalysis.resources.dll b/Tools/Sharpmake/macOS/es/Microsoft.CodeAnalysis.resources.dll old mode 100755 new mode 100644 index 2d6218e8..bd05ba39 Binary files a/Tools/Sharpmake/macOS/es/Microsoft.CodeAnalysis.resources.dll and b/Tools/Sharpmake/macOS/es/Microsoft.CodeAnalysis.resources.dll differ diff --git a/Tools/Sharpmake/macOS/fr/Microsoft.CodeAnalysis.CSharp.resources.dll b/Tools/Sharpmake/macOS/fr/Microsoft.CodeAnalysis.CSharp.resources.dll old mode 100755 new mode 100644 index 93a31c11..b526d0c3 Binary files a/Tools/Sharpmake/macOS/fr/Microsoft.CodeAnalysis.CSharp.resources.dll and b/Tools/Sharpmake/macOS/fr/Microsoft.CodeAnalysis.CSharp.resources.dll differ diff --git a/Tools/Sharpmake/macOS/fr/Microsoft.CodeAnalysis.resources.dll b/Tools/Sharpmake/macOS/fr/Microsoft.CodeAnalysis.resources.dll old mode 100755 new mode 100644 index a22b8d5b..ef17d3a4 Binary files a/Tools/Sharpmake/macOS/fr/Microsoft.CodeAnalysis.resources.dll and b/Tools/Sharpmake/macOS/fr/Microsoft.CodeAnalysis.resources.dll differ diff --git a/Tools/Sharpmake/macOS/it/Microsoft.CodeAnalysis.CSharp.resources.dll b/Tools/Sharpmake/macOS/it/Microsoft.CodeAnalysis.CSharp.resources.dll old mode 100755 new mode 100644 index 7f9325d6..ccc03d86 Binary files a/Tools/Sharpmake/macOS/it/Microsoft.CodeAnalysis.CSharp.resources.dll and b/Tools/Sharpmake/macOS/it/Microsoft.CodeAnalysis.CSharp.resources.dll differ diff --git a/Tools/Sharpmake/macOS/it/Microsoft.CodeAnalysis.resources.dll b/Tools/Sharpmake/macOS/it/Microsoft.CodeAnalysis.resources.dll old mode 100755 new mode 100644 index e71779fa..d1cf57c7 Binary files a/Tools/Sharpmake/macOS/it/Microsoft.CodeAnalysis.resources.dll and b/Tools/Sharpmake/macOS/it/Microsoft.CodeAnalysis.resources.dll differ diff --git a/Tools/Sharpmake/macOS/ja/Microsoft.CodeAnalysis.CSharp.resources.dll b/Tools/Sharpmake/macOS/ja/Microsoft.CodeAnalysis.CSharp.resources.dll old mode 100755 new mode 100644 index 58a375d8..7f4d074d Binary files a/Tools/Sharpmake/macOS/ja/Microsoft.CodeAnalysis.CSharp.resources.dll and b/Tools/Sharpmake/macOS/ja/Microsoft.CodeAnalysis.CSharp.resources.dll differ diff --git a/Tools/Sharpmake/macOS/ja/Microsoft.CodeAnalysis.resources.dll b/Tools/Sharpmake/macOS/ja/Microsoft.CodeAnalysis.resources.dll old mode 100755 new mode 100644 index 8c8510d8..afe9820e Binary files a/Tools/Sharpmake/macOS/ja/Microsoft.CodeAnalysis.resources.dll and b/Tools/Sharpmake/macOS/ja/Microsoft.CodeAnalysis.resources.dll differ diff --git a/Tools/Sharpmake/macOS/ko/Microsoft.CodeAnalysis.CSharp.resources.dll b/Tools/Sharpmake/macOS/ko/Microsoft.CodeAnalysis.CSharp.resources.dll old mode 100755 new mode 100644 index 3b3f0ed8..06cb5a7e Binary files a/Tools/Sharpmake/macOS/ko/Microsoft.CodeAnalysis.CSharp.resources.dll and b/Tools/Sharpmake/macOS/ko/Microsoft.CodeAnalysis.CSharp.resources.dll differ diff --git a/Tools/Sharpmake/macOS/ko/Microsoft.CodeAnalysis.resources.dll b/Tools/Sharpmake/macOS/ko/Microsoft.CodeAnalysis.resources.dll old mode 100755 new mode 100644 index 66458d52..b8664551 Binary files a/Tools/Sharpmake/macOS/ko/Microsoft.CodeAnalysis.resources.dll and b/Tools/Sharpmake/macOS/ko/Microsoft.CodeAnalysis.resources.dll differ diff --git a/Tools/Sharpmake/macOS/pl/Microsoft.CodeAnalysis.CSharp.resources.dll b/Tools/Sharpmake/macOS/pl/Microsoft.CodeAnalysis.CSharp.resources.dll old mode 100755 new mode 100644 index 0c6175e1..49c30bca Binary files a/Tools/Sharpmake/macOS/pl/Microsoft.CodeAnalysis.CSharp.resources.dll and b/Tools/Sharpmake/macOS/pl/Microsoft.CodeAnalysis.CSharp.resources.dll differ diff --git a/Tools/Sharpmake/macOS/pl/Microsoft.CodeAnalysis.resources.dll b/Tools/Sharpmake/macOS/pl/Microsoft.CodeAnalysis.resources.dll old mode 100755 new mode 100644 index 82ff47c2..c6fa1fc4 Binary files a/Tools/Sharpmake/macOS/pl/Microsoft.CodeAnalysis.resources.dll and b/Tools/Sharpmake/macOS/pl/Microsoft.CodeAnalysis.resources.dll differ diff --git a/Tools/Sharpmake/macOS/pt-BR/Microsoft.CodeAnalysis.CSharp.resources.dll b/Tools/Sharpmake/macOS/pt-BR/Microsoft.CodeAnalysis.CSharp.resources.dll old mode 100755 new mode 100644 index 2d2ccbe3..08b1c560 Binary files a/Tools/Sharpmake/macOS/pt-BR/Microsoft.CodeAnalysis.CSharp.resources.dll and b/Tools/Sharpmake/macOS/pt-BR/Microsoft.CodeAnalysis.CSharp.resources.dll differ diff --git a/Tools/Sharpmake/macOS/pt-BR/Microsoft.CodeAnalysis.resources.dll b/Tools/Sharpmake/macOS/pt-BR/Microsoft.CodeAnalysis.resources.dll old mode 100755 new mode 100644 index b583d8ef..b2d1850e Binary files a/Tools/Sharpmake/macOS/pt-BR/Microsoft.CodeAnalysis.resources.dll and b/Tools/Sharpmake/macOS/pt-BR/Microsoft.CodeAnalysis.resources.dll differ diff --git a/Tools/Sharpmake/macOS/ref/Sharpmake.Application.dll b/Tools/Sharpmake/macOS/ref/Sharpmake.Application.dll deleted file mode 100644 index fe05aeee..00000000 Binary files a/Tools/Sharpmake/macOS/ref/Sharpmake.Application.dll and /dev/null differ diff --git a/Tools/Sharpmake/macOS/ref/Sharpmake.CommonPlatforms.dll b/Tools/Sharpmake/macOS/ref/Sharpmake.CommonPlatforms.dll deleted file mode 100644 index 01752265..00000000 Binary files a/Tools/Sharpmake/macOS/ref/Sharpmake.CommonPlatforms.dll and /dev/null differ diff --git a/Tools/Sharpmake/macOS/ref/Sharpmake.Generators.dll b/Tools/Sharpmake/macOS/ref/Sharpmake.Generators.dll deleted file mode 100644 index 46217d96..00000000 Binary files a/Tools/Sharpmake/macOS/ref/Sharpmake.Generators.dll and /dev/null differ diff --git a/Tools/Sharpmake/macOS/ref/Sharpmake.dll b/Tools/Sharpmake/macOS/ref/Sharpmake.dll deleted file mode 100644 index 70a167cb..00000000 Binary files a/Tools/Sharpmake/macOS/ref/Sharpmake.dll and /dev/null differ diff --git a/Tools/Sharpmake/macOS/ru/Microsoft.CodeAnalysis.CSharp.resources.dll b/Tools/Sharpmake/macOS/ru/Microsoft.CodeAnalysis.CSharp.resources.dll old mode 100755 new mode 100644 index 08d18ade..4e01dae0 Binary files a/Tools/Sharpmake/macOS/ru/Microsoft.CodeAnalysis.CSharp.resources.dll and b/Tools/Sharpmake/macOS/ru/Microsoft.CodeAnalysis.CSharp.resources.dll differ diff --git a/Tools/Sharpmake/macOS/ru/Microsoft.CodeAnalysis.resources.dll b/Tools/Sharpmake/macOS/ru/Microsoft.CodeAnalysis.resources.dll old mode 100755 new mode 100644 index 0d0a62d5..fe221095 Binary files a/Tools/Sharpmake/macOS/ru/Microsoft.CodeAnalysis.resources.dll and b/Tools/Sharpmake/macOS/ru/Microsoft.CodeAnalysis.resources.dll differ diff --git a/Tools/Sharpmake/macOS/tr/Microsoft.CodeAnalysis.CSharp.resources.dll b/Tools/Sharpmake/macOS/tr/Microsoft.CodeAnalysis.CSharp.resources.dll old mode 100755 new mode 100644 index 56f6a165..33763440 Binary files a/Tools/Sharpmake/macOS/tr/Microsoft.CodeAnalysis.CSharp.resources.dll and b/Tools/Sharpmake/macOS/tr/Microsoft.CodeAnalysis.CSharp.resources.dll differ diff --git a/Tools/Sharpmake/macOS/tr/Microsoft.CodeAnalysis.resources.dll b/Tools/Sharpmake/macOS/tr/Microsoft.CodeAnalysis.resources.dll old mode 100755 new mode 100644 index 81ce1fcf..aa2dec2e Binary files a/Tools/Sharpmake/macOS/tr/Microsoft.CodeAnalysis.resources.dll and b/Tools/Sharpmake/macOS/tr/Microsoft.CodeAnalysis.resources.dll differ diff --git a/Tools/Sharpmake/macOS/zh-Hans/Microsoft.CodeAnalysis.CSharp.resources.dll b/Tools/Sharpmake/macOS/zh-Hans/Microsoft.CodeAnalysis.CSharp.resources.dll old mode 100755 new mode 100644 index ffe26824..5f8f81ee Binary files a/Tools/Sharpmake/macOS/zh-Hans/Microsoft.CodeAnalysis.CSharp.resources.dll and b/Tools/Sharpmake/macOS/zh-Hans/Microsoft.CodeAnalysis.CSharp.resources.dll differ diff --git a/Tools/Sharpmake/macOS/zh-Hans/Microsoft.CodeAnalysis.resources.dll b/Tools/Sharpmake/macOS/zh-Hans/Microsoft.CodeAnalysis.resources.dll old mode 100755 new mode 100644 index d17ccb3c..e4ef4b73 Binary files a/Tools/Sharpmake/macOS/zh-Hans/Microsoft.CodeAnalysis.resources.dll and b/Tools/Sharpmake/macOS/zh-Hans/Microsoft.CodeAnalysis.resources.dll differ diff --git a/Tools/Sharpmake/macOS/zh-Hant/Microsoft.CodeAnalysis.CSharp.resources.dll b/Tools/Sharpmake/macOS/zh-Hant/Microsoft.CodeAnalysis.CSharp.resources.dll old mode 100755 new mode 100644 index 2efe8782..e94b9fc2 Binary files a/Tools/Sharpmake/macOS/zh-Hant/Microsoft.CodeAnalysis.CSharp.resources.dll and b/Tools/Sharpmake/macOS/zh-Hant/Microsoft.CodeAnalysis.CSharp.resources.dll differ diff --git a/Tools/Sharpmake/macOS/zh-Hant/Microsoft.CodeAnalysis.resources.dll b/Tools/Sharpmake/macOS/zh-Hant/Microsoft.CodeAnalysis.resources.dll old mode 100755 new mode 100644 index 62c7b50e..692886cd Binary files a/Tools/Sharpmake/macOS/zh-Hant/Microsoft.CodeAnalysis.resources.dll and b/Tools/Sharpmake/macOS/zh-Hant/Microsoft.CodeAnalysis.resources.dll differ diff --git a/Tools/SharpmakeProject.sharpmake.cs b/Tools/SharpmakeProject.sharpmake.cs index db7448ee..b38a9984 100644 --- a/Tools/SharpmakeProject.sharpmake.cs +++ b/Tools/SharpmakeProject.sharpmake.cs @@ -9,7 +9,9 @@ public SharpmakeProjectBase() RootPath = @"[project.SharpmakeCsPath]"; SourceRootPath = @"[project.SharpmakeCsPath]"; - ProjectSchema = CSharpProjectSchema.NetFramework; + ProjectSchema = CSharpProjectSchema.NetCore; + CustomProperties.Add("Configurations", ScriptCore.GetConfigurationsList()); + CustomProperties.Add("Platforms", "x64"); SourceFilesExcludeRegex.Add(@".*\.xml"); SourceFilesExcludeRegex.Add(@".*\.map"); diff --git a/Tools/Win64/geometryv.exe b/Tools/Win64/geometryv.exe new file mode 100644 index 00000000..c2d3ff7a Binary files /dev/null and b/Tools/Win64/geometryv.exe differ diff --git a/Tools/Win64/shaderc.exe b/Tools/Win64/shaderc.exe index 5e1c9c7a..e33eedb3 100644 Binary files a/Tools/Win64/shaderc.exe and b/Tools/Win64/shaderc.exe differ diff --git a/Tools/Win64/texturec.exe b/Tools/Win64/texturec.exe index c1299c16..50e2d2b3 100644 Binary files a/Tools/Win64/texturec.exe and b/Tools/Win64/texturec.exe differ diff --git a/Tools/Win64/texturev.exe b/Tools/Win64/texturev.exe new file mode 100644 index 00000000..ae64e7c6 Binary files /dev/null and b/Tools/Win64/texturev.exe differ diff --git a/Tools/linux/geometryc b/Tools/linux/geometryc new file mode 100755 index 00000000..2cf5dafb Binary files /dev/null and b/Tools/linux/geometryc differ diff --git a/Tools/linux/geometryv b/Tools/linux/geometryv new file mode 100755 index 00000000..9ca6b574 Binary files /dev/null and b/Tools/linux/geometryv differ diff --git a/Tools/linux/shaderc b/Tools/linux/shaderc new file mode 100755 index 00000000..c6d139eb Binary files /dev/null and b/Tools/linux/shaderc differ diff --git a/Tools/linux/texturec b/Tools/linux/texturec new file mode 100755 index 00000000..d5af6bfb Binary files /dev/null and b/Tools/linux/texturec differ diff --git a/Tools/linux/texturev b/Tools/linux/texturev new file mode 100755 index 00000000..8c6bf2d6 Binary files /dev/null and b/Tools/linux/texturev differ