Full Code of hYdos/Blaze4D for AI

master 4b3bb5a815f6 cached
170 files
978.1 KB
283.7k tokens
1296 symbols
1 requests
Download .txt
Showing preview only (1,040K chars total). Download the full file or copy to clipboard to get everything.
Repository: hYdos/Blaze4D
Branch: master
Commit: 4b3bb5a815f6
Files: 170
Total size: 978.1 KB

Directory structure:
gitextract_4ufyiq5t/

├── .github/
│   └── workflows/
│       ├── build.yml
│       ├── publish.yml
│       └── test.yml
├── .gitignore
├── README.md
├── buildSrc/
│   ├── .gitignore
│   ├── build.gradle.kts
│   └── src/
│       └── main/
│           └── kotlin/
│               └── graphics/
│                   └── kiln/
│                       └── blaze4d/
│                           └── build/
│                               └── assets/
│                                   ├── AssetsPlugin.kt
│                                   ├── AssetsPluginExtension.kt
│                                   └── shaders/
│                                       ├── CompileShadersTask.kt
│                                       ├── CompilerConfig.kt
│                                       ├── ShaderCompiler.kt
│                                       ├── ShaderModule.kt
│                                       ├── ShaderProject.kt
│                                       ├── ShaderStage.kt
│                                       └── SprivVersion.kt
├── core/
│   ├── LICENSE
│   ├── api/
│   │   ├── .gitignore
│   │   ├── LICENSE
│   │   ├── build.gradle.kts
│   │   └── src/
│   │       └── main/
│   │           └── java/
│   │               ├── graphics/
│   │               │   └── kiln/
│   │               │       └── blaze4d/
│   │               │           └── core/
│   │               │               ├── Blaze4DCore.java
│   │               │               ├── Frame.java
│   │               │               ├── GlobalImage.java
│   │               │               ├── GlobalMesh.java
│   │               │               ├── natives/
│   │               │               │   ├── ImageDataNative.java
│   │               │               │   ├── Lib.java
│   │               │               │   ├── McUniformDataNative.java
│   │               │               │   ├── MeshDataNative.java
│   │               │               │   ├── Natives.java
│   │               │               │   ├── PipelineConfigurationNative.java
│   │               │               │   ├── Vec2u32Native.java
│   │               │               │   └── VertexFormatNative.java
│   │               │               └── types/
│   │               │                   ├── B4DFormat.java
│   │               │                   ├── B4DImageData.java
│   │               │                   ├── B4DIndexType.java
│   │               │                   ├── B4DMeshData.java
│   │               │                   ├── B4DPrimitiveTopology.java
│   │               │                   ├── B4DUniform.java
│   │               │                   ├── B4DUniformData.java
│   │               │                   ├── B4DVertexFormat.java
│   │               │                   ├── BlendFactor.java
│   │               │                   ├── BlendOp.java
│   │               │                   ├── CompareOp.java
│   │               │                   └── PipelineConfiguration.java
│   │               └── module-info.java
│   ├── assets/
│   │   ├── .gitattributes
│   │   ├── .gitignore
│   │   ├── build.gradle.kts
│   │   └── src/
│   │       ├── debug/
│   │       │   ├── apply.frag
│   │       │   ├── apply.vert
│   │       │   ├── basic.frag
│   │       │   ├── basic.vert
│   │       │   └── font/
│   │       │       ├── JetBrainsMono/
│   │       │       │   ├── OFL.txt
│   │       │       │   └── tmp_built/
│   │       │       │       └── regular.json
│   │       │       ├── charset.txt
│   │       │       ├── msdf_font.frag
│   │       │       └── msdf_font.vert
│   │       ├── emulator/
│   │       │   ├── debug/
│   │       │   │   ├── background.frag
│   │       │   │   ├── background.vert
│   │       │   │   ├── color.vert
│   │       │   │   ├── debug.frag
│   │       │   │   ├── null.vert
│   │       │   │   ├── position.vert
│   │       │   │   ├── textured.frag
│   │       │   │   └── uv.vert
│   │       │   └── mc_uniforms.glsl
│   │       └── utils/
│   │           ├── blit.frag
│   │           └── full_screen_quad.vert
│   └── natives/
│       ├── .cargo/
│       │   └── config.toml
│       ├── .gitignore
│       ├── Cargo.toml
│       ├── build.gradle.kts
│       ├── build.rs
│       ├── examples/
│       │   └── immediate_cube.rs
│       ├── libvma/
│       │   └── CMakeLists.txt
│       ├── rustfmt.toml
│       ├── src/
│       │   ├── allocator/
│       │   │   ├── mod.rs
│       │   │   └── vma.rs
│       │   ├── b4d.rs
│       │   ├── c_api.rs
│       │   ├── c_log.rs
│       │   ├── device/
│       │   │   ├── device.rs
│       │   │   ├── device_utils.rs
│       │   │   ├── init.rs
│       │   │   ├── mod.rs
│       │   │   └── surface.rs
│       │   ├── glfw_surface.rs
│       │   ├── instance/
│       │   │   ├── debug_messenger.rs
│       │   │   ├── init.rs
│       │   │   ├── instance.rs
│       │   │   └── mod.rs
│       │   ├── lib.rs
│       │   ├── objects/
│       │   │   ├── id.rs
│       │   │   ├── mod.rs
│       │   │   ├── object_set.rs
│       │   │   └── sync.rs
│       │   ├── renderer/
│       │   │   ├── emulator/
│       │   │   │   ├── debug_pipeline.rs
│       │   │   │   ├── descriptors.rs
│       │   │   │   ├── global_objects.rs
│       │   │   │   ├── immediate.rs
│       │   │   │   ├── mc_shaders.rs
│       │   │   │   ├── mod.rs
│       │   │   │   ├── pass.rs
│       │   │   │   ├── pipeline.rs
│       │   │   │   ├── share.rs
│       │   │   │   ├── staging.rs
│       │   │   │   └── worker.rs
│       │   │   └── mod.rs
│       │   ├── util/
│       │   │   ├── alloc.rs
│       │   │   ├── format.rs
│       │   │   ├── id.rs
│       │   │   ├── mod.rs
│       │   │   ├── rand.rs
│       │   │   ├── slice_splitter.rs
│       │   │   └── vk.rs
│       │   ├── vk/
│       │   │   ├── mod.rs
│       │   │   ├── objects/
│       │   │   │   ├── buffer.rs
│       │   │   │   ├── image.rs
│       │   │   │   ├── mod.rs
│       │   │   │   ├── surface.rs
│       │   │   │   ├── swapchain.rs
│       │   │   │   └── types.rs
│       │   │   └── test.rs
│       │   └── window.rs
│       └── tests/
│           └── test_common/
│               └── mod.rs
├── gradle/
│   └── wrapper/
│       ├── gradle-wrapper.jar
│       └── gradle-wrapper.properties
├── gradle.properties
├── gradlew
├── gradlew.bat
├── mod/
│   ├── .gitignore
│   ├── LICENSE
│   ├── build.gradle.kts
│   ├── gradle.properties
│   └── src/
│       └── main/
│           ├── java/
│           │   └── graphics/
│           │       └── kiln/
│           │           └── blaze4d/
│           │               ├── Blaze4D.java
│           │               ├── Blaze4DMixinPlugin.java
│           │               ├── Blaze4DPreLaunch.java
│           │               ├── api/
│           │               │   ├── B4DShader.java
│           │               │   ├── B4DUniform.java
│           │               │   ├── B4DVertexBuffer.java
│           │               │   └── Utils.java
│           │               ├── emulation/
│           │               │   └── GLStateTracker.java
│           │               └── mixin/
│           │                   ├── integration/
│           │                   │   ├── FramebufferMixin.java
│           │                   │   ├── GLXMixin.java
│           │                   │   ├── GlDebugMixin.java
│           │                   │   ├── GlStateManagerMixin.java
│           │                   │   ├── MinecraftClientMixin.java
│           │                   │   ├── VertexFormatMixin.java
│           │                   │   ├── VideoWarningManagerMixin.java
│           │                   │   ├── WindowFramebufferMixin.java
│           │                   │   └── WindowMixin.java
│           │                   ├── render/
│           │                   │   ├── BufferUploaderMixin.java
│           │                   │   ├── RenderSystemMixin.java
│           │                   │   ├── VertexBufferMixin.java
│           │                   │   └── WorldRendererMixin.java
│           │                   ├── shader/
│           │                   │   ├── GlStateManagerMixin.java
│           │                   │   ├── GlUniformMixin.java
│           │                   │   ├── RenderSystemMixin.java
│           │                   │   ├── ShaderAccessor.java
│           │                   │   └── ShaderMixin.java
│           │                   └── texture/
│           │                       ├── LightmapTextureManagerMixin.java
│           │                       ├── NativeImageMixin.java
│           │                       ├── RenderSystemMixin.java
│           │                       ├── TextureManagerMixin.java
│           │                       ├── TextureUtilMixin_Development.java
│           │                       └── TextureUtilMixin_Runtime.java
│           └── resources/
│               ├── blaze4d.aw
│               ├── blaze4d.mixins.json
│               └── fabric.mod.json
└── settings.gradle.kts

================================================
FILE CONTENTS
================================================

================================================
FILE: .github/workflows/build.yml
================================================
name: Build
on:
  - pull_request
  - push

jobs:
  build:
    if: "! contains(toJSON(github.event.commits.*.message), '[ci skip]')"
    strategy:
      matrix:
        java:
          - 18
        os:
          - ubuntu-20.04
          - windows-latest
    runs-on: ${{ matrix.os }}
    steps:
      - name: Checkout repository
        uses: actions/checkout@v2
        with:
          submodules: recursive
      - name: Validate gradle wrapper
        uses: gradle/wrapper-validation-action@v1
      - name: Set up JDK ${{ matrix.java }}
        uses: actions/setup-java@v1
        with:
          java-version: ${{ matrix.java }}
      - name: Build
        run: ./gradlew build
      - name: Upload artifacts
        uses: actions/upload-artifact@v2
        with:
          name: Blaze4D-${{ matrix.java }}-${{ matrix.os }}
          path: build/libs/


================================================
FILE: .github/workflows/publish.yml
================================================
name: Publish to hydos Maven
on:
  push:
    branches:
      - master

jobs:
  publish:
    if: "! contains(toJSON(github.event.commits.*.message), '[ci skip]')"
    runs-on: ubuntu-latest
    steps:
      - name: Checkout repository
        uses: actions/checkout@v2
      - name: Validate gradle wrapper
        uses: gradle/wrapper-validation-action@v1
      - name: Set up JDK 18
        uses: actions/setup-java@v1
        with:
          java-version: 18
      - name: Publish
        run: ./gradlew publishAllPublicationsToHydosRepository
        env:
          MAVEN_USERNAME: ${{ secrets.MAVEN_USERNAME }}
          MAVEN_PASSWORD: ${{ secrets.MAVEN_PASSWORD }}


================================================
FILE: .github/workflows/test.yml
================================================
on: [ push, pull_request ]

name: Build

jobs:
  build:
    strategy:
      matrix:
        os: [ubuntu-latest, windows-latest]
    runs-on: ${{ matrix.os }}

    steps:
      - name: Checkout sources
        uses: actions/checkout@v2

      - name: Prepare Vulkan SDK
        uses: humbletim/install-vulkan-sdk@v1.1.1
        with:
          version: latest
          cache: true

      - name: Setup Rust
        uses: actions-rs/toolchain@v1
        with:
          profile: minimal
          toolchain: stable
          override: true

      - name: Setup Java
        uses: actions/setup-java@v3
        with:
          distribution: 'temurin'
          java-version: '17'

      - name: Compile resources
        run: ./gradlew
        working-directory: resources

      - name: Build
        uses: actions-rs/cargo@v1
        with:
          command: build
          args: --release

      - name: Upload binaries
        uses: actions/upload-artifact@v3
        with:
          name: bin-${{ matrix.os }}
          path: |
            target/release/*b4d_core.*

================================================
FILE: .gitignore
================================================
# gradle
.gradle/

# eclipse
*.launch

# idea
.idea/
*.iml
*.ipr
*.iws

# vscode
.settings/
.vscode/
bin/
.classpath
.project

# macos
*.DS_Store

# random log files
*.log

# renderdoc captures
*.cap

================================================
FILE: README.md
================================================
![blaze](https://user-images.githubusercontent.com/68126718/125143247-71be4580-e0f0-11eb-88bc-070eb2838435.png)

## Information 
Blaze4D is a Fabric mod that changes Minecraft's rendering engine to use the Vulkan Graphics Library, it is currently in
Early Development and is **NOT** intended for use by the faint-hearted. Support for Blaze4D can be found in the #support
Discord channel.

## Community
We have a [Discord server](https://discord.gg/H93wJePuWf) where you can track development progress, ask questions, or just hang out in.

## Building
### Build Requirements

 - Vulkan SDK - Version 1.3.208 or newer
 - CMake and a C++ compiler - Required for building some of our dependencies
 - Rust - Version 1.62.0 or newer
 - Java 18

### Build Steps
To build the project with natives for your platform run
```
./gradlew build
```
in the project root directory.

To run the game with the mod use any of the 3 run targets:
- `./gradlew runClient`
- `./gradlew runClientWithValidation` - Enables validation layers
- `./gradlew runClientWithValidationRenderdoc` - Enables validation layers and automatically loads the renderdoc shared library.

#### Manually building natives
To work on and test natives it can be useful to run cargo manually. To do this it's necessary to first build the assets
by running
```
./gradlew :core:assets:build
```
This only needs to be repeated if the assets are modified.

After that the natives can be manually built using cargo.

## Contributing
1. Clone the repository (https://github.com/Blaze4D-MC/Blaze4D.git).
2. Edit
3. Pull Request

## Project Structure
The project is organized in 2 parts

### Core
This is the core of Blaze4D that performs the actual rendering and is written in Rust. The gradle project contains 3
subprojects.
 - assets - These are any assets we need to bundle with Blaze4D. For example shaders or fonts. They currently need to be separately built after a change using their gradle `build` task.
 - natives - The main Blaze4D core rust code.
 - api - A java api of the rust code used by the mod.

### Mod
This is the fabric mod itself. Its job is to interface with minecraft. Most of the heavy lifting should take place in Blaze4D core.

================================================
FILE: buildSrc/.gitignore
================================================
# Gradle local files
/build/

================================================
FILE: buildSrc/build.gradle.kts
================================================
plugins {
    kotlin("jvm") version "1.7.10"
}

repositories {
    mavenCentral()
}

dependencies {
    implementation(gradleApi())
}

================================================
FILE: buildSrc/src/main/kotlin/graphics/kiln/blaze4d/build/assets/AssetsPlugin.kt
================================================
package graphics.kiln.blaze4d.build.assets

import org.gradle.api.Action
import org.gradle.api.Plugin
import org.gradle.api.Project
import org.gradle.api.plugins.ExtensionAware
import org.gradle.api.tasks.Delete

import java.io.File

import graphics.kiln.blaze4d.build.assets.shaders.CompileShadersTask;

class AssetsPlugin : Plugin<Project> {

    public lateinit var extension: AssetsPluginExtension;
    public lateinit var outputDir: File;

    override fun apply(project: Project) {
        extension = project.extensions.create("assets", AssetsPluginExtension::class.java);
        outputDir = File(project.buildDir, "out");

        project.tasks.register("compileShaders", CompileShadersTask::class.java);

        project.tasks.create("build", {
            it.dependsOn("compileShaders")
        });

        project.afterEvaluate({
            project.tasks.getByName("compileShaders", {
                it.inputs.dir(extension.getShaderCompiler().generateSourceDir(project));
            })
        })
    }
}

================================================
FILE: buildSrc/src/main/kotlin/graphics/kiln/blaze4d/build/assets/AssetsPluginExtension.kt
================================================
package graphics.kiln.blaze4d.build.assets

import graphics.kiln.blaze4d.build.assets.shaders.ShaderCompiler
import org.gradle.api.Action
import org.gradle.api.tasks.Nested

abstract class AssetsPluginExtension {

    @Nested
    public abstract fun getShaderCompiler(): ShaderCompiler;

    fun shaders(configure: Action<ShaderCompiler>) {
        configure.execute(this.getShaderCompiler());
    }
}

================================================
FILE: buildSrc/src/main/kotlin/graphics/kiln/blaze4d/build/assets/shaders/CompileShadersTask.kt
================================================
package graphics.kiln.blaze4d.build.assets.shaders

import graphics.kiln.blaze4d.build.assets.AssetsPlugin
import graphics.kiln.blaze4d.build.assets.AssetsPluginExtension
import org.gradle.api.DefaultTask
import org.gradle.api.tasks.TaskAction
import java.io.File
import javax.inject.Inject

abstract class CompileShadersTask : DefaultTask() {
    init {
        outputs.dir(project.buildDir)
    }

    @TaskAction
    fun compile() {
        var assetsPlugin = project.plugins.getPlugin(AssetsPlugin::class.java);

        project.delete(assetsPlugin.outputDir);
        assetsPlugin.extension.getShaderCompiler().compile(project, assetsPlugin.outputDir);
    }
}

================================================
FILE: buildSrc/src/main/kotlin/graphics/kiln/blaze4d/build/assets/shaders/CompilerConfig.kt
================================================
package graphics.kiln.blaze4d.build.assets.shaders

import java.io.File

data class CompilerConfig(
        val targetSpriv: SprivVersion,
        val includeDirs: Set<File>,
)


================================================
FILE: buildSrc/src/main/kotlin/graphics/kiln/blaze4d/build/assets/shaders/ShaderCompiler.kt
================================================
package graphics.kiln.blaze4d.build.assets.shaders

import org.gradle.api.Action
import org.gradle.api.NamedDomainObjectContainer
import org.gradle.api.Project
import org.gradle.api.file.RelativePath
import org.gradle.api.provider.Property
import org.gradle.api.tasks.Input
import java.io.File

abstract class ShaderCompiler {

    @get:Input
    public abstract val targetSpirv: Property<SprivVersion>;

    @get:Input
    public abstract val sourceDir: Property<RelativePath>;

    @get:Input
    public abstract val outputDir: Property<RelativePath>;

    @get:Input
    public abstract val projects: NamedDomainObjectContainer<ShaderProject>;

    public fun targetSpriv(version: SprivVersion) {
        this.targetSpirv.set(version)
    }

    public fun sourceDir(path: String) {
        this.sourceDir.set(RelativePath.parse(false, path))
    }

    public fun outputDir(path: String) {
        this.outputDir.set(RelativePath.parse(false, path))
    }

    public fun addProject(name: String, configure: Action<ShaderProject>) {
        this.projects.create(name, configure)
    }

    fun generateSourceDir(project: Project): File {
        return this.sourceDir.getOrElse(RelativePath.parse(false, "src")).getFile(project.projectDir);
    }

    fun compile(project: Project, outBaseDir: File) {
        var srcBaseDir = this.generateSourceDir(project);
        var newOutBaseDir = this.outputDir.getOrElse(RelativePath.parse(false, "")).getFile(outBaseDir);

        var targetSpirv = this.targetSpirv.getOrElse(SprivVersion.SPV_1_0);
        var config = CompilerConfig(targetSpirv, HashSet());

        this.projects.forEach({
            it.compile(project, srcBaseDir, newOutBaseDir, config)
        })
    }
}

================================================
FILE: buildSrc/src/main/kotlin/graphics/kiln/blaze4d/build/assets/shaders/ShaderModule.kt
================================================
package graphics.kiln.blaze4d.build.assets.shaders

import org.gradle.api.file.RelativePath
import org.gradle.api.provider.Property
import org.gradle.api.tasks.Input
import java.io.File

abstract class ShaderModule {
    public abstract fun getName(): String;

    @get:Input
    public abstract val srcFile: Property<RelativePath>;

    @get:Input
    public abstract val outFile: Property<RelativePath>;

    public fun srcFile(file: String) {
        this.srcFile.set(RelativePath.parse(true, file))
    }

    fun generateArg(srcBaseDir: File, outBaseDir: File): Array<String> {
        var relativeSrcFile = this.srcFile.getOrElse(RelativePath.parse(true, this.getName()));
        var srcFile = relativeSrcFile.getFile(srcBaseDir);

        var generatedOutFile = "${srcFile.nameWithoutExtension}_${srcFile.extension}.spv";
        var outFile = this.outFile.getOrElse(relativeSrcFile.replaceLastName(generatedOutFile)).getFile(outBaseDir);

        var outDir = outFile.parentFile;
        if(!outDir.exists()) {
            if (!outDir.mkdirs()) {
                throw java.lang.RuntimeException("Failed to create output directory for shader module. ${outDir}");
            }
        }

        return arrayOf("${srcFile.absolutePath}", "-o${outFile.absolutePath}");
    }
}

================================================
FILE: buildSrc/src/main/kotlin/graphics/kiln/blaze4d/build/assets/shaders/ShaderProject.kt
================================================
package graphics.kiln.blaze4d.build.assets.shaders

import org.gradle.api.Action
import org.gradle.api.NamedDomainObjectContainer
import org.gradle.api.Project
import org.gradle.api.file.RelativePath
import org.gradle.api.provider.Property
import org.gradle.api.provider.SetProperty
import org.gradle.api.tasks.Input

import java.io.File

abstract class ShaderProject {
    public abstract fun getName(): String;

    @get:Input
    public abstract val projectDir: Property<RelativePath>;

    @get:Input
    public abstract val targetSpriv: Property<SprivVersion>;

    @get:Input
    public abstract val includeDirs: SetProperty<RelativePath>;

    @get:Input
    public abstract val modules: NamedDomainObjectContainer<ShaderModule>

    public fun projectDir(path: String) {
        this.projectDir.set(RelativePath.parse(false, path))
    }

    public fun targetSpriv(version: SprivVersion) {
        this.targetSpriv.set(version)
    }

    public fun addIncludeDir(path: String) {
        this.includeDirs.add(RelativePath.parse(false, path))
    }

    public fun addModule(name: String) {
        this.modules.create(name)
    }

    public fun addModule(name: String, configure: Action<ShaderModule>) {
        this.modules.create(name, configure)
    }

    fun compile(project: Project, srcBaseDir: File, outBaseDir: File, parentConfig: CompilerConfig) {
        val projectDir = this.projectDir.getOrElse(RelativePath.parse(false, ""));
        val newSrcBaseDir = projectDir.getFile(srcBaseDir);
        val newOutBaseDir = projectDir.getFile(outBaseDir);

        val targetSpriv = this.targetSpriv.getOrElse(parentConfig.targetSpriv);
        val includeDirs = HashSet<File>(parentConfig.includeDirs);
        this.includeDirs.orNull?.forEach({
            includeDirs.add(it.getFile(newSrcBaseDir));
        });
        includeDirs.add(newSrcBaseDir);
        val config = CompilerConfig(targetSpriv, includeDirs);

        this.execCompile(project, newSrcBaseDir, newOutBaseDir, config);
    }

    private fun execCompile(project: Project, srcBaseDir: File, outBaseDir: File, config: CompilerConfig) {
        this.modules.forEach({
            var moduleArgs = it.generateArg(srcBaseDir, outBaseDir);

            project.exec({
                it.executable("glslc")
                it.args(config.targetSpriv.cliArg)

                var exec = it;
                config.includeDirs.forEach({
                    exec.args("-I${it}")
                })

                moduleArgs.forEach({
                    exec.args(it)
                })
            })
        })
    }
}

================================================
FILE: buildSrc/src/main/kotlin/graphics/kiln/blaze4d/build/assets/shaders/ShaderStage.kt
================================================
package graphics.kiln.blaze4d.build.assets.shaders

enum class ShaderStage(cliArg: String) {
    VERTEX("-fshader-stage=vertex"),
    FRAGMENT("-fshader-stage=fragment"),
    TESSELATION_CONTROL("-fshader-stage=tesscontrol"),
    TESSELATION_EVALUATION("-fshader-stage=tesseval"),
    GEOMETRY("-fshader-stage=geometry"),
    COMPUTE("-fshader-stage=compute"),
}

================================================
FILE: buildSrc/src/main/kotlin/graphics/kiln/blaze4d/build/assets/shaders/SprivVersion.kt
================================================
package graphics.kiln.blaze4d.build.assets.shaders

enum class SprivVersion(val cliArg: String) {
    SPV_1_0("--target-spv=spv1.0"),
    SPV_1_1("--target-spv=spv1.1"),
    SPV_1_2("--target-spv=spv1.2"),
    SPV_1_3("--target-spv=spv1.3"),
    SPV_1_4("--target-spv=spv1.4"),
    SPV_1_5("--target-spv=spv1.5"),
    SPV_1_6("--target-spv=spv1.6"),
}

================================================
FILE: core/LICENSE
================================================
                    GNU GENERAL PUBLIC LICENSE
                       Version 3, 29 June 2007

 Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
 Everyone is permitted to copy and distribute verbatim copies
 of this license document, but changing it is not allowed.

                            Preamble

  The GNU General Public License is a free, copyleft license for
software and other kinds of works.

  The licenses for most software and other practical works are designed
to take away your freedom to share and change the works.  By contrast,
the GNU General Public License is intended to guarantee your freedom to
share and change all versions of a program--to make sure it remains free
software for all its users.  We, the Free Software Foundation, use the
GNU General Public License for most of our software; it applies also to
any other work released this way by its authors.  You can apply it to
your programs, too.

  When we speak of free software, we are referring to freedom, not
price.  Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
them if you wish), that you receive source code or can get it if you
want it, that you can change the software or use pieces of it in new
free programs, and that you know you can do these things.

  To protect your rights, we need to prevent others from denying you
these rights or asking you to surrender the rights.  Therefore, you have
certain responsibilities if you distribute copies of the software, or if
you modify it: responsibilities to respect the freedom of others.

  For example, if you distribute copies of such a program, whether
gratis or for a fee, you must pass on to the recipients the same
freedoms that you received.  You must make sure that they, too, receive
or can get the source code.  And you must show them these terms so they
know their rights.

  Developers that use the GNU GPL protect your rights with two steps:
(1) assert copyright on the software, and (2) offer you this License
giving you legal permission to copy, distribute and/or modify it.

  For the developers' and authors' protection, the GPL clearly explains
that there is no warranty for this free software.  For both users' and
authors' sake, the GPL requires that modified versions be marked as
changed, so that their problems will not be attributed erroneously to
authors of previous versions.

  Some devices are designed to deny users access to install or run
modified versions of the software inside them, although the manufacturer
can do so.  This is fundamentally incompatible with the aim of
protecting users' freedom to change the software.  The systematic
pattern of such abuse occurs in the area of products for individuals to
use, which is precisely where it is most unacceptable.  Therefore, we
have designed this version of the GPL to prohibit the practice for those
products.  If such problems arise substantially in other domains, we
stand ready to extend this provision to those domains in future versions
of the GPL, as needed to protect the freedom of users.

  Finally, every program is threatened constantly by software patents.
States should not allow patents to restrict development and use of
software on general-purpose computers, but in those that do, we wish to
avoid the special danger that patents applied to a free program could
make it effectively proprietary.  To prevent this, the GPL assures that
patents cannot be used to render the program non-free.

  The precise terms and conditions for copying, distribution and
modification follow.

                       TERMS AND CONDITIONS

  0. Definitions.

  "This License" refers to version 3 of the GNU General Public License.

  "Copyright" also means copyright-like laws that apply to other kinds of
works, such as semiconductor masks.

  "The Program" refers to any copyrightable work licensed under this
License.  Each licensee is addressed as "you".  "Licensees" and
"recipients" may be individuals or organizations.

  To "modify" a work means to copy from or adapt all or part of the work
in a fashion requiring copyright permission, other than the making of an
exact copy.  The resulting work is called a "modified version" of the
earlier work or a work "based on" the earlier work.

  A "covered work" means either the unmodified Program or a work based
on the Program.

  To "propagate" a work means to do anything with it that, without
permission, would make you directly or secondarily liable for
infringement under applicable copyright law, except executing it on a
computer or modifying a private copy.  Propagation includes copying,
distribution (with or without modification), making available to the
public, and in some countries other activities as well.

  To "convey" a work means any kind of propagation that enables other
parties to make or receive copies.  Mere interaction with a user through
a computer network, with no transfer of a copy, is not conveying.

  An interactive user interface displays "Appropriate Legal Notices"
to the extent that it includes a convenient and prominently visible
feature that (1) displays an appropriate copyright notice, and (2)
tells the user that there is no warranty for the work (except to the
extent that warranties are provided), that licensees may convey the
work under this License, and how to view a copy of this License.  If
the interface presents a list of user commands or options, such as a
menu, a prominent item in the list meets this criterion.

  1. Source Code.

  The "source code" for a work means the preferred form of the work
for making modifications to it.  "Object code" means any non-source
form of a work.

  A "Standard Interface" means an interface that either is an official
standard defined by a recognized standards body, or, in the case of
interfaces specified for a particular programming language, one that
is widely used among developers working in that language.

  The "System Libraries" of an executable work include anything, other
than the work as a whole, that (a) is included in the normal form of
packaging a Major Component, but which is not part of that Major
Component, and (b) serves only to enable use of the work with that
Major Component, or to implement a Standard Interface for which an
implementation is available to the public in source code form.  A
"Major Component", in this context, means a major essential component
(kernel, window system, and so on) of the specific operating system
(if any) on which the executable work runs, or a compiler used to
produce the work, or an object code interpreter used to run it.

  The "Corresponding Source" for a work in object code form means all
the source code needed to generate, install, and (for an executable
work) run the object code and to modify the work, including scripts to
control those activities.  However, it does not include the work's
System Libraries, or general-purpose tools or generally available free
programs which are used unmodified in performing those activities but
which are not part of the work.  For example, Corresponding Source
includes interface definition files associated with source files for
the work, and the source code for shared libraries and dynamically
linked subprograms that the work is specifically designed to require,
such as by intimate data communication or control flow between those
subprograms and other parts of the work.

  The Corresponding Source need not include anything that users
can regenerate automatically from other parts of the Corresponding
Source.

  The Corresponding Source for a work in source code form is that
same work.

  2. Basic Permissions.

  All rights granted under this License are granted for the term of
copyright on the Program, and are irrevocable provided the stated
conditions are met.  This License explicitly affirms your unlimited
permission to run the unmodified Program.  The output from running a
covered work is covered by this License only if the output, given its
content, constitutes a covered work.  This License acknowledges your
rights of fair use or other equivalent, as provided by copyright law.

  You may make, run and propagate covered works that you do not
convey, without conditions so long as your license otherwise remains
in force.  You may convey covered works to others for the sole purpose
of having them make modifications exclusively for you, or provide you
with facilities for running those works, provided that you comply with
the terms of this License in conveying all material for which you do
not control copyright.  Those thus making or running the covered works
for you must do so exclusively on your behalf, under your direction
and control, on terms that prohibit them from making any copies of
your copyrighted material outside their relationship with you.

  Conveying under any other circumstances is permitted solely under
the conditions stated below.  Sublicensing is not allowed; section 10
makes it unnecessary.

  3. Protecting Users' Legal Rights From Anti-Circumvention Law.

  No covered work shall be deemed part of an effective technological
measure under any applicable law fulfilling obligations under article
11 of the WIPO copyright treaty adopted on 20 December 1996, or
similar laws prohibiting or restricting circumvention of such
measures.

  When you convey a covered work, you waive any legal power to forbid
circumvention of technological measures to the extent such circumvention
is effected by exercising rights under this License with respect to
the covered work, and you disclaim any intention to limit operation or
modification of the work as a means of enforcing, against the work's
users, your or third parties' legal rights to forbid circumvention of
technological measures.

  4. Conveying Verbatim Copies.

  You may convey verbatim copies of the Program's source code as you
receive it, in any medium, provided that you conspicuously and
appropriately publish on each copy an appropriate copyright notice;
keep intact all notices stating that this License and any
non-permissive terms added in accord with section 7 apply to the code;
keep intact all notices of the absence of any warranty; and give all
recipients a copy of this License along with the Program.

  You may charge any price or no price for each copy that you convey,
and you may offer support or warranty protection for a fee.

  5. Conveying Modified Source Versions.

  You may convey a work based on the Program, or the modifications to
produce it from the Program, in the form of source code under the
terms of section 4, provided that you also meet all of these conditions:

    a) The work must carry prominent notices stating that you modified
    it, and giving a relevant date.

    b) The work must carry prominent notices stating that it is
    released under this License and any conditions added under section
    7.  This requirement modifies the requirement in section 4 to
    "keep intact all notices".

    c) You must license the entire work, as a whole, under this
    License to anyone who comes into possession of a copy.  This
    License will therefore apply, along with any applicable section 7
    additional terms, to the whole of the work, and all its parts,
    regardless of how they are packaged.  This License gives no
    permission to license the work in any other way, but it does not
    invalidate such permission if you have separately received it.

    d) If the work has interactive user interfaces, each must display
    Appropriate Legal Notices; however, if the Program has interactive
    interfaces that do not display Appropriate Legal Notices, your
    work need not make them do so.

  A compilation of a covered work with other separate and independent
works, which are not by their nature extensions of the covered work,
and which are not combined with it such as to form a larger program,
in or on a volume of a storage or distribution medium, is called an
"aggregate" if the compilation and its resulting copyright are not
used to limit the access or legal rights of the compilation's users
beyond what the individual works permit.  Inclusion of a covered work
in an aggregate does not cause this License to apply to the other
parts of the aggregate.

  6. Conveying Non-Source Forms.

  You may convey a covered work in object code form under the terms
of sections 4 and 5, provided that you also convey the
machine-readable Corresponding Source under the terms of this License,
in one of these ways:

    a) Convey the object code in, or embodied in, a physical product
    (including a physical distribution medium), accompanied by the
    Corresponding Source fixed on a durable physical medium
    customarily used for software interchange.

    b) Convey the object code in, or embodied in, a physical product
    (including a physical distribution medium), accompanied by a
    written offer, valid for at least three years and valid for as
    long as you offer spare parts or customer support for that product
    model, to give anyone who possesses the object code either (1) a
    copy of the Corresponding Source for all the software in the
    product that is covered by this License, on a durable physical
    medium customarily used for software interchange, for a price no
    more than your reasonable cost of physically performing this
    conveying of source, or (2) access to copy the
    Corresponding Source from a network server at no charge.

    c) Convey individual copies of the object code with a copy of the
    written offer to provide the Corresponding Source.  This
    alternative is allowed only occasionally and noncommercially, and
    only if you received the object code with such an offer, in accord
    with subsection 6b.

    d) Convey the object code by offering access from a designated
    place (gratis or for a charge), and offer equivalent access to the
    Corresponding Source in the same way through the same place at no
    further charge.  You need not require recipients to copy the
    Corresponding Source along with the object code.  If the place to
    copy the object code is a network server, the Corresponding Source
    may be on a different server (operated by you or a third party)
    that supports equivalent copying facilities, provided you maintain
    clear directions next to the object code saying where to find the
    Corresponding Source.  Regardless of what server hosts the
    Corresponding Source, you remain obligated to ensure that it is
    available for as long as needed to satisfy these requirements.

    e) Convey the object code using peer-to-peer transmission, provided
    you inform other peers where the object code and Corresponding
    Source of the work are being offered to the general public at no
    charge under subsection 6d.

  A separable portion of the object code, whose source code is excluded
from the Corresponding Source as a System Library, need not be
included in conveying the object code work.

  A "User Product" is either (1) a "consumer product", which means any
tangible personal property which is normally used for personal, family,
or household purposes, or (2) anything designed or sold for incorporation
into a dwelling.  In determining whether a product is a consumer product,
doubtful cases shall be resolved in favor of coverage.  For a particular
product received by a particular user, "normally used" refers to a
typical or common use of that class of product, regardless of the status
of the particular user or of the way in which the particular user
actually uses, or expects or is expected to use, the product.  A product
is a consumer product regardless of whether the product has substantial
commercial, industrial or non-consumer uses, unless such uses represent
the only significant mode of use of the product.

  "Installation Information" for a User Product means any methods,
procedures, authorization keys, or other information required to install
and execute modified versions of a covered work in that User Product from
a modified version of its Corresponding Source.  The information must
suffice to ensure that the continued functioning of the modified object
code is in no case prevented or interfered with solely because
modification has been made.

  If you convey an object code work under this section in, or with, or
specifically for use in, a User Product, and the conveying occurs as
part of a transaction in which the right of possession and use of the
User Product is transferred to the recipient in perpetuity or for a
fixed term (regardless of how the transaction is characterized), the
Corresponding Source conveyed under this section must be accompanied
by the Installation Information.  But this requirement does not apply
if neither you nor any third party retains the ability to install
modified object code on the User Product (for example, the work has
been installed in ROM).

  The requirement to provide Installation Information does not include a
requirement to continue to provide support service, warranty, or updates
for a work that has been modified or installed by the recipient, or for
the User Product in which it has been modified or installed.  Access to a
network may be denied when the modification itself materially and
adversely affects the operation of the network or violates the rules and
protocols for communication across the network.

  Corresponding Source conveyed, and Installation Information provided,
in accord with this section must be in a format that is publicly
documented (and with an implementation available to the public in
source code form), and must require no special password or key for
unpacking, reading or copying.

  7. Additional Terms.

  "Additional permissions" are terms that supplement the terms of this
License by making exceptions from one or more of its conditions.
Additional permissions that are applicable to the entire Program shall
be treated as though they were included in this License, to the extent
that they are valid under applicable law.  If additional permissions
apply only to part of the Program, that part may be used separately
under those permissions, but the entire Program remains governed by
this License without regard to the additional permissions.

  When you convey a copy of a covered work, you may at your option
remove any additional permissions from that copy, or from any part of
it.  (Additional permissions may be written to require their own
removal in certain cases when you modify the work.)  You may place
additional permissions on material, added by you to a covered work,
for which you have or can give appropriate copyright permission.

  Notwithstanding any other provision of this License, for material you
add to a covered work, you may (if authorized by the copyright holders of
that material) supplement the terms of this License with terms:

    a) Disclaiming warranty or limiting liability differently from the
    terms of sections 15 and 16 of this License; or

    b) Requiring preservation of specified reasonable legal notices or
    author attributions in that material or in the Appropriate Legal
    Notices displayed by works containing it; or

    c) Prohibiting misrepresentation of the origin of that material, or
    requiring that modified versions of such material be marked in
    reasonable ways as different from the original version; or

    d) Limiting the use for publicity purposes of names of licensors or
    authors of the material; or

    e) Declining to grant rights under trademark law for use of some
    trade names, trademarks, or service marks; or

    f) Requiring indemnification of licensors and authors of that
    material by anyone who conveys the material (or modified versions of
    it) with contractual assumptions of liability to the recipient, for
    any liability that these contractual assumptions directly impose on
    those licensors and authors.

  All other non-permissive additional terms are considered "further
restrictions" within the meaning of section 10.  If the Program as you
received it, or any part of it, contains a notice stating that it is
governed by this License along with a term that is a further
restriction, you may remove that term.  If a license document contains
a further restriction but permits relicensing or conveying under this
License, you may add to a covered work material governed by the terms
of that license document, provided that the further restriction does
not survive such relicensing or conveying.

  If you add terms to a covered work in accord with this section, you
must place, in the relevant source files, a statement of the
additional terms that apply to those files, or a notice indicating
where to find the applicable terms.

  Additional terms, permissive or non-permissive, may be stated in the
form of a separately written license, or stated as exceptions;
the above requirements apply either way.

  8. Termination.

  You may not propagate or modify a covered work except as expressly
provided under this License.  Any attempt otherwise to propagate or
modify it is void, and will automatically terminate your rights under
this License (including any patent licenses granted under the third
paragraph of section 11).

  However, if you cease all violation of this License, then your
license from a particular copyright holder is reinstated (a)
provisionally, unless and until the copyright holder explicitly and
finally terminates your license, and (b) permanently, if the copyright
holder fails to notify you of the violation by some reasonable means
prior to 60 days after the cessation.

  Moreover, your license from a particular copyright holder is
reinstated permanently if the copyright holder notifies you of the
violation by some reasonable means, this is the first time you have
received notice of violation of this License (for any work) from that
copyright holder, and you cure the violation prior to 30 days after
your receipt of the notice.

  Termination of your rights under this section does not terminate the
licenses of parties who have received copies or rights from you under
this License.  If your rights have been terminated and not permanently
reinstated, you do not qualify to receive new licenses for the same
material under section 10.

  9. Acceptance Not Required for Having Copies.

  You are not required to accept this License in order to receive or
run a copy of the Program.  Ancillary propagation of a covered work
occurring solely as a consequence of using peer-to-peer transmission
to receive a copy likewise does not require acceptance.  However,
nothing other than this License grants you permission to propagate or
modify any covered work.  These actions infringe copyright if you do
not accept this License.  Therefore, by modifying or propagating a
covered work, you indicate your acceptance of this License to do so.

  10. Automatic Licensing of Downstream Recipients.

  Each time you convey a covered work, the recipient automatically
receives a license from the original licensors, to run, modify and
propagate that work, subject to this License.  You are not responsible
for enforcing compliance by third parties with this License.

  An "entity transaction" is a transaction transferring control of an
organization, or substantially all assets of one, or subdividing an
organization, or merging organizations.  If propagation of a covered
work results from an entity transaction, each party to that
transaction who receives a copy of the work also receives whatever
licenses to the work the party's predecessor in interest had or could
give under the previous paragraph, plus a right to possession of the
Corresponding Source of the work from the predecessor in interest, if
the predecessor has it or can get it with reasonable efforts.

  You may not impose any further restrictions on the exercise of the
rights granted or affirmed under this License.  For example, you may
not impose a license fee, royalty, or other charge for exercise of
rights granted under this License, and you may not initiate litigation
(including a cross-claim or counterclaim in a lawsuit) alleging that
any patent claim is infringed by making, using, selling, offering for
sale, or importing the Program or any portion of it.

  11. Patents.

  A "contributor" is a copyright holder who authorizes use under this
License of the Program or a work on which the Program is based.  The
work thus licensed is called the contributor's "contributor version".

  A contributor's "essential patent claims" are all patent claims
owned or controlled by the contributor, whether already acquired or
hereafter acquired, that would be infringed by some manner, permitted
by this License, of making, using, or selling its contributor version,
but do not include claims that would be infringed only as a
consequence of further modification of the contributor version.  For
purposes of this definition, "control" includes the right to grant
patent sublicenses in a manner consistent with the requirements of
this License.

  Each contributor grants you a non-exclusive, worldwide, royalty-free
patent license under the contributor's essential patent claims, to
make, use, sell, offer for sale, import and otherwise run, modify and
propagate the contents of its contributor version.

  In the following three paragraphs, a "patent license" is any express
agreement or commitment, however denominated, not to enforce a patent
(such as an express permission to practice a patent or covenant not to
sue for patent infringement).  To "grant" such a patent license to a
party means to make such an agreement or commitment not to enforce a
patent against the party.

  If you convey a covered work, knowingly relying on a patent license,
and the Corresponding Source of the work is not available for anyone
to copy, free of charge and under the terms of this License, through a
publicly available network server or other readily accessible means,
then you must either (1) cause the Corresponding Source to be so
available, or (2) arrange to deprive yourself of the benefit of the
patent license for this particular work, or (3) arrange, in a manner
consistent with the requirements of this License, to extend the patent
license to downstream recipients.  "Knowingly relying" means you have
actual knowledge that, but for the patent license, your conveying the
covered work in a country, or your recipient's use of the covered work
in a country, would infringe one or more identifiable patents in that
country that you have reason to believe are valid.

  If, pursuant to or in connection with a single transaction or
arrangement, you convey, or propagate by procuring conveyance of, a
covered work, and grant a patent license to some of the parties
receiving the covered work authorizing them to use, propagate, modify
or convey a specific copy of the covered work, then the patent license
you grant is automatically extended to all recipients of the covered
work and works based on it.

  A patent license is "discriminatory" if it does not include within
the scope of its coverage, prohibits the exercise of, or is
conditioned on the non-exercise of one or more of the rights that are
specifically granted under this License.  You may not convey a covered
work if you are a party to an arrangement with a third party that is
in the business of distributing software, under which you make payment
to the third party based on the extent of your activity of conveying
the work, and under which the third party grants, to any of the
parties who would receive the covered work from you, a discriminatory
patent license (a) in connection with copies of the covered work
conveyed by you (or copies made from those copies), or (b) primarily
for and in connection with specific products or compilations that
contain the covered work, unless you entered into that arrangement,
or that patent license was granted, prior to 28 March 2007.

  Nothing in this License shall be construed as excluding or limiting
any implied license or other defenses to infringement that may
otherwise be available to you under applicable patent law.

  12. No Surrender of Others' Freedom.

  If conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License.  If you cannot convey a
covered work so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you may
not convey it at all.  For example, if you agree to terms that obligate you
to collect a royalty for further conveying from those to whom you convey
the Program, the only way you could satisfy both those terms and this
License would be to refrain entirely from conveying the Program.

  13. Use with the GNU Affero General Public License.

  Notwithstanding any other provision of this License, you have
permission to link or combine any covered work with a work licensed
under version 3 of the GNU Affero General Public License into a single
combined work, and to convey the resulting work.  The terms of this
License will continue to apply to the part which is the covered work,
but the special requirements of the GNU Affero General Public License,
section 13, concerning interaction through a network will apply to the
combination as such.

  14. Revised Versions of this License.

  The Free Software Foundation may publish revised and/or new versions of
the GNU General Public License from time to time.  Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.

  Each version is given a distinguishing version number.  If the
Program specifies that a certain numbered version of the GNU General
Public License "or any later version" applies to it, you have the
option of following the terms and conditions either of that numbered
version or of any later version published by the Free Software
Foundation.  If the Program does not specify a version number of the
GNU General Public License, you may choose any version ever published
by the Free Software Foundation.

  If the Program specifies that a proxy can decide which future
versions of the GNU General Public License can be used, that proxy's
public statement of acceptance of a version permanently authorizes you
to choose that version for the Program.

  Later license versions may give you additional or different
permissions.  However, no additional obligations are imposed on any
author or copyright holder as a result of your choosing to follow a
later version.

  15. Disclaimer of Warranty.

  THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
APPLICABLE LAW.  EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE.  THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
IS WITH YOU.  SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.

  16. Limitation of Liability.

  IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
SUCH DAMAGES.

  17. Interpretation of Sections 15 and 16.

  If the disclaimer of warranty and limitation of liability provided
above cannot be given local legal effect according to their terms,
reviewing courts shall apply local law that most closely approximates
an absolute waiver of all civil liability in connection with the
Program, unless a warranty or assumption of liability accompanies a
copy of the Program in return for a fee.

                     END OF TERMS AND CONDITIONS

            How to Apply These Terms to Your New Programs

  If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.

  To do so, attach the following notices to the program.  It is safest
to attach them to the start of each source file to most effectively
state the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.

    <one line to give the program's name and a brief idea of what it does.>
    Copyright (C) <year>  <name of author>

    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with this program.  If not, see <https://www.gnu.org/licenses/>.

Also add information on how to contact you by electronic and paper mail.

  If the program does terminal interaction, make it output a short
notice like this when it starts in an interactive mode:

    <program>  Copyright (C) <year>  <name of author>
    This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
    This is free software, and you are welcome to redistribute it
    under certain conditions; type `show c' for details.

The hypothetical commands `show w' and `show c' should show the appropriate
parts of the General Public License.  Of course, your program's commands
might be different; for a GUI interface, you would use an "about box".

  You should also get your employer (if you work as a programmer) or school,
if any, to sign a "copyright disclaimer" for the program, if necessary.
For more information on this, and how to apply and follow the GNU GPL, see
<https://www.gnu.org/licenses/>.

  The GNU General Public License does not permit incorporating your program
into proprietary programs.  If your program is a subroutine library, you
may consider it more useful to permit linking proprietary applications with
the library.  If this is what you want to do, use the GNU Lesser General
Public License instead of this License.  But first, please read
<https://www.gnu.org/licenses/why-not-lgpl.html>.


================================================
FILE: core/api/.gitignore
================================================
# Gradle local files
/build/

================================================
FILE: core/api/LICENSE
================================================
                    GNU GENERAL PUBLIC LICENSE
                       Version 3, 29 June 2007

 Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
 Everyone is permitted to copy and distribute verbatim copies
 of this license document, but changing it is not allowed.

                            Preamble

  The GNU General Public License is a free, copyleft license for
software and other kinds of works.

  The licenses for most software and other practical works are designed
to take away your freedom to share and change the works.  By contrast,
the GNU General Public License is intended to guarantee your freedom to
share and change all versions of a program--to make sure it remains free
software for all its users.  We, the Free Software Foundation, use the
GNU General Public License for most of our software; it applies also to
any other work released this way by its authors.  You can apply it to
your programs, too.

  When we speak of free software, we are referring to freedom, not
price.  Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
them if you wish), that you receive source code or can get it if you
want it, that you can change the software or use pieces of it in new
free programs, and that you know you can do these things.

  To protect your rights, we need to prevent others from denying you
these rights or asking you to surrender the rights.  Therefore, you have
certain responsibilities if you distribute copies of the software, or if
you modify it: responsibilities to respect the freedom of others.

  For example, if you distribute copies of such a program, whether
gratis or for a fee, you must pass on to the recipients the same
freedoms that you received.  You must make sure that they, too, receive
or can get the source code.  And you must show them these terms so they
know their rights.

  Developers that use the GNU GPL protect your rights with two steps:
(1) assert copyright on the software, and (2) offer you this License
giving you legal permission to copy, distribute and/or modify it.

  For the developers' and authors' protection, the GPL clearly explains
that there is no warranty for this free software.  For both users' and
authors' sake, the GPL requires that modified versions be marked as
changed, so that their problems will not be attributed erroneously to
authors of previous versions.

  Some devices are designed to deny users access to install or run
modified versions of the software inside them, although the manufacturer
can do so.  This is fundamentally incompatible with the aim of
protecting users' freedom to change the software.  The systematic
pattern of such abuse occurs in the area of products for individuals to
use, which is precisely where it is most unacceptable.  Therefore, we
have designed this version of the GPL to prohibit the practice for those
products.  If such problems arise substantially in other domains, we
stand ready to extend this provision to those domains in future versions
of the GPL, as needed to protect the freedom of users.

  Finally, every program is threatened constantly by software patents.
States should not allow patents to restrict development and use of
software on general-purpose computers, but in those that do, we wish to
avoid the special danger that patents applied to a free program could
make it effectively proprietary.  To prevent this, the GPL assures that
patents cannot be used to render the program non-free.

  The precise terms and conditions for copying, distribution and
modification follow.

                       TERMS AND CONDITIONS

  0. Definitions.

  "This License" refers to version 3 of the GNU General Public License.

  "Copyright" also means copyright-like laws that apply to other kinds of
works, such as semiconductor masks.

  "The Program" refers to any copyrightable work licensed under this
License.  Each licensee is addressed as "you".  "Licensees" and
"recipients" may be individuals or organizations.

  To "modify" a work means to copy from or adapt all or part of the work
in a fashion requiring copyright permission, other than the making of an
exact copy.  The resulting work is called a "modified version" of the
earlier work or a work "based on" the earlier work.

  A "covered work" means either the unmodified Program or a work based
on the Program.

  To "propagate" a work means to do anything with it that, without
permission, would make you directly or secondarily liable for
infringement under applicable copyright law, except executing it on a
computer or modifying a private copy.  Propagation includes copying,
distribution (with or without modification), making available to the
public, and in some countries other activities as well.

  To "convey" a work means any kind of propagation that enables other
parties to make or receive copies.  Mere interaction with a user through
a computer network, with no transfer of a copy, is not conveying.

  An interactive user interface displays "Appropriate Legal Notices"
to the extent that it includes a convenient and prominently visible
feature that (1) displays an appropriate copyright notice, and (2)
tells the user that there is no warranty for the work (except to the
extent that warranties are provided), that licensees may convey the
work under this License, and how to view a copy of this License.  If
the interface presents a list of user commands or options, such as a
menu, a prominent item in the list meets this criterion.

  1. Source Code.

  The "source code" for a work means the preferred form of the work
for making modifications to it.  "Object code" means any non-source
form of a work.

  A "Standard Interface" means an interface that either is an official
standard defined by a recognized standards body, or, in the case of
interfaces specified for a particular programming language, one that
is widely used among developers working in that language.

  The "System Libraries" of an executable work include anything, other
than the work as a whole, that (a) is included in the normal form of
packaging a Major Component, but which is not part of that Major
Component, and (b) serves only to enable use of the work with that
Major Component, or to implement a Standard Interface for which an
implementation is available to the public in source code form.  A
"Major Component", in this context, means a major essential component
(kernel, window system, and so on) of the specific operating system
(if any) on which the executable work runs, or a compiler used to
produce the work, or an object code interpreter used to run it.

  The "Corresponding Source" for a work in object code form means all
the source code needed to generate, install, and (for an executable
work) run the object code and to modify the work, including scripts to
control those activities.  However, it does not include the work's
System Libraries, or general-purpose tools or generally available free
programs which are used unmodified in performing those activities but
which are not part of the work.  For example, Corresponding Source
includes interface definition files associated with source files for
the work, and the source code for shared libraries and dynamically
linked subprograms that the work is specifically designed to require,
such as by intimate data communication or control flow between those
subprograms and other parts of the work.

  The Corresponding Source need not include anything that users
can regenerate automatically from other parts of the Corresponding
Source.

  The Corresponding Source for a work in source code form is that
same work.

  2. Basic Permissions.

  All rights granted under this License are granted for the term of
copyright on the Program, and are irrevocable provided the stated
conditions are met.  This License explicitly affirms your unlimited
permission to run the unmodified Program.  The output from running a
covered work is covered by this License only if the output, given its
content, constitutes a covered work.  This License acknowledges your
rights of fair use or other equivalent, as provided by copyright law.

  You may make, run and propagate covered works that you do not
convey, without conditions so long as your license otherwise remains
in force.  You may convey covered works to others for the sole purpose
of having them make modifications exclusively for you, or provide you
with facilities for running those works, provided that you comply with
the terms of this License in conveying all material for which you do
not control copyright.  Those thus making or running the covered works
for you must do so exclusively on your behalf, under your direction
and control, on terms that prohibit them from making any copies of
your copyrighted material outside their relationship with you.

  Conveying under any other circumstances is permitted solely under
the conditions stated below.  Sublicensing is not allowed; section 10
makes it unnecessary.

  3. Protecting Users' Legal Rights From Anti-Circumvention Law.

  No covered work shall be deemed part of an effective technological
measure under any applicable law fulfilling obligations under article
11 of the WIPO copyright treaty adopted on 20 December 1996, or
similar laws prohibiting or restricting circumvention of such
measures.

  When you convey a covered work, you waive any legal power to forbid
circumvention of technological measures to the extent such circumvention
is effected by exercising rights under this License with respect to
the covered work, and you disclaim any intention to limit operation or
modification of the work as a means of enforcing, against the work's
users, your or third parties' legal rights to forbid circumvention of
technological measures.

  4. Conveying Verbatim Copies.

  You may convey verbatim copies of the Program's source code as you
receive it, in any medium, provided that you conspicuously and
appropriately publish on each copy an appropriate copyright notice;
keep intact all notices stating that this License and any
non-permissive terms added in accord with section 7 apply to the code;
keep intact all notices of the absence of any warranty; and give all
recipients a copy of this License along with the Program.

  You may charge any price or no price for each copy that you convey,
and you may offer support or warranty protection for a fee.

  5. Conveying Modified Source Versions.

  You may convey a work based on the Program, or the modifications to
produce it from the Program, in the form of source code under the
terms of section 4, provided that you also meet all of these conditions:

    a) The work must carry prominent notices stating that you modified
    it, and giving a relevant date.

    b) The work must carry prominent notices stating that it is
    released under this License and any conditions added under section
    7.  This requirement modifies the requirement in section 4 to
    "keep intact all notices".

    c) You must license the entire work, as a whole, under this
    License to anyone who comes into possession of a copy.  This
    License will therefore apply, along with any applicable section 7
    additional terms, to the whole of the work, and all its parts,
    regardless of how they are packaged.  This License gives no
    permission to license the work in any other way, but it does not
    invalidate such permission if you have separately received it.

    d) If the work has interactive user interfaces, each must display
    Appropriate Legal Notices; however, if the Program has interactive
    interfaces that do not display Appropriate Legal Notices, your
    work need not make them do so.

  A compilation of a covered work with other separate and independent
works, which are not by their nature extensions of the covered work,
and which are not combined with it such as to form a larger program,
in or on a volume of a storage or distribution medium, is called an
"aggregate" if the compilation and its resulting copyright are not
used to limit the access or legal rights of the compilation's users
beyond what the individual works permit.  Inclusion of a covered work
in an aggregate does not cause this License to apply to the other
parts of the aggregate.

  6. Conveying Non-Source Forms.

  You may convey a covered work in object code form under the terms
of sections 4 and 5, provided that you also convey the
machine-readable Corresponding Source under the terms of this License,
in one of these ways:

    a) Convey the object code in, or embodied in, a physical product
    (including a physical distribution medium), accompanied by the
    Corresponding Source fixed on a durable physical medium
    customarily used for software interchange.

    b) Convey the object code in, or embodied in, a physical product
    (including a physical distribution medium), accompanied by a
    written offer, valid for at least three years and valid for as
    long as you offer spare parts or customer support for that product
    model, to give anyone who possesses the object code either (1) a
    copy of the Corresponding Source for all the software in the
    product that is covered by this License, on a durable physical
    medium customarily used for software interchange, for a price no
    more than your reasonable cost of physically performing this
    conveying of source, or (2) access to copy the
    Corresponding Source from a network server at no charge.

    c) Convey individual copies of the object code with a copy of the
    written offer to provide the Corresponding Source.  This
    alternative is allowed only occasionally and noncommercially, and
    only if you received the object code with such an offer, in accord
    with subsection 6b.

    d) Convey the object code by offering access from a designated
    place (gratis or for a charge), and offer equivalent access to the
    Corresponding Source in the same way through the same place at no
    further charge.  You need not require recipients to copy the
    Corresponding Source along with the object code.  If the place to
    copy the object code is a network server, the Corresponding Source
    may be on a different server (operated by you or a third party)
    that supports equivalent copying facilities, provided you maintain
    clear directions next to the object code saying where to find the
    Corresponding Source.  Regardless of what server hosts the
    Corresponding Source, you remain obligated to ensure that it is
    available for as long as needed to satisfy these requirements.

    e) Convey the object code using peer-to-peer transmission, provided
    you inform other peers where the object code and Corresponding
    Source of the work are being offered to the general public at no
    charge under subsection 6d.

  A separable portion of the object code, whose source code is excluded
from the Corresponding Source as a System Library, need not be
included in conveying the object code work.

  A "User Product" is either (1) a "consumer product", which means any
tangible personal property which is normally used for personal, family,
or household purposes, or (2) anything designed or sold for incorporation
into a dwelling.  In determining whether a product is a consumer product,
doubtful cases shall be resolved in favor of coverage.  For a particular
product received by a particular user, "normally used" refers to a
typical or common use of that class of product, regardless of the status
of the particular user or of the way in which the particular user
actually uses, or expects or is expected to use, the product.  A product
is a consumer product regardless of whether the product has substantial
commercial, industrial or non-consumer uses, unless such uses represent
the only significant mode of use of the product.

  "Installation Information" for a User Product means any methods,
procedures, authorization keys, or other information required to install
and execute modified versions of a covered work in that User Product from
a modified version of its Corresponding Source.  The information must
suffice to ensure that the continued functioning of the modified object
code is in no case prevented or interfered with solely because
modification has been made.

  If you convey an object code work under this section in, or with, or
specifically for use in, a User Product, and the conveying occurs as
part of a transaction in which the right of possession and use of the
User Product is transferred to the recipient in perpetuity or for a
fixed term (regardless of how the transaction is characterized), the
Corresponding Source conveyed under this section must be accompanied
by the Installation Information.  But this requirement does not apply
if neither you nor any third party retains the ability to install
modified object code on the User Product (for example, the work has
been installed in ROM).

  The requirement to provide Installation Information does not include a
requirement to continue to provide support service, warranty, or updates
for a work that has been modified or installed by the recipient, or for
the User Product in which it has been modified or installed.  Access to a
network may be denied when the modification itself materially and
adversely affects the operation of the network or violates the rules and
protocols for communication across the network.

  Corresponding Source conveyed, and Installation Information provided,
in accord with this section must be in a format that is publicly
documented (and with an implementation available to the public in
source code form), and must require no special password or key for
unpacking, reading or copying.

  7. Additional Terms.

  "Additional permissions" are terms that supplement the terms of this
License by making exceptions from one or more of its conditions.
Additional permissions that are applicable to the entire Program shall
be treated as though they were included in this License, to the extent
that they are valid under applicable law.  If additional permissions
apply only to part of the Program, that part may be used separately
under those permissions, but the entire Program remains governed by
this License without regard to the additional permissions.

  When you convey a copy of a covered work, you may at your option
remove any additional permissions from that copy, or from any part of
it.  (Additional permissions may be written to require their own
removal in certain cases when you modify the work.)  You may place
additional permissions on material, added by you to a covered work,
for which you have or can give appropriate copyright permission.

  Notwithstanding any other provision of this License, for material you
add to a covered work, you may (if authorized by the copyright holders of
that material) supplement the terms of this License with terms:

    a) Disclaiming warranty or limiting liability differently from the
    terms of sections 15 and 16 of this License; or

    b) Requiring preservation of specified reasonable legal notices or
    author attributions in that material or in the Appropriate Legal
    Notices displayed by works containing it; or

    c) Prohibiting misrepresentation of the origin of that material, or
    requiring that modified versions of such material be marked in
    reasonable ways as different from the original version; or

    d) Limiting the use for publicity purposes of names of licensors or
    authors of the material; or

    e) Declining to grant rights under trademark law for use of some
    trade names, trademarks, or service marks; or

    f) Requiring indemnification of licensors and authors of that
    material by anyone who conveys the material (or modified versions of
    it) with contractual assumptions of liability to the recipient, for
    any liability that these contractual assumptions directly impose on
    those licensors and authors.

  All other non-permissive additional terms are considered "further
restrictions" within the meaning of section 10.  If the Program as you
received it, or any part of it, contains a notice stating that it is
governed by this License along with a term that is a further
restriction, you may remove that term.  If a license document contains
a further restriction but permits relicensing or conveying under this
License, you may add to a covered work material governed by the terms
of that license document, provided that the further restriction does
not survive such relicensing or conveying.

  If you add terms to a covered work in accord with this section, you
must place, in the relevant source files, a statement of the
additional terms that apply to those files, or a notice indicating
where to find the applicable terms.

  Additional terms, permissive or non-permissive, may be stated in the
form of a separately written license, or stated as exceptions;
the above requirements apply either way.

  8. Termination.

  You may not propagate or modify a covered work except as expressly
provided under this License.  Any attempt otherwise to propagate or
modify it is void, and will automatically terminate your rights under
this License (including any patent licenses granted under the third
paragraph of section 11).

  However, if you cease all violation of this License, then your
license from a particular copyright holder is reinstated (a)
provisionally, unless and until the copyright holder explicitly and
finally terminates your license, and (b) permanently, if the copyright
holder fails to notify you of the violation by some reasonable means
prior to 60 days after the cessation.

  Moreover, your license from a particular copyright holder is
reinstated permanently if the copyright holder notifies you of the
violation by some reasonable means, this is the first time you have
received notice of violation of this License (for any work) from that
copyright holder, and you cure the violation prior to 30 days after
your receipt of the notice.

  Termination of your rights under this section does not terminate the
licenses of parties who have received copies or rights from you under
this License.  If your rights have been terminated and not permanently
reinstated, you do not qualify to receive new licenses for the same
material under section 10.

  9. Acceptance Not Required for Having Copies.

  You are not required to accept this License in order to receive or
run a copy of the Program.  Ancillary propagation of a covered work
occurring solely as a consequence of using peer-to-peer transmission
to receive a copy likewise does not require acceptance.  However,
nothing other than this License grants you permission to propagate or
modify any covered work.  These actions infringe copyright if you do
not accept this License.  Therefore, by modifying or propagating a
covered work, you indicate your acceptance of this License to do so.

  10. Automatic Licensing of Downstream Recipients.

  Each time you convey a covered work, the recipient automatically
receives a license from the original licensors, to run, modify and
propagate that work, subject to this License.  You are not responsible
for enforcing compliance by third parties with this License.

  An "entity transaction" is a transaction transferring control of an
organization, or substantially all assets of one, or subdividing an
organization, or merging organizations.  If propagation of a covered
work results from an entity transaction, each party to that
transaction who receives a copy of the work also receives whatever
licenses to the work the party's predecessor in interest had or could
give under the previous paragraph, plus a right to possession of the
Corresponding Source of the work from the predecessor in interest, if
the predecessor has it or can get it with reasonable efforts.

  You may not impose any further restrictions on the exercise of the
rights granted or affirmed under this License.  For example, you may
not impose a license fee, royalty, or other charge for exercise of
rights granted under this License, and you may not initiate litigation
(including a cross-claim or counterclaim in a lawsuit) alleging that
any patent claim is infringed by making, using, selling, offering for
sale, or importing the Program or any portion of it.

  11. Patents.

  A "contributor" is a copyright holder who authorizes use under this
License of the Program or a work on which the Program is based.  The
work thus licensed is called the contributor's "contributor version".

  A contributor's "essential patent claims" are all patent claims
owned or controlled by the contributor, whether already acquired or
hereafter acquired, that would be infringed by some manner, permitted
by this License, of making, using, or selling its contributor version,
but do not include claims that would be infringed only as a
consequence of further modification of the contributor version.  For
purposes of this definition, "control" includes the right to grant
patent sublicenses in a manner consistent with the requirements of
this License.

  Each contributor grants you a non-exclusive, worldwide, royalty-free
patent license under the contributor's essential patent claims, to
make, use, sell, offer for sale, import and otherwise run, modify and
propagate the contents of its contributor version.

  In the following three paragraphs, a "patent license" is any express
agreement or commitment, however denominated, not to enforce a patent
(such as an express permission to practice a patent or covenant not to
sue for patent infringement).  To "grant" such a patent license to a
party means to make such an agreement or commitment not to enforce a
patent against the party.

  If you convey a covered work, knowingly relying on a patent license,
and the Corresponding Source of the work is not available for anyone
to copy, free of charge and under the terms of this License, through a
publicly available network server or other readily accessible means,
then you must either (1) cause the Corresponding Source to be so
available, or (2) arrange to deprive yourself of the benefit of the
patent license for this particular work, or (3) arrange, in a manner
consistent with the requirements of this License, to extend the patent
license to downstream recipients.  "Knowingly relying" means you have
actual knowledge that, but for the patent license, your conveying the
covered work in a country, or your recipient's use of the covered work
in a country, would infringe one or more identifiable patents in that
country that you have reason to believe are valid.

  If, pursuant to or in connection with a single transaction or
arrangement, you convey, or propagate by procuring conveyance of, a
covered work, and grant a patent license to some of the parties
receiving the covered work authorizing them to use, propagate, modify
or convey a specific copy of the covered work, then the patent license
you grant is automatically extended to all recipients of the covered
work and works based on it.

  A patent license is "discriminatory" if it does not include within
the scope of its coverage, prohibits the exercise of, or is
conditioned on the non-exercise of one or more of the rights that are
specifically granted under this License.  You may not convey a covered
work if you are a party to an arrangement with a third party that is
in the business of distributing software, under which you make payment
to the third party based on the extent of your activity of conveying
the work, and under which the third party grants, to any of the
parties who would receive the covered work from you, a discriminatory
patent license (a) in connection with copies of the covered work
conveyed by you (or copies made from those copies), or (b) primarily
for and in connection with specific products or compilations that
contain the covered work, unless you entered into that arrangement,
or that patent license was granted, prior to 28 March 2007.

  Nothing in this License shall be construed as excluding or limiting
any implied license or other defenses to infringement that may
otherwise be available to you under applicable patent law.

  12. No Surrender of Others' Freedom.

  If conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License.  If you cannot convey a
covered work so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you may
not convey it at all.  For example, if you agree to terms that obligate you
to collect a royalty for further conveying from those to whom you convey
the Program, the only way you could satisfy both those terms and this
License would be to refrain entirely from conveying the Program.

  13. Use with the GNU Affero General Public License.

  Notwithstanding any other provision of this License, you have
permission to link or combine any covered work with a work licensed
under version 3 of the GNU Affero General Public License into a single
combined work, and to convey the resulting work.  The terms of this
License will continue to apply to the part which is the covered work,
but the special requirements of the GNU Affero General Public License,
section 13, concerning interaction through a network will apply to the
combination as such.

  14. Revised Versions of this License.

  The Free Software Foundation may publish revised and/or new versions of
the GNU General Public License from time to time.  Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.

  Each version is given a distinguishing version number.  If the
Program specifies that a certain numbered version of the GNU General
Public License "or any later version" applies to it, you have the
option of following the terms and conditions either of that numbered
version or of any later version published by the Free Software
Foundation.  If the Program does not specify a version number of the
GNU General Public License, you may choose any version ever published
by the Free Software Foundation.

  If the Program specifies that a proxy can decide which future
versions of the GNU General Public License can be used, that proxy's
public statement of acceptance of a version permanently authorizes you
to choose that version for the Program.

  Later license versions may give you additional or different
permissions.  However, no additional obligations are imposed on any
author or copyright holder as a result of your choosing to follow a
later version.

  15. Disclaimer of Warranty.

  THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
APPLICABLE LAW.  EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE.  THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
IS WITH YOU.  SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.

  16. Limitation of Liability.

  IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
SUCH DAMAGES.

  17. Interpretation of Sections 15 and 16.

  If the disclaimer of warranty and limitation of liability provided
above cannot be given local legal effect according to their terms,
reviewing courts shall apply local law that most closely approximates
an absolute waiver of all civil liability in connection with the
Program, unless a warranty or assumption of liability accompanies a
copy of the Program in return for a fee.

                     END OF TERMS AND CONDITIONS

            How to Apply These Terms to Your New Programs

  If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.

  To do so, attach the following notices to the program.  It is safest
to attach them to the start of each source file to most effectively
state the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.

    <one line to give the program's name and a brief idea of what it does.>
    Copyright (C) <year>  <name of author>

    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with this program.  If not, see <https://www.gnu.org/licenses/>.

Also add information on how to contact you by electronic and paper mail.

  If the program does terminal interaction, make it output a short
notice like this when it starts in an interactive mode:

    <program>  Copyright (C) <year>  <name of author>
    This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
    This is free software, and you are welcome to redistribute it
    under certain conditions; type `show c' for details.

The hypothetical commands `show w' and `show c' should show the appropriate
parts of the General Public License.  Of course, your program's commands
might be different; for a GUI interface, you would use an "about box".

  You should also get your employer (if you work as a programmer) or school,
if any, to sign a "copyright disclaimer" for the program, if necessary.
For more information on this, and how to apply and follow the GNU GPL, see
<https://www.gnu.org/licenses/>.

  The GNU General Public License does not permit incorporating your program
into proprietary programs.  If your program is a subroutine library, you
may consider it more useful to permit linking proprietary applications with
the library.  If this is what you want to do, use the GNU Lesser General
Public License instead of this License.  But first, please read
<https://www.gnu.org/licenses/why-not-lgpl.html>.


================================================
FILE: core/api/build.gradle.kts
================================================
plugins {
    id("java")
    id("fr.stardustenterprises.rust.importer") version "3.2.4"
}

group = "graphics.kiln"
version = "1.0.0-SNAPSHOT"

repositories {
    mavenCentral()
}

dependencies {
    rust(project(":core:natives"))

    implementation("org.apache.logging.log4j:log4j-api:2.17.0")
    implementation("org.apache.commons:commons-lang3:3.12.0")
    implementation("com.google.code.gson:gson:2.8.9")
    implementation("org.lwjgl:lwjgl-glfw:3.3.1")

    testImplementation("org.junit.jupiter:junit-jupiter-api:5.8.2")
    testRuntimeOnly("org.junit.jupiter:junit-jupiter-engine:5.8.2")
}

rustImport {
    baseDir.set("/graphics/kiln/blaze4d/core/natives")
    layout.set("hierarchical")
}

tasks.withType<JavaCompile> {
    options.release.set(18)
    options.compilerArgs.add("--add-modules=jdk.incubator.foreign")
}

tasks.getByName<Test>("test") {
    useJUnitPlatform()
}

================================================
FILE: core/api/src/main/java/graphics/kiln/blaze4d/core/Blaze4DCore.java
================================================
package graphics.kiln.blaze4d.core;

import graphics.kiln.blaze4d.core.natives.Natives;
import graphics.kiln.blaze4d.core.types.B4DFormat;
import graphics.kiln.blaze4d.core.types.B4DImageData;
import graphics.kiln.blaze4d.core.types.B4DMeshData;
import graphics.kiln.blaze4d.core.types.B4DVertexFormat;
import jdk.incubator.foreign.MemoryAddress;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.apache.logging.log4j.message.StringFormatterMessageFactory;

public class Blaze4DCore implements AutoCloseable {
    public static final Logger LOGGER = LogManager.getLogger("Blaze4DCore", new StringFormatterMessageFactory());

    private final MemoryAddress handle;

    public Blaze4DCore(long glfwWindow) {
        boolean enableValidation = System.getProperty("b4d.enable_validation") != null;

        MemoryAddress surfaceProvider = Natives.b4dCreateGlfwSurfaceProvider(glfwWindow);
        this.handle = Natives.b4dInit(surfaceProvider, enableValidation);
    }

    public void setDebugMode(DebugMode mode) {
        Natives.b4dSetDebugMode(this.handle, mode.raw);
    }

    public long createShader(B4DVertexFormat vertexFormat, long usedUniforms) {
        return Natives.b4dCreateShader(this.handle, vertexFormat.getAddress(), usedUniforms);
    }

    public void destroyShader(long shaderId) {
        Natives.b4dDestroyShader(this.handle, shaderId);
    }

    public GlobalMesh createGlobalMesh(B4DMeshData meshData) {
        return new GlobalMesh(Natives.b4dCreateGlobalMesh(this.handle, meshData.getAddress()));
    }

    public GlobalImage createGlobalImage(int width, int height, B4DFormat format) {
        return new GlobalImage(Natives.b4dCreateGlobalImage(this.handle, width, height, format.getValue()));
    }

    public Frame startFrame(int windowWidth, int windowHeight) {
        MemoryAddress frame = Natives.b4dStartFrame(this.handle, windowWidth, windowHeight);
        if(frame.toRawLongValue() == 0L) {
            return null;
        } else {
            return new Frame(frame);
        }
    }

    @Override
    public void close() throws Exception {
        Natives.b4dDestroy(this.handle);
    }

    public enum DebugMode {
        NONE(0),
        DEPTH(1),
        POSITION(2),
        COLOR(3),
        NORMAL(4),
        UV0(5),
        UV1(6),
        UV2(7),
        TEXTURED0(8),
        TEXTURED1(9),
        TEXTURED2(10);

        final int raw;

        DebugMode(int raw) {
            this.raw = raw;
        }
    }
}


================================================
FILE: core/api/src/main/java/graphics/kiln/blaze4d/core/Frame.java
================================================
package graphics.kiln.blaze4d.core;

import graphics.kiln.blaze4d.core.natives.Natives;
import graphics.kiln.blaze4d.core.types.B4DMeshData;
import graphics.kiln.blaze4d.core.types.B4DUniformData;
import jdk.incubator.foreign.MemoryAddress;

public class Frame implements AutoCloseable {

    private final MemoryAddress handle;

    Frame(MemoryAddress handle) {
        this.handle = handle;
    }

    public void updateUniform(long shaderId, B4DUniformData data) {
        Natives.b4dPassUpdateUniform(this.handle, data.getAddress(), shaderId);
    }

    public void drawGlobal(GlobalMesh mesh, long shaderId, boolean depthWrite) {
        Natives.b4dPassDrawGlobal(this.handle, mesh.getHandle(), shaderId, depthWrite);
    }

    public int uploadImmediate(B4DMeshData data) {
        return Natives.b4dPassUploadImmediate(this.handle, data.getAddress());
    }

    public void drawImmediate(int meshId, long shaderId, boolean depthWrite) {
        Natives.b4dPassDrawImmediate(this.handle, meshId, shaderId, depthWrite);
    }

    @Override
    public void close() throws Exception {
        Natives.b4dEndFrame(this.handle);
    }
}


================================================
FILE: core/api/src/main/java/graphics/kiln/blaze4d/core/GlobalImage.java
================================================
package graphics.kiln.blaze4d.core;

import graphics.kiln.blaze4d.core.natives.Natives;
import graphics.kiln.blaze4d.core.types.B4DImageData;
import jdk.incubator.foreign.MemoryAddress;

public class GlobalImage implements AutoCloseable {

    private final MemoryAddress handle;

    GlobalImage(MemoryAddress handle) {
        this.handle = handle;
    }

    public void update(B4DImageData data) {
        Natives.b4DUpdateGlobalImage(this.handle, data.getAddress(), 1);
    }

    MemoryAddress getHandle() {
        return this.handle;
    }

    @Override
    public void close() throws Exception {
        Natives.b4dDestroyGlobalImage(this.handle);
    }
}


================================================
FILE: core/api/src/main/java/graphics/kiln/blaze4d/core/GlobalMesh.java
================================================
package graphics.kiln.blaze4d.core;

import graphics.kiln.blaze4d.core.natives.Natives;
import jdk.incubator.foreign.MemoryAddress;

public class GlobalMesh implements AutoCloseable {

    private final MemoryAddress handle;

    GlobalMesh(MemoryAddress handle) {
        this.handle = handle;
    }

    MemoryAddress getHandle() {
        return this.handle;
    }

    @Override
    public void close() throws Exception {
        Natives.b4dDestroyGlobalMesh(this.handle);
    }
}


================================================
FILE: core/api/src/main/java/graphics/kiln/blaze4d/core/natives/ImageDataNative.java
================================================
package graphics.kiln.blaze4d.core.natives;

import jdk.incubator.foreign.MemoryLayout;
import jdk.incubator.foreign.ValueLayout;

import java.lang.invoke.VarHandle;

public class ImageDataNative {
    public static final MemoryLayout LAYOUT;

    public static final MemoryLayout.PathElement DATA_PTR_PATH;
    public static final MemoryLayout.PathElement DATA_LEN_PATH;
    public static final MemoryLayout.PathElement ROW_STRIDE_PATH;
    public static final MemoryLayout.PathElement OFFSET_PATH;
    public static final MemoryLayout.PathElement EXTENT_PATH;

    public static final VarHandle DATA_PTR_HANDLE;
    public static final VarHandle DATA_LEN_HANDLE;
    public static final VarHandle ROW_STRIDE_HANDLE;
    public static final VarHandle OFFSET_HANDLE;
    public static final VarHandle EXTENT_HANDLE;

    static {
        LAYOUT = MemoryLayout.structLayout(
                ValueLayout.ADDRESS.withName("data_ptr"),
                Natives.getSizeLayout().withName("data_len"),
                ValueLayout.JAVA_INT.withName("row_stride"),
                MemoryLayout.sequenceLayout(2, ValueLayout.JAVA_INT).withName("offset"),
                MemoryLayout.sequenceLayout(2, ValueLayout.JAVA_INT).withName("extent")
        );

        DATA_PTR_PATH = MemoryLayout.PathElement.groupElement("data_ptr");
        DATA_LEN_PATH = MemoryLayout.PathElement.groupElement("data_len");
        ROW_STRIDE_PATH = MemoryLayout.PathElement.groupElement("row_stride");
        OFFSET_PATH = MemoryLayout.PathElement.groupElement("offset");
        EXTENT_PATH = MemoryLayout.PathElement.groupElement("extent");

        DATA_PTR_HANDLE = LAYOUT.varHandle(DATA_PTR_PATH);
        DATA_LEN_HANDLE = LAYOUT.varHandle(DATA_LEN_PATH);
        ROW_STRIDE_HANDLE = LAYOUT.varHandle(ROW_STRIDE_PATH);
        OFFSET_HANDLE = LAYOUT.varHandle(OFFSET_PATH, MemoryLayout.PathElement.sequenceElement());
        EXTENT_HANDLE = LAYOUT.varHandle(EXTENT_PATH, MemoryLayout.PathElement.sequenceElement());
    }
}


================================================
FILE: core/api/src/main/java/graphics/kiln/blaze4d/core/natives/Lib.java
================================================
package graphics.kiln.blaze4d.core.natives;

import graphics.kiln.blaze4d.core.Blaze4DCore;
import jdk.incubator.foreign.SymbolLookup;

import org.apache.commons.lang3.SystemUtils;

import java.io.*;

/**
 * Manages loading of the native library
 */
public class Lib {
    public static SymbolLookup nativeLookup = null;

    /**
     * Attempts to load the b4d core natives.
     *
     * It is safe to call this function multiple times and concurrently.
     */
    public static synchronized void loadNatives() {
        if (nativeLookup != null) {
            return;
        }

        String overwrite = System.getProperty("b4d_core.native_lib");
        if (overwrite != null) {
            File overwriteFile = new File(overwrite).getAbsoluteFile();
            Blaze4DCore.LOGGER.info("Using native overwrite: " + overwriteFile);
            System.load(overwriteFile.getAbsolutePath());
            nativeLookup = SymbolLookup.loaderLookup();
            return;
        }
        File nativeFile = extractNatives(new File(System.getProperty("user.dir"), "b4d" + File.separator + "natives"));

        System.load(nativeFile.getAbsolutePath());
        nativeLookup = SymbolLookup.loaderLookup();
    }

    private static File extractNatives(File dstDirectory) {
        if (!dstDirectory.exists()) {
            if (!dstDirectory.mkdirs()) {
                throw new RuntimeException("Failed to make natives directory");
            }
        }
        if (!dstDirectory.isDirectory()) {
            throw new RuntimeException("Natives directory is not a directory");
        }

        String fileName = System.mapLibraryName("b4d-core");
        File nativesFile = new File(dstDirectory, fileName);
        Blaze4DCore.LOGGER.info("Extracting natives to " + nativesFile);

        if(nativesFile.isFile()) {
            if (!nativesFile.delete()) {
                throw new RuntimeException("Failed to delete already existing natives file");
            }
        } else {
            if (nativesFile.exists()) {
                throw new RuntimeException("Natives file already exists but is not a file");
            }
        }

        copyToFile(nativesFile, Os.getOs().name + "/" + Arch.getArch().name + "/" + fileName);

        return nativesFile;
    }

    private static void copyToFile(File dst, String resourcePath) {
        try (InputStream in = Lib.class.getResourceAsStream(resourcePath)) {
            if (in == null) {
                throw new RuntimeException("Invalid native lib resource path: " + resourcePath);
            }

            try (OutputStream out = new FileOutputStream(dst)) {
                byte[] buffer = new byte[1024 * 1024 * 16];
                int readBytes;

                while((readBytes = in.read(buffer)) != -1) {
                    out.write(buffer, 0, readBytes);
                }
            }
        } catch (IOException e) {
            throw new RuntimeException("Failed to extract native lib.", e);
        }
    }

    private enum Os {
        WINDOWS("windows"),
        GENERIC_LINUX("generic_linux"),
        MAC("mac");

        public final String name;

        Os(String name) {
            this.name = name;
        }

        static Os getOs() {
            if (SystemUtils.IS_OS_WINDOWS) {
                return WINDOWS;
            } else if(SystemUtils.IS_OS_LINUX) {
                return GENERIC_LINUX;
            } else if(SystemUtils.IS_OS_MAC) {
                return MAC;
            } else {
                throw new UnsupportedOperationException("Unknown os: " + SystemUtils.OS_NAME);
            }
        }
    }

    private enum Arch {
        I686("i686"),
        AMD64("x86_64"),
        AARCH64("aarch64");

        public final String name;

        Arch(String name) {
            this.name = name;
        }

        static Arch getArch() {
            return switch (SystemUtils.OS_ARCH) {
                case "x86" -> I686;
                case "amd64" -> AMD64;
                case "aarch64" -> AARCH64;
                default -> throw new UnsupportedOperationException("Unknown arch: " + SystemUtils.OS_ARCH);
            };
        }
    }
}

================================================
FILE: core/api/src/main/java/graphics/kiln/blaze4d/core/natives/McUniformDataNative.java
================================================
package graphics.kiln.blaze4d.core.natives;

import jdk.incubator.foreign.*;

import java.lang.invoke.VarHandle;

public class McUniformDataNative {
    public static final MemoryLayout LAYOUT;

    public static final MemoryLayout.PathElement UNIFORM_PATH;
    public static final MemoryLayout.PathElement PAYLOAD_PATH;
    public static final MemoryLayout.PathElement PAYLOAD_U32_PATH;
    public static final MemoryLayout.PathElement PAYLOAD_F32_PATH;
    public static final MemoryLayout.PathElement PAYLOAD_VEC2F32_PATH;
    public static final MemoryLayout.PathElement PAYLOAD_VEC3F32_PATH;
    public static final MemoryLayout.PathElement PAYLOAD_VEC4F32_PATH;
    public static final MemoryLayout.PathElement PAYLOAD_MAT4F32_PATH;
    
    public static final VarHandle UNIFORM_HANDLE;
    public static final VarHandle PAYLOAD_U32_HANDLE;
    public static final VarHandle PAYLOAD_F32_HANDLE;
    public static final VarHandle PAYLOAD_VEC2F32_HANDLE;
    public static final VarHandle PAYLOAD_VEC3F32_HANDLE;
    public static final VarHandle PAYLOAD_VEC4F32_HANDLE;
    public static final VarHandle PAYLOAD_MAT4F32_HANDLE;

    static {
        LAYOUT = MemoryLayout.structLayout(
                ValueLayout.JAVA_LONG.withName("uniform"),
                MemoryLayout.unionLayout(
                        ValueLayout.JAVA_INT.withName("u32"),
                        ValueLayout.JAVA_FLOAT.withName("f32"),
                        MemoryLayout.sequenceLayout(2, ValueLayout.JAVA_FLOAT).withName("vec2f32"),
                        MemoryLayout.sequenceLayout(3, ValueLayout.JAVA_FLOAT).withName("vec3f32"),
                        MemoryLayout.sequenceLayout(4, ValueLayout.JAVA_FLOAT).withName("vec4f32"),
                        MemoryLayout.sequenceLayout(16, ValueLayout.JAVA_FLOAT).withName("mat4f32")
                ).withName("payload")
        );

        UNIFORM_PATH = MemoryLayout.PathElement.groupElement("uniform");
        PAYLOAD_PATH = MemoryLayout.PathElement.groupElement("payload");
        PAYLOAD_U32_PATH = MemoryLayout.PathElement.groupElement("u32");
        PAYLOAD_F32_PATH = MemoryLayout.PathElement.groupElement("f32");
        PAYLOAD_VEC2F32_PATH = MemoryLayout.PathElement.groupElement("vec2f32");
        PAYLOAD_VEC3F32_PATH = MemoryLayout.PathElement.groupElement("vec3f32");
        PAYLOAD_VEC4F32_PATH = MemoryLayout.PathElement.groupElement("vec4f32");
        PAYLOAD_MAT4F32_PATH = MemoryLayout.PathElement.groupElement("mat4f32");

        UNIFORM_HANDLE = LAYOUT.varHandle(UNIFORM_PATH);
        PAYLOAD_U32_HANDLE = LAYOUT.varHandle(PAYLOAD_PATH, PAYLOAD_U32_PATH);
        PAYLOAD_F32_HANDLE = LAYOUT.varHandle(PAYLOAD_PATH, PAYLOAD_F32_PATH);
        PAYLOAD_VEC2F32_HANDLE = LAYOUT.varHandle(PAYLOAD_PATH, PAYLOAD_VEC2F32_PATH, MemoryLayout.PathElement.sequenceElement());
        PAYLOAD_VEC3F32_HANDLE = LAYOUT.varHandle(PAYLOAD_PATH, PAYLOAD_VEC3F32_PATH, MemoryLayout.PathElement.sequenceElement());
        PAYLOAD_VEC4F32_HANDLE = LAYOUT.varHandle(PAYLOAD_PATH, PAYLOAD_VEC4F32_PATH, MemoryLayout.PathElement.sequenceElement());
        PAYLOAD_MAT4F32_HANDLE = LAYOUT.varHandle(PAYLOAD_PATH, PAYLOAD_MAT4F32_PATH, MemoryLayout.PathElement.sequenceElement());
    }
}


================================================
FILE: core/api/src/main/java/graphics/kiln/blaze4d/core/natives/MeshDataNative.java
================================================
package graphics.kiln.blaze4d.core.natives;

import jdk.incubator.foreign.*;

import java.lang.invoke.VarHandle;

public class MeshDataNative {
    public static final MemoryLayout LAYOUT;

    public static final MemoryLayout.PathElement VERTEX_DATA_PTR_PATH;
    public static final MemoryLayout.PathElement VERTEX_DATA_LEN_PATH;
    public static final MemoryLayout.PathElement INDEX_DATA_PTR_PATH;
    public static final MemoryLayout.PathElement INDEX_DATA_LEN_PATH;
    public static final MemoryLayout.PathElement VERTEX_STRIDE_PATH;
    public static final MemoryLayout.PathElement INDEX_COUNT_PATH;
    public static final MemoryLayout.PathElement INDEX_TYPE_PATH;
    public static final MemoryLayout.PathElement PRIMITIVE_TOPOLOGY_PATH;

    public static final VarHandle VERTEX_DATA_PTR_HANDLE;
    public static final VarHandle VERTEX_DATA_LEN_HANDLE;
    public static final VarHandle INDEX_DATA_PTR_HANDLE;
    public static final VarHandle INDEX_DATA_LEN_HANDLE;
    public static final VarHandle VERTEX_STRIDE_HANDLE;
    public static final VarHandle INDEX_COUNT_HANDLE;
    public static final VarHandle INDEX_TYPE_HANDLE;
    public static final VarHandle PRIMITIVE_TOPOLOGY_HANDLE;

    static {
        LAYOUT = MemoryLayout.structLayout(
                ValueLayout.ADDRESS.withName("vertex_data_ptr"),
                Natives.getSizeLayout().withName("vertex_data_len"),
                ValueLayout.ADDRESS.withName("index_data_ptr"),
                Natives.getSizeLayout().withName("index_data_len"),
                ValueLayout.JAVA_INT.withName("vertex_stride"),
                ValueLayout.JAVA_INT.withName("index_count"),
                ValueLayout.JAVA_INT.withName("index_type"),
                ValueLayout.JAVA_INT.withName("primitive_topology")
        );

        VERTEX_DATA_PTR_PATH = MemoryLayout.PathElement.groupElement("vertex_data_ptr");
        VERTEX_DATA_LEN_PATH = MemoryLayout.PathElement.groupElement("vertex_data_len");
        INDEX_DATA_PTR_PATH = MemoryLayout.PathElement.groupElement("index_data_ptr");
        INDEX_DATA_LEN_PATH = MemoryLayout.PathElement.groupElement("index_data_len");
        VERTEX_STRIDE_PATH = MemoryLayout.PathElement.groupElement("vertex_stride");
        INDEX_COUNT_PATH = MemoryLayout.PathElement.groupElement("index_count");
        INDEX_TYPE_PATH = MemoryLayout.PathElement.groupElement("index_type");
        PRIMITIVE_TOPOLOGY_PATH = MemoryLayout.PathElement.groupElement("primitive_topology");

        VERTEX_DATA_PTR_HANDLE = LAYOUT.varHandle(VERTEX_DATA_PTR_PATH);
        VERTEX_DATA_LEN_HANDLE = LAYOUT.varHandle(VERTEX_DATA_LEN_PATH);
        INDEX_DATA_PTR_HANDLE = LAYOUT.varHandle(INDEX_DATA_PTR_PATH);
        INDEX_DATA_LEN_HANDLE = LAYOUT.varHandle(INDEX_DATA_LEN_PATH);
        VERTEX_STRIDE_HANDLE = LAYOUT.varHandle(VERTEX_STRIDE_PATH);
        INDEX_COUNT_HANDLE = LAYOUT.varHandle(INDEX_COUNT_PATH);
        INDEX_TYPE_HANDLE = LAYOUT.varHandle(INDEX_TYPE_PATH);
        PRIMITIVE_TOPOLOGY_HANDLE = LAYOUT.varHandle(PRIMITIVE_TOPOLOGY_PATH);
    }
}


================================================
FILE: core/api/src/main/java/graphics/kiln/blaze4d/core/natives/Natives.java
================================================
/**
 * Internal api to directly call native functions
 */

package graphics.kiln.blaze4d.core.natives;

import jdk.incubator.foreign.*;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.apache.logging.log4j.message.StringFormatterMessageFactory;
import org.lwjgl.glfw.GLFW;
import org.lwjgl.system.APIUtil;

import java.lang.invoke.MethodHandle;
import java.lang.invoke.MethodHandles;
import java.lang.invoke.MethodType;
import java.nio.charset.StandardCharsets;
import java.util.Optional;

import static jdk.incubator.foreign.ValueLayout.*;

public class Natives {
    private static final Logger NATIVE_LOGGER = LogManager.getLogger("Blaze4DNative", new StringFormatterMessageFactory());

    public static final CLinker linker;

    public static final NativeMetadata nativeMetadata;

    public static final MethodHandle B4D_CREATE_GLFW_SURFACE_PROVIDER_HANDLE;
    public static final MethodHandle B4D_INIT_HANDLE;
    public static final MethodHandle B4D_DESTROY_HANDLE;
    public static final MethodHandle B4D_SET_DEBUG_MODE_HANDLE;
    public static final MethodHandle B4D_CREATE_GLOBAL_MESH_HANDLE;
    public static final MethodHandle B4D_DESTROY_GLOBAL_MESH_HANDLE;
    public static final MethodHandle B4D_CREATE_GLOBAL_IMAGE_HANDLE;
    public static final MethodHandle B4D_UPDATE_GLOBAL_IMAGE_HANDLE;
    public static final MethodHandle B4D_DESTROY_GLOBAL_IMAGE_HANDLE;
    public static final MethodHandle B4D_CREATE_SHADER_HANDLE;
    public static final MethodHandle B4D_DESTROY_SHADER_HANDLE;
    public static final MethodHandle B4D_START_FRAME_HANDLE;
    public static final MethodHandle B4D_PASS_UPDATE_UNIFORM_HANDLE;
    public static final MethodHandle B4D_PASS_DRAW_GLOBAL_HANDLE;
    public static final MethodHandle B4D_PASS_UPLOAD_IMMEDIATE_HANDLE;
    public static final MethodHandle B4D_PASS_DRAW_IMMEDIATE_HANDLE;
    public static final MethodHandle B4D_END_FRAME_HANDLE;

    static {
        Lib.loadNatives();

        linker = CLinker.systemCLinker();
        nativeMetadata = loadMetadata();
        initNativeLogger();
        preInitGlfw();

        B4D_CREATE_GLFW_SURFACE_PROVIDER_HANDLE = lookupFunction("b4d_create_glfw_surface_provider",
                FunctionDescriptor.of(ADDRESS, ADDRESS, ADDRESS, ADDRESS)
        );

        B4D_INIT_HANDLE = lookupFunction("b4d_init",
                FunctionDescriptor.of(ADDRESS, ADDRESS, JAVA_INT)
        );

        B4D_DESTROY_HANDLE = lookupFunction("b4d_destroy",
                FunctionDescriptor.ofVoid(ADDRESS)
        );

        B4D_SET_DEBUG_MODE_HANDLE = lookupFunction("b4d_set_debug_mode",
                FunctionDescriptor.ofVoid(ADDRESS, JAVA_INT)
        );

        B4D_CREATE_GLOBAL_MESH_HANDLE = lookupFunction("b4d_create_global_mesh",
                FunctionDescriptor.of(ADDRESS, ADDRESS, ADDRESS)
        );

        B4D_DESTROY_GLOBAL_MESH_HANDLE = lookupFunction("b4d_destroy_global_mesh",
                FunctionDescriptor.ofVoid(ADDRESS)
        );

        B4D_CREATE_GLOBAL_IMAGE_HANDLE = lookupFunction("b4d_create_global_image",
                FunctionDescriptor.of(ADDRESS, JAVA_INT, JAVA_INT, JAVA_INT)
        );

        B4D_UPDATE_GLOBAL_IMAGE_HANDLE = lookupFunction("b4d_update_global_image",
                FunctionDescriptor.ofVoid(ADDRESS, ADDRESS, JAVA_INT)
        );

        B4D_DESTROY_GLOBAL_IMAGE_HANDLE = lookupFunction("b4d_destroy_global_image",
                FunctionDescriptor.ofVoid(ADDRESS)
        );

        B4D_CREATE_SHADER_HANDLE = lookupFunction("b4d_create_shader",
                FunctionDescriptor.of(JAVA_LONG, ADDRESS, ADDRESS, JAVA_LONG)
        );

        B4D_DESTROY_SHADER_HANDLE = lookupFunction("b4d_destroy_shader",
                FunctionDescriptor.ofVoid(ADDRESS, JAVA_LONG)
        );

        B4D_START_FRAME_HANDLE = lookupFunction("b4d_start_frame",
                FunctionDescriptor.of(ADDRESS, ADDRESS, JAVA_INT, JAVA_INT)
        );

        B4D_PASS_UPDATE_UNIFORM_HANDLE = lookupFunction("b4d_pass_update_uniform",
                FunctionDescriptor.ofVoid(ADDRESS, ADDRESS, JAVA_LONG)
        );

        B4D_PASS_DRAW_GLOBAL_HANDLE = lookupFunction("b4d_pass_draw_global",
                FunctionDescriptor.ofVoid(ADDRESS, ADDRESS, JAVA_LONG, JAVA_INT)
        );

        B4D_PASS_UPLOAD_IMMEDIATE_HANDLE = lookupFunction("b4d_pass_upload_immediate",
                FunctionDescriptor.of(JAVA_INT, ADDRESS, ADDRESS)
        );

        B4D_PASS_DRAW_IMMEDIATE_HANDLE = lookupFunction("b4d_pass_draw_immediate",
                FunctionDescriptor.ofVoid(ADDRESS, JAVA_INT, JAVA_LONG, JAVA_INT)
        );

        B4D_END_FRAME_HANDLE = lookupFunction("b4d_end_frame",
                FunctionDescriptor.ofVoid(ADDRESS)
        );
    }

    public static MemoryAddress b4dCreateGlfwSurfaceProvider(long glfwWindow) {
        MemoryAddress pfnGlfwGetRequiredInstanceExtensions = MemoryAddress.ofLong(APIUtil.apiGetFunctionAddress(GLFW.getLibrary(), "glfwGetRequiredInstanceExtensions"));
        MemoryAddress pfnGlfwCreateWindowSurface = MemoryAddress.ofLong(APIUtil.apiGetFunctionAddress(GLFW.getLibrary(), "glfwCreateWindowSurface"));
        try {
            return (MemoryAddress) B4D_CREATE_GLFW_SURFACE_PROVIDER_HANDLE.invoke(MemoryAddress.ofLong(glfwWindow), pfnGlfwGetRequiredInstanceExtensions, pfnGlfwCreateWindowSurface);
        } catch (Throwable e) {
            throw new RuntimeException("Failed to invoke b4d_create_glfw_surface_provider", e);
        }
    }

    public static MemoryAddress b4dInit(MemoryAddress surface, boolean enableValidation) {
        int enableValidationInt = enableValidation ? 1 : 0;
        try {
            return (MemoryAddress) B4D_INIT_HANDLE.invoke(surface, enableValidationInt);
        } catch (Throwable e) {
            throw new RuntimeException("Failed to invoke b4d_init", e);
        }
    }

    public static void b4dDestroy(MemoryAddress b4d) {
        try {
            B4D_DESTROY_HANDLE.invoke(b4d);
        } catch (Throwable e) {
            throw new RuntimeException("Failed to invoke b4d_destroy", e);
        }
    }

    public static void b4dSetDebugMode(MemoryAddress b4d, int debugMode) {
        try {
            B4D_SET_DEBUG_MODE_HANDLE.invoke(b4d, debugMode);
        } catch (Throwable e) {
            throw new RuntimeException("Failed to invoke b4d_set_debug_mode", e);
        }
    }

    public static MemoryAddress b4dCreateGlobalMesh(MemoryAddress b4d, MemoryAddress meshData) {
        try {
            return (MemoryAddress) B4D_CREATE_GLOBAL_MESH_HANDLE.invoke(b4d, meshData);
        } catch (Throwable e) {
            throw new RuntimeException("Failed to invoke b4d_create_global_mesh", e);
        }
    }

    public static void b4dDestroyGlobalMesh(MemoryAddress mesh) {
        try {
            B4D_DESTROY_GLOBAL_MESH_HANDLE.invoke(mesh);
        } catch (Throwable e) {
            throw new RuntimeException("Failed to invoke b4d_destroy_global_mesh", e);
        }
    }

    public static MemoryAddress b4dCreateGlobalImage(MemoryAddress b4d, int width, int height, int format) {
        try {
            return (MemoryAddress) B4D_CREATE_GLOBAL_IMAGE_HANDLE.invoke(b4d, width, height, format);
        } catch (Throwable e) {
            throw new RuntimeException("Failed to invoke b4d_create_global_image", e);
        }
    }

    public static void b4DUpdateGlobalImage(MemoryAddress image, MemoryAddress data, int dataCount) {
        try {
            B4D_UPDATE_GLOBAL_IMAGE_HANDLE.invoke(image, data, dataCount);
        } catch (Throwable e) {
            throw new RuntimeException("Failed to invoke b4d_update_global_image", e);
        }
    }

    public static void b4dDestroyGlobalImage(MemoryAddress image) {
        try {
            B4D_DESTROY_GLOBAL_IMAGE_HANDLE.invoke(image);
        } catch (Throwable e) {
            throw new RuntimeException("Failed to invoke b4d_destroy_global_image", e);
        }
    }

    public static long b4dCreateShader(MemoryAddress b4d, MemoryAddress vertexFormat, long usedUniforms) {
        try {
            return (long) B4D_CREATE_SHADER_HANDLE.invoke(b4d, vertexFormat, usedUniforms);
        } catch (Throwable e) {
            throw new RuntimeException("Failed to invoke b4d_create_shader", e);
        }
    }

    public static void b4dDestroyShader(MemoryAddress b4d, long shaderId) {
        try {
            B4D_DESTROY_SHADER_HANDLE.invoke(b4d, shaderId);
        } catch (Throwable e) {
            throw new RuntimeException("Failed to invoke b4d_destroy_shader", e);
        }
    }

    public static MemoryAddress b4dStartFrame(MemoryAddress b4d, int windowWidth, int windowHeight) {
        try {
            return (MemoryAddress) B4D_START_FRAME_HANDLE.invoke(b4d, windowWidth, windowHeight);
        } catch (Throwable e) {
            throw new RuntimeException("Failed to invoke b4d_start_frame", e);
        }
    }

    public static void b4dPassUpdateUniform(MemoryAddress frame, MemoryAddress data, long shaderId) {
        try {
            B4D_PASS_UPDATE_UNIFORM_HANDLE.invoke(frame, data, shaderId);
        } catch (Throwable e) {
            throw new RuntimeException("Failed to invoke b4d_pass_update_uniform", e);
        }
    }

    public static void b4dPassDrawGlobal(MemoryAddress frame, MemoryAddress mesh, long shaderId, boolean depthWrite) {
        int depthWriteInt;
        if (depthWrite) {
            depthWriteInt = 1;
        } else {
            depthWriteInt = 0;
        }
        try {
            B4D_PASS_DRAW_GLOBAL_HANDLE.invoke(frame, mesh, shaderId, depthWriteInt);
        } catch (Throwable e) {
            throw new RuntimeException("Failed to invoke b4d_pass_draw_global", e);
        }
    }

    public static int b4dPassUploadImmediate(MemoryAddress frame, MemoryAddress data) {
        try {
            return (int) B4D_PASS_UPLOAD_IMMEDIATE_HANDLE.invoke(frame, data);
        } catch (Throwable e) {
            throw new RuntimeException("Failed to invoke b4d_pass_upload_immediate", e);
        }
    }

    public static void b4dPassDrawImmediate(MemoryAddress frame, int meshId, long shaderId, boolean depthWrite) {
        int depthWriteInt;
        if (depthWrite) {
            depthWriteInt = 1;
        } else {
            depthWriteInt = 0;
        }
        try {
            B4D_PASS_DRAW_IMMEDIATE_HANDLE.invoke(frame, meshId, shaderId, depthWriteInt);
        } catch (Throwable e) {
            throw new RuntimeException("Failed to invoke b4d_pass_draw_immediate", e);
        }
    }

    public static void b4dEndFrame(MemoryAddress frame) {
        try {
            B4D_END_FRAME_HANDLE.invoke(frame);
        } catch (Throwable e) {
            throw new RuntimeException("Failed to invoke b4d_end_frame", e);
        }
    }

    public record NativeMetadata(int sizeBytes) {
    }

    public static ValueLayout getSizeLayout() {
        // Only 64 bit is supported right now
        return JAVA_LONG;
    }

    private static MethodHandle lookupFunction(String name, FunctionDescriptor descriptor) {
        Optional<NativeSymbol> result = Lib.nativeLookup.lookup(name);
        if (result.isPresent()) {
            return linker.downcallHandle(result.get(), descriptor);
        }
        throw new UnsatisfiedLinkError("Failed to find Blaze4D core function \"" + name + "\"");
    }

    private static NativeMetadata loadMetadata() {
        MethodHandle b4dGetNativeMetadataHandle = lookupFunction("b4d_get_native_metadata",
                FunctionDescriptor.of(ADDRESS)
        );

        MemoryLayout layout = MemoryLayout.structLayout(
                JAVA_INT.withName("size_bytes")
        );

        MemoryAddress address;
        try {
            address = (MemoryAddress) b4dGetNativeMetadataHandle.invoke();
        } catch (Throwable e) {
            throw new RuntimeException("Failed to invoke b4d_get_native_metadata", e);
        }

        MemorySegment segment = MemorySegment.ofAddress(address, layout.byteSize(), ResourceScope.globalScope());
        int sizeBytes = segment.get(JAVA_INT, layout.byteOffset(PathElement.groupElement("size_bytes")));

        if(sizeBytes != 8) {
            throw new RuntimeException("Blaze4D natives have 4byte size type. We do not support 32bit right now.");
        }

        return new NativeMetadata(sizeBytes);
    }

    private static void preInitGlfw() {
        MethodHandle b4dPreInitGlfwHandle = lookupFunction("b4d_pre_init_glfw",
                FunctionDescriptor.ofVoid(ADDRESS)
        );

        try {
            b4dPreInitGlfwHandle.invoke(MemoryAddress.ofLong(APIUtil.apiGetFunctionAddress(GLFW.getLibrary(), "glfwInitVulkanLoader")));
        } catch (Throwable e) {
            throw new RuntimeException("Failed to invoke b4d_pre_init_glfw", e);
        }
    }

    private static void initNativeLogger() {
        MethodHandle b4dInitExternalLogger = lookupFunction("b4d_init_external_logger",
                FunctionDescriptor.ofVoid(ADDRESS)
        );

        try {
            MethodHandle logFn = MethodHandles.lookup().findStatic(Natives.class, "nativeLogHandler",
                    MethodType.methodType(Void.TYPE, MemoryAddress.class, MemoryAddress.class, Integer.TYPE, Integer.TYPE, Integer.TYPE));
            NativeSymbol logFnNative = linker.upcallStub(
                    logFn,
                    FunctionDescriptor.ofVoid(ADDRESS, ADDRESS, JAVA_INT, JAVA_INT, JAVA_INT),
                    ResourceScope.globalScope()
            );
            b4dInitExternalLogger.invoke(logFnNative);
        } catch (Throwable e) {
            throw new RuntimeException("Failed to init b4d native logger", e);
        }
    }

    private static void nativeLogHandler(MemoryAddress targetPtr, MemoryAddress msgPtr, int targetLen, int msgLen, int level) {
        try (ResourceScope scope = ResourceScope.newConfinedScope()) {
            MemorySegment target = MemorySegment.ofAddress(targetPtr, targetLen, scope);
            MemorySegment message = MemorySegment.ofAddress(msgPtr, msgLen, scope);

            byte[] targetData = target.toArray(ValueLayout.JAVA_BYTE);
            byte[] messageData = message.toArray(ValueLayout.JAVA_BYTE);

            String targetString = new String(targetData, StandardCharsets.UTF_8);
            String messageString = new String(messageData, StandardCharsets.UTF_8);

            switch (level) {
                case 0 -> NATIVE_LOGGER.trace(messageString);
                case 1 -> NATIVE_LOGGER.debug(messageString);
                case 2 -> NATIVE_LOGGER.info(messageString);
                case 3 -> NATIVE_LOGGER.warn(messageString);
                case 4 -> NATIVE_LOGGER.error(messageString);
                default -> NATIVE_LOGGER.error("Received invalid log level from b4d native: " + level);
            }
        } catch (Throwable e) {
            NATIVE_LOGGER.error("Failed to log native message", e);
        }
    }

    public static void verifyInit() {
    }
}


================================================
FILE: core/api/src/main/java/graphics/kiln/blaze4d/core/natives/PipelineConfigurationNative.java
================================================
package graphics.kiln.blaze4d.core.natives;

import jdk.incubator.foreign.MemoryLayout;
import jdk.incubator.foreign.ValueLayout;

import java.lang.invoke.VarHandle;

public class PipelineConfigurationNative {
    public static final MemoryLayout LAYOUT;

    public static final MemoryLayout.PathElement DEPTH_TEST_ENABLE_PATH;
    public static final MemoryLayout.PathElement DEPTH_COMPARE_OP_PATH;
    public static final MemoryLayout.PathElement DEPTH_WRITE_ENABLE_PATH;
    public static final MemoryLayout.PathElement BLEND_ENABLE_PATH;
    public static final MemoryLayout.PathElement BLEND_COLOR_OP_PATH;
    public static final MemoryLayout.PathElement BLEND_COLOR_SRC_FACTOR_PATH;
    public static final MemoryLayout.PathElement BLEND_COLOR_DST_FACTOR_PATH;
    public static final MemoryLayout.PathElement BLEND_ALPHA_OP_PATH;
    public static final MemoryLayout.PathElement BLEND_ALPHA_SRC_FACTOR_PATH;
    public static final MemoryLayout.PathElement BLEND_ALPHA_DST_FACTOR_PATH;

    public static final VarHandle DEPTH_TEST_ENABLE_HANDLE;
    public static final VarHandle DEPTH_COMPARE_OP_HANDLE;
    public static final VarHandle DEPTH_WRITE_ENABLE_HANDLE;
    public static final VarHandle BLEND_ENABLE_HANDLE;
    public static final VarHandle BLEND_COLOR_OP_HANDLE;
    public static final VarHandle BLEND_COLOR_SRC_FACTOR_HANDLE;
    public static final VarHandle BLEND_COLOR_DST_FACTOR_HANDLE;
    public static final VarHandle BLEND_ALPHA_OP_HANDLE;
    public static final VarHandle BLEND_ALPHA_SRC_FACTOR_HANDLE;
    public static final VarHandle BLEND_ALPHA_DST_FACTOR_HANDLE;

    static {
        LAYOUT = MemoryLayout.structLayout(
                ValueLayout.JAVA_INT.withName("depth_test_enable"),
                ValueLayout.JAVA_INT.withName("depth_compare_op"),
                ValueLayout.JAVA_INT.withName("depth_write_enable"),
                ValueLayout.JAVA_INT.withName("blend_enable"),
                ValueLayout.JAVA_INT.withName("blend_color_op"),
                ValueLayout.JAVA_INT.withName("blend_color_src_factor"),
                ValueLayout.JAVA_INT.withName("blend_color_dst_factor"),
                ValueLayout.JAVA_INT.withName("blend_alpha_op"),
                ValueLayout.JAVA_INT.withName("blend_alpha_src_factor"),
                ValueLayout.JAVA_INT.withName("blend_alpha_dst_factor")
        );

        DEPTH_TEST_ENABLE_PATH = MemoryLayout.PathElement.groupElement("depth_test_enable");
        DEPTH_COMPARE_OP_PATH = MemoryLayout.PathElement.groupElement("depth_compare_op");
        DEPTH_WRITE_ENABLE_PATH = MemoryLayout.PathElement.groupElement("depth_write_enable");
        BLEND_ENABLE_PATH = MemoryLayout.PathElement.groupElement("blend_enable");
        BLEND_COLOR_OP_PATH = MemoryLayout.PathElement.groupElement("blend_color_op");
        BLEND_COLOR_SRC_FACTOR_PATH = MemoryLayout.PathElement.groupElement("blend_color_src_factor");
        BLEND_COLOR_DST_FACTOR_PATH = MemoryLayout.PathElement.groupElement("blend_color_dst_factor");
        BLEND_ALPHA_OP_PATH = MemoryLayout.PathElement.groupElement("blend_alpha_op");
        BLEND_ALPHA_SRC_FACTOR_PATH = MemoryLayout.PathElement.groupElement("blend_alpha_src_factor");
        BLEND_ALPHA_DST_FACTOR_PATH = MemoryLayout.PathElement.groupElement("blend_alpha_dst_factor");

        DEPTH_TEST_ENABLE_HANDLE = LAYOUT.varHandle(DEPTH_TEST_ENABLE_PATH);
        DEPTH_COMPARE_OP_HANDLE = LAYOUT.varHandle(DEPTH_COMPARE_OP_PATH);
        DEPTH_WRITE_ENABLE_HANDLE = LAYOUT.varHandle(DEPTH_WRITE_ENABLE_PATH);
        BLEND_ENABLE_HANDLE = LAYOUT.varHandle(BLEND_ENABLE_PATH);
        BLEND_COLOR_OP_HANDLE = LAYOUT.varHandle(BLEND_COLOR_OP_PATH);
        BLEND_COLOR_SRC_FACTOR_HANDLE = LAYOUT.varHandle(BLEND_COLOR_SRC_FACTOR_PATH);
        BLEND_COLOR_DST_FACTOR_HANDLE = LAYOUT.varHandle(BLEND_COLOR_DST_FACTOR_PATH);
        BLEND_ALPHA_OP_HANDLE = LAYOUT.varHandle(BLEND_ALPHA_OP_PATH);
        BLEND_ALPHA_SRC_FACTOR_HANDLE = LAYOUT.varHandle(BLEND_ALPHA_SRC_FACTOR_PATH);
        BLEND_ALPHA_DST_FACTOR_HANDLE = LAYOUT.varHandle(BLEND_ALPHA_DST_FACTOR_PATH);
    }
}

================================================
FILE: core/api/src/main/java/graphics/kiln/blaze4d/core/natives/Vec2u32Native.java
================================================
package graphics.kiln.blaze4d.core.natives;

import jdk.incubator.foreign.MemoryLayout;
import jdk.incubator.foreign.ValueLayout;

public class Vec2u32Native {
    public static final MemoryLayout LAYOUT;

    static {
        LAYOUT = MemoryLayout.sequenceLayout(2, ValueLayout.JAVA_INT);
    }
}


================================================
FILE: core/api/src/main/java/graphics/kiln/blaze4d/core/natives/VertexFormatNative.java
================================================
package graphics.kiln.blaze4d.core.natives;

import graphics.kiln.blaze4d.core.Blaze4DCore;
import jdk.incubator.foreign.*;

import java.lang.invoke.VarHandle;

public class VertexFormatNative {
    public static final MemoryLayout LAYOUT;

    public static final MemoryLayout.PathElement STRIDE_PATH;
    public static final MemoryLayout.PathElement POSITION_OFFSET_PATH;
    public static final MemoryLayout.PathElement POSITION_FORMAT_PATH;
    public static final MemoryLayout.PathElement NORMAL_OFFSET_PATH;
    public static final MemoryLayout.PathElement NORMAL_FORMAT_PATH;
    public static final MemoryLayout.PathElement COLOR_OFFSET_PATH;
    public static final MemoryLayout.PathElement COLOR_FORMAT_PATH;
    public static final MemoryLayout.PathElement UV0_OFFSET_PATH;
    public static final MemoryLayout.PathElement UV0_FORMAT_PATH;
    public static final MemoryLayout.PathElement UV1_OFFSET_PATH;
    public static final MemoryLayout.PathElement UV1_FORMAT_PATH;
    public static final MemoryLayout.PathElement UV2_OFFSET_PATH;
    public static final MemoryLayout.PathElement UV2_FORMAT_PATH;
    public static final MemoryLayout.PathElement HAS_NORMAL_PATH;
    public static final MemoryLayout.PathElement HAS_COLOR_PATH;
    public static final MemoryLayout.PathElement HAS_UV0_PATH;
    public static final MemoryLayout.PathElement HAS_UV1_PATH;
    public static final MemoryLayout.PathElement HAS_UV2_PATH;

    public static final VarHandle STRIDE_HANDLE;
    public static final VarHandle POSITION_OFFSET_HANDLE;
    public static final VarHandle POSITION_FORMAT_HANDLE;
    public static final VarHandle NORMAL_OFFSET_HANDLE;
    public static final VarHandle NORMAL_FORMAT_HANDLE;
    public static final VarHandle COLOR_OFFSET_HANDLE;
    public static final VarHandle COLOR_FORMAT_HANDLE;
    public static final VarHandle UV0_OFFSET_HANDLE;
    public static final VarHandle UV0_FORMAT_HANDLE;
    public static final VarHandle UV1_OFFSET_HANDLE;
    public static final VarHandle UV1_FORMAT_HANDLE;
    public static final VarHandle UV2_OFFSET_HANDLE;
    public static final VarHandle UV2_FORMAT_HANDLE;
    public static final VarHandle HAS_NORMAL_HANDLE;
    public static final VarHandle HAS_COLOR_HANDLE;
    public static final VarHandle HAS_UV0_HANDLE;
    public static final VarHandle HAS_UV1_HANDLE;
    public static final VarHandle HAS_UV2_HANDLE;

    static {
        LAYOUT = MemoryLayout.structLayout(
                ValueLayout.JAVA_INT.withName("stride"),
                ValueLayout.JAVA_INT.withName("position_offset"),
                ValueLayout.JAVA_INT.withName("position_format"),
                ValueLayout.JAVA_INT.withName("normal_offset"),
                ValueLayout.JAVA_INT.withName("normal_format"),
                ValueLayout.JAVA_INT.withName("color_offset"),
                ValueLayout.JAVA_INT.withName("color_format"),
                ValueLayout.JAVA_INT.withName("uv0_offset"),
                ValueLayout.JAVA_INT.withName("uv0_format"),
                ValueLayout.JAVA_INT.withName("uv1_offset"),
                ValueLayout.JAVA_INT.withName("uv1_format"),
                ValueLayout.JAVA_INT.withName("uv2_offset"),
                ValueLayout.JAVA_INT.withName("uv2_format"),
                ValueLayout.JAVA_BOOLEAN.withName("has_normal"),
                ValueLayout.JAVA_BOOLEAN.withName("has_color"),
                ValueLayout.JAVA_BOOLEAN.withName("has_uv0"),
                ValueLayout.JAVA_BOOLEAN.withName("has_uv1"),
                ValueLayout.JAVA_BOOLEAN.withName("has_uv2")
        );

        STRIDE_PATH = MemoryLayout.PathElement.groupElement("stride");
        POSITION_OFFSET_PATH = MemoryLayout.PathElement.groupElement("position_offset");
        POSITION_FORMAT_PATH = MemoryLayout.PathElement.groupElement("position_format");
        NORMAL_OFFSET_PATH = MemoryLayout.PathElement.groupElement("normal_offset");
        NORMAL_FORMAT_PATH = MemoryLayout.PathElement.groupElement("normal_format");
        COLOR_OFFSET_PATH = MemoryLayout.PathElement.groupElement("color_offset");
        COLOR_FORMAT_PATH = MemoryLayout.PathElement.groupElement("color_format");
        UV0_OFFSET_PATH = MemoryLayout.PathElement.groupElement("uv0_offset");
        UV0_FORMAT_PATH = MemoryLayout.PathElement.groupElement("uv0_format");
        UV1_OFFSET_PATH = MemoryLayout.PathElement.groupElement("uv1_offset");
        UV1_FORMAT_PATH = MemoryLayout.PathElement.groupElement("uv1_format");
        UV2_OFFSET_PATH = MemoryLayout.PathElement.groupElement("uv2_offset");
        UV2_FORMAT_PATH = MemoryLayout.PathElement.groupElement("uv2_format");
        HAS_NORMAL_PATH = MemoryLayout.PathElement.groupElement("has_normal");
        HAS_COLOR_PATH = MemoryLayout.PathElement.groupElement("has_color");
        HAS_UV0_PATH = MemoryLayout.PathElement.groupElement("has_uv0");
        HAS_UV1_PATH = MemoryLayout.PathElement.groupElement("has_uv1");
        HAS_UV2_PATH = MemoryLayout.PathElement.groupElement("has_uv2");

        STRIDE_HANDLE = LAYOUT.varHandle(STRIDE_PATH);
        POSITION_OFFSET_HANDLE = LAYOUT.varHandle(POSITION_OFFSET_PATH);
        POSITION_FORMAT_HANDLE = LAYOUT.varHandle(POSITION_FORMAT_PATH);
        NORMAL_OFFSET_HANDLE = LAYOUT.varHandle(NORMAL_OFFSET_PATH);
        NORMAL_FORMAT_HANDLE = LAYOUT.varHandle(NORMAL_FORMAT_PATH);
        COLOR_OFFSET_HANDLE = LAYOUT.varHandle(COLOR_OFFSET_PATH);
        COLOR_FORMAT_HANDLE = LAYOUT.varHandle(COLOR_FORMAT_PATH);
        UV0_OFFSET_HANDLE = LAYOUT.varHandle(UV0_OFFSET_PATH);
        UV0_FORMAT_HANDLE = LAYOUT.varHandle(UV0_FORMAT_PATH);
        UV1_OFFSET_HANDLE = LAYOUT.varHandle(UV1_OFFSET_PATH);
        UV1_FORMAT_HANDLE = LAYOUT.varHandle(UV1_FORMAT_PATH);
        UV2_OFFSET_HANDLE = LAYOUT.varHandle(UV2_OFFSET_PATH);
        UV2_FORMAT_HANDLE = LAYOUT.varHandle(UV2_FORMAT_PATH);
        HAS_NORMAL_HANDLE = LAYOUT.varHandle(HAS_NORMAL_PATH);
        HAS_COLOR_HANDLE = LAYOUT.varHandle(HAS_COLOR_PATH);
        HAS_UV0_HANDLE = LAYOUT.varHandle(HAS_UV0_PATH);
        HAS_UV1_HANDLE = LAYOUT.varHandle(HAS_UV1_PATH);
        HAS_UV2_HANDLE = LAYOUT.varHandle(HAS_UV2_PATH);
    }
}


================================================
FILE: core/api/src/main/java/graphics/kiln/blaze4d/core/types/B4DFormat.java
================================================
package graphics.kiln.blaze4d.core.types;

public enum B4DFormat {
    UNDEFINED(0),
    R8_UNORM(9),
    R8_SNORM(10),
    R8_USCALED(11),
    R8_SSCALED(12),
    R8_UINT(13),
    R8_SINT(14),
    R8_SRGB(15),
    R8G8_UNORM(16),
    R8G8_SNORM(17),
    R8G8_USCALED(18),
    R8G8_SSCALED(19),
    R8G8_UINT(20),
    R8G8_SINT(21),
    R8G8_SRGB(22),
    R8G8B8_UNORM(23),
    R8G8B8_SNORM(24),
    R8G8B8_USCALED(25),
    R8G8B8_SSCALED(26),
    R8G8B8_UINT(27),
    R8G8B8_SINT(28),
    R8G8B8_SRGB(29),
    R8G8B8A8_UNORM(37),
    R8G8B8A8_SNORM(38),
    R8G8B8A8_USCALED(39),
    R8G8B8A8_SSCALED(40),
    R8G8B8A8_UINT(41),
    R8G8B8A8_SINT(42),
    R8G8B8A8_SRGB(43),
    R16_UNORM(70),
    R16_SNORM(71),
    R16_USCALED(72),
    R16_SSCALED(73),
    R16_UINT(74),
    R16_SINT(75),
    R16_SFLOAT(76),
    R16G16_UNORM(77),
    R16G16_SNORM(78),
    R16G16_USCALED(79),
    R16G16_SSCALED(80),
    R16G16_UINT(81),
    R16G16_SINT(82),
    R16G16_SFLOAT(83),
    R16G16B16_UNORM(84),
    R16G16B16_SNORM(85),
    R16G16B16_USCALED(86),
    R16G16B16_SSCALED(87),
    R16G16B16_UINT(88),
    R16G16B16_SINT(89),
    R16G16B16_SFLOAT(90),
    R16G16B16A16_UNORM(91),
    R16G16B16A16_SNORM(92),
    R16G16B16A16_USCALED(93),
    R16G16B16A16_SSCALED(94),
    R16G16B16A16_UINT(95),
    R16G16B16A16_SINT(96),
    R16G16B16A16_SFLOAT(97),
    R32_UINT(98),
    R32_SINT(99),
    R32_SFLOAT(100),
    R32G32_UINT(101),
    R32G32_SINT(102),
    R32G32_SFLOAT(103),
    R32G32B32_UINT(104),
    R32G32B32_SINT(105),
    R32G32B32_SFLOAT(106),
    R32G32B32A32_UINT(107),
    R32G32B32A32_SINT(108),
    R32G32B32A32_SFLOAT(109);

    private final int value;

    B4DFormat(int value) {
        this.value = value;
    }

    public int getValue() {
        return this.value;
    }

    public static B4DFormat fromRaw(int value) {
        switch (value) {
            case 0 -> {
                return B4DFormat.UNDEFINED;
            }
            case 9 -> {
                return B4DFormat.R8_UNORM;
            }
            case 10 -> {
                return B4DFormat.R8_SNORM;
            }
            case 11 -> {
                return B4DFormat.R8_USCALED;
            }
            case 12 -> {
                return B4DFormat.R8_SSCALED;
            }
            case 13 -> {
                return B4DFormat.R8_UINT;
            }
            case 14 -> {
                return B4DFormat.R8_SINT;
            }
            case 15 -> {
                return B4DFormat.R8_SRGB;
            }
            case 16 -> {
                return B4DFormat.R8G8_UNORM;
            }
            case 17 -> {
                return B4DFormat.R8G8_SNORM;
            }
            case 18 -> {
                return B4DFormat.R8G8_USCALED;
            }
            case 19 -> {
                return B4DFormat.R8G8_SSCALED;
            }
            case 20 -> {
                return B4DFormat.R8G8_UINT;
            }
            case 21 -> {
                return B4DFormat.R8G8_SINT;
            }
            case 22 -> {
                return B4DFormat.R8G8_SRGB;
            }
            case 23 -> {
                return B4DFormat.R8G8B8_UNORM;
            }
            case 24 -> {
                return B4DFormat.R8G8B8_SNORM;
            }
            case 25 -> {
                return B4DFormat.R8G8B8_USCALED;
            }
            case 26 -> {
                return B4DFormat.R8G8B8_SSCALED;
            }
            case 27 -> {
                return B4DFormat.R8G8B8_UINT;
            }
            case 28 -> {
                return B4DFormat.R8G8B8_SINT;
            }
            case 29 -> {
                return B4DFormat.R8G8B8_SRGB;
            }
            case 37 -> {
                return B4DFormat.R8G8B8A8_UNORM;
            }
            case 38 -> {
                return B4DFormat.R8G8B8A8_SNORM;
            }
            case 39 -> {
                return B4DFormat.R8G8B8A8_USCALED;
            }
            case 40 -> {
                return B4DFormat.R8G8B8A8_SSCALED;
            }
            case 41 -> {
                return B4DFormat.R8G8B8A8_UINT;
            }
            case 42 -> {
                return B4DFormat.R8G8B8A8_SINT;
            }
            case 43 -> {
                return B4DFormat.R8G8B8A8_SRGB;
            }
            case 70 -> {
                return B4DFormat.R16_UNORM;
            }
            case 71 -> {
                return B4DFormat.R16_SNORM;
            }
            case 72 -> {
                return B4DFormat.R16_USCALED;
            }
            case 73 -> {
                return B4DFormat.R16_SSCALED;
            }
            case 74 -> {
                return B4DFormat.R16_UINT;
            }
            case 75 -> {
                return B4DFormat.R16_SINT;
            }
            case 76 -> {
                return B4DFormat.R16_SFLOAT;
            }
            case 77 -> {
                return B4DFormat.R16G16_UNORM;
            }
            case 78 -> {
                return B4DFormat.R16G16_SNORM;
            }
            case 79 -> {
                return B4DFormat.R16G16_USCALED;
            }
            case 80 -> {
                return B4DFormat.R16G16_SSCALED;
            }
            case 81 -> {
                return B4DFormat.R16G16_UINT;
            }
            case 82 -> {
                return B4DFormat.R16G16_SINT;
            }
            case 83 -> {
                return B4DFormat.R16G16_SFLOAT;
            }
            case 84 -> {
                return B4DFormat.R16G16B16_UNORM;
            }
            case 85 -> {
                return B4DFormat.R16G16B16_SNORM;
            }
            case 86 -> {
                return B4DFormat.R16G16B16_USCALED;
            }
            case 87 -> {
                return B4DFormat.R16G16B16_SSCALED;
            }
            case 88 -> {
                return B4DFormat.R16G16B16_UINT;
            }
            case 89 -> {
                return B4DFormat.R16G16B16_SINT;
            }
            case 90 -> {
                return B4DFormat.R16G16B16_SFLOAT;
            }
            case 91 -> {
                return B4DFormat.R16G16B16A16_UNORM;
            }
            case 92 -> {
                return B4DFormat.R16G16B16A16_SNORM;
            }
            case 93 -> {
                return B4DFormat.R16G16B16A16_USCALED;
            }
            case 94 -> {
                return B4DFormat.R16G16B16A16_SSCALED;
            }
            case 95 -> {
                return B4DFormat.R16G16B16A16_UINT;
            }
            case 96 -> {
                return B4DFormat.R16G16B16A16_SINT;
            }
            case 97 -> {
                return B4DFormat.R16G16B16A16_SFLOAT;
            }
            case 98 -> {
                return B4DFormat.R32_UINT;
            }
            case 99 -> {
                return B4DFormat.R32_SINT;
            }
            case 100 -> {
                return B4DFormat.R32_SFLOAT;
            }
            case 101 -> {
                return B4DFormat.R32G32_UINT;
            }
            case 102 -> {
                return B4DFormat.R32G32_SINT;
            }
            case 103 -> {
                return B4DFormat.R32G32_SFLOAT;
            }
            case 104 -> {
                return B4DFormat.R32G32B32_UINT;
            }
            case 105 -> {
                return B4DFormat.R32G32B32_SINT;
            }
            case 106 -> {
                return B4DFormat.R32G32B32_SFLOAT;
            }
            case 107 -> {
                return B4DFormat.R32G32B32A32_UINT;
            }
            case 108 -> {
                return B4DFormat.R32G32B32A32_SINT;
            }
            case 109 -> {
                return B4DFormat.R32G32B32A32_SFLOAT;
            }
            default ->
                throw new RuntimeException("Invalid format value " + value);
        }
    }
}


================================================
FILE: core/api/src/main/java/graphics/kiln/blaze4d/core/types/B4DImageData.java
================================================
package graphics.kiln.blaze4d.core.types;

import graphics.kiln.blaze4d.core.natives.ImageDataNative;
import jdk.incubator.foreign.MemoryAddress;
import jdk.incubator.foreign.MemorySegment;
import jdk.incubator.foreign.ResourceScope;

public class B4DImageData implements AutoCloseable {

    private final ResourceScope resourceScope;
    private final MemorySegment memory;

    public B4DImageData() {
        this.resourceScope = ResourceScope.newSharedScope();
        this.memory = MemorySegment.allocateNative(ImageDataNative.LAYOUT, this.resourceScope);
    }

    private void setData(MemoryAddress data, long dataLen) {
        ImageDataNative.DATA_PTR_HANDLE.set(this.memory, data);
        ImageDataNative.DATA_LEN_HANDLE.set(this.memory, dataLen);
    }

    public void setData(long dataPtr, long dataLen) {
        this.setData(MemoryAddress.ofLong(dataPtr), dataLen);
    }

    public void setRowStride(int rowStride) {
        ImageDataNative.ROW_STRIDE_HANDLE.set(this.memory, rowStride);
    }

    public void setOffset(int x, int y) {
        ImageDataNative.OFFSET_HANDLE.set(this.memory, 0, x);
        ImageDataNative.OFFSET_HANDLE.set(this.memory, 1, y);
    }

    public void setExtent(int x, int y) {
        ImageDataNative.EXTENT_HANDLE.set(this.memory, 0, x);
        ImageDataNative.EXTENT_HANDLE.set(this.memory, 1, y);
    }

    public MemoryAddress getAddress() {
        return this.memory.address();
    }

    @Override
    public void close() throws Exception {
        this.resourceScope.close();
    }
}


================================================
FILE: core/api/src/main/java/graphics/kiln/blaze4d/core/types/B4DIndexType.java
================================================
package graphics.kiln.blaze4d.core.types;

public enum B4DIndexType {
    UINT16(0),
    UINT32(1);

    private final int value;

    B4DIndexType(int value) {
        this.value = value;
    }

    public int getValue() {
        return this.value;
    }

    public static B4DIndexType fromValue(int value) {
        switch (value) {
            case 0 -> {
                return B4DIndexType.UINT16;
            }
            case 1 -> {
                return B4DIndexType.UINT32;
            }
            default ->
                throw new RuntimeException("Invalid index type value " + value);
        }
    }
}


================================================
FILE: core/api/src/main/java/graphics/kiln/blaze4d/core/types/B4DMeshData.java
================================================
package graphics.kiln.blaze4d.core.types;

import graphics.kiln.blaze4d.core.natives.MeshDataNative;
import jdk.incubator.foreign.MemoryAddress;
import jdk.incubator.foreign.MemorySegment;
import jdk.incubator.foreign.ResourceScope;

/**
 * Wrapper class around the native CMeshData type.
 */
public class B4DMeshData implements AutoCloseable {

    private final ResourceScope resourceScope;
    private final MemorySegment memory;

    /**
     * Allocates a new mesh data instance with native backing memory.
     * All data will be uninitialized.
     */
    public B4DMeshData() {
        this.resourceScope = ResourceScope.newSharedScope();
        this.memory = MemorySegment.allocateNative(MeshDataNative.LAYOUT, this.resourceScope);
    }

    private void setVertexDataMem(MemoryAddress data, long dataLen) {
        MeshDataNative.VERTEX_DATA_PTR_HANDLE.set(this.memory, data);
        MeshDataNative.VERTEX_DATA_LEN_HANDLE.set(this.memory, dataLen);
    }

    public void setVertexData(long dataPtr, long dataLen) {
        this.setVertexDataMem(MemoryAddress.ofLong(dataPtr), dataLen);
    }

    public MemoryAddress getVertexDataPtr() {
        return (MemoryAddress) MeshDataNative.VERTEX_DATA_PTR_HANDLE.get(this.memory);
    }

    public long getVertexDataLen() {
        return (long) MeshDataNative.VERTEX_DATA_LEN_HANDLE.get(this.memory);
    }

    public void setIndexData() {
        MeshDataNative.INDEX_DATA_PTR_HANDLE.set(this.memory, MemoryAddress.ofLong(0L));
    }

    private void setIndexDataMem(MemoryAddress data, long dataLen) {
        MeshDataNative.INDEX_DATA_PTR_HANDLE.set(this.memory, data);
        MeshDataNative.INDEX_DATA_LEN_HANDLE.set(this.memory, dataLen);
    }

    public void setIndexData(long dataPtr, long dataLen) {
        this.setIndexDataMem(MemoryAddress.ofLong(dataPtr), dataLen);
    }

    public MemoryAddress getIndexDataPtr() {
        return (MemoryAddress) MeshDataNative.INDEX_DATA_PTR_HANDLE.get(this.memory);
    }

    public long getIndexDataLen() {
        return (long) MeshDataNative.INDEX_DATA_LEN_HANDLE.get(this.memory);
    }

    public void setVertexStride(int vertexStride) {
        MeshDataNative.VERTEX_STRIDE_HANDLE.set(this.memory, vertexStride);
    }

    public int getVertexStride() {
        return (int) MeshDataNative.VERTEX_STRIDE_HANDLE.get(this.memory);
    }

    public void setIndexCount(int indexCount) {
        MeshDataNative.INDEX_COUNT_HANDLE.set(this.memory, indexCount);
    }

    public int getIndexCount() {
        return (int) MeshDataNative.INDEX_COUNT_HANDLE.get(this.memory);
    }

    public void setIndexType(B4DIndexType type) {
        MeshDataNative.INDEX_TYPE_HANDLE.set(this.memory, type.getValue());
    }

    public B4DIndexType getIndexType() {
        return B4DIndexType.fromValue((int) MeshDataNative.INDEX_TYPE_HANDLE.get(this.memory));
    }

    public void setIndexTypeRaw(int indexType) {
        MeshDataNative.INDEX_TYPE_HANDLE.set(this.memory, indexType);
    }

    public int getIndexTypeRaw() {
        return (int) MeshDataNative.INDEX_TYPE_HANDLE.get(this.memory);
    }

    public void setPrimitiveTopology(B4DPrimitiveTopology primitiveTopology) {
        MeshDataNative.PRIMITIVE_TOPOLOGY_HANDLE.set(this.memory, primitiveTopology.getValue());
    }

    public B4DPrimitiveTopology getPrimitiveTopology() {
        return B4DPrimitiveTopology.fromRaw((int) MeshDataNative.PRIMITIVE_TOPOLOGY_HANDLE.get(this.memory));
    }

    public void setPrimitiveTopologyRaw(int primitiveTopology) {
        MeshDataNative.PRIMITIVE_TOPOLOGY_HANDLE.set(this.memory, primitiveTopology);
    }

    public int getPrimitiveTopologyRaw() {
        return (int) MeshDataNative.PRIMITIVE_TOPOLOGY_HANDLE.get(this.memory);
    }

    public MemoryAddress getAddress() {
        return this.memory.address();
    }

    @Override
    public void close() throws Exception {
        this.resourceScope.close();
    }
}


================================================
FILE: core/api/src/main/java/graphics/kiln/blaze4d/core/types/B4DPrimitiveTopology.java
================================================
package graphics.kiln.blaze4d.core.types;

public enum B4DPrimitiveTopology {
    POINT_LIST(0),
    LINE_LIST(1),
    LINE_STRIP(2),
    TRIANGLE_LIST(3),
    TRIANGLE_STRIP(4),
    TRIANGLE_FAN(5);

    private final int value;

    B4DPrimitiveTopology(int value) {
        this.value = value;
    }

    public int getValue() {
        return this.value;
    }

    public static B4DPrimitiveTopology fromRaw(int value) {
        switch (value) {
            case 0 -> {
                return B4DPrimitiveTopology.POINT_LIST;
            }
            case 1 -> {
                return B4DPrimitiveTopology.LINE_LIST;
            }
            case 2 -> {
                return B4DPrimitiveTopology.LINE_STRIP;
            }
            case 3 -> {
                return B4DPrimitiveTopology.TRIANGLE_LIST;
            }
            case 4 -> {
                return B4DPrimitiveTopology.TRIANGLE_STRIP;
            }
            case 5 -> {
                return B4DPrimitiveTopology.TRIANGLE_FAN;
            }
            default ->
                throw new RuntimeException("Invalid primitive topology value " + value);
        }
    }

    public static B4DPrimitiveTopology fromGLMode(int mode) {
        switch (mode) {
            case 0 -> {
                return B4DPrimitiveTopology.POINT_LIST;
            }
            case 1 -> {
                return B4DPrimitiveTopology.LINE_LIST;
            }
            case 3 -> {
                return B4DPrimitiveTopology.LINE_STRIP;
            }
            case 4 -> {
                return B4DPrimitiveTopology.TRIANGLE_LIST;
            }
            case 5 -> {
                return B4DPrimitiveTopology.TRIANGLE_STRIP;
            }
            case 6 -> {
                return B4DPrimitiveTopology.TRIANGLE_FAN;
            }
            default ->
                throw new RuntimeException("Unsupported OpenGL mode " + mode);
        }
    }
}


================================================
FILE: core/api/src/main/java/graphics/kiln/blaze4d/core/types/B4DUniform.java
================================================
package graphics.kiln.blaze4d.core.types;

public enum B4DUniform {
    MODEL_VIEW_MATRIX(1L),
    PROJECTION_MATRIX(1L << 1),
    INVERSE_VIEW_ROTATION_MATRIX(1L << 2),
    TEXTURE_MATRIX(1L << 3),
    SCREEN_SIZE(1L << 4),
    COLOR_MODULATOR(1L << 5),
    LIGHT0_DIRECTION(1L << 6),
    LIGHT1_DIRECTION(1L << 7),
    FOG_START(1L << 8),
    FOG_END(1L << 9),
    FOG_COLOR(1L << 10),
    FOG_SHAPE(1L << 11),
    LINE_WIDTH(1L << 12),
    GAME_TIME(1L << 13),
    CHUNK_OFFSET(1L << 14);

    private final long value;

    B4DUniform(long value) {
        this.value = value;
    }

    public long getValue() {
        return this.value;
    }
}


================================================
FILE: core/api/src/main/java/graphics/kiln/blaze4d/core/types/B4DUniformData.java
================================================
package graphics.kiln.blaze4d.core.types;

import graphics.kiln.blaze4d.core.natives.McUniformDataNative;
import jdk.incubator.foreign.MemoryAddress;
import jdk.incubator.foreign.MemorySegment;
import jdk.incubator.foreign.ResourceScope;

public class B4DUniformData implements AutoCloseable {

    private final ResourceScope resourceScope;
    private final MemorySegment memory;

    public B4DUniformData() {
        this.resourceScope = ResourceScope.newSharedScope();
        this.memory = MemorySegment.allocateNative(McUniformDataNative.LAYOUT, this.resourceScope);
    }

    public void setModelViewMatrix(float m00, float m01, float m02, float m03, float m10, float m11, float m12, float m13, float m20, float m21, float m22, float m23, float m30, float m31, float m32, float m33) {
        McUniformDataNative.UNIFORM_HANDLE.set(this.memory, B4DUniform.MODEL_VIEW_MATRIX.getValue());
        this.setMat4f32(m00, m01, m02, m03, m10, m11, m12, m13, m20, m21, m22, m23, m30, m31, m32, m33);
    }

    public void setProjectionMatrix(float m00, float m01, float m02, float m03, float m10, float m11, float m12, float m13, float m20, float m21, float m22, float m23, float m30, float m31, float m32, float m33) {
        McUniformDataNative.UNIFORM_HANDLE.set(this.memory, B4DUniform.PROJECTION_MATRIX.getValue());
        this.setMat4f32(m00, m01, m02, m03, m10, m11, m12, m13, m20, m21, m22, m23, m30, m31, m32, m33);
    }

    public void setChunkOffset(float x, float y, float z) {
        McUniformDataNative.UNIFORM_HANDLE.set(this.memory, B4DUniform.CHUNK_OFFSET.getValue());
        this.setVec3f32(x, y, z);
    }

    public MemoryAddress getAddress() {
        return this.memory.address();
    }

    @Override
    public void close() throws Exception {
        this.resourceScope.close();
    }

    private void setVec3f32(float x, float y, float z) {
        McUniformDataNative.PAYLOAD_VEC3F32_HANDLE.set(this.memory, 0, x);
        McUniformDataNative.PAYLOAD_VEC3F32_HANDLE.set(this.memory, 1, y);
        McUniformDataNative.PAYLOAD_VEC3F32_HANDLE.set(this.memory, 2, z);
    }

    private void setMat4f32(float m00, float m01, float m02, float m03, float m10, float m11, float m12, float m13, float m20, float m21, float m22, float m23, float m30, float m31, float m32, float m33) {
        McUniformDataNative.PAYLOAD_MAT4F32_HANDLE.set(this.memory, 0, m00);
        McUniformDataNative.PAYLOAD_MAT4F32_HANDLE.set(this.memory, 1, m10);
        McUniformDataNative.PAYLOAD_MAT4F32_HANDLE.set(this.memory, 2, m20);
        McUniformDataNative.PAYLOAD_MAT4F32_HANDLE.set(this.memory, 3, m30);
        McUniformDataNative.PAYLOAD_MAT4F32_HANDLE.set(this.memory, 4, m01);
        McUniformDataNative.PAYLOAD_MAT4F32_HANDLE.set(this.memory, 5, m11);
        McUniformDataNative.PAYLOAD_MAT4F32_HANDLE.set(this.memory, 6, m21);
        McUniformDataNative.PAYLOAD_MAT4F32_HANDLE.set(this.memory, 7, m31);
        McUniformDataNative.PAYLOAD_MAT4F32_HANDLE.set(this.memory, 8, m02);
        McUniformDataNative.PAYLOAD_MAT4F32_HANDLE.set(this.memory, 9, m12);
        McUniformDataNative.PAYLOAD_MAT4F32_HANDLE.set(this.memory, 10, m22);
        McUniformDataNative.PAYLOAD_MAT4F32_HANDLE.set(this.memory, 11, m32);
        McUniformDataNative.PAYLOAD_MAT4F32_HANDLE.set(this.memory, 12, m03);
        McUniformDataNative.PAYLOAD_MAT4F32_HANDLE.set(this.memory, 13, m13);
        McUniformDataNative.PAYLOAD_MAT4F32_HANDLE.set(this.memory, 14, m23);
        McUniformDataNative.PAYLOAD_MAT4F32_HANDLE.set(this.memory, 15, m33);
    }
}


================================================
FILE: core/api/src/main/java/graphics/kiln/blaze4d/core/types/B4DVertexFormat.java
================================================
package graphics.kiln.blaze4d.core.types;

import graphics.kiln.blaze4d.core.natives.VertexFormatNative;
import jdk.incubator.foreign.MemoryAddress;
import jdk.incubator.foreign.MemorySegment;
import jdk.incubator.foreign.ResourceScope;

import java.util.Optional;

public class B4DVertexFormat implements AutoCloseable {

    private final ResourceScope resourceScope;
    private final MemorySegment memory;

    public B4DVertexFormat() {
        this.resourceScope = ResourceScope.newSharedScope();
        this.memory = MemorySegment.allocateNative(VertexFormatNative.LAYOUT, this.resourceScope);
    }

    public void initialize() {
        this.setStride(0);
        this.setPosition(0, B4DFormat.UNDEFINED);
        this.setNormal();
        this.setColor();
        this.setUV0();
        this.setUV1();
        this.setUV2();
    }

    public void setStride(int stride) {
        VertexFormatNative.STRIDE_HANDLE.set(this.memory, stride);
    }

    public void setPosition(FormatEntry entry) {
        this.setPosition(entry.offset, entry.format);
    }

    public void setPosition(int offset, B4DFormat format) {
        this.setPosition(offset, format.getValue());
    }

    public void setPosition(int offset, int format) {
        VertexFormatNative.POSITION_OFFSET_HANDLE.set(this.memory, offset);
        VertexFormatNative.POSITION_FORMAT_HANDLE.set(this.memory, format);
    }

    public FormatEntry getPosition() {
        int offset = (int) VertexFormatNative.POSITION_OFFSET_HANDLE.get(this.memory);
        int format = (int) VertexFormatNative.POSITION_FORMAT_HANDLE.get(this.memory);
        return new FormatEntry(offset, B4DFormat.fromRaw(format));
    }

    public void setNormal() {
        VertexFormatNative.HAS_NORMAL_HANDLE.set(this.memory, false);
    }

    public void setNormal(FormatEntry entry) {
        this.setNormal(entry.offset, entry.format);
    }

    public void setNormal(int offset, B4DFormat format) {
        this.setNormal(offset, format.getValue());
    }

    public void setNormal(int offset, int format) {
        VertexFormatNative.NORMAL_OFFSET_HANDLE.set(this.memory, offset);
        VertexFormatNative.NORMAL_FORMAT_HANDLE.set(this.memory, format);
        VertexFormatNative.HAS_NORMAL_HANDLE.set(this.memory, true);
    }

    public Optional<FormatEntry> getNormal() {
        if ((boolean) VertexFormatNative.HAS_NORMAL_HANDLE.get(this.memory)) {
            int offset = (int) VertexFormatNative.NORMAL_OFFSET_HANDLE.get(this.memory);
            int format = (int) VertexFormatNative.NORMAL_FORMAT_HANDLE.get(this.memory);
            return Optional.of(new FormatEntry(offset, B4DFormat.fromRaw(format)));
        }
        return Optional.empty();
    }

    public void setColor() {
        VertexFormatNative.HAS_COLOR_HANDLE.set(this.memory, false);
    }

    public void setColor(FormatEntry entry) {
        this.setColor(entry.offset, entry.format);
    }

    public void setColor(int offset, B4DFormat format) {
        this.setColor(offset, format.getValue());
    }

    public void setColor(int offset, int format) {
        VertexFormatNative.COLOR_OFFSET_HANDLE.set(this.memory, offset);
        VertexFormatNative.COLOR_FORMAT_HANDLE.set(this.memory, format);
        VertexFormatNative.HAS_COLOR_HANDLE.set(this.memory, true);
    }

    public Optional<FormatEntry> getColor() {
        if ((boolean) VertexFormatNative.HAS_COLOR_HANDLE.get(this.memory)) {
            int offset = (int) VertexFormatNative.COLOR_OFFSET_HANDLE.get(this.memory);
            int format = (int) VertexFormatNative.COLOR_FORMAT_HANDLE.get(this.memory);
            return Optional.of(new FormatEntry(offset, B4DFormat.fromRaw(format)));
        }
        return Optional.empty();
    }

    public void setUV0() {
        VertexFormatNative.HAS_UV0_HANDLE.set(this.memory, false);
    }

    public void setUV0(FormatEntry entry) {
        this.setUV0(entry.offset, entry.format);
    }

    public void setUV0(int offset, B4DFormat format) {
        this.setUV0(offset, format.getValue());
    }

    public void setUV0(int offset, int format) {
        VertexFormatNative.UV0_OFFSET_HANDLE.set(this.memory, offset);
        VertexFormatNative.UV0_FORMAT_HANDLE.set(this.memory, format);
        VertexFormatNative.HAS_UV0_HANDLE.set(this.memory, true);
    }

    public Optional<FormatEntry> getUV0() {
        if ((boolean) VertexFormatNative.HAS_UV0_HANDLE.get(this.memory)) {
            int offset = (int) VertexFormatNative.UV0_OFFSET_HANDLE.get(this.memory);
            int format = (int) VertexFormatNative.UV0_FORMAT_HANDLE.get(this.memory);
            return Optional.of(new FormatEntry(offset, B4DFormat.fromRaw(format)));
        }
        return Optional.empty();
    }

    public void setUV1() {
        VertexFormatNative.HAS_UV1_HANDLE.set(this.memory, false);
    }

    public void setUV1(FormatEntry entry) {
        this.setUV1(entry.offset, entry.format);
    }

    public void setUV1(int offset, B4DFormat format) {
        this.setUV1(offset, format.getValue());
    }

    public void setUV1(int offset, int format) {
        VertexFormatNative.UV1_OFFSET_HANDLE.set(this.memory, offset);
        VertexFormatNative.UV1_FORMAT_HANDLE.set(this.memory, format);
        VertexFormatNative.HAS_UV1_HANDLE.set(this.memory, true);
    }

    public Optional<FormatEntry> getUV1() {
        if ((boolean) VertexFormatNative.HAS_UV1_HANDLE.get(this.memory)) {
            int offset = (int) VertexFormatNative.UV1_OFFSET_HANDLE.get(this.memory);
            int format = (int) VertexFormatNative.UV1_FORMAT_HANDLE.get(this.memory);
            return Optional.of(new FormatEntry(offset, B4DFormat.fromRaw(format)));
        }
        return Optional.empty();
    }

    public void setUV2() {
        VertexFormatNative.HAS_UV2_HANDLE.set(this.memory, false);
    }

    public void setUV2(FormatEntry entry) {
        this.setUV2(entry.offset, entry.format);
    }

    public void setUV2(int offset, B4DFormat format) {
        this.setUV2(offset, format.getValue());
    }

    public void setUV2(int offset, int format) {
        VertexFormatNative.UV2_OFFSET_HANDLE.set(this.memory, offset);
        VertexFormatNative.UV2_FORMAT_HANDLE.set(this.memory, format);
        VertexFormatNative.HAS_UV2_HANDLE.set(this.memory, true);
    }

    public Optional<FormatEntry> getUV2() {
        if ((boolean) VertexFormatNative.HAS_UV2_HANDLE.get(this.memory)) {
            int offset = (int) VertexFormatNative.UV2_OFFSET_HANDLE.get(this.memory);
            int format = (int) VertexFormatNative.UV2_FORMAT_HANDLE.get(this.memory);
            return Optional.of(new FormatEntry(offset, B4DFormat.fromRaw(format)));
        }
        return Optional.empty();
    }

    public MemoryAddress getAddress() {
        return this.memory.address();
    }

    @Override
    public void close() throws Exception {
        this.resourceScope.close();
    }

    public record FormatEntry(int offset, B4DFormat format) {
    }
}


================================================
FILE: core/api/src/main/java/graphics/kiln/blaze4d/core/types/BlendFactor.java
================================================
package graphics.kiln.blaze4d.core.types;

public enum BlendFactor {
    ZERO(0),
    ONE(1),
    SRC_COLOR(2),
    ONE_MINUS_SRC_COLOR(3),
    DST_COLOR(4),
    ONE_MINUS_DST_COLOR(5),
    SRC_ALPHA(6),
    ONE_MINUS_SRC_ALPHA(7),
    DST_ALPHA(8),
    ONE_MINUS_DST_ALPHA(9);

    private final int value;

    BlendFactor(int value) {
        this.value = value;
    }

    public int getValue() {
        return this.value;
    }

    public static BlendFactor fromValue(int value) {
        return switch (value) {
            case 0 -> ZERO;
            case 1 -> ONE;
            case 2 -> SRC_COLOR;
            case 3 -> ONE_MINUS_SRC_COLOR;
            case 4 -> DST_COLOR;
            case 5 -> ONE_MINUS_DST_COLOR;
            case 6 -> SRC_ALPHA;
            case 7 -> ONE_MINUS_SRC_ALPHA;
            case 8 -> DST_ALPHA;
            case 9 -> ONE_MINUS_DST_ALPHA;
            default -> throw new IllegalArgumentException("Invalid blend factor value: " + value);
        };
    }

    public static BlendFactor fromGlBlendFunc(int factor) {
        return switch (factor) {
            case 0 -> ZERO;
            case 1 -> ONE;
            case 0x0300 -> SRC_COLOR;
            case 0x0301 -> ONE_MINUS_SRC_COLOR;
            case 0x0302 -> SRC_ALPHA;
            case 0x0303 -> ONE_MINUS_SRC_ALPHA;
            case 0x0304 -> DST_ALPHA;
            case 0x0305 -> ONE_MINUS_DST_ALPHA;
            case 0x0306 -> DST_COLOR;
            case 0x0307 -> ONE_MINUS_DST_COLOR;
            default -> throw new IllegalArgumentException("Invalid blend func: " + factor);
        };
    }
}


================================================
FILE: core/api/src/main/java/graphics/kiln/blaze4d/core/types/BlendOp.java
================================================
package graphics.kiln.blaze4d.core.types;

public enum BlendOp {
    ADD(0),
    SUBTRACT(1),
    REVERSE_SUBTRACT(2),
    MIN(3),
    MAX(4);

    private final int value;

    BlendOp(int value) {
        this.value = value;
    }

    public int getValue() {
        return this.value;
    }

    public static BlendOp fromValue(int value) {
        return switch (value) {
            case 0 -> ADD;
            case 1 -> SUBTRACT;
            case 2 -> REVERSE_SUBTRACT;
            case 3 -> MIN;
            case 4 -> MAX;
            default -> throw new IllegalArgumentException("Invalid blend op value: " + value);
        };
    }

    public static BlendOp fromGlBlendEquation(int glEquation) {
        return switch (glEquation) {
            case 0x8006 -> ADD;
            case 0x8007 -> MIN;
            case 0x8008 -> MAX;
            case 0x800A -> SUBTRACT;
            case 0x800B -> REVERSE_SUBTRACT;
            default -> throw new IllegalArgumentException("Invalid blend equation: " + glEquation);
        };
    }
}


================================================
FILE: core/api/src/main/java/graphics/kiln/blaze4d/core/types/CompareOp.java
================================================
package graphics.kiln.blaze4d.core.types;

public enum CompareOp {
    NEVER(0),
    LESS(1),
    EQUAL(2),
    LESS_OR_EQUAL(3),
    GREATER(4),
    NOT_EQUAL(5),
    GREATER_OR_EQUAL(6),
    ALWAYS(7);

    private final int value;

    CompareOp(int value) {
        this.value = value;
    }

    public int getValue() {
        return this.value;
    }

    public static CompareOp fromValue(int value) {
        return switch (value) {
            case 0 -> NEVER;
            case 1 -> LESS;
            case 2 -> EQUAL;
            case 3 -> LESS_OR_EQUAL;
            case 4 -> GREATER;
            case 5 -> NOT_EQUAL;
            case 6 -> GREATER_OR_EQUAL;
            case 7 -> ALWAYS;
            default -> throw new IllegalStateException("Invalid compare op value: " + value);
        };
    }

    public static CompareOp fromGlDepthFunc(int glFunc) {
        return switch (glFunc) {
            case 0x0200 -> NEVER;
            case 0x0201 -> LESS;
            case 0x0202 -> EQUAL;
            case 0x0203 -> LESS_OR_EQUAL;
            case 0x0204 -> GREATER;
            case 0x0205 -> NOT_EQUAL;
            case 0x0206 -> GREATER_OR_EQUAL;
            case 0x0207 -> ALWAYS;
            default -> throw new IllegalStateException("Invalid depth function value: " + glFunc);
        };
    }
}


================================================
FILE: core/api/src/main/java/graphics/kiln/blaze4d/core/types/PipelineConfiguration.java
================================================
package graphics.kiln.blaze4d.core.types;

import graphics.kiln.blaze4d.core.natives.PipelineConfigurationNative;
import jdk.incubator.foreign.MemoryAddress;
import jdk.incubator.foreign.MemorySegment;
import jdk.incubator.foreign.ResourceScope;

public class PipelineConfiguration implements AutoCloseable {

    private final ResourceScope resourceScope;
    private final MemorySegment memory;

    public PipelineConfiguration() {
        this.resourceScope = ResourceScope.newSharedScope();
        this.memory = MemorySegment.allocateNative(PipelineConfigurationNative.LAYOUT, this.resourceScope);
    }

    public void setDepthTestEnable(boolean enable) {
        PipelineConfigurationNative.DEPTH_TEST_ENABLE_HANDLE.set(this.memory, enable ? 1 : 0);
    }

    public boolean getDepthTestEnable() {
        return ((int) PipelineConfigurationNative.DEPTH_TEST_ENABLE_HANDLE.get(this.memory)) != 0;
    }

    public void setDepthCompareOp(CompareOp op) {
        PipelineConfigurationNative.DEPTH_COMPARE_OP_HANDLE.set(this.memory, op.getValue());
    }

    public CompareOp getDepthCompareOp() {
        return CompareOp.fromValue((int) PipelineConfigurationNative.DEPTH_COMPARE_OP_HANDLE.get(this.memory));
    }

    public void setDepthWriteEnable(boolean enable) {
        PipelineConfigurationNative.DEPTH_WRITE_ENABLE_HANDLE.set(this.memory, enable ? 1 : 0);
    }

    public boolean getDepthWriteEnable() {
        return ((int) PipelineConfigurationNative.DEPTH_WRITE_ENABLE_HANDLE.get(this.memory)) != 0;
    }

    public void setBlendEnable(boolean enable) {
        PipelineConfigurationNative.BLEND_ENABLE_HANDLE.set(this.memory, enable ? 1 : 0);
    }

    public boolean getBlendEnable() {
        return ((int) PipelineConfigurationNative.BLEND_ENABLE_HANDLE.get(this.memory)) != 0;
    }

    public void setBlendColorOp(BlendOp op) {
        PipelineConfigurationNative.BLEND_COLOR_OP_HANDLE.set(this.memory, op.getValue());
    }

    public BlendOp getBlendColorOp() {
        return BlendOp.fromValue((int) PipelineConfigurationNative.BLEND_COLOR_OP_HANDLE.get(this.memory));
    }

    public void setBlendColorSrcFactor(BlendFactor factor) {
        PipelineConfigurationNative.BLEND_COLOR_SRC_FACTOR_HANDLE.set(this.memory, factor.getValue());
    }

    public BlendFactor getBlendColorSrcFactor() {
        return BlendFactor.fromValue((int) PipelineConfigurationNative.BLEND_COLOR_SRC_FACTOR_HANDLE.get(this.memory));
    }

    public void setBlendColorDstFactor(BlendFactor factor) {
        PipelineConfigurationNative.BLEND_COLOR_DST_FACTOR_HANDLE.set(this.memory, factor.getValue());
    }

    public BlendFactor getBlendColorDstFactor() {
        return BlendFactor.fromValue((int) PipelineConfigurationNative.BLEND_COLOR_DST_FACTOR_HANDLE.get(this.memory));
    }

    public void setBlendAlphaOp(BlendOp op) {
        PipelineConfigurationNative.BLEND_ALPHA_OP_HANDLE.set(this.memory, op.getValue());
    }

    public BlendOp getBlendAlphaOp() {
        return BlendOp.fromValue((int) PipelineConfigurationNative.BLEND_ALPHA_OP_HANDLE.get(this.memory));
    }

    public void setBlendAlphaSrcFactor(BlendFactor factor) {
        PipelineConfigurationNative.BLEND_ALPHA_SRC_FACTOR_HANDLE.set(this.memory, factor.getValue());
    }

    public BlendFactor getBlendAlphaSrcFactor() {
        return BlendFactor.fromValue((int) PipelineConfigurationNative.BLEND_ALPHA_SRC_FACTOR_HANDLE.get(this.memory));
    }

    public void setBlendAlphaDstFactor(BlendFactor factor) {
        PipelineConfigurationNative.BLEND_ALPHA_DST_FACTOR_HANDLE.set(this.memory, factor.getValue());
    }

    public BlendFactor getBlendAlphaDstFactor() {
        return BlendFactor.fromValue((int) PipelineConfigurationNative.BLEND_ALPHA_DST_FACTOR_HANDLE.get(this.memory));
    }

    public MemoryAddress getAddress() {
        return this.memory.address();
    }

    @Override
    public void close() throws Exception {
        this.resourceScope.close();
    }
}


================================================
FILE: core/api/src/main/java/module-info.java
================================================
module graphics.kiln.blaze4d.core {
    requires jdk.incubator.foreign;

    requires com.google.gson;
    requires org.apache.logging.log4j;
    requires org.lwjgl.glfw;
    requires org.apache.commons.lang3;

    exports graphics.kiln.blaze4d.core;
    exports graphics.kiln.blaze4d.core.types;
}

================================================
FILE: core/assets/.gitattributes
================================================
#
# https://help.github.com/articles/dealing-with-line-endings/
#
# These are explicitly windows files and should use crlf
*.bat           text eol=crlf



================================================
FILE: core/assets/.gitignore
================================================
# Gradle local files
/build/

================================================
FILE: core/assets/build.gradle.kts
================================================
apply<graphics.kiln.blaze4d.build.assets.AssetsPlugin>()

configure<graphics.kiln.blaze4d.build.assets.AssetsPluginExtension> {
    shaders {
        targetSpriv(graphics.kiln.blaze4d.build.assets.shaders.SprivVersion.SPV_1_3)

        addProject("Emulator") {
            projectDir("emulator")

            addModule("debug/position.vert")
            addModule("debug/color.vert")
            addModule("debug/uv.vert")
            addModule("debug/null.vert")
            addModule("debug/debug.frag")
            addModule("debug/textured.frag")
            addModule("debug/background.vert")
            addModule("debug/background.frag")
        }

        addProject("Utils") {
            projectDir("utils")

            addModule("full_screen_quad.vert")
            addModule("blit.frag")
        }

        addProject("Debug") {
            projectDir("debug")

            addModule("apply.vert")
            addModule("apply.frag")
            addModule("font/msdf_font.vert")
            addModule("font/msdf_font.frag")
            addModule("basic.vert")
            addModule("basic.frag")
        }
    }
}

================================================
FILE: core/assets/src/debug/apply.frag
================================================
#version 450

layout(input_attachment_index=0, set=0, binding=0) uniform subpassInput overlay;

layout(location=0) out vec4 out_color;

void main() {
    out_color = subpassLoad(overlay);
    //out_color = vec4(1.0, 1.0, 1.0, 1.0);
}

================================================
FILE: core/assets/src/debug/apply.vert
================================================
#version 450

vec2 positions[4] = vec2[](
    vec2(-1.0, 1.0),
    vec2(-1.0, -1.0),
    vec2(1.0, 1.0),
    vec2(1.0, -1.0)
);

void main() {
    gl_Position = vec4(positions[gl_VertexIndex], 0.0, 1.0);
}

================================================
FILE: core/assets/src/debug/basic.frag
================================================
#version 450

layout(location=0) in vec2 in_uv;

layout(location=0) out vec4 color;

void main() {
    color = vec4(in_uv, 0.0, 1.0);
}

================================================
FILE: core/assets/src/debug/basic.vert
================================================
#version 450

layout(location=0) in vec3 position;
layout(location=1) in vec2 in_uv;

layout(location=0) out vec2 out_uv;

layout(push_constant) uniform Constants {
    mat4 world_ndc;
    mat4 model_world;
} pmat;

void main() {
    gl_Position = pmat.world_ndc * (pmat.model_world * vec4(position, 1.0));
    out_uv = in_uv;
}

================================================
FILE: core/assets/src/debug/font/JetBrainsMono/OFL.txt
================================================
Copyright 2020 The JetBrains Mono Project Authors (https://github.com/JetBrains/JetBrainsMono)

This Font Software is licensed under the SIL Open Font License, Version 1.1.

This license is copied below, and is also available with a FAQ at: https://scripts.sil.org/OFL


-----------------------------------------------------------
SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
-----------------------------------------------------------

PREAMBLE
The goals of the Open Font License (OFL) are to stimulate worldwide
development of collaborative font projects, to support the font creation
efforts of academic and linguistic communities, and to provide a free and
open framework in which fonts may be shared and improved in partnership
with others.

The OFL allows the licensed fonts to be used, studied, modified and
redistributed freely as long as they are not sold by themselves. The
fonts, including any derivative works, can be bundled, embedded,
redistributed and/or sold with any software provided that any reserved
names are not used by derivative works. The fonts and derivatives,
however, cannot be released under any other type of license. The
requirement for fonts to remain under this license does not apply
to any document created using the fonts or their derivatives.

DEFINITIONS
"Font Software" refers to the set of files released by the Copyright
Holder(s) under this license and clearly marked as such. This may
include source files, build scripts and documentation.

"Reserved Font Name" refers to any names specified as such after the
copyright statement(s).

"Original Version" refers to the collection of Font Software components as
distributed by the Copyright Holder(s).

"Modified Version" refers to any derivative made by adding to, deleting,
or substituting -- in part or in whole -- any of the components of the
Original Version, by changing formats or by porting the Font Software to a
new environment.

"Author" refers to any designer, engineer, programmer, technical
writer or other person who contributed to the Font Software.

PERMISSION & CONDITIONS
Permission is hereby granted, free of charge, to any person obtaining
a copy of the Font Software, to use, study, copy, merge, embed, modify,
redistribute, and sell modified and unmodified copies of the Font
Software, subject to the following conditions:

1) Neither the Font Software nor any of its individual components,
in Original or Modified Versions, may be sold by itself.

2) Original or Modified Versions of the Font Software may be bundled,
redistributed and/or sold with any software, provided that each copy
contains the above copyright notice and this license. These can be
included either as stand-alone text files, human-readable headers or
in the appropriate machine-readable metadata fields within text or
binary files as long as those fields can be easily viewed by the user.

3) No Modified Version of the Font Software may use the Reserved Font
Name(s) unless explicit written permission is granted by the corresponding
Copyright Holder. This restriction only applies to the primary font name as
presented to the users.

4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
Software shall not be used to promote, endorse or advertise any
Modified Version, except to acknowledge the contribution(s) of the
Copyright Holder(s) and the Author(s) or with their explicit written
permission.

5) The Font Software, modified or unmodified, in part or in whole,
must be distributed entirely under this license, and must not be
distributed under any other license. The requirement for fonts to
remain under this license does not apply to any document created
using the Font Software.

TERMINATION
This license becomes null and void if any of the above conditions are
not met.

DISCLAIMER
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
OTHER DEALINGS IN THE FONT SOFTWARE.


================================================
FILE: core/assets/src/debug/font/JetBrainsMono/tmp_built/regular.json
================================================
{"atlas":{"type":"msdf","distanceRange":5,"size":13,"width":512,"height":512,"yOrigin":"bottom"},"metrics":{"emSize":1,"lineHeight":1.3200000000000001,"ascender":1.02,"descender":-0.29999999999999999,"underlineY":-0.17999999999999999,"underlineThickness":0.050000000000000003},"glyphs":[{"unicode":32,"advance":0.59999999999999998},{"unicode":33,"advance":0.59999999999999998,"planeBounds":{"left":0.030769230769230868,"bottom":-0.21442307692307683,"right":0.56923076923076932,"top":0.93942307692307692},"atlasBounds":{"left":504.5,"bottom":496.5,"right":511.5,"top":511.5}},{"unicode":34,"advance":0.59999999999999998,"planeBounds":{"left":-0.04615384615384608,"bottom":0.23384615384615393,"right":0.64615384615384619,"top":0.92615384615384622},"atlasBounds":{"left":502.5,"bottom":279.5,"right":511.5,"top":288.5}},{"unicode":35,"advance":0.59999999999999998,"planeBounds":{"left":-0.16153846153846146,"bottom":-0.2119230769230768,"right":0.76153846153846172,"top":0.94192307692307697},"atlasBounds":{"left":70.5,"bottom":239.5,"right":82.5,"top":254.5}},{"unicode":36,"advance":0.59999999999999998,"planeBounds":{"left":-0.12307692307692299,"bottom":-0.36576923076923074,"right":0.72307692307692306,"top":1.0957692307692311},"atlasBounds":{"left":176.5,"bottom":440.5,"right":187.5,"top":459.5}},{"unicode":37,"advance":0.59999999999999998,"planeBounds":{"left":-0.1999999999999999,"bottom":-0.21192307692307685,"right":0.80000000000000004,"top":0.94192307692307697},"atlasBounds":{"left":83.5,"bottom":239.5,"right":96.5,"top":254.5}},{"unicode":38,"advance":0.59999999999999998,"planeBounds":{"left":-0.15103846153846145,"bottom":-0.2119230769230768,"right":0.77203846153846167,"top":0.94192307692307697},"atlasBounds":{"left":97.5,"bottom":239.5,"right":109.5,"top":254.5}},{"unicode":39,"advance":0.59999999999999998,"planeBounds":{"left":0.025269230769230839,"bottom":0.23384615384615393,"right":0.56373076923076926,"top":0.92615384615384622},"atlasBounds":{"left":504.5,"bottom":486.5,"right":511.5,"top":495.5}},{"unicode":40,"advance":0.59999999999999998,"planeBounds":{"left":-0.011153846153846082,"bottom":-0.33230769230769214,"right":0.68115384615384622,"top":1.0523076923076924},"atlasBounds":{"left":97.5,"bottom":419.5,"right":106.5,"top":437.5}},{"unicode":41,"advance":0.59999999999999998,"planeBounds":{"left":-0.081153846153846076,"bottom":-0.33230769230769214,"right":0.61115384615384616,"top":1.0523076923076924},"atlasBounds":{"left":107.5,"bottom":419.5,"right":116.5,"top":437.5}},{"unicode":42,"advance":0.59999999999999998,"planeBounds":{"left":-0.16153846153846146,"bottom":-0.10953846153846149,"right":0.76153846153846172,"top":0.81353846153846165},"atlasBounds":{"left":403.5,"bottom":101.5,"right":415.5,"top":113.5}},{"unicode":43,"advance":0.59999999999999998,"planeBounds":{"left":-0.16153846153846144,"bottom":-0.13153846153846144,"right":0.76153846153846172,"top":0.79153846153846164},"atlasBounds":{"left":416.5,"bottom":101.5,"right":428.5,"top":113.5}},{"unicode":44,"advance":0.59999999999999998,"planeBounds":{"left":-0.037692307692307615,"bottom":-0.38911538461538459,"right":0.57769230769230773,"top":0.38011538461538458},"atlasBounds":{"left":130.5,"bottom":76.5,"right":138.5,"top":86.5}},{"unicode":45,"advance":0.59999999999999998,"planeBounds":{"left":-0.084615384615384565,"bottom":0.060769230769230839,"right":0.68461538461538463,"top":0.59923076923076934},"atlasBounds":{"left":496.5,"bottom":464.5,"right":506.5,"top":471.5}},{"unicode":46,"advance":0.59999999999999998,"planeBounds":{"left":-0.0076923076923076155,"bottom":-0.23469230769230767,"right":0.60769230769230775,"top":0.38069230769230766},"atlasBounds":{"left":103.5,"bottom":56.5,"right":111.5,"top":64.5}},{"unicode":47,"advance":0.59999999999999998,"planeBounds":{"left":-0.12307692307692299,"bottom":-0.33230769230769225,"right":0.72307692307692306,"top":1.0523076923076924},"atlasBounds":{"left":117.5,"bottom":419.5,"right":128.5,"top":437.5}},{"unicode":48,"advance":0.59999999999999998,"planeBounds":{"left":-0.12307692307692301,"bottom":-0.2119230769230768,"right":0.72307692307692306,"top":0.94192307692307697},"atlasBounds":{"left":121.5,"bottom":239.5,"right":132.5,"top":254.5}},{"unicode":49,"advance":0.59999999999999998,"planeBounds":{"left":-0.10807692307692299,"bottom":-0.2119230769230768,"right":0.73807692307692307,"top":0.94192307692307697},"atlasBounds":{"left":133.5,"bottom":239.5,"right":144.5,"top":254.5}},{"unicode":50,"advance":0.59999999999999998,"planeBounds":{"left":-0.12407692307692299,"bottom":-0.20692307692307685,"right":0.72207692307692306,"top":0.94692307692307698},"atlasBounds":{"left":145.5,"bottom":239.5,"right":156.5,"top":254.5}},{"unicode":51,"advance":0.59999999999999998,"planeBounds":{"left":-0.13307692307692301,"bottom":-0.21692307692307686,"right":0.71307692307692316,"top":0.93692307692307697},"atlasBounds":{"left":157.5,"bottom":239.5,"right":168.5,"top":254.5}},{"unicode":52,"advance":0.59999999999999998,"planeBounds":{"left":-0.14307692307692299,"bottom":-0.2119230769230768,"right":0.70307692307692315,"top":0.94192307692307697},"atlasBounds":{"left":169.5,"bottom":239.5,"right":180.5,"top":254.5}},{"unicode":53,"advance":0.59999999999999998,"planeBounds":{"left":-0.12307692307692296,"bottom":-0.21692307692307686,"right":0.72307692307692306,"top":0.93692307692307697},"atlasBounds":{"left":181.5,"bottom":239.5,"right":192.5,"top":254.5}},{"unicode":54,"advance":0.59999999999999998,"planeBounds":{"left":-0.16153846153846144,"bottom":-0.21692307692307686,"right":0.76153846153846172,"top":0.93692307692307697},"atlasBounds":{"left":193.5,"bottom":239.5,"right":205.5,"top":254.5}},{"unicode":55,"advance":0.59999999999999998,"planeBounds":{"left":-0.14903846153846143,"bottom":-0.2119230769230768,"right":0.77403846153846168,"top":0.94192307692307697},"atlasBounds":{"left":218.5,"bottom":239.5,"right":230.5,"top":254.5}},{"unicode":56,"advance":0.59999999999999998,"planeBounds":{"left":-0.16153846153846144,"bottom":-0.2114230769230768,"right":0.76153846153846172,"top":0.94242307692307692},"atlasBounds":{"left":246.5,"bottom":239.5,"right":258.5,"top":254.5}},{"unicode":57,"advance":0.59999999999999998,"planeBounds":{"left":-0.16153846153846144,"bottom":-0.20692307692307685,"right":0.76153846153846172,"top":0.94692307692307698},"atlasBounds":{"left":259.5,"bottom":239.5,"right":271.5,"top":254.5}},{"unicode":58,"advance":0.59999999999999998,"planeBounds":{"left":-0.0076923076923076155,"bottom":-0.22499999999999989,"right":0.60769230769230775,"top":0.77500000000000002},"atlasBounds":{"left":175.5,"bottom":129.5,"right":183.5,"top":142.5}},{"unicode":59,"advance":0.59999999999999998,"planeBounds":{"left":-0.030192307692307602,"bottom":-0.37692307692307686,"right":0.58519230769230779,"top":0.77692307692307694},"atlasBounds":{"left":272.5,"bottom":239.5,"right":280.5,"top":254.5}},{"unicode":60,"advance":0.59999999999999998,"planeBounds":{"left":-0.12307692307692296,"bottom":-0.13153846153846147,"right":0.72307692307692306,"top":0.79153846153846164},"atlasBounds":{"left":429.5,"bottom":101.5,"right":440.5,"top":113.5}},{"unicode":61,"advance":0.59999999999999998,"planeBounds":{"left":-0.12307692307692296,"bottom":-0.054615384615384552,"right":0.72307692307692306,"top":0.71461538461538465},"atlasBounds":{"left":163.5,"bottom":76.5,"right":174.5,"top":86.5}},{"unicode":62,"advance":0.59999999999999998,"planeBounds":{"left":-0.12307692307692296,"bottom":-0.13153846153846147,"right":0.72307692307692306,"top":0.79153846153846164},"atlasBounds":{"left":441.5,"bottom":101.5,"right":452.5,"top":113.5}},{"unicode":63,"advance":0.59999999999999998,"planeBounds":{"left":-0.077115384615384558,"bottom":-0.21442307692307683,"right":0.69211538461538469,"top":0.93942307692307692},"atlasBounds":{"left":281.5,"bottom":239.5,"right":291.5,"top":254.5}},{"unicode":64,"advance":0.59999999999999998,"planeBounds":{"left":-0.15903846153846149,"bottom":-0.37384615384615372,"right":0.76403846153846167,"top":0.9338461538461541},"atlasBounds":{"left":286.5,"bottom":343.5,"right":298.5,"top":360.5}},{"unicode":65,"advance":0.59999999999999998,"planeBounds":{"left":-0.16153846153846144,"bottom":-0.2119230769230768,"right":0.76153846153846172,"top":0.94192307692307697},"atlasBounds":{"left":292.5,"bottom":239.5,"right":304.5,"top":254.5}},{"unicode":66,"advance":0.59999999999999998,"planeBounds":{"left":-0.11157692307692298,"bottom":-0.2119230769230768,"right":0.73457692307692313,"top":0.94192307692307697},"atlasBounds":{"left":305.5,"bottom":239.5,"right":316.5,"top":254.5}},{"unicode":67,"advance":0.59999999999999998,"planeBounds":{"left":-0.12007692307692296,"bottom":-0.2119230769230768,"right":0.72607692307692306,"top":0.94192307692307697},"atlasBounds":{"left":329.5,"bottom":239.5,"right":340.5,"top":254.5}},{"unicode":68,"advance":0.59999999999999998,"planeBounds":{"left":-0.12107692307692298,"bottom":-0.2119230769230768,"right":0.72507692307692306,"top":0.94192307692307697},"atlasBounds":{"left":353.5,"bottom":239.5,"right":364.5,"top":254.5}},{"unicode":69,"advance":0.59999999999999998,"planeBounds":{"left":-0.11307692307692298,"bottom":-0.2119230769230768,"right":0.73307692307692307,"top":0.94192307692307697},"atlasBounds":{"left":377.5,"bottom":239.5,"right":388.5,"top":254.5}},{"unicode":70,"advance":0.59999999999999998,"planeBounds":{"left":-0.11307692307692295,"bottom":-0.2119230769230768,"right":0.73307692307692307,"top":0.94192307692307697},"atlasBounds":{"left":389.5,"bottom":239.5,"right":400.5,"top":254.5}},{"unicode":71,"advance":0.59999999999999998,"planeBounds":{"left":-0.12007692307692296,"bottom":-0.2119230769230768,"right":0.72607692307692306,"top":0.94192307692307697},"atlasBounds":{"left":453.5,"bottom":239.5,"right":464.5,"top":254.5}},{"unicode":72,"advance":0.59999999999999998,"planeBounds":{"left":-0.12307692307692299,"bottom":-0.2119230769230768,"right":0.72307692307692306,"top":0.94192307692307697},"atlasBounds":{"left":479.5,"bottom":239.5,"right":490.5,"top":254.5}},{"unicode":73,"advance":0.59999999999999998,"planeBounds":{"left":-0.12307692307692301,"bottom":-0.2119230769230768,"right":0.72307692307692306,"top":0.94192307692307697},"atlasBounds":{"left":491.5,"bottom":239.5,"right":502.5,"top":254.5}},{"unicode":74,"advance":0.59999999999999998,"planeBounds":{"left":-0.15307692307692297,"bottom":-0.21692307692307686,"right":0.69307692307692315,"top":0.93692307692307697},"atlasBounds":{"left":0.5,"bottom":222.5,"right":11.5,"top":237.5}},{"unicode":75,"advance":0.59999999999999998,"planeBounds":{"left":-0.13553846153846144,"bottom":-0.2119230769230768,"right":0.78753846153846163,"top":0.94192307692307697},"atlasBounds":{"left":12.5,"bottom":222.5,"right":24.5,"top":237.5}},{"unicode":76,"advance":0.59999999999999998,"planeBounds":{"left":-0.083076923076922979,"bottom":-0.2119230769230768,"right":0.7630769230769231,"top":0.94192307692307697},"atlasBounds":{"left":25.5,"bottom":222.5,"right":36.5,"top":237.5}},{"unicode":77,"advance":0.59999999999999998,"planeBounds":{"left":-0.12307692307692299,"bottom":-0.2119230769230768,"right":0.72307692307692306,"top":0.94192307692307697},"atlasBounds":{"left":37.5,"bottom":222.5,"right":48.5,"top":237.5}},{"unicode":78,"advance":0.59999999999999998,"planeBounds":{"left":-0.12307692307692299,"bottom":-0.2119230769230768,"right":0.72307692307692306,"top":0.94192307692307697},"atlasBounds":{"left":49.5,"bottom":222.5,"right":60.5,"top":237.5}},{"unicode":79,"advance":0.59999999999999998,"planeBounds":{"left":-0.12307692307692301,"bottom":-0.2119230769230768,"right":0.72307692307692306,"top":0.94192307692307697},"atlasBounds":{"left":61.5,"bottom":222.5,"right":72.5,"top":237.5}},{"unicode":80,"advance":0.59999999999999998,"planeBounds":{"left":-0.10207692307692301,"bottom":-0.2119230769230768,"right":0.74407692307692308,"top":0.94192307692307697},"atlasBounds":{"left":86.5,"bottom":222.5,"right":97.5,"top":237.5}},{"unicode":81,"advance":0.59999999999999998,"planeBounds":{"left":-0.12007692307692296,"bottom":-0.37384615384615372,"right":0.72607692307692306,"top":0.9338461538461541},"atlasBounds":{"left":299.5,"bottom":343.5,"right":310.5,"top":360.5}},{"unicode":82,"advance":0.59999999999999998,"planeBounds":{"left":-0.10457692307692298,"bottom":-0.2119230769230768,"right":0.74157692307692313,"top":0.94192307692307697},"atlasBounds":{"left":98.5,"bottom":222.5,"right":109.5,"top":237.5}},{"unicode":83,"advance":0.59999999999999998,"planeBounds":{"left":-0.12307692307692299,"bottom":-0.2119230769230768,"right":0.72307692307692306,"top":0.94192307692307697},"atlasBounds":{"left":110.5,"bottom":222.5,"right":121.5,"top":237.5}},{"unicode":84,"advance":0.59999999999999998,"planeBounds":{"left":-0.16153846153846144,"bottom":-0.2119230769230768,"right":0.76153846153846172,"top":0.94192307692307697},"atlasBounds":{"left":122.5,"bottom":222.5,"right":134.5,"top":237.5}},{"unicode":85,"advance":0.59999999999999998,"planeBounds":{"left":-0.12307692307692299,"bottom":-0.21692307692307686,"right":0.72307692307692306,"top":0.93692307692307697},"atlasBounds":{"left":135.5,"bottom":222.5,"right":146.5,"top":237.5}},{"unicode":86,"advance":0.59999999999999998,"planeBounds":{"left":-0.16153846153846144,"bottom":-0.2119230769230768,"right":0.76153846153846172,"top":0.94192307692307697},"atlasBounds":{"left":147.5,"bottom":222.5,"right":159.5,"top":237.5}},{"unicode":87,"advance":0.59999999999999998,"planeBounds":{"left":-0.19999999999999996,"bottom":-0.2119230769230768,"right":0.80000000000000004,"top":0.94192307692307697},"atlasBounds":{"left":160.5,"bottom":222.5,"right":173.5,"top":237.5}},{"unicode":88,"advance":0.59999999999999998,"planeBounds":{"left":-0.16153846153846144,"bottom":-0.2119230769230768,"right":0.76153846153846172,"top":0.94192307692307697},"atlasBounds":{"left":174.5,"bottom":222.5,"right":186.5,"top":237.5}},{"unicode":89,"advance":0.59999999999999998,"planeBounds":{"left":-0.16153846153846146,"bottom":-0.2119230769230768,"right":0.76153846153846172,"top":0.94192307692307697},"atlasBounds":{"left":200.5,"bottom":222.5,"right":212.5,"top":237.5}},{"unicode":90,"advance":0.59999999999999998,"planeBounds":{"left":-0.12307692307692296,"bottom":-0.2119230769230768,"right":0.72307692307692306,"top":0.94192307692307697},"atlasBounds":{"left":213.5,"bottom":222.5,"right":224.5,"top":237.5}},{"unicode":91,"advance":0.59999999999999998,"planeBounds":{"left":-0.01865384615384607,"bottom":-0.33230769230769225,"right":0.67365384615384616,"top":1.0523076923076924},"atlasBounds":{"left":129.5,"bottom":419.5,"right":138.5,"top":437.5}},{"unicode":92,"advance":0.59999999999999998,"planeBounds":{"left":-0.12307692307692299,"bottom":-0.33230769230769225,"right":0.72307692307692306,"top":1.0523076923076924},"atlasBounds":{"left":139.5,"bottom":419.5,"right":150.5,"top":437.5}},{"unicode":93,"advance":0.59999999999999998,"planeBounds":{"left":-0.07365384615384607,"bottom":-0.33230769230769225,"right":0.61865384615384622,"top":1.0523076923076924},"atlasBounds":{"left":151.5,"bottom":419.5,"right":160.5,"top":437.5}},{"unicode":94,"advance":0.59999999999999998,"planeBounds":{"left":-0.12307692307692301,"bottom":0.111923076923077,"right":0.72307692307692306,"top":0.95807692307692316},"atlasBounds":{"left":259.5,"bottom":88.5,"right":270.5,"top":99.5}},{"unicode":95,"advance":0.59999999999999998,"planeBounds":{"left":-0.16153846153846149,"bottom":-0.29326923076923078,"right":0.76153846153846172,"top":0.16826923076923078},"atlasBounds":{"left":261.5,"bottom":48.5,"right":273.5,"top":54.5}},{"unicode":96,"advance":0.59999999999999998,"planeBounds":{"left":-0.040692307692307618,"bottom":0.44576923076923086,"right":0.57469230769230772,"top":0.98423076923076935},"atlasBounds":{"left":215.5,"bottom":47.5,"right":223.5,"top":54.5}},{"unicode":97,"advance":0.59999999999999998,"planeBounds":{"left":-0.13557692307692304,"bottom":-0.22499999999999989,"right":0.71057692307692311,"top":0.77500000000000002},"atlasBounds":{"left":378.5,"bottom":129.5,"right":389.5,"top":142.5}},{"unicode":98,"advance":0.59999999999999998,"planeBounds":{"left":-0.11957692307692301,"bottom":-0.21692307692307686,"right":0.72657692307692312,"top":0.93692307692307697},"atlasBounds":{"left":238.5,"bottom":222.5,"right":249.5,"top":237.5}},{"unicode":99,"advance":0.59999999999999998,"planeBounds":{"left":-0.12157692307692299,"bottom":-0.22499999999999989,"right":0.72457692307692312,"top":0.77500000000000002},"atlasBounds":{"left":402.5,"bottom":129.5,"right":413.5,"top":142.5}},{"unicode":100,"advance":0.59999999999999998,"planeBounds":{"left":-0.126576923076923,"bottom":-0.21692307692307686,"right":0.71957692307692311,"top":0.93692307692307697},"atlasBounds":{"left":250.5,"bottom":222.5,"right":261.5,"top":237.5}},{"unicode":101,"advance":0.59999999999999998,"planeBounds":{"left":-0.12307692307692296,"bottom":-0.22499999999999989,"right":0.72307692307692306,"top":0.77500000000000002},"atlasBounds":{"left":427.5,"bottom":129.5,"right":438.5,"top":142.5}},{"unicode":102,"advance":0.59999999999999998,"planeBounds":{"left":-0.16403846153846147,"bottom":-0.2119230769230768,"right":0.75903846153846166,"top":0.94192307692307697},"atlasBounds":{"left":262.5,"bottom":222.5,"right":274.5,"top":237.5}},{"unicode":103,"advance":0.59999999999999998,"planeBounds":{"left":-0.12557692307692297,"bottom":-0.38692307692307687,"right":0.72057692307692311,"top":0.76692307692307693},"atlasBounds":{"left":275.5,"bottom":222.5,"right":286.5,"top":237.5}},{"unicode":104,"advance":0.59999999999999998,"planeBounds":{"left":-0.12207692307692299,"bottom":-0.2119230769230768,"right":0.72407692307692306,"top":0.94192307692307697},"atlasBounds":{"left":287.5,"bottom":222.5,"right":298.5,"top":237.5}},{"unicode":105,"advance":0.59999999999999998,"planeBounds":{"left":-0.14153846153846145,"bottom":-0.2268846153846153,"right":0.78153846153846163,"top":1.0038846153846155},"atlasBounds":{"left":381.5,"bottom":307.5,"right":393.5,"top":323.5}},{"unicode":106,"advance":0.59999999999999998,"planeBounds":{"left":-0.16007692307692298,"bottom":-0.39380769230769219,"right":0.68607692307692314,"top":0.99080769230769239},"atlasBounds":{"left":161.5,"bottom":419.5,"right":172.5,"top":437.5}},{"unicode":107,"advance":0.59999999999999998,"planeBounds":{"left":-0.1355384615384615,"bottom":-0.2119230769230768,"right":0.78753846153846163,"top":0.94192307692307697},"atlasBounds":{"left":313.5,"bottom":222.5,"right":325.5,"top":237.5}},{"unicode":108,"advance":0.59999999999999998,"planeBounds":{"left":-0.17153846153846145,"bottom":-0.2119230769230768,"right":0.75153846153846171,"top":0.94192307692307697},"atlasBounds":{"left":326.5,"bottom":222.5,"right":338.5,"top":237.5}},{"unicode":109,"advance":0.59999999999999998,"planeBounds":{"left":-0.16153846153846149,"bottom":-0.21999999999999989,"right":0.76153846153846172,"top":0.78000000000000003},"atlasBounds":{"left":0.5,"bottom":114.5,"right":12.5,"top":127.5}},{"unicode":110,"advance":0.59999999999999998,"planeBounds":{"left":-0.12207692307692299,"bottom":-0.21999999999999989,"right":0.72407692307692306,"top":0.78000000000000003},"atlasBounds":{"left":13.5,"bottom":114.5,"right":24.5,"top":127.5}},{"unicode":111,"advance":0.59999999999999998,"planeBounds":{"left":-0.12307692307692296,"bottom":-0.22499999999999995,"right":0.72307692307692306,"top":0.77500000000000002},"atlasBounds":{"left":25.5,"bottom":114.5,"right":36.5,"top":127.5}},{"unicode":112,"advance":0.59999999999999998,"planeBounds":{"left":-0.11857692307692301,"bottom":-0.38692307692307687,"right":0.72757692307692312,"top":0.76692307692307693},"atlasBounds":{"left":339.5,"bottom":222.5,"right":350.5,"top":237.5}},{"unicode":113,"advance":0.59999999999999998,"planeBounds":{"left":-0.12507692307692297,"bottom":-0.38692307692307687,"right":0.72107692307692306,"top":0.76692307692307693},"atlasBounds":{"left":351.5,"bottom":222.5,"right":362.5,"top":237.5}},{"unicode":114,"advance":0.59999999999999998,"planeBounds":{"left":-0.10157692307692301,"bottom":-0.21999999999999989,"right":0.74457692307692314,"top":0.78000000000000003},"atlasBounds":{"left":129.5,"bottom":114.5,"right":140.5,"top":127.5}},{"unicode":115,"advance":0.59999999999999998,"planeBounds":{"left":-0.11807692307692295,"bottom":-0.22499999999999995,"right":0.72807692307692307,"top":0.77500000000000002},"atlasBounds":{"left":141.5,"bottom":114.5,"right":152.5,"top":127.5}},{"unicode":116,"advance":0.59999999999999998,"planeBounds":{"left":-0.17403846153846145,"bottom":-0.22442307692307686,"right":0.74903846153846165,"top":0.92942307692307691},"atlasBounds":{"left":376.5,"bottom":222.5,"right":388.5,"top":237.5}},{"unicode":117,"advance":0.59999999999999998,"planeBounds":{"left":-0.12307692307692299,"bottom":-0.2299999999999999,"right":0.72307692307692306,"top":0.77000000000000002},"atlasBounds":{"left":165.5,"bottom":114.5,"right":176.5,"top":127.5}},{"unicode":118,"advance":0.59999999999999998,"planeBounds":{"left":-0.16153846153846144,"bottom":-0.22499999999999995,"right":0.76153846153846172,"top":0.77500000000000002},"atlasBounds":{"left":177.5,"bottom":114.5,"right":189.5,"top":127.5}},{"unicode":119,"advance":0.
Download .txt
gitextract_4ufyiq5t/

├── .github/
│   └── workflows/
│       ├── build.yml
│       ├── publish.yml
│       └── test.yml
├── .gitignore
├── README.md
├── buildSrc/
│   ├── .gitignore
│   ├── build.gradle.kts
│   └── src/
│       └── main/
│           └── kotlin/
│               └── graphics/
│                   └── kiln/
│                       └── blaze4d/
│                           └── build/
│                               └── assets/
│                                   ├── AssetsPlugin.kt
│                                   ├── AssetsPluginExtension.kt
│                                   └── shaders/
│                                       ├── CompileShadersTask.kt
│                                       ├── CompilerConfig.kt
│                                       ├── ShaderCompiler.kt
│                                       ├── ShaderModule.kt
│                                       ├── ShaderProject.kt
│                                       ├── ShaderStage.kt
│                                       └── SprivVersion.kt
├── core/
│   ├── LICENSE
│   ├── api/
│   │   ├── .gitignore
│   │   ├── LICENSE
│   │   ├── build.gradle.kts
│   │   └── src/
│   │       └── main/
│   │           └── java/
│   │               ├── graphics/
│   │               │   └── kiln/
│   │               │       └── blaze4d/
│   │               │           └── core/
│   │               │               ├── Blaze4DCore.java
│   │               │               ├── Frame.java
│   │               │               ├── GlobalImage.java
│   │               │               ├── GlobalMesh.java
│   │               │               ├── natives/
│   │               │               │   ├── ImageDataNative.java
│   │               │               │   ├── Lib.java
│   │               │               │   ├── McUniformDataNative.java
│   │               │               │   ├── MeshDataNative.java
│   │               │               │   ├── Natives.java
│   │               │               │   ├── PipelineConfigurationNative.java
│   │               │               │   ├── Vec2u32Native.java
│   │               │               │   └── VertexFormatNative.java
│   │               │               └── types/
│   │               │                   ├── B4DFormat.java
│   │               │                   ├── B4DImageData.java
│   │               │                   ├── B4DIndexType.java
│   │               │                   ├── B4DMeshData.java
│   │               │                   ├── B4DPrimitiveTopology.java
│   │               │                   ├── B4DUniform.java
│   │               │                   ├── B4DUniformData.java
│   │               │                   ├── B4DVertexFormat.java
│   │               │                   ├── BlendFactor.java
│   │               │                   ├── BlendOp.java
│   │               │                   ├── CompareOp.java
│   │               │                   └── PipelineConfiguration.java
│   │               └── module-info.java
│   ├── assets/
│   │   ├── .gitattributes
│   │   ├── .gitignore
│   │   ├── build.gradle.kts
│   │   └── src/
│   │       ├── debug/
│   │       │   ├── apply.frag
│   │       │   ├── apply.vert
│   │       │   ├── basic.frag
│   │       │   ├── basic.vert
│   │       │   └── font/
│   │       │       ├── JetBrainsMono/
│   │       │       │   ├── OFL.txt
│   │       │       │   └── tmp_built/
│   │       │       │       └── regular.json
│   │       │       ├── charset.txt
│   │       │       ├── msdf_font.frag
│   │       │       └── msdf_font.vert
│   │       ├── emulator/
│   │       │   ├── debug/
│   │       │   │   ├── background.frag
│   │       │   │   ├── background.vert
│   │       │   │   ├── color.vert
│   │       │   │   ├── debug.frag
│   │       │   │   ├── null.vert
│   │       │   │   ├── position.vert
│   │       │   │   ├── textured.frag
│   │       │   │   └── uv.vert
│   │       │   └── mc_uniforms.glsl
│   │       └── utils/
│   │           ├── blit.frag
│   │           └── full_screen_quad.vert
│   └── natives/
│       ├── .cargo/
│       │   └── config.toml
│       ├── .gitignore
│       ├── Cargo.toml
│       ├── build.gradle.kts
│       ├── build.rs
│       ├── examples/
│       │   └── immediate_cube.rs
│       ├── libvma/
│       │   └── CMakeLists.txt
│       ├── rustfmt.toml
│       ├── src/
│       │   ├── allocator/
│       │   │   ├── mod.rs
│       │   │   └── vma.rs
│       │   ├── b4d.rs
│       │   ├── c_api.rs
│       │   ├── c_log.rs
│       │   ├── device/
│       │   │   ├── device.rs
│       │   │   ├── device_utils.rs
│       │   │   ├── init.rs
│       │   │   ├── mod.rs
│       │   │   └── surface.rs
│       │   ├── glfw_surface.rs
│       │   ├── instance/
│       │   │   ├── debug_messenger.rs
│       │   │   ├── init.rs
│       │   │   ├── instance.rs
│       │   │   └── mod.rs
│       │   ├── lib.rs
│       │   ├── objects/
│       │   │   ├── id.rs
│       │   │   ├── mod.rs
│       │   │   ├── object_set.rs
│       │   │   └── sync.rs
│       │   ├── renderer/
│       │   │   ├── emulator/
│       │   │   │   ├── debug_pipeline.rs
│       │   │   │   ├── descriptors.rs
│       │   │   │   ├── global_objects.rs
│       │   │   │   ├── immediate.rs
│       │   │   │   ├── mc_shaders.rs
│       │   │   │   ├── mod.rs
│       │   │   │   ├── pass.rs
│       │   │   │   ├── pipeline.rs
│       │   │   │   ├── share.rs
│       │   │   │   ├── staging.rs
│       │   │   │   └── worker.rs
│       │   │   └── mod.rs
│       │   ├── util/
│       │   │   ├── alloc.rs
│       │   │   ├── format.rs
│       │   │   ├── id.rs
│       │   │   ├── mod.rs
│       │   │   ├── rand.rs
│       │   │   ├── slice_splitter.rs
│       │   │   └── vk.rs
│       │   ├── vk/
│       │   │   ├── mod.rs
│       │   │   ├── objects/
│       │   │   │   ├── buffer.rs
│       │   │   │   ├── image.rs
│       │   │   │   ├── mod.rs
│       │   │   │   ├── surface.rs
│       │   │   │   ├── swapchain.rs
│       │   │   │   └── types.rs
│       │   │   └── test.rs
│       │   └── window.rs
│       └── tests/
│           └── test_common/
│               └── mod.rs
├── gradle/
│   └── wrapper/
│       ├── gradle-wrapper.jar
│       └── gradle-wrapper.properties
├── gradle.properties
├── gradlew
├── gradlew.bat
├── mod/
│   ├── .gitignore
│   ├── LICENSE
│   ├── build.gradle.kts
│   ├── gradle.properties
│   └── src/
│       └── main/
│           ├── java/
│           │   └── graphics/
│           │       └── kiln/
│           │           └── blaze4d/
│           │               ├── Blaze4D.java
│           │               ├── Blaze4DMixinPlugin.java
│           │               ├── Blaze4DPreLaunch.java
│           │               ├── api/
│           │               │   ├── B4DShader.java
│           │               │   ├── B4DUniform.java
│           │               │   ├── B4DVertexBuffer.java
│           │               │   └── Utils.java
│           │               ├── emulation/
│           │               │   └── GLStateTracker.java
│           │               └── mixin/
│           │                   ├── integration/
│           │                   │   ├── FramebufferMixin.java
│           │                   │   ├── GLXMixin.java
│           │                   │   ├── GlDebugMixin.java
│           │                   │   ├── GlStateManagerMixin.java
│           │                   │   ├── MinecraftClientMixin.java
│           │                   │   ├── VertexFormatMixin.java
│           │                   │   ├── VideoWarningManagerMixin.java
│           │                   │   ├── WindowFramebufferMixin.java
│           │                   │   └── WindowMixin.java
│           │                   ├── render/
│           │                   │   ├── BufferUploaderMixin.java
│           │                   │   ├── RenderSystemMixin.java
│           │                   │   ├── VertexBufferMixin.java
│           │                   │   └── WorldRendererMixin.java
│           │                   ├── shader/
│           │                   │   ├── GlStateManagerMixin.java
│           │                   │   ├── GlUniformMixin.java
│           │                   │   ├── RenderSystemMixin.java
│           │                   │   ├── ShaderAccessor.java
│           │                   │   └── ShaderMixin.java
│           │                   └── texture/
│           │                       ├── LightmapTextureManagerMixin.java
│           │                       ├── NativeImageMixin.java
│           │                       ├── RenderSystemMixin.java
│           │                       ├── TextureManagerMixin.java
│           │                       ├── TextureUtilMixin_Development.java
│           │                       └── TextureUtilMixin_Runtime.java
│           └── resources/
│               ├── blaze4d.aw
│               ├── blaze4d.mixins.json
│               └── fabric.mod.json
└── settings.gradle.kts
Download .txt
SYMBOL INDEX (1296 symbols across 99 files)

FILE: core/api/src/main/java/graphics/kiln/blaze4d/core/Blaze4DCore.java
  class Blaze4DCore (line 13) | public class Blaze4DCore implements AutoCloseable {
    method Blaze4DCore (line 18) | public Blaze4DCore(long glfwWindow) {
    method setDebugMode (line 25) | public void setDebugMode(DebugMode mode) {
    method createShader (line 29) | public long createShader(B4DVertexFormat vertexFormat, long usedUnifor...
    method destroyShader (line 33) | public void destroyShader(long shaderId) {
    method createGlobalMesh (line 37) | public GlobalMesh createGlobalMesh(B4DMeshData meshData) {
    method createGlobalImage (line 41) | public GlobalImage createGlobalImage(int width, int height, B4DFormat ...
    method startFrame (line 45) | public Frame startFrame(int windowWidth, int windowHeight) {
    method close (line 54) | @Override
    type DebugMode (line 59) | public enum DebugMode {
      method DebugMode (line 74) | DebugMode(int raw) {

FILE: core/api/src/main/java/graphics/kiln/blaze4d/core/Frame.java
  class Frame (line 8) | public class Frame implements AutoCloseable {
    method Frame (line 12) | Frame(MemoryAddress handle) {
    method updateUniform (line 16) | public void updateUniform(long shaderId, B4DUniformData data) {
    method drawGlobal (line 20) | public void drawGlobal(GlobalMesh mesh, long shaderId, boolean depthWr...
    method uploadImmediate (line 24) | public int uploadImmediate(B4DMeshData data) {
    method drawImmediate (line 28) | public void drawImmediate(int meshId, long shaderId, boolean depthWrit...
    method close (line 32) | @Override

FILE: core/api/src/main/java/graphics/kiln/blaze4d/core/GlobalImage.java
  class GlobalImage (line 7) | public class GlobalImage implements AutoCloseable {
    method GlobalImage (line 11) | GlobalImage(MemoryAddress handle) {
    method update (line 15) | public void update(B4DImageData data) {
    method getHandle (line 19) | MemoryAddress getHandle() {
    method close (line 23) | @Override

FILE: core/api/src/main/java/graphics/kiln/blaze4d/core/GlobalMesh.java
  class GlobalMesh (line 6) | public class GlobalMesh implements AutoCloseable {
    method GlobalMesh (line 10) | GlobalMesh(MemoryAddress handle) {
    method getHandle (line 14) | MemoryAddress getHandle() {
    method close (line 18) | @Override

FILE: core/api/src/main/java/graphics/kiln/blaze4d/core/natives/ImageDataNative.java
  class ImageDataNative (line 8) | public class ImageDataNative {

FILE: core/api/src/main/java/graphics/kiln/blaze4d/core/natives/Lib.java
  class Lib (line 13) | public class Lib {
    method loadNatives (line 21) | public static synchronized void loadNatives() {
    method extractNatives (line 40) | private static File extractNatives(File dstDirectory) {
    method copyToFile (line 69) | private static void copyToFile(File dst, String resourcePath) {
    type Os (line 88) | private enum Os {
      method Os (line 95) | Os(String name) {
      method getOs (line 99) | static Os getOs() {
    type Arch (line 112) | private enum Arch {
      method Arch (line 119) | Arch(String name) {
      method getArch (line 123) | static Arch getArch() {

FILE: core/api/src/main/java/graphics/kiln/blaze4d/core/natives/McUniformDataNative.java
  class McUniformDataNative (line 7) | public class McUniformDataNative {

FILE: core/api/src/main/java/graphics/kiln/blaze4d/core/natives/MeshDataNative.java
  class MeshDataNative (line 7) | public class MeshDataNative {

FILE: core/api/src/main/java/graphics/kiln/blaze4d/core/natives/Natives.java
  class Natives (line 22) | public class Natives {
    method b4dCreateGlfwSurfaceProvider (line 124) | public static MemoryAddress b4dCreateGlfwSurfaceProvider(long glfwWind...
    method b4dInit (line 134) | public static MemoryAddress b4dInit(MemoryAddress surface, boolean ena...
    method b4dDestroy (line 143) | public static void b4dDestroy(MemoryAddress b4d) {
    method b4dSetDebugMode (line 151) | public static void b4dSetDebugMode(MemoryAddress b4d, int debugMode) {
    method b4dCreateGlobalMesh (line 159) | public static MemoryAddress b4dCreateGlobalMesh(MemoryAddress b4d, Mem...
    method b4dDestroyGlobalMesh (line 167) | public static void b4dDestroyGlobalMesh(MemoryAddress mesh) {
    method b4dCreateGlobalImage (line 175) | public static MemoryAddress b4dCreateGlobalImage(MemoryAddress b4d, in...
    method b4DUpdateGlobalImage (line 183) | public static void b4DUpdateGlobalImage(MemoryAddress image, MemoryAdd...
    method b4dDestroyGlobalImage (line 191) | public static void b4dDestroyGlobalImage(MemoryAddress image) {
    method b4dCreateShader (line 199) | public static long b4dCreateShader(MemoryAddress b4d, MemoryAddress ve...
    method b4dDestroyShader (line 207) | public static void b4dDestroyShader(MemoryAddress b4d, long shaderId) {
    method b4dStartFrame (line 215) | public static MemoryAddress b4dStartFrame(MemoryAddress b4d, int windo...
    method b4dPassUpdateUniform (line 223) | public static void b4dPassUpdateUniform(MemoryAddress frame, MemoryAdd...
    method b4dPassDrawGlobal (line 231) | public static void b4dPassDrawGlobal(MemoryAddress frame, MemoryAddres...
    method b4dPassUploadImmediate (line 245) | public static int b4dPassUploadImmediate(MemoryAddress frame, MemoryAd...
    method b4dPassDrawImmediate (line 253) | public static void b4dPassDrawImmediate(MemoryAddress frame, int meshI...
    method b4dEndFrame (line 267) | public static void b4dEndFrame(MemoryAddress frame) {
    method getSizeLayout (line 278) | public static ValueLayout getSizeLayout() {
    method lookupFunction (line 283) | private static MethodHandle lookupFunction(String name, FunctionDescri...
    method loadMetadata (line 291) | private static NativeMetadata loadMetadata() {
    method preInitGlfw (line 317) | private static void preInitGlfw() {
    method initNativeLogger (line 329) | private static void initNativeLogger() {
    method nativeLogHandler (line 348) | private static void nativeLogHandler(MemoryAddress targetPtr, MemoryAd...
    method verifyInit (line 372) | public static void verifyInit() {

FILE: core/api/src/main/java/graphics/kiln/blaze4d/core/natives/PipelineConfigurationNative.java
  class PipelineConfigurationNative (line 8) | public class PipelineConfigurationNative {

FILE: core/api/src/main/java/graphics/kiln/blaze4d/core/natives/Vec2u32Native.java
  class Vec2u32Native (line 6) | public class Vec2u32Native {

FILE: core/api/src/main/java/graphics/kiln/blaze4d/core/natives/VertexFormatNative.java
  class VertexFormatNative (line 8) | public class VertexFormatNative {

FILE: core/api/src/main/java/graphics/kiln/blaze4d/core/types/B4DFormat.java
  type B4DFormat (line 3) | public enum B4DFormat {
    method B4DFormat (line 76) | B4DFormat(int value) {
    method getValue (line 80) | public int getValue() {
    method fromRaw (line 84) | public static B4DFormat fromRaw(int value) {

FILE: core/api/src/main/java/graphics/kiln/blaze4d/core/types/B4DImageData.java
  class B4DImageData (line 8) | public class B4DImageData implements AutoCloseable {
    method B4DImageData (line 13) | public B4DImageData() {
    method setData (line 18) | private void setData(MemoryAddress data, long dataLen) {
    method setData (line 23) | public void setData(long dataPtr, long dataLen) {
    method setRowStride (line 27) | public void setRowStride(int rowStride) {
    method setOffset (line 31) | public void setOffset(int x, int y) {
    method setExtent (line 36) | public void setExtent(int x, int y) {
    method getAddress (line 41) | public MemoryAddress getAddress() {
    method close (line 45) | @Override

FILE: core/api/src/main/java/graphics/kiln/blaze4d/core/types/B4DIndexType.java
  type B4DIndexType (line 3) | public enum B4DIndexType {
    method B4DIndexType (line 9) | B4DIndexType(int value) {
    method getValue (line 13) | public int getValue() {
    method fromValue (line 17) | public static B4DIndexType fromValue(int value) {

FILE: core/api/src/main/java/graphics/kiln/blaze4d/core/types/B4DMeshData.java
  class B4DMeshData (line 11) | public class B4DMeshData implements AutoCloseable {
    method B4DMeshData (line 20) | public B4DMeshData() {
    method setVertexDataMem (line 25) | private void setVertexDataMem(MemoryAddress data, long dataLen) {
    method setVertexData (line 30) | public void setVertexData(long dataPtr, long dataLen) {
    method getVertexDataPtr (line 34) | public MemoryAddress getVertexDataPtr() {
    method getVertexDataLen (line 38) | public long getVertexDataLen() {
    method setIndexData (line 42) | public void setIndexData() {
    method setIndexDataMem (line 46) | private void setIndexDataMem(MemoryAddress data, long dataLen) {
    method setIndexData (line 51) | public void setIndexData(long dataPtr, long dataLen) {
    method getIndexDataPtr (line 55) | public MemoryAddress getIndexDataPtr() {
    method getIndexDataLen (line 59) | public long getIndexDataLen() {
    method setVertexStride (line 63) | public void setVertexStride(int vertexStride) {
    method getVertexStride (line 67) | public int getVertexStride() {
    method setIndexCount (line 71) | public void setIndexCount(int indexCount) {
    method getIndexCount (line 75) | public int getIndexCount() {
    method setIndexType (line 79) | public void setIndexType(B4DIndexType type) {
    method getIndexType (line 83) | public B4DIndexType getIndexType() {
    method setIndexTypeRaw (line 87) | public void setIndexTypeRaw(int indexType) {
    method getIndexTypeRaw (line 91) | public int getIndexTypeRaw() {
    method setPrimitiveTopology (line 95) | public void setPrimitiveTopology(B4DPrimitiveTopology primitiveTopolog...
    method getPrimitiveTopology (line 99) | public B4DPrimitiveTopology getPrimitiveTopology() {
    method setPrimitiveTopologyRaw (line 103) | public void setPrimitiveTopologyRaw(int primitiveTopology) {
    method getPrimitiveTopologyRaw (line 107) | public int getPrimitiveTopologyRaw() {
    method getAddress (line 111) | public MemoryAddress getAddress() {
    method close (line 115) | @Override

FILE: core/api/src/main/java/graphics/kiln/blaze4d/core/types/B4DPrimitiveTopology.java
  type B4DPrimitiveTopology (line 3) | public enum B4DPrimitiveTopology {
    method B4DPrimitiveTopology (line 13) | B4DPrimitiveTopology(int value) {
    method getValue (line 17) | public int getValue() {
    method fromRaw (line 21) | public static B4DPrimitiveTopology fromRaw(int value) {
    method fromGLMode (line 46) | public static B4DPrimitiveTopology fromGLMode(int mode) {

FILE: core/api/src/main/java/graphics/kiln/blaze4d/core/types/B4DUniform.java
  type B4DUniform (line 3) | public enum B4DUniform {
    method B4DUniform (line 22) | B4DUniform(long value) {
    method getValue (line 26) | public long getValue() {

FILE: core/api/src/main/java/graphics/kiln/blaze4d/core/types/B4DUniformData.java
  class B4DUniformData (line 8) | public class B4DUniformData implements AutoCloseable {
    method B4DUniformData (line 13) | public B4DUniformData() {
    method setModelViewMatrix (line 18) | public void setModelViewMatrix(float m00, float m01, float m02, float ...
    method setProjectionMatrix (line 23) | public void setProjectionMatrix(float m00, float m01, float m02, float...
    method setChunkOffset (line 28) | public void setChunkOffset(float x, float y, float z) {
    method getAddress (line 33) | public MemoryAddress getAddress() {
    method close (line 37) | @Override
    method setVec3f32 (line 42) | private void setVec3f32(float x, float y, float z) {
    method setMat4f32 (line 48) | private void setMat4f32(float m00, float m01, float m02, float m03, fl...

FILE: core/api/src/main/java/graphics/kiln/blaze4d/core/types/B4DVertexFormat.java
  class B4DVertexFormat (line 10) | public class B4DVertexFormat implements AutoCloseable {
    method B4DVertexFormat (line 15) | public B4DVertexFormat() {
    method initialize (line 20) | public void initialize() {
    method setStride (line 30) | public void setStride(int stride) {
    method setPosition (line 34) | public void setPosition(FormatEntry entry) {
    method setPosition (line 38) | public void setPosition(int offset, B4DFormat format) {
    method setPosition (line 42) | public void setPosition(int offset, int format) {
    method getPosition (line 47) | public FormatEntry getPosition() {
    method setNormal (line 53) | public void setNormal() {
    method setNormal (line 57) | public void setNormal(FormatEntry entry) {
    method setNormal (line 61) | public void setNormal(int offset, B4DFormat format) {
    method setNormal (line 65) | public void setNormal(int offset, int format) {
    method getNormal (line 71) | public Optional<FormatEntry> getNormal() {
    method setColor (line 80) | public void setColor() {
    method setColor (line 84) | public void setColor(FormatEntry entry) {
    method setColor (line 88) | public void setColor(int offset, B4DFormat format) {
    method setColor (line 92) | public void setColor(int offset, int format) {
    method getColor (line 98) | public Optional<FormatEntry> getColor() {
    method setUV0 (line 107) | public void setUV0() {
    method setUV0 (line 111) | public void setUV0(FormatEntry entry) {
    method setUV0 (line 115) | public void setUV0(int offset, B4DFormat format) {
    method setUV0 (line 119) | public void setUV0(int offset, int format) {
    method getUV0 (line 125) | public Optional<FormatEntry> getUV0() {
    method setUV1 (line 134) | public void setUV1() {
    method setUV1 (line 138) | public void setUV1(FormatEntry entry) {
    method setUV1 (line 142) | public void setUV1(int offset, B4DFormat format) {
    method setUV1 (line 146) | public void setUV1(int offset, int format) {
    method getUV1 (line 152) | public Optional<FormatEntry> getUV1() {
    method setUV2 (line 161) | public void setUV2() {
    method setUV2 (line 165) | public void setUV2(FormatEntry entry) {
    method setUV2 (line 169) | public void setUV2(int offset, B4DFormat format) {
    method setUV2 (line 173) | public void setUV2(int offset, int format) {
    method getUV2 (line 179) | public Optional<FormatEntry> getUV2() {
    method getAddress (line 188) | public MemoryAddress getAddress() {
    method close (line 192) | @Override

FILE: core/api/src/main/java/graphics/kiln/blaze4d/core/types/BlendFactor.java
  type BlendFactor (line 3) | public enum BlendFactor {
    method BlendFactor (line 17) | BlendFactor(int value) {
    method getValue (line 21) | public int getValue() {
    method fromValue (line 25) | public static BlendFactor fromValue(int value) {
    method fromGlBlendFunc (line 41) | public static BlendFactor fromGlBlendFunc(int factor) {

FILE: core/api/src/main/java/graphics/kiln/blaze4d/core/types/BlendOp.java
  type BlendOp (line 3) | public enum BlendOp {
    method BlendOp (line 12) | BlendOp(int value) {
    method getValue (line 16) | public int getValue() {
    method fromValue (line 20) | public static BlendOp fromValue(int value) {
    method fromGlBlendEquation (line 31) | public static BlendOp fromGlBlendEquation(int glEquation) {

FILE: core/api/src/main/java/graphics/kiln/blaze4d/core/types/CompareOp.java
  type CompareOp (line 3) | public enum CompareOp {
    method CompareOp (line 15) | CompareOp(int value) {
    method getValue (line 19) | public int getValue() {
    method fromValue (line 23) | public static CompareOp fromValue(int value) {
    method fromGlDepthFunc (line 37) | public static CompareOp fromGlDepthFunc(int glFunc) {

FILE: core/api/src/main/java/graphics/kiln/blaze4d/core/types/PipelineConfiguration.java
  class PipelineConfiguration (line 8) | public class PipelineConfiguration implements AutoCloseable {
    method PipelineConfiguration (line 13) | public PipelineConfiguration() {
    method setDepthTestEnable (line 18) | public void setDepthTestEnable(boolean enable) {
    method getDepthTestEnable (line 22) | public boolean getDepthTestEnable() {
    method setDepthCompareOp (line 26) | public void setDepthCompareOp(CompareOp op) {
    method getDepthCompareOp (line 30) | public CompareOp getDepthCompareOp() {
    method setDepthWriteEnable (line 34) | public void setDepthWriteEnable(boolean enable) {
    method getDepthWriteEnable (line 38) | public boolean getDepthWriteEnable() {
    method setBlendEnable (line 42) | public void setBlendEnable(boolean enable) {
    method getBlendEnable (line 46) | public boolean getBlendEnable() {
    method setBlendColorOp (line 50) | public void setBlendColorOp(BlendOp op) {
    method getBlendColorOp (line 54) | public BlendOp getBlendColorOp() {
    method setBlendColorSrcFactor (line 58) | public void setBlendColorSrcFactor(BlendFactor factor) {
    method getBlendColorSrcFactor (line 62) | public BlendFactor getBlendColorSrcFactor() {
    method setBlendColorDstFactor (line 66) | public void setBlendColorDstFactor(BlendFactor factor) {
    method getBlendColorDstFactor (line 70) | public BlendFactor getBlendColorDstFactor() {
    method setBlendAlphaOp (line 74) | public void setBlendAlphaOp(BlendOp op) {
    method getBlendAlphaOp (line 78) | public BlendOp getBlendAlphaOp() {
    method setBlendAlphaSrcFactor (line 82) | public void setBlendAlphaSrcFactor(BlendFactor factor) {
    method getBlendAlphaSrcFactor (line 86) | public BlendFactor getBlendAlphaSrcFactor() {
    method setBlendAlphaDstFactor (line 90) | public void setBlendAlphaDstFactor(BlendFactor factor) {
    method getBlendAlphaDstFactor (line 94) | public BlendFactor getBlendAlphaDstFactor() {
    method getAddress (line 98) | public MemoryAddress getAddress() {
    method close (line 102) | @Override

FILE: core/natives/build.rs
  function main (line 4) | fn main() {
  function main (line 8) | fn main() {

FILE: core/natives/examples/immediate_cube.rs
  function main (line 15) | fn main() {
  constant CUBE_VERTICES (line 115) | const CUBE_VERTICES: [Vertex; 8] = [
  constant CUBE_INDICES (line 158) | const CUBE_INDICES: [u32; 36] = [
  type Vertex (line 168) | struct Vertex {
    method make_b4d_vertex_format (line 178) | fn make_b4d_vertex_format() -> VertexFormat {
  function make_projection_matrix (line 194) | fn make_projection_matrix(window_size: Vec2u32, fov: f32) -> Mat4f32 {

FILE: core/natives/src/allocator/mod.rs
  type Allocator (line 12) | pub struct Allocator {
    method new (line 20) | pub fn new(functions: Arc<DeviceFunctions>) -> Result<Self, vk::Result> {
    method allocate_memory (line 38) | pub unsafe fn allocate_memory(&self, requirements: &vk::MemoryRequirem...
    method allocate_memory_pages (line 64) | pub unsafe fn allocate_memory_pages(&self, requirements: &[vk::MemoryR...
    method free_memory (line 85) | pub unsafe fn free_memory(&self, allocation: Allocation) {
    method free_memory_pages (line 94) | pub unsafe fn free_memory_pages(&self, allocations: &[Allocation]) {
    method create_gpu_buffer (line 106) | pub unsafe fn create_gpu_buffer(&self, create_info: &vk::BufferCreateI...
    method create_buffer (line 133) | pub unsafe fn create_buffer(&self, create_info: &vk::BufferCreateInfo,...
    method create_gpu_image (line 157) | pub unsafe fn create_gpu_image(&self, create_info: &vk::ImageCreateInf...
    method create_image (line 184) | pub unsafe fn create_image(&self, create_info: &vk::ImageCreateInfo, h...
    method destroy_buffer (line 208) | pub unsafe fn destroy_buffer(&self, buffer: vk::Buffer, allocation: Al...
    method destroy_image (line 219) | pub unsafe fn destroy_image(&self, image: vk::Image, allocation: Alloc...
    method set_allocation_name (line 223) | unsafe fn set_allocation_name(&self, allocation: vma::Allocation, name...
    method make_default_info (line 231) | fn make_default_info<'a>(host_access: HostAccess) -> vma::AllocationCr...
  type Allocation (line 247) | pub struct Allocation {
    method new (line 252) | fn new(vma_allocation: vma::Allocation) -> Self {
  type AllocationBindingInfo (line 261) | pub struct AllocationBindingInfo {
    method new (line 269) | fn new(info: &vma::AllocationInfo) -> Self {
  type HostAccess (line 281) | pub enum HostAccess {
    method to_vma_flags (line 301) | fn to_vma_flags(&self) -> vma::AllocationCreateFlags {

FILE: core/natives/src/allocator/vma.rs
  type AllocatorCreateFlags (line 9) | pub struct AllocatorCreateFlags(u32);
    constant EXTERNALLY_SYNCHRONIZED (line 12) | pub const EXTERNALLY_SYNCHRONIZED: AllocatorCreateFlags = AllocatorCre...
    constant DEDICATED_ALLOCATION (line 13) | pub const DEDICATED_ALLOCATION: AllocatorCreateFlags = AllocatorCreate...
    constant KHR_BIND_MEMORY2 (line 14) | pub const KHR_BIND_MEMORY2: AllocatorCreateFlags = AllocatorCreateFlag...
    constant EXT_MEMORY_BUDGET (line 15) | pub const EXT_MEMORY_BUDGET: AllocatorCreateFlags = AllocatorCreateFla...
    constant AMD_DEVICE_COHERENT_MEMORY (line 16) | pub const AMD_DEVICE_COHERENT_MEMORY: AllocatorCreateFlags = Allocator...
    constant BUFFER_DEVICE_ADDRESS (line 17) | pub const BUFFER_DEVICE_ADDRESS: AllocatorCreateFlags = AllocatorCreat...
    constant EXT_MEMORY_PRIORITY (line 18) | pub const EXT_MEMORY_PRIORITY: AllocatorCreateFlags = AllocatorCreateF...
  type AllocationCreateFlags (line 24) | pub struct AllocationCreateFlags(u32);
    constant DEDICATED_MEMORY (line 27) | pub const DEDICATED_MEMORY: AllocationCreateFlags = AllocationCreateFl...
    constant NEVER_ALLOCATE (line 28) | pub const NEVER_ALLOCATE: AllocationCreateFlags = AllocationCreateFlag...
    constant CREATE_MAPPED (line 29) | pub const CREATE_MAPPED: AllocationCreateFlags = AllocationCreateFlags...
    constant UPPER_ADDRESS (line 30) | pub const UPPER_ADDRESS: AllocationCreateFlags = AllocationCreateFlags...
    constant DONT_BIND (line 31) | pub const DONT_BIND: AllocationCreateFlags = AllocationCreateFlags(0x0...
    constant WITHIN_BUDGET (line 32) | pub const WITHIN_BUDGET: AllocationCreateFlags = AllocationCreateFlags...
    constant CAN_ALIAS (line 33) | pub const CAN_ALIAS: AllocationCreateFlags = AllocationCreateFlags(0x0...
    constant HOST_ACCESS_SEQUENTIAL_WRITE (line 34) | pub const HOST_ACCESS_SEQUENTIAL_WRITE: AllocationCreateFlags = Alloca...
    constant HOST_ACCESS_RANDOM (line 35) | pub const HOST_ACCESS_RANDOM: AllocationCreateFlags = AllocationCreate...
    constant HOST_ACCESS_ALLOW_TRANSFER_INSTEAD (line 36) | pub const HOST_ACCESS_ALLOW_TRANSFER_INSTEAD: AllocationCreateFlags = ...
    constant STRATEGY_MIN_MEMORY (line 37) | pub const STRATEGY_MIN_MEMORY: AllocationCreateFlags = AllocationCreat...
    constant STRATEGY_MIN_TIME (line 38) | pub const STRATEGY_MIN_TIME: AllocationCreateFlags = AllocationCreateF...
    constant STRATEGY_MIN_OFFSET (line 39) | pub const STRATEGY_MIN_OFFSET: AllocationCreateFlags = AllocationCreat...
  type MemoryUsage (line 45) | pub struct MemoryUsage(u32);
    constant UNKNOWN (line 48) | pub const UNKNOWN: MemoryUsage = MemoryUsage(0);
    constant GPU_LAZILY_ALLOCATED (line 49) | pub const GPU_LAZILY_ALLOCATED: MemoryUsage = MemoryUsage(6);
    constant AUTO (line 50) | pub const AUTO: MemoryUsage = MemoryUsage(7);
    constant AUTO_PREFER_DEVICE (line 51) | pub const AUTO_PREFER_DEVICE: MemoryUsage = MemoryUsage(8);
    constant AUTO_PREFER_HOST (line 52) | pub const AUTO_PREFER_HOST: MemoryUsage = MemoryUsage(9);
    method from_raw (line 54) | pub const fn from_raw(raw: u32) -> Self {
    method as_raw (line 58) | pub const fn as_raw(self) -> u32 {
  type AllocationCreateInfo (line 65) | pub struct AllocationCreateInfo {
    method builder (line 90) | pub fn builder<'a>() -> AllocationCreateInfoBuilder<'a> {
  method default (line 76) | fn default() -> Self {
  type AllocationCreateInfoBuilder (line 99) | pub struct AllocationCreateInfoBuilder<'a> {
  type Target (line 104) | type Target = AllocationCreateInfo;
  function deref (line 105) | fn deref(&self) -> &Self::Target {
  function deref_mut (line 110) | fn deref_mut(&mut self) -> &mut Self::Target {
  function flags (line 116) | pub fn flags(mut self, flags: AllocationCreateFlags) -> Self {
  function usage (line 122) | pub fn usage(mut self, usage: MemoryUsage) -> Self {
  function required_flags (line 128) | pub fn required_flags(mut self, required_flags: vk::MemoryPropertyFlags)...
  function preferred_flags (line 134) | pub fn preferred_flags(mut self, preferred_flags: vk::MemoryPropertyFlag...
  function memory_type_bits (line 140) | pub fn memory_type_bits(mut self, memory_type_bits: u32) -> Self {
  function pool (line 146) | pub fn pool(mut self, pool: *const u8) -> Self {
  function priority (line 152) | pub fn priority(mut self, priority: f32) -> Self {
  function build (line 161) | pub fn build(self) -> AllocationCreateInfo {
  type AllocationInfo (line 168) | pub struct AllocationInfo {
  method default (line 178) | fn default() -> Self {
  type VulkanFunctions (line 192) | struct VulkanFunctions {
    method new_dynamic (line 222) | fn new_dynamic(entry: &ash::Entry, instance: &ash::Instance) -> Self {
  type AllocatorCreateInfo (line 255) | struct AllocatorCreateInfo {
  type AllocatorHandle (line 271) | struct AllocatorHandle(*const u8);
  type Allocator (line 273) | pub struct Allocator {
    method new (line 278) | pub fn new(device: &DeviceFunctions, create_flags: AllocatorCreateFlag...
    method allocate_memory (line 306) | pub unsafe fn allocate_memory(&self, memory_requirements: &vk::MemoryR...
    method allocate_memory_pages (line 317) | pub unsafe fn allocate_memory_pages(&self, memory_requirements: &[vk::...
    method free_memory (line 335) | pub unsafe fn free_memory(&self, allocation: Allocation) {
    method free_memory_pages (line 339) | pub unsafe fn free_memory_pages(&self, allocations: &[Allocation]) {
    method get_allocation_info (line 343) | pub unsafe fn get_allocation_info(&self, allocation: Allocation, info:...
    method set_allocation_name (line 347) | pub unsafe fn set_allocation_name(&self, allocation: Allocation, name:...
    method create_buffer (line 351) | pub unsafe fn create_buffer(&self, buffer_create_info: &vk::BufferCrea...
    method destroy_buffer (line 363) | pub unsafe fn destroy_buffer(&self, buffer: vk::Buffer, allocation: Al...
    method create_image (line 367) | pub unsafe fn create_image(&self, image_create_info: &vk::ImageCreateI...
    method destroy_image (line 379) | pub unsafe fn destroy_image(&self, image: vk::Image, allocation: Alloc...
  method drop (line 388) | fn drop(&mut self) {
  type Allocation (line 397) | pub struct Allocation(*const u8);
    method null (line 400) | pub const fn null() -> Self {
    method is_null (line 404) | pub fn is_null(&self) -> bool {
  method default (line 409) | fn default() -> Self {
  function vmaCreateAllocator (line 423) | pub(super) fn vmaCreateAllocator(
  function vmaDestroyAllocator (line 428) | pub(super) fn vmaDestroyAllocator(
  function vmaAllocateMemory (line 432) | pub(super) fn vmaAllocateMemory(
  function vmaAllocateMemoryPages (line 440) | pub(super) fn vmaAllocateMemoryPages(
  function vmaFreeMemory (line 449) | pub(super) fn vmaFreeMemory(
  function vmaFreeMemoryPages (line 454) | pub(super) fn vmaFreeMemoryPages(
  function vmaGetAllocationInfo (line 460) | pub(super) fn vmaGetAllocationInfo(
  function vmaSetAllocationName (line 466) | pub(super) fn vmaSetAllocationName(
  function vmaCreateBuffer (line 472) | pub(super) fn vmaCreateBuffer(
  function vmaDestroyBuffer (line 481) | pub(super) fn vmaDestroyBuffer(
  function vmaCreateImage (line 487) | pub(super) fn vmaCreateImage(
  function vmaDestroyImage (line 496) | pub(super) fn vmaDestroyImage(

FILE: core/natives/src/b4d.rs
  type Blaze4D (line 22) | pub struct Blaze4D {
    method new (line 34) | pub fn new(mut main_window: Box<dyn SurfaceProvider>, enable_validatio...
    method set_debug_mode (line 81) | pub fn set_debug_mode(&self, mode: Option<DebugPipelineMode>) {
    method create_global_mesh (line 85) | pub fn create_global_mesh(&self, data: &MeshData) -> Arc<GlobalMesh> {
    method create_global_image (line 89) | pub fn create_global_image(&self, size:Vec2u32, format: &'static Forma...
    method create_shader (line 93) | pub fn create_shader(&self, vertex_format: &VertexFormat, used_uniform...
    method drop_shader (line 97) | pub fn drop_shader(&self, id: ShaderId) {
    method try_start_frame (line 101) | pub fn try_start_frame(&self, window_size: Vec2u32) -> Option<PassReco...
  type RenderConfig (line 110) | struct RenderConfig {
    method new (line 124) | fn new(device: Arc<DeviceContext>, emulator: Arc<EmulatorRenderer>, ma...
    method set_debug_mode (line 139) | fn set_debug_mode(&mut self, mode: Option<DebugPipelineMode>) {
    method try_start_frame (line 146) | fn try_start_frame(&mut self, renderer: &EmulatorRenderer, size: Vec2u...
    method prepare_pipeline (line 188) | fn prepare_pipeline(&mut self, output_size: Vec2u32) -> (Arc<dyn Emula...
    method try_create_swapchain (line 206) | fn try_create_swapchain(&mut self, size: Vec2u32) -> bool {
  type B4DVertexFormat (line 241) | pub struct B4DVertexFormat {

FILE: core/natives/src/c_api.rs
  type NativeMetadata (line 16) | struct NativeMetadata {
  constant NATIVE_METADATA (line 21) | const NATIVE_METADATA: NativeMetadata = NativeMetadata {
  type CDebugMode (line 27) | struct CDebugMode(u32);
    constant NONE (line 30) | pub const NONE: CDebugMode = CDebugMode(0);
    constant DEPTH (line 31) | pub const DEPTH: CDebugMode = CDebugMode(1);
    constant POSITION (line 32) | pub const POSITION: CDebugMode = CDebugMode(2);
    constant COLOR (line 33) | pub const COLOR: CDebugMode = CDebugMode(3);
    constant NORMAL (line 34) | pub const NORMAL: CDebugMode = CDebugMode(4);
    constant UV0 (line 35) | pub const UV0: CDebugMode = CDebugMode(5);
    constant UV1 (line 36) | pub const UV1: CDebugMode = CDebugMode(6);
    constant UV2 (line 37) | pub const UV2: CDebugMode = CDebugMode(7);
    constant TEXTURED0 (line 38) | pub const TEXTURED0: CDebugMode = CDebugMode(8);
    constant TEXTURED1 (line 39) | pub const TEXTURED1: CDebugMode = CDebugMode(9);
    constant TEXTURED2 (line 40) | pub const TEXTURED2: CDebugMode = CDebugMode(10);
    method to_debug_pipeline_mode (line 42) | pub fn to_debug_pipeline_mode(&self) -> Option<DebugPipelineMode> {
  type CPipelineConfiguration (line 62) | struct CPipelineConfiguration {
  type CMeshData (line 77) | struct CMeshData {
    method to_mesh_data (line 89) | unsafe fn to_mesh_data(&self) -> MeshData {
  type CVertexFormat (line 112) | struct CVertexFormat {
    method to_vertex_format (line 134) | fn to_vertex_format(&self) -> VertexFormat {
  type CImageData (line 196) | struct CImageData {
    method to_image_data (line 205) | unsafe fn to_image_data(&self) -> ImageData {
  type CMcUniformData (line 231) | struct CMcUniformData {
    method to_mc_uniform_data (line 237) | unsafe fn to_mc_uniform_data(&self) -> McUniformData {
  type CSamplerInfo (line 293) | struct CSamplerInfo {
    method to_sampler_info (line 303) | fn to_sampler_info(&self) -> SamplerInfo {
  function b4d_get_native_metadata (line 317) | unsafe extern "C" fn b4d_get_native_metadata() -> *const NativeMetadata {
  function b4d_init (line 326) | unsafe extern "C" fn b4d_init(surface: *mut GLFWSurfaceProvider, enable_...
  function b4d_destroy (line 346) | unsafe extern "C" fn b4d_destroy(b4d: *mut Blaze4D) {
  function b4d_set_debug_mode (line 360) | unsafe extern "C" fn b4d_set_debug_mode(b4d: *const Blaze4D, mode: CDebu...
  function b4d_create_global_mesh (line 375) | unsafe extern "C" fn b4d_create_global_mesh(b4d: *const Blaze4D, data: *...
  function b4d_destroy_global_mesh (line 396) | unsafe extern "C" fn b4d_destroy_global_mesh(mesh: *mut Arc<GlobalMesh>) {
  function b4d_create_global_image (line 410) | unsafe extern "C" fn b4d_create_global_image(b4d: *const Blaze4D, width:...
  function b4d_update_global_image (line 428) | unsafe extern "C" fn b4d_update_global_image(image: *mut Arc<GlobalImage...
  function b4d_destroy_global_image (line 450) | unsafe extern "C" fn b4d_destroy_global_image(image: *mut Arc<GlobalImag...
  function b4d_create_shader (line 464) | unsafe extern "C" fn b4d_create_shader(b4d: *const Blaze4D, vertex_forma...
  function b4d_destroy_shader (line 486) | unsafe extern "C" fn b4d_destroy_shader(b4d: *const Blaze4D, shader_id: ...
  function b4d_start_frame (line 504) | unsafe extern "C" fn b4d_start_frame(b4d: *mut Blaze4D, window_width: u3...
  function b4d_pass_update_uniform (line 522) | unsafe extern "C" fn b4d_pass_update_uniform(pass: *mut PassRecorder, da...
  function b4d_pass_update_texture (line 544) | unsafe extern "C" fn b4d_pass_update_texture(pass: *mut PassRecorder, in...
  function b4d_pass_draw_global (line 570) | unsafe extern "C" fn b4d_pass_draw_global(pass: *mut PassRecorder, mesh:...
  function b4d_pass_upload_immediate (line 592) | unsafe extern "C" fn b4d_pass_upload_immediate(pass: *mut PassRecorder, ...
  function b4d_pass_draw_immediate (line 613) | unsafe extern "C" fn b4d_pass_draw_immediate(pass: *mut PassRecorder, id...
  function b4d_end_frame (line 631) | unsafe extern "C" fn b4d_end_frame(recorder: *mut PassRecorder) {

FILE: core/natives/src/c_log.rs
  type PfnLog (line 8) | type PfnLog = unsafe extern "C" fn(*const u8, *const u8, u32, u32, u32);
  type CLogger (line 10) | struct CLogger {
    method new (line 15) | fn new(pfn: PfnLog) -> Self {
    method log_internal (line 21) | fn log_internal(&self, target: &str, message: &str, level: Level) {
  method enabled (line 40) | fn enabled(&self, _: &Metadata) -> bool {
  method log (line 44) | fn log(&self, record: &Record) {
  method flush (line 52) | fn flush(&self) {
  function b4d_init_external_logger (line 57) | unsafe extern "C" fn b4d_init_external_logger(pfn: PfnLog) {

FILE: core/natives/src/device/device.rs
  type DeviceFunctions (line 15) | pub struct DeviceFunctions {
  method drop (line 27) | fn drop(&mut self) {
  type DeviceContext (line 34) | pub struct DeviceContext {
    method new (line 45) | pub(crate) fn new(
    method get_uuid (line 65) | pub fn get_uuid(&self) -> &NamedUUID {
    method get_entry (line 69) | pub fn get_entry(&self) -> &ash::Entry {
    method get_instance (line 73) | pub fn get_instance(&self) -> &Arc<InstanceContext> {
    method get_functions (line 77) | pub fn get_functions(&self) -> &Arc<DeviceFunctions> {
    method vk (line 81) | pub fn vk(&self) -> &ash::Device {
    method synchronization_2_khr (line 85) | pub fn synchronization_2_khr(&self) -> &ash::extensions::khr::Synchron...
    method timeline_semaphore_khr (line 89) | pub fn timeline_semaphore_khr(&self) -> &ash::extensions::khr::Timelin...
    method push_descriptor_khr (line 93) | pub fn push_descriptor_khr(&self) -> &ash::extensions::khr::PushDescri...
    method swapchain_khr (line 97) | pub fn swapchain_khr(&self) -> Option<&ash::extensions::khr::Swapchain> {
    method maintenance_4 (line 101) | pub fn maintenance_4(&self) -> Option<&ash::extensions::khr::Maintenan...
    method get_main_queue (line 105) | pub fn get_main_queue(&self) -> &Arc<Queue> {
    method get_async_compute_queue (line 109) | pub fn get_async_compute_queue(&self) -> Option<&Arc<Queue>> {
    method get_async_transfer_queue (line 113) | pub fn get_async_transfer_queue(&self) -> Option<&Arc<Queue>> {
    method get_allocator (line 117) | pub fn get_allocator(&self) -> &Arc<Allocator> {
    method get_utils (line 121) | pub fn get_utils(&self) -> &Arc<DeviceUtils> {
  method eq (line 127) | fn eq(&self, other: &Self) -> bool {
  method partial_cmp (line 136) | fn partial_cmp(&self, other: &Self) -> Option<Ordering> {
  method cmp (line 142) | fn cmp(&self, other: &Self) -> Ordering {
  type Queue (line 149) | pub struct Queue {
    method new (line 156) | pub(super) fn new(functions: Arc<DeviceFunctions>, family: u32, index:...
    method submit (line 168) | pub unsafe fn submit(&self, submits: &[vk::SubmitInfo], fence: Option<...
    method submit_2 (line 175) | pub unsafe fn submit_2(&self, submits: &[vk::SubmitInfo2], fence: Opti...
    method wait_idle (line 182) | pub unsafe fn wait_idle(&self) -> VkResult<()> {
    method bind_sparse (line 187) | pub unsafe fn bind_sparse(&self, bindings: &[vk::BindSparseInfo], fenc...
    method present (line 195) | pub unsafe fn present(&self, present_info: &vk::PresentInfoKHR) -> VkR...
    method lock_queue (line 200) | pub fn lock_queue(&self) -> MutexGuard<vk::Queue> {
    method get_queue_family_index (line 204) | pub fn get_queue_family_index(&self) -> u32 {

FILE: core/natives/src/device/device_utils.rs
  function create_shader_from_bytes (line 13) | pub fn create_shader_from_bytes(device: &DeviceFunctions, code: &[u8]) -...
  type DeviceUtils (line 22) | pub struct DeviceUtils {
    method new (line 27) | pub fn new(device: Arc<DeviceFunctions>, _: Arc<Allocator>) -> Arc<Sel...
    method blit_utils (line 35) | pub fn blit_utils(&self) -> &BlitUtils {
  type BlitUtils (line 40) | pub struct BlitUtils {
    method new (line 51) | fn new(utils: Weak<DeviceUtils>, device: Arc<DeviceFunctions>) -> Self {
    method create_blit_pass (line 69) | pub fn create_blit_pass(&self, dst_format: vk::Format, load_op: vk::At...
    method create_render_pass (line 80) | fn create_render_pass(&self, dst_format: vk::Format, load_op: vk::Atta...
    method create_pipeline (line 107) | fn create_pipeline(&self, render_pass: vk::RenderPass) -> vk::Pipeline {
    method create_sampler (line 183) | fn create_sampler(device: &DeviceFunctions) -> vk::Sampler {
    method create_descriptor_set_layout (line 200) | fn create_descriptor_set_layout(device: &DeviceFunctions, sampler: vk:...
    method create_pipeline_layout (line 215) | fn create_pipeline_layout(device: &DeviceFunctions, set_layout: vk::De...
  method drop (line 226) | fn drop(&mut self) {
  type BlitPass (line 237) | pub struct BlitPass {
    method create_descriptor_sets (line 247) | pub fn create_descriptor_sets(&self, pool: vk::DescriptorPool, image_v...
    method create_framebuffer (line 288) | pub fn create_framebuffer(&self, image_view: vk::ImageView, size: Vec2...
    method record_blit (line 306) | pub fn record_blit(&self, command_buffer: vk::CommandBuffer, descripto...
    method get_device (line 357) | pub fn get_device(&self) -> &Arc<DeviceFunctions> {
  method drop (line 363) | fn drop(&mut self) {

FILE: core/natives/src/device/init.rs
  type DeviceCreateConfig (line 16) | pub struct DeviceCreateConfig {
    method new (line 23) | pub fn new() -> Self {
    method add_surface (line 31) | pub fn add_surface(&mut self, surface: vk::SurfaceKHR) {
    method disable_robustness (line 35) | pub fn disable_robustness(&mut self) {
    method add_required_extension (line 39) | pub fn add_required_extension(&mut self, extension: &CStr) {
    method require_swapchain (line 43) | pub fn require_swapchain(&mut self) {
  type DeviceCreateError (line 49) | pub enum DeviceCreateError {
    method from (line 56) | fn from(result: vk::Result) -> Self {
  function create_device (line 61) | pub fn create_device(config: DeviceCreateConfig, instance: Arc<InstanceC...
  function filter_devices (line 160) | fn filter_devices<'a>(
  type DeviceConfigurator (line 196) | struct DeviceConfigurator<'a, 'b> {
  function new (line 209) | fn new(instance: &'a InstanceContext, vk_vp: &VulkanProfiles, config: &'...
  function get_name (line 269) | fn get_name(&self) -> &CStr {
  function get_properties (line 273) | fn get_properties(&self, mut properties: vk::PhysicalDeviceProperties2Bu...
  function get_features (line 280) | fn get_features(&self, mut features: vk::PhysicalDeviceFeatures2Builder)...
  function filter_sort_queues (line 287) | fn filter_sort_queues<F: Fn(u32, &vk::QueueFamilyProperties, bool) -> Op...
  function is_extension_supported (line 305) | fn is_extension_supported(&self, name: &CStr) -> bool {
  function add_extension (line 312) | fn add_extension(&mut self, name: &CStr) {
  function allocate (line 316) | fn allocate<T: 'b>(&self, data: T) -> &'b mut T {
  function push_next (line 320) | fn push_next<T: vk::ExtendsDeviceCreateInfo + 'b>(&mut self, data: T) {
  function build (line 328) | fn build(self) -> vk::DeviceCreateInfoBuilder<'b> {
  type DeviceConfigInfo (line 341) | struct DeviceConfigInfo {
  function configure_device (line 358) | fn configure_device(device: &mut DeviceConfigurator) -> Result<Option<De...

FILE: core/natives/src/device/surface.rs
  type DeviceSurface (line 16) | pub struct DeviceSurface {
    method new (line 31) | pub fn new(device: Arc<DeviceFunctions>, surface: Box<dyn SurfaceProvi...
    method get_surface_present_modes (line 41) | pub fn get_surface_present_modes(&self) -> VkResult<Vec<vk::PresentMod...
    method get_surface_capabilities (line 47) | pub fn get_surface_capabilities(&self) -> VkResult<vk::SurfaceCapabili...
    method get_surface_formats (line 53) | pub fn get_surface_formats(&self) -> VkResult<Vec<vk::SurfaceFormatKHR...
    method create_swapchain (line 70) | pub fn create_swapchain(&self, config: &SwapchainConfig, extent: Vec2u...
    method create_swapchain_direct (line 95) | pub fn create_swapchain_direct(&self, info: &mut vk::SwapchainCreateIn...
    method find_best_image_count (line 140) | fn find_best_image_count(&self, capabilities: &vk::SurfaceCapabilities...
    method find_best_format (line 149) | fn find_best_format(&self, config: &SwapchainConfig) -> Result<vk::Sur...
    method validate_extent (line 160) | fn validate_extent(&self, capabilities: &vk::SurfaceCapabilitiesKHR, e...
    method find_best_usage_flags (line 175) | fn find_best_usage_flags(&self, capabilities: &vk::SurfaceCapabilities...
    method find_best_present_mode (line 184) | fn find_best_present_mode(&self, config: &SwapchainConfig) -> Result<v...
    method find_best_transform (line 198) | fn find_best_transform(&self, capabilities: &vk::SurfaceCapabilitiesKH...
    method find_best_composite_alpha (line 221) | fn find_best_composite_alpha(&self, capabilities: &vk::SurfaceCapabili...
    method lock_current_swapchain (line 244) | fn lock_current_swapchain(&self) -> (MutexGuard<SurfaceSwapchainInfo>,...
  type SurfaceSwapchainInfo (line 258) | struct SurfaceSwapchainInfo {
    method new (line 263) | fn new() -> Self {
    method try_upgrade (line 269) | fn try_upgrade(&self) -> Result<Option<Arc<SurfaceSwapchain>>, ()> {
    method is_current (line 281) | fn is_current(&self, set_id: UUID) -> bool {
    method set_current (line 289) | fn set_current(&mut self, swapchain: &Arc<SurfaceSwapchain>) {
    method clear_current (line 293) | fn clear_current(&mut self) {
  type SwapchainConfig (line 298) | pub struct SwapchainConfig {
  type SwapchainCreateError (line 307) | pub enum SwapchainCreateError {
    method from (line 314) | fn from(result: vk::Result) -> Self {
  type SurfaceSwapchain (line 327) | pub struct SurfaceSwapchain {
    method new (line 341) | fn new(surface: Arc<DeviceSurface>, swapchain: vk::SwapchainKHR, image...
    method get_surface (line 365) | pub fn get_surface(&self) -> &Arc<DeviceSurface> {
    method get_swapchain (line 372) | pub fn get_swapchain(&self) -> &Mutex<vk::SwapchainKHR> {
    method get_images (line 377) | pub fn get_images(&self) -> &[ImageObjects] {
    method get_image_size (line 382) | pub fn get_image_size(&self) -> Vec2u32 {
    method get_image_format (line 387) | pub fn get_image_format(&self) -> &vk::SurfaceFormatKHR {
    method get_image_usage (line 392) | pub fn get_image_usage(&self) -> vk::ImageUsageFlags {
    method acquire_next_image (line 396) | pub fn acquire_next_image(&self, timeout: u64, fence: Option<vk::Fence...
    method get_device (line 420) | pub fn get_device(&self) -> &Arc<DeviceFunctions> {
    method get_next_acquire (line 424) | fn get_next_acquire(&self) -> usize {
  method fmt (line 436) | fn fmt(&self, _: &mut Formatter<'_>) -> std::fmt::Result {
  method drop (line 442) | fn drop(&mut self) {
  type AcquireObjects (line 467) | struct AcquireObjects {
    method new (line 474) | fn new(device: &DeviceFunctions) -> Self {
    method wait_and_get (line 499) | fn wait_and_get(&self, device: &DeviceFunctions, timeout: u64) -> Opti...
    method destroy (line 526) | fn destroy(&mut self, device: &DeviceFunctions) {
  type ImageObjects (line 534) | pub struct ImageObjects {
    method new (line 541) | fn new(device: &DeviceFunctions, image: Image, format: vk::Format) -> ...
    method get_image (line 577) | pub fn get_image(&self) -> Image {
    method get_framebuffer_view (line 581) | pub fn get_framebuffer_view(&self) -> vk::ImageView {
    method get_present_semaphore (line 585) | pub fn get_present_semaphore(&self) -> Semaphore {
    method destroy (line 589) | fn destroy(&mut self, device: &DeviceFunctions) {
  type AcquiredImageInfo (line 597) | pub struct AcquiredImageInfo {

FILE: core/natives/src/glfw_surface.rs
  type PFN_glfwInitVulkanLoader (line 9) | pub type PFN_glfwInitVulkanLoader = unsafe extern "C" fn(vk::PFN_vkGetIn...
  type PFN_glfwGetRequiredInstanceExtensions (line 12) | pub type PFN_glfwGetRequiredInstanceExtensions = unsafe extern "C" fn(*m...
  type PFN_glfwCreateWindowSurface (line 15) | pub type PFN_glfwCreateWindowSurface = unsafe extern "C" fn(vk::Instance...
  type GLFWSurfaceProvider (line 17) | pub struct GLFWSurfaceProvider {
    method new (line 25) | pub fn new(
  method get_required_instance_extensions (line 52) | fn get_required_instance_extensions(&self) -> Vec<CString> {
  method init (line 56) | fn init(&mut self, entry: &ash::Entry, instance: &ash::Instance) -> Resu...
  method get_handle (line 66) | fn get_handle(&self) -> Option<vk::SurfaceKHR> {
  method drop (line 78) | fn drop(&mut self) {
  function b4d_pre_init_glfw (line 86) | unsafe extern "C" fn b4d_pre_init_glfw(func: PFN_glfwInitVulkanLoader) {
  function b4d_create_glfw_surface_provider (line 97) | unsafe extern "C" fn b4d_create_glfw_surface_provider(

FILE: core/natives/src/instance/debug_messenger.rs
  type DebugMessengerCallback (line 6) | pub trait DebugMessengerCallback: Send + Sync + UnwindSafe + RefUnwindSa...
    method on_message (line 7) | fn on_message(
    method on_message (line 28) | fn on_message(&self, message_severity: vk::DebugUtilsMessageSeverityFl...
  type RustLogDebugMessenger (line 17) | pub struct RustLogDebugMessenger {
    method new (line 21) | pub fn new() -> Self {

FILE: core/natives/src/instance/init.rs
  type InstanceCreateConfig (line 18) | pub struct InstanceCreateConfig {
    method new (line 28) | pub fn new(application_name: CString, application_version: u32) -> Self {
    method add_debug_messenger (line 39) | pub fn add_debug_messenger(&mut self, messenger: Box<dyn DebugMessenge...
    method enable_validation (line 43) | pub fn enable_validation(&mut self) {
    method add_required_extension (line 47) | pub fn add_required_extension(&mut self, extension: &CStr) {
    method require_surface_khr (line 51) | pub fn require_surface_khr(&mut self) {
  type InstanceCreateError (line 57) | pub enum InstanceCreateError {
    method from (line 65) | fn from(result: vk::Result) -> Self {
    method from (line 71) | fn from(err: Utf8Error) -> Self {
  function create_instance (line 76) | pub fn create_instance(config: InstanceCreateConfig) -> Result<Arc<Insta...
  type DebugUtilsMessengerWrapper (line 179) | pub struct DebugUtilsMessengerWrapper {
  method fmt (line 184) | fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result {
  function debug_utils_messenger_callback_wrapper (line 189) | extern "system" fn debug_utils_messenger_callback_wrapper(
  function basic_init (line 221) | fn basic_init() {

FILE: core/natives/src/instance/instance.rs
  type VulkanVersion (line 15) | pub struct VulkanVersion(u32);
    constant VK_1_0 (line 18) | pub const VK_1_0: VulkanVersion = VulkanVersion(vk::API_VERSION_1_0);
    constant VK_1_1 (line 19) | pub const VK_1_1: VulkanVersion = VulkanVersion(vk::API_VERSION_1_1);
    constant VK_1_2 (line 20) | pub const VK_1_2: VulkanVersion = VulkanVersion(vk::API_VERSION_1_2);
    constant VK_1_3 (line 21) | pub const VK_1_3: VulkanVersion = VulkanVersion(vk::API_VERSION_1_3);
    method from_raw (line 23) | pub const fn from_raw(value: u32) -> Self {
    method new (line 27) | pub fn new(variant: u32, major: u32, minor: u32, patch: u32) -> Self {
    method get_major (line 31) | pub const fn get_major(&self) -> u32 {
    method get_minor (line 35) | pub const fn get_minor(&self) -> u32 {
    method get_patch (line 39) | pub const fn get_patch(&self) -> u32 {
    method get_raw (line 43) | pub const fn get_raw(&self) -> u32 {
  function from (line 49) | fn from(version: VulkanVersion) -> Self {
  method fmt (line 55) | fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result {
  type InstanceContext (line 63) | pub struct InstanceContext {
    method new (line 74) | pub fn new(
    method get_uuid (line 93) | pub fn get_uuid(&self) -> &NamedUUID {
    method get_entry (line 97) | pub fn get_entry(&self) -> &ash::Entry {
    method vk (line 101) | pub fn vk(&self) -> &ash::Instance {
    method surface_khr (line 105) | pub fn surface_khr(&self) -> Option<&ash::extensions::khr::Surface> {
    method get_version (line 109) | pub fn get_version(&self) -> VulkanVersion {
    method get_profile (line 113) | pub fn get_profile(&self) -> &vp::ProfileProperties {
  method drop (line 119) | fn drop(&mut self) {
  method eq (line 127) | fn eq(&self, other: &Self) -> bool {
  method partial_cmp (line 136) | fn partial_cmp(&self, other: &Self) -> Option<Ordering> {
  method cmp (line 142) | fn cmp(&self, other: &Self) -> Ordering {
  method fmt (line 148) | fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result {

FILE: core/natives/src/lib.rs
  type BuildInfo (line 21) | pub struct BuildInfo {
  method fmt (line 29) | fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result {
  method fmt (line 35) | fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result {
  constant CRATE_NAME (line 44) | pub const CRATE_NAME: &'static str = "Blaze4D-Core";
  constant BUILD_INFO (line 45) | pub const BUILD_INFO: BuildInfo = BuildInfo {
  type Vec2f32 (line 61) | pub type Vec2f32 = nalgebra::Vector2<f32>;
  type Vec3f32 (line 62) | pub type Vec3f32 = nalgebra::Vector3<f32>;
  type Vec4f32 (line 63) | pub type Vec4f32 = nalgebra::Vector4<f32>;
  type Vec2u32 (line 65) | pub type Vec2u32 = nalgebra::Vector2<u32>;
  type Vec3u32 (line 66) | pub type Vec3u32 = nalgebra::Vector3<u32>;
  type Vec4u32 (line 67) | pub type Vec4u32 = nalgebra::Vector4<u32>;
  type Vec2i32 (line 69) | pub type Vec2i32 = nalgebra::Vector2<i32>;
  type Vec3i32 (line 70) | pub type Vec3i32 = nalgebra::Vector3<i32>;
  type Vec4i32 (line 71) | pub type Vec4i32 = nalgebra::Vector4<i32>;
  type Mat2f32 (line 73) | pub type Mat2f32 = nalgebra::Matrix2<f32>;
  type Mat3f32 (line 74) | pub type Mat3f32 = nalgebra::Matrix3<f32>;
  type Mat4f32 (line 75) | pub type Mat4f32 = nalgebra::Matrix4<f32>;

FILE: core/natives/src/objects/id.rs
  type ObjectId (line 10) | pub trait ObjectId: Copy + Clone + PartialEq + Eq + PartialOrd + Ord + H...
    method from_raw (line 13) | fn from_raw(id: UUID) -> Self;
    method as_uuid (line 15) | fn as_uuid(&self) -> UUID;

FILE: core/natives/src/objects/object_set.rs
  type ObjectSetProvider (line 12) | pub trait ObjectSetProvider: Debug {
    method get_id (line 13) | fn get_id(&self) -> UUID;
    method get_handle (line 15) | fn get_handle(&self, id: UUID) -> Option<u64>;
    method get (line 17) | fn get<ID: ObjectId>(&self, id: ID) -> Option<ID::HandleType> where Se...
    method get_id (line 36) | fn get_id(&self) -> UUID {
    method get_handle (line 40) | fn get_handle(&self, id: UUID) -> Option<u64> {
  type ObjectSet (line 23) | pub struct ObjectSet(Arc<dyn ObjectSetProvider + Send + Sync>);
    method new (line 26) | pub fn new(provider: Arc<dyn ObjectSetProvider + Send + Sync>) -> Self {
    method get_provider (line 30) | pub fn get_provider(&self) -> &Arc<dyn ObjectSetProvider + Send + Sync> {
  method eq (line 46) | fn eq(&self, other: &Self) -> bool {
  method partial_cmp (line 55) | fn partial_cmp(&self, other: &Self) -> Option<Ordering> {
  method cmp (line 61) | fn cmp(&self, other: &Self) -> Ordering {
  method hash (line 67) | fn hash<H: Hasher>(&self, state: &mut H) {
  method fmt (line 73) | fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result {

FILE: core/natives/src/objects/sync.rs
  type Semaphore (line 9) | pub struct Semaphore {
    method new (line 15) | pub fn new(handle: vk::Semaphore) -> Self {
    method get_id (line 22) | pub fn get_id(&self) -> SemaphoreId {
    method get_handle (line 26) | pub fn get_handle(&self) -> vk::Semaphore {
  method eq (line 32) | fn eq(&self, other: &Self) -> bool {
  method partial_cmp (line 41) | fn partial_cmp(&self, other: &Self) -> Option<Ordering> {
  method cmp (line 47) | fn cmp(&self, other: &Self) -> Ordering {
  method hash (line 53) | fn hash<H: Hasher>(&self, state: &mut H) {
  method fmt (line 59) | fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result {
  type SemaphoreOp (line 65) | pub struct SemaphoreOp {
    method new_binary (line 71) | pub fn new_binary(semaphore: Semaphore) -> Self {
    method new_timeline (line 78) | pub fn new_timeline(semaphore: Semaphore, value: u64) -> Self {
  type SemaphoreOps (line 87) | pub enum SemaphoreOps {
    method single_binary (line 94) | pub fn single_binary(semaphore: Semaphore) -> Self {
    method single_timeline (line 98) | pub fn single_timeline(semaphore: Semaphore, value: u64) -> Self {
    method from_option (line 102) | pub fn from_option(op: Option<SemaphoreOp>) -> Self {
    method as_slice (line 109) | pub fn as_slice(&self) -> &[SemaphoreOp] {

FILE: core/natives/src/renderer/emulator/debug_pipeline.rs
  type DepthTypeInfo (line 22) | pub struct DepthTypeInfo {
  type ObjectCreateError (line 32) | pub enum ObjectCreateError {
    method from (line 38) | fn from(result: vk::Result) -> Self {
  type DebugPipelineMode (line 44) | pub enum DebugPipelineMode {
  type DebugPipeline (line 68) | pub struct DebugPipeline {
    method new (line 88) | pub fn new(emulator: Arc<EmulatorRenderer>, mode: DebugPipelineMode, f...
    method next_index (line 201) | fn next_index(&self) -> usize {
    method get_pipeline (line 213) | fn get_pipeline(&self, shader: ShaderId, config: &PipelineConfig) -> v...
    method create_pipeline (line 223) | fn create_pipeline(&self, config: &PipelineConfig, vertex_format: &Ver...
    method create_render_pass (line 296) | fn create_render_pass(device: &DeviceContext, depth_format: vk::Format...
    method create_descriptor_pool (line 395) | fn create_descriptor_pool(device: &DeviceContext, concurrent_passes: u...
  method start_pass (line 421) | fn start_pass(&self) -> Box<dyn EmulatorPipelinePass + Send> {
  method get_output (line 428) | fn get_output(&self) -> (Vec2u32, &[vk::ImageView]) {
  method inc_shader_used (line 432) | fn inc_shader_used(&self, shader: ShaderId) {
  method dec_shader_used (line 453) | fn dec_shader_used(&self, shader: ShaderId) {
  method on_shader_drop (line 468) | fn on_shader_drop(&self, id: ShaderId) {
  method drop (line 482) | fn drop(&mut self) {
  type ShaderModules (line 501) | struct ShaderModules {
    method new (line 510) | fn new(device: &DeviceContext, mode: DebugPipelineMode) -> Result<Self...
    method configure_pipeline (line 558) | fn configure_pipeline<'s, 'a: 's>(&'s self, vertex_format: &VertexForm...
    method process_vertex_format (line 652) | fn process_vertex_format<'a>(&self, vertex_format: &'a VertexFormat) -...
    method destroy (line 667) | fn destroy(&mut self, device: &DeviceContext) {
  type DrawPipeline (line 679) | struct DrawPipeline {
    method new (line 685) | fn new(device: &DeviceContext) -> Result<Self, ObjectCreateError> {
    method destroy (line 742) | fn destroy(&mut self, device: &DeviceContext) {
  type BackgroundPipeline (line 750) | struct BackgroundPipeline {
    method new (line 757) | fn new(device: &DeviceContext, render_pass: vk::RenderPass, subpass: u...
    method destroy (line 804) | fn destroy(&mut self, device: &DeviceContext) {
    method create_pipeline (line 812) | fn create_pipeline(device: &DeviceContext, layout: vk::PipelineLayout,...
  type PassObjects (line 928) | struct PassObjects {
    method new (line 948) | fn new(device: &DeviceContext, framebuffer_size: Vec2u32, depth_format...
    method wait_and_take (line 1034) | fn wait_and_take(&self) {
    method destroy (line 1048) | fn destroy(&mut self, device: &DeviceContext) {
    method create_image (line 1078) | fn create_image(device: &DeviceContext, size: Vec2u32, format: vk::For...
    method create_image_view (line 1100) | fn create_image_view(device: &DeviceContext, image: vk::Image, format:...
    method create_framebuffer (line 1141) | fn create_framebuffer(device: &DeviceContext, size: Vec2u32, depth_vie...
  type PipelineConfig (line 1165) | struct PipelineConfig {
  type ShaderPipelines (line 1171) | struct ShaderPipelines {
    method new (line 1183) | fn new(device: Arc<DeviceContext>, vertex_format: VertexFormat, used_u...
    method get_or_create_pipeline (line 1195) | fn get_or_create_pipeline<T: FnOnce(&VertexFormat) -> vk::Pipeline>(&m...
    method inc_used (line 1205) | fn inc_used(&mut self) {
    method dec_used (line 1209) | fn dec_used(&mut self) {
    method mark (line 1213) | fn mark(&mut self) {
    method can_drop (line 1217) | fn can_drop(&self) -> bool {
  method drop (line 1223) | fn drop(&mut self) {
  type DebugPipelinePass (line 1232) | struct DebugPipelinePass {
    method new (line 1247) | fn new(parent: Arc<DebugPipeline>, index: usize) -> Self {
    method update_uniform (line 1263) | fn update_uniform(&mut self, shader: ShaderId, data: &McUniformData) {
    method update_texture (line 1272) | fn update_texture(&mut self, shader: ShaderId, index: u32, view: vk::I...
    method draw (line 1281) | fn draw(&mut self, task: &DrawTask, obj: &mut PooledObjectProvider) {
  method init (line 1417) | fn init(&mut self, _: &Queue, obj: &mut PooledObjectProvider, placeholde...
  method process_task (line 1455) | fn process_task(&mut self, task: &PipelineTask, obj: &mut PooledObjectPr...
  method record (line 1469) | fn record<'a>(&mut self, _: &mut PooledObjectProvider, submits: &mut Sub...
  method get_output_index (line 1541) | fn get_output_index(&self) -> usize {
  method get_internal_fences (line 1545) | fn get_internal_fences(&self, _: &mut Vec<vk::Fence>) {
  method drop (line 1551) | fn drop(&mut self) {
  type UniformStateTracker (line 1556) | struct UniformStateTracker {
    method new (line 1567) | fn new(used_uniforms: McUniform, initial_texture: vk::ImageView, initi...
    method update_uniform (line 1592) | fn update_uniform(&mut self, data: &McUniformData) {
    method update_texture (line 1657) | fn update_texture(&mut self, index: u32, view: vk::ImageView, sampler:...
    method validate_push_constants (line 1675) | fn validate_push_constants(&mut self) -> Option<&PushConstants> {
    method validate_static_uniforms (line 1684) | fn validate_static_uniforms(&mut self) -> Option<&StaticUniforms> {
    method validate_textures (line 1693) | fn validate_textures(&mut self) -> Option<&[(vk::ImageView, vk::Sample...
  type PushConstants (line 1705) | struct PushConstants {
  type StaticUniforms (line 1722) | struct StaticUniforms {
  function try_create_shader_module (line 1750) | fn try_create_shader_module(device: &DeviceContext, data: &[u8], name: &...
  constant SHADER_ENTRY (line 1759) | const SHADER_ENTRY: &'static CStr = unsafe { CStr::from_bytes_with_nul_u...

FILE: core/natives/src/renderer/emulator/descriptors.rs
  type DescriptorPool (line 9) | pub(super) struct DescriptorPool {
    method new (line 15) | pub(super) fn new(device: Arc<DeviceContext>) -> Self {
    method allocate_uniform (line 23) | pub(super) fn allocate_uniform(&mut self, data: &[u8]) -> (vk::Buffer,...
  method drop (line 29) | fn drop(&mut self) {
  type UniformBufferPool (line 34) | struct UniformBufferPool {
    method new (line 43) | fn new(device: &DeviceContext) -> Self {
    method allocate_write (line 63) | fn allocate_write(&mut self, data: &[u8]) -> (vk::Buffer, vk::DeviceSi...
    method destroy (line 90) | fn destroy(&mut self, device: &DeviceContext) {

FILE: core/natives/src/renderer/emulator/global_objects.rs
  type GlobalObjectCreateError (line 22) | pub enum GlobalObjectCreateError {
    method from (line 28) | fn from(err: vk::Result) -> Self {
  type GlobalMesh (line 33) | pub struct GlobalMesh {
    method new (line 47) | pub(super) fn new(share: Arc<Share>, data: &MeshData) -> Result<Arc<Se...
    method update_used_in (line 102) | pub(super) fn update_used_in(&self, pass: PassId) {
    method get_buffer_handle (line 115) | pub(super) fn get_buffer_handle(&self) -> vk::Buffer {
    method get_draw_info (line 119) | pub(super) fn get_draw_info(&self) -> &GlobalMeshDrawInfo {
    method create_buffer (line 123) | fn create_buffer(device: &DeviceContext, size: vk::DeviceSize) -> Resu...
  method eq (line 136) | fn eq(&self, other: &Self) -> bool {
  method partial_cmp (line 145) | fn partial_cmp(&self, other: &Self) -> Option<Ordering> {
  method cmp (line 151) | fn cmp(&self, other: &Self) -> Ordering {
  method hash (line 157) | fn hash<H: Hasher>(&self, state: &mut H) {
  method drop (line 163) | fn drop(&mut self) {
  type GlobalMeshDrawInfo (line 170) | pub(super) struct GlobalMeshDrawInfo {
  type ImageData (line 178) | pub struct ImageData<'a> {
  function new_full (line 193) | pub fn new_full(data: &'a [u8], size: Vec2u32) -> Self {
  function new_full_with_stride (line 202) | pub fn new_full_with_stride(data: &'a [u8], row_stride: u32, size: Vec2u...
  function new_extent (line 211) | pub fn new_extent(data: &'a [u8], offset: Vec2u32, extent: Vec2u32) -> S...
  function new_extent_with_stride (line 220) | pub fn new_extent_with_stride(data: &'a [u8], row_stride: u32, offset: V...
  type GlobalImage (line 232) | pub struct GlobalImage {
    method new (line 249) | pub(super) fn new(share: Arc<Share>, size: Vec2u32, mip_levels: u32, f...
    method update_used_in (line 277) | pub(super) fn update_used_in(&self, pass: PassId) {
    method get_id (line 290) | pub fn get_id(&self) -> GlobalImageId {
    method get_size (line 294) | pub fn get_size(&self) -> Vec2u32 {
    method update_regions (line 298) | pub fn update_regions(&self, regions: &[ImageData]) {
    method get_image_handle (line 346) | pub(super) fn get_image_handle(&self) -> vk::Image {
    method get_mip_levels (line 350) | pub(super) fn get_mip_levels(&self) -> u32 {
    method get_sampler_view (line 354) | pub(super) fn get_sampler_view(&self) -> vk::ImageView {
    method get_sampler (line 358) | pub(super) fn get_sampler(&self, sampler_info: &SamplerInfo) -> vk::Sa...
    method create_image (line 390) | fn create_image(device: &DeviceContext, format: vk::Format, size: Vec2...
  method eq (line 445) | fn eq(&self, other: &Self) -> bool {
  method partial_cmp (line 454) | fn partial_cmp(&self, other: &Self) -> Option<Ordering> {
  method cmp (line 460) | fn cmp(&self, other: &Self) -> Ordering {
  method hash (line 466) | fn hash<H: Hasher>(&self, state: &mut H) {
  method drop (line 472) | fn drop(&mut self) {
  type SamplerInfo (line 482) | pub struct SamplerInfo {

FILE: core/natives/src/renderer/emulator/immediate.rs
  type ImmediatePool (line 13) | pub(super) struct ImmediatePool {
    method new (line 19) | pub(super) fn new(device: Arc<DeviceContext>) -> Self {
    method get_next_buffer (line 31) | pub(super) fn get_next_buffer(&self) -> Box<ImmediateBuffer> {
    method return_buffer (line 53) | pub(super) fn return_buffer(&self, mut buffer: Box<ImmediateBuffer>) {
  type ImmediateBuffer (line 68) | pub(super) struct ImmediateBuffer {
    constant MIN_BUFFER_SIZE (line 75) | const MIN_BUFFER_SIZE: vk::DeviceSize = 2u64.pow(24);
    constant OVER_ALLOCATION (line 76) | const OVER_ALLOCATION: u8 = 77;
    method new (line 78) | fn new(device: Arc<DeviceContext>) -> Self {
    method generate_copy_commands (line 88) | pub(super) fn generate_copy_commands(&self, cmd: vk::CommandBuffer) {
    method reset (line 95) | pub(super) fn reset(&mut self) {
    method allocate (line 100) | pub(super) fn allocate(&mut self, data: &[u8], alignment: vk::DeviceSi...
    method get_current_usage (line 116) | fn get_current_usage(&self) -> vk::DeviceSize {
  type Buffer (line 126) | struct Buffer {
    method new (line 139) | fn new(device: Arc<DeviceContext>, size: vk::DeviceSize) -> Self {
    method generate_copy_commands (line 162) | fn generate_copy_commands(&self, cmd: vk::CommandBuffer) {
    method reset (line 181) | fn reset(&mut self) {
    method allocate (line 185) | fn allocate(&mut self, bytes: &[u8], alignment: vk::DeviceSize) -> Opt...
    method get_current_used_bytes (line 202) | fn get_current_used_bytes(&self) -> vk::DeviceSize {
    method create_main_buffer (line 206) | fn create_main_buffer(device: &DeviceContext, size: vk::DeviceSize) ->...
    method create_staging_buffer (line 222) | fn create_staging_buffer(device: &DeviceContext, size: vk::DeviceSize)...
  method drop (line 246) | fn drop(&mut self) {

FILE: core/natives/src/renderer/emulator/mc_shaders.rs
  type ShaderDropListener (line 14) | pub trait ShaderDropListener {
    method on_shader_drop (line 15) | fn on_shader_drop(&self, id: ShaderId);
  type Shader (line 18) | pub struct Shader {
    method new (line 27) | pub fn new(vertex_format: VertexFormat, used_uniforms: McUniform) -> A...
    method get_id (line 39) | pub fn get_id(&self) -> ShaderId {
    method get_vertex_format (line 43) | pub fn get_vertex_format(&self) -> &VertexFormat {
    method get_used_uniforms (line 47) | pub fn get_used_uniforms(&self) -> McUniform {
    method register_drop_listener (line 55) | pub fn register_drop_listener(&self, listener: &Arc<dyn ShaderDropList...
    method remove_listener (line 68) | fn remove_listener(&self, id: UUID) {
  type ShaderListener (line 74) | pub struct ShaderListener {
  method drop (line 80) | fn drop(&mut self) {
  type McUniform (line 88) | pub struct McUniform(u64);
    method empty (line 92) | pub const fn empty() -> Self {
    method from_raw (line 97) | pub const fn from_raw(raw: u64) -> Self {
    method as_raw (line 102) | pub const fn as_raw(&self) -> u64 {
    method is_empty (line 107) | pub const fn is_empty(&self) -> bool {
    method intersects (line 112) | pub const fn intersects(&self, other: &Self) -> bool {
    method contains (line 117) | pub const fn contains(&self, other: &Self) -> bool {
    constant MODEL_VIEW_MATRIX (line 121) | pub const MODEL_VIEW_MATRIX: Self = Self::from_raw(1u64);
    constant PROJECTION_MATRIX (line 122) | pub const PROJECTION_MATRIX: Self = Self::from_raw(1u64 << 1);
    constant INVERSE_VIEW_ROTATION_MATRIX (line 123) | pub const INVERSE_VIEW_ROTATION_MATRIX: Self = Self::from_raw(1u64 << 2);
    constant TEXTURE_MATRIX (line 124) | pub const TEXTURE_MATRIX: Self = Self::from_raw(1u64 << 3);
    constant SCREEN_SIZE (line 125) | pub const SCREEN_SIZE: Self = Self::from_raw(1u64 << 4);
    constant COLOR_MODULATOR (line 126) | pub const COLOR_MODULATOR: Self = Self::from_raw(1u64 << 5);
    constant LIGHT0_DIRECTION (line 127) | pub const LIGHT0_DIRECTION: Self = Self::from_raw(1u64 << 6);
    constant LIGHT1_DIRECTION (line 128) | pub const LIGHT1_DIRECTION: Self = Self::from_raw(1u64 << 7);
    constant FOG_START (line 129) | pub const FOG_START: Self = Self::from_raw(1u64 << 8);
    constant FOG_END (line 130) | pub const FOG_END: Self = Self::from_raw(1u64 << 9);
    constant FOG_COLOR (line 131) | pub const FOG_COLOR: Self = Self::from_raw(1u64 << 10);
    constant FOG_SHAPE (line 132) | pub const FOG_SHAPE: Self = Self::from_raw(1u64 << 11);
    constant LINE_WIDTH (line 133) | pub const LINE_WIDTH: Self = Self::from_raw(1u64 << 12);
    constant GAME_TIME (line 134) | pub const GAME_TIME: Self = Self::from_raw(1u64 << 13);
    constant CHUNK_OFFSET (line 135) | pub const CHUNK_OFFSET: Self = Self::from_raw(1u64 << 14);
  type Output (line 139) | type Output = McUniform;
  method bitor (line 142) | fn bitor(self, rhs: Self) -> Self::Output {
  method bitor_assign (line 149) | fn bitor_assign(&mut self, rhs: Self) {
  type Output (line 155) | type Output = McUniform;
  method bitand (line 158) | fn bitand(self, rhs: Self) -> Self::Output {
  method bitand_assign (line 165) | fn bitand_assign(&mut self, rhs: Self) {
  type Output (line 171) | type Output = McUniform;
  method bitxor (line 174) | fn bitxor(self, rhs: Self) -> Self::Output {
  method bitxor_assign (line 181) | fn bitxor_assign(&mut self, rhs: Self) {
  type Output (line 187) | type Output = McUniform;
  method not (line 190) | fn not(self) -> Self::Output {
  type McUniformData (line 196) | pub enum McUniformData {
  type DevUniform (line 216) | pub struct DevUniform {
  type VertexFormatEntry (line 232) | pub struct VertexFormatEntry {
  type VertexFormat (line 238) | pub struct VertexFormat {

FILE: core/natives/src/renderer/emulator/mod.rs
  type EmulatorRenderer (line 48) | pub struct EmulatorRenderer {
    method new (line 56) | pub(crate) fn new(device: Arc<DeviceContext>) -> Self {
    method get_device (line 87) | pub fn get_device(&self) -> &Arc<DeviceContext> {
    method create_global_mesh (line 91) | pub fn create_global_mesh(&self, data: &MeshData) -> Arc<GlobalMesh> {
    method create_global_image (line 95) | pub fn create_global_image(&self, size: Vec2u32, format: &'static Form...
    method create_global_image_mips (line 99) | pub fn create_global_image_mips(&self, size: Vec2u32, mip_levels: u32,...
    method create_shader (line 103) | pub fn create_shader(&self, vertex_format: &VertexFormat, used_uniform...
    method drop_shader (line 107) | pub fn drop_shader(&self, id: ShaderId) {
    method get_shader (line 111) | pub fn get_shader(&self, id: ShaderId) -> Option<Arc<Shader>> {
    method start_pass (line 115) | pub fn start_pass(&self, pipeline: Arc<dyn EmulatorPipeline>) -> PassR...
    method create_placeholder_image (line 119) | fn create_placeholder_image(share: Arc<Share>) -> Arc<GlobalImage> {
  method eq (line 147) | fn eq(&self, other: &Self) -> bool {
  type MeshData (line 158) | pub struct MeshData<'a> {
  function get_index_size (line 168) | pub fn get_index_size(&self) -> u32 {
  method fmt (line 182) | fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result {

FILE: core/natives/src/renderer/emulator/pass.rs
  type PassId (line 16) | pub struct PassId(u64);
    method from_raw (line 19) | pub fn from_raw(id: u64) -> Self {
    method get_raw (line 23) | pub fn get_raw(&self) -> u64 {
  type ImmediateMeshId (line 29) | pub struct ImmediateMeshId(u32);
    method form_raw (line 32) | pub fn form_raw(id: u32) -> Self {
    method get_raw (line 36) | pub fn get_raw(&self) -> u32 {
  type PassRecorder (line 41) | pub struct PassRecorder {
    method new (line 56) | pub(super) fn new(share: Arc<Share>, pipeline: Arc<dyn EmulatorPipelin...
    method use_output (line 82) | pub fn use_output(&mut self, output: Box<dyn EmulatorOutput + Send>) {
    method update_uniform (line 86) | pub fn update_uniform(&mut self, data: &McUniformData, shader: ShaderI...
    method update_texture (line 91) | pub fn update_texture(&mut self, index: u32, image: &Arc<GlobalImage>,...
    method upload_immediate (line 103) | pub fn upload_immediate(&mut self, data: &MeshData) -> ImmediateMeshId {
    method draw_immediate (line 124) | pub fn draw_immediate(&mut self, id: ImmediateMeshId, shader: ShaderId...
    method draw_global (line 143) | pub fn draw_global(&mut self, mesh: Arc<GlobalMesh>, shader: ShaderId,...
    method use_shader (line 166) | fn use_shader(&mut self, shader: ShaderId) {
  method drop (line 175) | fn drop(&mut self) {
  type ImmediateMeshInfo (line 181) | struct ImmediateMeshInfo {

FILE: core/natives/src/renderer/emulator/pipeline.rs
  type EmulatorPipeline (line 23) | pub trait EmulatorPipeline: Send + Sync + UnwindSafe + RefUnwindSafe {
    method start_pass (line 31) | fn start_pass(&self) -> Box<dyn EmulatorPipelinePass + Send>;
    method get_output (line 37) | fn get_output(&self) -> (Vec2u32, &[vk::ImageView]);
    method inc_shader_used (line 47) | fn inc_shader_used(&self, shader: ShaderId);
    method dec_shader_used (line 53) | fn dec_shader_used(&self, shader: ShaderId);
  type EmulatorPipelinePass (line 66) | pub trait EmulatorPipelinePass {
    method init (line 77) | fn init(&mut self, queue: &Queue, obj: &mut PooledObjectProvider, plac...
    method process_task (line 82) | fn process_task(&mut self, task: &PipelineTask, obj: &mut PooledObject...
    method record (line 88) | fn record<'a>(&mut self, obj: &mut PooledObjectProvider, submits: &mut...
    method get_output_index (line 94) | fn get_output_index(&self) -> usize;
    method get_internal_fences (line 106) | fn get_internal_fences(&self, fences: &mut Vec<vk::Fence>);
  type PipelineTask (line 110) | pub enum PipelineTask {
  type DrawTask (line 117) | pub struct DrawTask {
  type EmulatorOutput (line 136) | pub trait EmulatorOutput {
    method init (line 138) | fn init(&mut self, pass: &dyn EmulatorPipelinePass, obj: &mut PooledOb...
    method record (line 142) | fn record<'a>(&mut self, obj: &mut PooledObjectProvider, submits: &mut...
    method on_post_submit (line 146) | fn on_post_submit(&mut self, queue: &Queue);
    method init (line 298) | fn init(&mut self, pass: &dyn EmulatorPipelinePass, _: &mut PooledObje...
    method record (line 302) | fn record<'a>(&mut self, obj: &mut PooledObjectProvider, submits: &mut...
    method on_post_submit (line 341) | fn on_post_submit(&mut self, queue: &Queue) {
  type OutputUtil (line 150) | pub struct OutputUtil {
    method new (line 159) | pub fn new(device: &DeviceContext, pipeline: Arc<dyn EmulatorPipeline>...
    method create_framebuffer (line 179) | pub fn create_framebuffer(&self, image_view: vk::ImageView, size: Vec2...
    method record (line 186) | pub fn record(&self, command_buffer: vk::CommandBuffer, output_framebu...
    method create_descriptor_pool (line 196) | fn create_descriptor_pool(device: &DeviceContext, sampler_count: usize...
  method drop (line 215) | fn drop(&mut self) {
  type SwapchainOutput (line 224) | pub struct SwapchainOutput {
    method new (line 232) | pub fn new(device: &DeviceContext, pipeline: Arc<dyn EmulatorPipeline>...
    method next_image (line 253) | pub fn next_image(&self) -> Option<(Box<dyn EmulatorOutput + Send>, bo...
  method drop (line 271) | fn drop(&mut self) {
  type SwapchainOutputInstance (line 281) | struct SwapchainOutputInstance {
    method new (line 288) | fn new(output: Arc<SwapchainOutput>, image_info: AcquiredImageInfo) ->...

FILE: core/natives/src/renderer/emulator/share.rs
  type Share (line 16) | pub(super) struct Share {
    constant PASS_ID_ACTIVE_BIT (line 30) | const PASS_ID_ACTIVE_BIT: u64 = 1u64 << 63;
    method new (line 32) | pub(super) fn new(device: Arc<DeviceContext>) -> Self {
    method get_device (line 53) | pub(super) fn get_device(&self) -> &Arc<DeviceContext> {
    method get_staging_pool (line 57) | pub(super) fn get_staging_pool(&self) -> &Mutex<StagingMemoryPool> {
    method create_shader (line 61) | pub(super) fn create_shader(&self, vertex_format: &VertexFormat, used_...
    method drop_shader (line 71) | pub(super) fn drop_shader(&self, id: ShaderId) {
    method get_shader (line 76) | pub(super) fn get_shader(&self, id: ShaderId) -> Option<Arc<Shader>> {
    method get_current_pass_id (line 81) | pub(super) fn get_current_pass_id(&self) -> Option<u64> {
    method try_start_pass_id (line 90) | pub(super) fn try_start_pass_id(&self) -> Option<u64> {
    method end_pass_id (line 110) | pub(super) fn end_pass_id(&self) {
    method get_next_immediate_buffer (line 123) | pub(super) fn get_next_immediate_buffer(&self) -> Box<ImmediateBuffer> {
    method return_immediate_buffer (line 127) | pub(super) fn return_immediate_buffer(&self, buffer: Box<ImmediateBuff...
    method allocate_uniform (line 131) | pub(super) fn allocate_uniform(&self, data: &[u8]) -> (vk::Buffer, vk:...
    method push_task (line 135) | pub(super) fn push_task(&self, task: WorkerTask) {
    method try_get_next_task_timeout (line 140) | pub(super) fn try_get_next_task_timeout(&self, timeout: Duration) -> N...
  method eq (line 172) | fn eq(&self, other: &Self) -> bool {
  type NextTaskResult (line 184) | pub(in crate::renderer::emulator) enum NextTaskResult {
  type Channel (line 189) | struct Channel {
    method new (line 194) | fn new() -> Self {

FILE: core/natives/src/renderer/emulator/staging.rs
  type StagingAllocationId (line 10) | pub struct StagingAllocationId {
  type StagingMemoryPool (line 15) | pub struct StagingMemoryPool {
    constant MIN_BUFFER_SIZE (line 33) | const MIN_BUFFER_SIZE: vk::DeviceSize = 2u64.pow(24);
    method new (line 35) | pub(super) fn new(device: Arc<DeviceContext>) -> Self {
    method allocate (line 49) | pub(super) fn allocate(&mut self, size: vk::DeviceSize, alignment: vk:...
    method free (line 59) | pub(super) fn free(&mut self, allocation: StagingAllocationId) {
    method create_new_buffer (line 79) | fn create_new_buffer(&mut self, additional_size: vk::DeviceSize) {
    method is_id_unused (line 105) | fn is_id_unused(&self, id: u16) -> bool {
  type StagingBuffer (line 118) | struct StagingBuffer {
    method new (line 127) | fn new(device: Arc<DeviceContext>, size: vk::DeviceSize) -> Self {
    method try_allocate (line 146) | fn try_allocate(&mut self, size: vk::DeviceSize, alignment: vk::Device...
    method free (line 157) | fn free(&mut self, slot_id: u16) {
    method is_empty (line 161) | fn is_empty(&self) -> bool {
    method used_byte_count (line 165) | fn used_byte_count(&self) -> vk::DeviceSize {
  method drop (line 171) | fn drop(&mut self) {
  type StagingAllocation (line 186) | pub(super) struct StagingAllocation {

FILE: core/natives/src/renderer/emulator/worker.rs
  type WorkerTask (line 24) | pub(super) enum WorkerTask {
  type GlobalMeshWrite (line 38) | pub(super) struct GlobalMeshWrite {
  type GlobalImageWrite (line 47) | pub(super) struct GlobalImageWrite {
  type GlobalImageClear (line 56) | pub(super) struct GlobalImageClear {
  function run_worker (line 62) | pub(super) fn run_worker(device: Arc<DeviceContext>, share: Arc<Share>) {
  function get_or_create_recorder (line 206) | fn get_or_create_recorder<'a>(recorder: &'a mut Option<GlobalObjectsReco...
  type WorkerObjectPool (line 215) | struct WorkerObjectPool {
    method new (line 223) | fn new(device: Arc<DeviceContext>, queue_family: u32) -> Self {
    method get_buffer (line 240) | fn get_buffer(&mut self) -> vk::CommandBuffer {
    method return_buffer (line 257) | fn return_buffer(&mut self, buffer: vk::CommandBuffer) {
    method return_buffers (line 261) | fn return_buffers(&mut self, buffers: &[vk::CommandBuffer]) {
    method get_fence (line 265) | fn get_fence(&mut self) -> vk::Fence {
    method return_fence (line 279) | fn return_fence(&mut self, fence: vk::Fence) {
  type PooledObjectProvider (line 284) | pub struct PooledObjectProvider {
    method new (line 292) | fn new(share: Arc<Share>, pool: Rc<RefCell<WorkerObjectPool>>) -> Self {
    method get_command_buffer (line 301) | pub fn get_command_buffer(&mut self) -> vk::CommandBuffer {
    method get_begin_command_buffer (line 308) | pub fn get_begin_command_buffer(&mut self) -> VkResult<vk::CommandBuff...
    method get_fence (line 321) | pub fn get_fence(&mut self) -> vk::Fence {
    method allocate_uniform (line 328) | pub fn allocate_uniform(&mut self, data: &[u8]) -> (vk::Buffer, vk::De...
  method drop (line 334) | fn drop(&mut self) {
  type SubmitRecorder (line 339) | pub struct SubmitRecorder<'a> {
  function new (line 345) | fn new(capacity: usize) -> Self {
  function push (line 352) | pub fn push(&mut self, submit: vk::SubmitInfo2Builder<'a>) {
  function as_slice (line 356) | fn as_slice(&self) -> &[vk::SubmitInfo2] {
  type PassState (line 361) | struct PassState {
    method new (line 386) | fn new(
    method use_immediate_buffer (line 428) | fn use_immediate_buffer(&mut self, immediate_buffer: Box<ImmediateBuff...
    method use_output (line 438) | fn use_output(&mut self, mut output: Box<dyn EmulatorOutput>) {
    method process_task (line 443) | fn process_task(&mut self, task: &PipelineTask) {
    method submit (line 447) | fn submit(&mut self, queue: &Queue, gob: Option<GlobalObjectsRecorder>) {
    method is_complete (line 484) | fn is_complete(&self) -> bool {
    method record_pre_submits (line 494) | fn record_pre_submits<'a>(&self, recorder: &mut SubmitRecorder<'a>, al...
    method record_post_submits (line 507) | fn record_post_submits<'a>(&self, _: &mut SubmitRecorder<'a>, _: &'a B...
  method drop (line 512) | fn drop(&mut self) {
  type GlobalObjectsRecorder (line 522) | struct GlobalObjectsRecorder {
    method new (line 545) | fn new(share: Arc<Share>, object_pool: Rc<RefCell<WorkerObjectPool>>) ...
    method record_global_buffer_write (line 570) | fn record_global_buffer_write(&mut self, write: GlobalMeshWrite, is_un...
    method record_global_image_clear (line 589) | fn record_global_image_clear(&mut self, clear: GlobalImageClear, is_un...
    method record_global_image_write (line 611) | fn record_global_image_write(&mut self, write: GlobalImageWrite, is_un...
    method record_global_image_generate_mipmaps (line 631) | fn record_global_image_generate_mipmaps(&mut self, image: Arc<GlobalIm...
    method record (line 704) | fn record<'a>(&mut self, recorder: &mut SubmitRecorder<'a>, bump: &'a ...
    method generate_buffer_post_barriers (line 753) | fn generate_buffer_post_barriers(&mut self) -> Vec<vk::BufferMemoryBar...
    method generate_image_post_barriers (line 765) | fn generate_image_post_barriers(&mut self) -> Vec<vk::ImageMemoryBarri...
    method push_staging (line 778) | fn push_staging(&mut self, alloc: StagingAllocationId, buffer: vk::Buf...
    method transition_mesh (line 802) | fn transition_mesh(&mut self, mesh: Arc<GlobalMesh>, new_state: gob::M...
    method transition_image (line 831) | fn transition_image(&mut self, image: Arc<GlobalImage>, new_state: gob...
  method drop (line 858) | fn drop(&mut self) {
  type MeshState (line 876) | pub(super) enum MeshState {
  function generate_mesh_barriers (line 885) | pub(super) fn generate_mesh_barriers(old_state: MeshState, new_state: Me...
  function MESH_READY_INFO (line 919) | fn MESH_READY_INFO() -> BufferAccessInfo {
  constant MESH_TRANSFER_WRITE_INFO (line 922) | const MESH_TRANSFER_WRITE_INFO: BufferAccessInfo = BufferAccessInfo::new...
  type BufferAccessInfo (line 924) | struct BufferAccessInfo {
    method new (line 931) | const fn new(stage_mask: vk::PipelineStageFlags2, access_mask: vk::Acc...
    method write_src (line 939) | fn write_src<'a>(&self, barrier: vk::BufferMemoryBarrier2Builder<'a>) ...
    method write_dst (line 946) | fn write_dst<'a>(&self, barrier: vk::BufferMemoryBarrier2Builder<'a>) ...
  type ImageState (line 954) | pub(super) enum ImageState {
  function generate_image_barriers (line 965) | pub(super) fn generate_image_barriers(old_state: ImageState, new_state: ...
  function make_full_subresource_range (line 1090) | fn make_full_subresource_range(aspect_mask: vk::ImageAspectFlags) -> vk:...
  function make_exclude_last_mips_subresource_range (line 1101) | fn make_exclude_last_mips_subresource_range(aspect_mask: vk::ImageAspect...
  function make_last_mip_subresource_range (line 1112) | fn make_last_mip_subresource_range(aspect_mask: vk::ImageAspectFlags, mi...
  function make_exclude_first_mips_subresource_range (line 1123) | fn make_exclude_first_mips_subresource_range(aspect_mask: vk::ImageAspec...
  function make_first_mip_subresource_range (line 1134) | fn make_first_mip_subresource_range(aspect_mask: vk::ImageAspectFlags) -...
  constant IMAGE_UNINITIALIZED_INFO (line 1144) | const IMAGE_UNINITIALIZED_INFO: ImageAccessInfo = ImageAccessInfo::new(v...
  constant IMAGE_READY_INFO (line 1145) | const IMAGE_READY_INFO: ImageAccessInfo = ImageAccessInfo::new(vk::Pipel...
  constant IMAGE_TRANSFER_WRITE_INFO (line 1146) | const IMAGE_TRANSFER_WRITE_INFO: ImageAccessInfo = ImageAccessInfo::new(...
  constant IMAGE_GENERATE_MIPMAPS_0_INFO (line 1147) | const IMAGE_GENERATE_MIPMAPS_0_INFO: ImageAccessInfo = ImageAccessInfo::...
  constant IMAGE_GENERATE_MIPMAPS_1_INFO (line 1148) | const IMAGE_GENERATE_MIPMAPS_1_INFO: ImageAccessInfo = ImageAccessInfo::...
  type ImageAccessInfo (line 1150) | struct ImageAccessInfo {
    method new (line 1158) | const fn new(stage_mask: vk::PipelineStageFlags2, access_mask: vk::Acc...
    method write_src (line 1167) | fn write_src<'a>(&self, barrier: vk::ImageMemoryBarrier2Builder<'a>) -...
    method write_dst (line 1175) | fn write_dst<'a>(&self, barrier: vk::ImageMemoryBarrier2Builder<'a>) -...

FILE: core/natives/src/util/alloc.rs
  function next_aligned (line 6) | pub fn next_aligned(base: vk::DeviceSize, alignment: vk::DeviceSize) -> ...
  type RingAllocator (line 16) | pub struct RingAllocator {
    method new (line 28) | pub fn new(size: vk::DeviceSize) -> Self {
    method is_empty (line 43) | pub fn is_empty(&self) -> bool {
    method free_byte_count (line 47) | pub fn free_byte_count(&self) -> vk::DeviceSize {
    method used_byte_count (line 51) | pub fn used_byte_count(&self) -> vk::DeviceSize {
    method allocate (line 55) | pub fn allocate(&mut self, size: u64, alignment: u64) -> Option<(vk::D...
    method free (line 93) | pub fn free(&mut self, id: u16) {
    method push_slot (line 133) | fn push_slot(&mut self, end_offset: vk::DeviceSize) -> Option<u16> {
    method expand_slots (line 157) | fn expand_slots(&mut self, mut new: u16) {
  type RingAllocatorSlot (line 180) | struct RingAllocatorSlot {
    constant MAX_END_OFFSET (line 190) | const MAX_END_OFFSET: u64 = Self::END_OFFSET_MASK;
    constant MAX_SLOT_INDEX (line 191) | const MAX_SLOT_INDEX: usize = ((u16::MAX - 1) as usize);
    constant END_OFFSET_MASK (line 193) | const END_OFFSET_MASK: u64 = (u64::MAX >> 17);
    constant FREE_MASK (line 195) | const FREE_MASK: u64 = (1u64 << 47);
    constant NEXT_SLOT_OFFSET (line 197) | const NEXT_SLOT_OFFSET: u8 = 48;
    constant NEXT_SLOT_MASK (line 198) | const NEXT_SLOT_MASK: u64 = ((u16::MAX as u64) << 48);
    method new (line 201) | fn new(next_slot: Option<u16>) -> Self {
    method set_end_offset (line 210) | fn set_end_offset(&mut self, end_offset: vk::DeviceSize) {
    method get_end_offset (line 216) | fn get_end_offset(&self) -> vk::DeviceSize {
    method set_free (line 221) | fn set_free(&mut self, free: bool) {
    method is_free (line 230) | fn is_free(&self) -> bool {
    method set_next_slot (line 235) | fn set_next_slot(&mut self, next_slot: Option<u16>) {
    method get_next_slot (line 248) | fn get_next_slot(&self) -> Option<u16> {
  function test_ring_allocator_slot (line 270) | fn test_ring_allocator_slot() {
  function test_alloc_free (line 437) | fn test_alloc_free() {
  function test_alloc_fail (line 480) | fn test_alloc_fail() {

FILE: core/natives/src/util/format.rs
  type CompatibilityClass (line 8) | pub struct CompatibilityClass {
    method new (line 19) | pub const fn new(name: &'static str) -> Self {
    method get_name (line 23) | pub const fn get_name(&self) -> &'static str {
  method eq (line 104) | fn eq(&self, other: &Self) -> bool {
  type ClearColorType (line 110) | pub enum ClearColorType {
    method make_zero_clear (line 117) | pub const fn make_zero_clear(&self) -> vk::ClearColorValue {
  type Format (line 139) | pub struct Format {
    method new (line 161) | pub const fn new(format: vk::Format, compatibility_class: Compatibilit...
    method get_format (line 165) | pub const fn get_format(&self) -> vk::Format {
    method get_compatibility_class (line 169) | pub const fn get_compatibility_class(&self) -> CompatibilityClass {
    method get_clear_color_type (line 173) | pub const fn get_clear_color_type(&self) -> Option<ClearColorType> {
    method is_compatible_with (line 177) | pub fn is_compatible_with(&self, other: &Format) -> bool {
  method eq (line 404) | fn eq(&self, other: &Self) -> bool {
  method partial_cmp (line 410) | fn partial_cmp(&self, other: &Self) -> Option<Ordering> {
  method cmp (line 416) | fn cmp(&self, other: &Self) -> Ordering {
  method hash (line 422) | fn hash<H: Hasher>(&self, state: &mut H) {
  method fmt (line 428) | fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result {
  function into (line 434) | fn into(self) -> vk::Format {

FILE: core/natives/src/util/id.rs
  type UUID (line 15) | pub struct UUID(NonZeroU64);
    method new (line 31) | pub fn new() -> Self {
    method from_raw (line 37) | pub const fn from_raw(id: u64) -> Self {
    method get_raw (line 44) | pub const fn get_raw(&self) -> u64 {
  method fmt (line 50) | fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result {
  type NameType (line 56) | enum NameType {
    method new_static (line 62) | const fn new_static(str: &'static str) -> Self {
    method new_string (line 66) | fn new_string(str: String) -> Self {
    method get (line 70) | fn get(&self) -> &str {
  type NamedUUID (line 84) | pub struct NamedUUID {
    method hash_str_const (line 90) | const fn hash_str_const(name: &str) -> u64 {
    method hash_str (line 94) | fn hash_str(name: &str) -> u64 {
    method from_str (line 100) | pub const fn from_str(name: &'static str) -> NamedUUID {
    method from_string (line 108) | pub fn from_string(name: String) -> NamedUUID {
    method with_str (line 116) | pub fn with_str(name: &'static str) -> NamedUUID {
    method with_string (line 122) | pub fn with_string(name: String) -> NamedUUID {
    method uuid_for (line 128) | pub const fn uuid_for(name: &str) -> UUID {
    method get_name (line 133) | pub fn get_name(&self) -> &str {
    method get_uuid (line 138) | pub fn get_uuid(&self) -> UUID {
    method clone_const (line 144) | pub const fn clone_const(&self) -> Self {
    method eq (line 166) | fn eq(&self, other: &UUID) -> bool {
    method partial_cmp (line 184) | fn partial_cmp(&self, other: &UUID) -> Option<Ordering> {
    method into (line 197) | fn into(self) -> UUID {
  method eq (line 157) | fn eq(&self, other: &Self) -> bool {
  method partial_cmp (line 172) | fn partial_cmp(&self, other: &Self) -> Option<Ordering> {
  method cmp (line 178) | fn cmp(&self, other: &Self) -> Ordering {
  method hash (line 190) | fn hash<H: Hasher>(&self, state: &mut H) {
  method fmt (line 203) | fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result {

FILE: core/natives/src/util/rand.rs
  type Xoshiro256PlusPlus (line 4) | pub struct Xoshiro256PlusPlus {
    constant JUMP (line 9) | const JUMP : [u64; 4] = [0x180ec6d33cfd0abau64, 0xd5a61266f0c9392cu64,...
    constant LONG_JUMP (line 10) | const LONG_JUMP : [u64; 4] = [ 0x76e15d3efefdcbbfu64, 0xc5004e441c522f...
    method from_seed (line 13) | pub const fn from_seed(seed: [u64; 4]) -> Self {
    method rotl (line 17) | const fn rotl(x: u64, k: i32) -> u64 {
    method gen (line 22) | pub fn gen(&mut self) -> u64 {
    method update_with (line 40) | fn update_with<const SIZE: usize>(&mut self, update: [u64; SIZE]) {
    method jump (line 66) | pub fn jump(&mut self) {
    method long_jump (line 73) | pub fn long_jump(&mut self) {
  type Item (line 79) | type Item = u64;
  method next (line 81) | fn next(&mut self) -> Option<Self::Item> {

FILE: core/natives/src/util/slice_splitter.rs
  type Splitter (line 3) | pub struct Splitter<'a, T> {
  function new (line 11) | pub fn new<'b: 'a>(slice: &'b mut [T], index: usize) -> (Self, &'a mut T) {
  function get (line 23) | pub fn get(&self, index: usize) -> Option<&T> {

FILE: core/natives/src/util/vk.rs
  function make_full_viewport (line 6) | pub fn make_full_viewport(size: Vec2u32) -> vk::Viewport {
  function make_full_rect (line 18) | pub fn make_full_rect(size: Vec2u32) -> vk::Rect2D {

FILE: core/natives/src/vk/objects/buffer.rs
  type Buffer (line 11) | pub struct Buffer {
    method new (line 17) | pub fn new(handle: vk::Buffer) -> Self {
    method from_raw (line 24) | pub fn from_raw(id: BufferId, handle: vk::Buffer) -> Self {
    method get_id (line 31) | pub fn get_id(&self) -> BufferId {
    method get_handle (line 35) | pub fn get_handle(&self) -> vk::Buffer {
  method eq (line 41) | fn eq(&self, other: &Self) -> bool {
  method partial_cmp (line 50) | fn partial_cmp(&self, other: &Self) -> Option<Ordering> {
  method cmp (line 56) | fn cmp(&self, other: &Self) -> Ordering {
  method hash (line 62) | fn hash<H: Hasher>(&self, state: &mut H) {
  method fmt (line 68) | fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result {
  method from (line 74) | fn from(buffer: Buffer) -> Self {
  method from (line 80) | fn from(buffer: Buffer) -> UUID {
  type BufferSpec (line 87) | pub struct BufferSpec {
    method new (line 92) | pub const fn new(size: u64) -> Self {
    method get_size (line 96) | pub const fn get_size(&self) -> u64 {
  type BufferRange (line 102) | pub struct BufferRange {

FILE: core/natives/src/vk/objects/image.rs
  type Image (line 14) | pub struct Image {
    method new (line 20) | pub fn new(handle: vk::Image) -> Self {
    method get_id (line 27) | pub fn get_id(&self) -> ImageId {
    method get_handle (line 31) | pub fn get_handle(&self) -> vk::Image {
  method eq (line 37) | fn eq(&self, other: &Self) -> bool {
  method partial_cmp (line 46) | fn partial_cmp(&self, other: &Self) -> Option<Ordering> {
  method cmp (line 52) | fn cmp(&self, other: &Self) -> Ordering {
  method hash (line 58) | fn hash<H: Hasher>(&self, state: &mut H) {
  method fmt (line 64) | fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result {
  method from (line 70) | fn from(image: Image) -> Self {
  method from (line 76) | fn from(image: Image) -> Self {
  type ImageSize (line 82) | pub enum ImageSize {
    method make_1d (line 89) | pub const fn make_1d(width: u32) -> Self {
    method make_1d_mip (line 93) | pub const fn make_1d_mip(width: u32, mip_levels: u32) -> Self {
    method make_1d_array (line 97) | pub const fn make_1d_array(width: u32, array_layers: u32) -> Self {
    method make_1d_array_mip (line 101) | pub const fn make_1d_array_mip(width: u32, array_layers: u32, mip_leve...
    method make_2d (line 105) | pub const fn make_2d(width: u32, height: u32) -> Self {
    method make_2d_mip (line 109) | pub const fn make_2d_mip(width: u32, height: u32, mip_levels: u32) -> ...
    method make_2d_array (line 113) | pub const fn make_2d_array(width: u32, height: u32, array_layers: u32)...
    method make_2d_array_mip (line 117) | pub const fn make_2d_array_mip(width: u32, height: u32, array_layers: ...
    method make_3d (line 121) | pub const fn make_3d(width: u32, height: u32, depth: u32) -> Self {
    method make_3d_mip (line 125) | pub const fn make_3d_mip(width: u32, height: u32, depth: u32, mip_leve...
    method get_vulkan_type (line 129) | pub const fn get_vulkan_type(&self) -> vk::ImageType {
    method get_width (line 137) | pub const fn get_width(&self) -> u32 {
    method get_height (line 145) | pub const fn get_height(&self) -> u32 {
    method get_depth (line 153) | pub const fn get_depth(&self) -> u32 {
    method get_array_layers (line 161) | pub const fn get_array_layers(&self) -> u32 {
    method get_mip_levels (line 169) | pub const fn get_mip_levels(&self) -> u32 {
    method as_extent_3d (line 177) | pub const fn as_extent_3d(&self) -> ash::vk::Extent3D {
    method fill_extent_3d (line 185) | pub fn fill_extent_3d(&self, extent: &mut ash::vk::Extent3D) {
  type ImageSpec (line 191) | pub struct ImageSpec {
    method new (line 198) | pub const fn new(size: ImageSize, format: &'static Format, sample_coun...
    method new_single_sample (line 202) | pub const fn new_single_sample(size: ImageSize, format: &'static Forma...
    method get_size (line 206) | pub const fn get_size(&self) -> ImageSize {
    method borrow_size (line 210) | pub const fn borrow_size(&self) -> &ImageSize {
    method get_format (line 214) | pub const fn get_format(&self) -> &'static Format {
    method get_sample_count (line 218) | pub const fn get_sample_count(&self) -> ash::vk::SampleCountFlags {
  type ImageSubresourceRange (line 224) | pub struct ImageSubresourceRange {
    method full_color (line 233) | pub fn full_color() -> Self {
    method as_vk_subresource_range (line 243) | pub const fn as_vk_subresource_range(&self) -> vk::ImageSubresourceRan...
  function from (line 255) | fn from(src: ImageSubresourceRange) -> Self {
  type ImageDescription (line 270) | pub struct ImageDescription {
    method new_simple (line 276) | pub fn new_simple(spec: ImageSpec, usage: vk::ImageUsageFlags) -> Self {
  type ImageViewDescription (line 287) | pub struct ImageViewDescription {
    method make_full (line 297) | pub fn make_full(view_type: vk::ImageViewType, format: &'static Format...
    method make_range (line 318) | pub fn make_range(view_type: vk::ImageViewType, format: &'static Forma...
  type ImageInstanceData (line 333) | pub struct ImageInstanceData {
    method new (line 338) | pub fn new(handle: vk::Image) -> Self {
    method get_handle (line 344) | pub unsafe fn get_handle(&self) -> vk::Image {
  type ImageViewInstanceData (line 349) | pub struct ImageViewInstanceData {
    method new (line 355) | pub fn new(handle: vk::ImageView, source_image: crate::vk::objects::ty...
    method get_source_image (line 362) | pub fn get_source_image(&self) -> crate::vk::objects::types::ImageId {
    method get_handle (line 366) | pub unsafe fn get_handle(&self) -> vk::ImageView {

FILE: core/natives/src/vk/objects/surface.rs
  type SurfaceId (line 10) | pub struct SurfaceId(UUID);
    method new (line 13) | pub fn new() -> Self {
    method from_raw (line 17) | pub fn from_raw(id: UUID) -> Self {
    method as_uuid (line 21) | pub fn as_uuid(&self) -> UUID {
  type Target (line 27) | type Target = UUID;
  method deref (line 29) | fn deref(&self) -> &Self::Target {
  method from (line 35) | fn from(id: SurfaceId) -> Self {
  method fmt (line 41) | fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result {
  type SurfaceInitError (line 47) | pub enum SurfaceInitError {
    method from (line 57) | fn from(res: vk::Result) -> Self {
  type SurfaceProvider (line 62) | pub trait SurfaceProvider: Send + Sync {
    method get_required_instance_extensions (line 63) | fn get_required_instance_extensions(&self) -> Vec<CString>;
    method init (line 65) | fn init(&mut self, entry: &ash::Entry, instance: &ash::Instance) -> Re...
    method get_handle (line 67) | fn get_handle(&self) -> Option<vk::SurfaceKHR>;
  type SurfaceCapabilities (line 70) | pub struct SurfaceCapabilities {
    method new (line 78) | pub fn new(instance: &InstanceContext, physical_device: vk::PhysicalDe...
    method get_capabilities (line 112) | pub fn get_capabilities(&self) -> &vk::SurfaceCapabilitiesKHR {
    method get_presentable_queue_families (line 116) | pub fn get_presentable_queue_families(&self) -> &[u32] {
    method get_surface_formats (line 120) | pub fn get_surface_formats(&self) -> &[vk::SurfaceFormatKHR] {
    method get_present_modes (line 124) | pub fn get_present_modes(&self) -> &[vk::PresentModeKHR] {

FILE: core/natives/src/vk/objects/swapchain.rs
  type SwapchainImageSpec (line 7) | pub struct SwapchainImageSpec {
    method make (line 15) | pub const fn make(format: &'static Format, color_space: vk::ColorSpace...
    method make_extent (line 27) | pub const fn make_extent(format: &'static Format, color_space: vk::Col...
    method make_multiview (line 36) | pub const fn make_multiview(format: &'static Format, color_space: vk::...
    method make_multiview_extent (line 48) | pub const fn make_multiview_extent(format: &'static Format, color_spac...
    method get_image_size (line 57) | pub const fn get_image_size(&self) -> ImageSize {
    method as_image_spec (line 61) | pub const fn as_image_spec(&self) -> ImageSpec {
  type SwapchainCreateDesc (line 68) | pub struct SwapchainCreateDesc {
    method make (line 79) | pub fn make(image_spec: SwapchainImageSpec, min_image_count: u32, usag...
  type SwapchainInstanceData (line 92) | pub struct SwapchainInstanceData {
    method new (line 97) | pub fn new(handle: vk::SwapchainKHR) -> Self {
    method get_handle (line 103) | pub unsafe fn get_handle(&self) -> vk::SwapchainKHR {

FILE: core/natives/src/vk/objects/types.rs
  type ObjectSetId (line 8) | pub struct ObjectSetId(NonZeroU64);
    constant OBJECT_SET_ID_MAX (line 13) | const OBJECT_SET_ID_MAX : u64 = (1u64 << 40u32) - 1u64;
    method new (line 16) | pub fn new() -> Self {
    method from_raw (line 25) | fn from_raw(raw: u64) -> Self {
    method get_raw (line 34) | pub fn get_raw(&self) -> u64 {
  method fmt (line 40) | fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result {
  type ObjectType (line 45) | pub struct ObjectType;
    method as_str (line 49) | pub const fn as_str(ty: u8) -> &'static str {
    constant GENERIC (line 64) | pub const GENERIC: u8 = u8::MAX;
    constant BUFFER (line 66) | pub const BUFFER: u8 = 1u8;
    constant BUFFER_VIEW (line 67) | pub const BUFFER_VIEW: u8 = 2u8;
    constant IMAGE (line 68) | pub const IMAGE: u8 = 3u8;
    constant IMAGE_VIEW (line 69) | pub const IMAGE_VIEW: u8 = 4u8;
    constant SEMAPHORE (line 70) | pub const SEMAPHORE: u8 = 5u8;
    constant EVENT (line 71) | pub const EVENT: u8 = 6u8;
    constant FENCE (line 72) | pub const FENCE: u8 = 7u8;
    constant SURFACE (line 73) | pub const SURFACE: u8 = 8u8;
    constant SWAPCHAIN (line 74) | pub const SWAPCHAIN: u8 = 9u8;
  type ObjectId (line 78) | pub struct ObjectId<const TYPE: u8>(NonZeroU64);
  constant SET_ID_BITS (line 81) | const SET_ID_BITS: u32 = 40u32;
  constant SET_ID_OFFSET (line 82) | const SET_ID_OFFSET: u32 = 0u32;
  constant SET_ID_MAX (line 83) | const SET_ID_MAX: u64 = (1u64 << Self::SET_ID_BITS) - 1u64;
  constant SET_ID_MASK (line 84) | const SET_ID_MASK: u64 = Self::SET_ID_MAX << Self::SET_ID_OFFSET;
  constant INDEX_OFFSET (line 86) | const INDEX_OFFSET: u32 = 48u32;
  constant INDEX_MAX (line 87) | const INDEX_MAX: u64 = u16::MAX as u64;
  constant INDEX_MASK (line 88) | const INDEX_MASK: u64 = Self::INDEX_MAX << Self::INDEX_OFFSET;
  constant TYPE_OFFSET (line 90) | const TYPE_OFFSET: u32 = 40u32;
  constant TYPE_MAX (line 91) | const TYPE_MAX: u64 = u8::MAX as u64;
  constant TYPE_MASK (line 92) | const TYPE_MASK: u64 = Self::TYPE_MAX << Self::TYPE_OFFSET;
  function make (line 94) | fn make(set_id: ObjectSetId, index: u16, object_type: u8) -> Self {
  function get_set_id (line 100) | pub fn get_set_id(&self) -> ObjectSetId {
  function get_index (line 104) | pub const fn get_index(&self) -> u16 {
  function get_type (line 108) | pub const fn get_type(&self) -> u8 {
  function as_generic (line 113) | pub const fn as_generic(&self) -> ObjectId<{ ObjectType::GENERIC }> {
  function downcast (line 121) | pub const fn downcast<const TRG: u8>(self) -> Option<ObjectId<TRG>> {
  method fmt (line 131) | fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result {
  method hash (line 137) | fn hash<H: Hasher>(&self, state: &mut H) {
  type ObjectIdType (line 142) | pub trait ObjectIdType {
    method as_generic (line 145) | fn as_generic(&self) -> GenericId;
  type UnwrapToInstanceData (line 148) | pub trait UnwrapToInstanceData<'a, I> {
    method unwrap (line 149) | fn unwrap(self) -> &'a I;
  type GenericId (line 152) | pub type GenericId = ObjectId<{ ObjectType::GENERIC }>;
  type BufferId (line 153) | pub type BufferId = ObjectId<{ ObjectType::BUFFER }>;
  type BufferViewId (line 154) | pub type BufferViewId = ObjectId<{ ObjectType::BUFFER_VIEW }>;
  type ImageId (line 155) | pub type ImageId = ObjectId<{ ObjectType::IMAGE }>;
  type ImageViewId (line 156) | pub type ImageViewId = ObjectId<{ ObjectType::IMAGE_VIEW }>;
  type SemaphoreId (line 157) | pub type SemaphoreId = ObjectId<{ ObjectType::SEMAPHORE }>;
  type EventId (line 158) | pub type EventId = ObjectId<{ ObjectType::EVENT }>;
  type FenceId (line 159) | pub type FenceId = ObjectId<{ ObjectType::FENCE }>;
  type SurfaceId (line 160) | pub type SurfaceId = ObjectId<{ ObjectType::SURFACE }>;
  type SwapchainId (line 161) | pub type SwapchainId = ObjectId<{ ObjectType::SWAPCHAIN }>;

FILE: core/natives/src/vk/test.rs
  function make_headless_instance (line 13) | pub fn make_headless_instance() -> Arc<InstanceContext> {
  function make_headless_instance_device (line 26) | pub fn make_headless_instance_device() -> (Arc<InstanceContext>, Arc<Dev...

FILE: core/natives/src/window.rs
  type WinitWindow (line 8) | pub struct WinitWindow {
    method new (line 15) | pub fn new<E>(title: &str, width: f64, height: f64, event_loop: &Event...
  method get_required_instance_extensions (line 32) | fn get_required_instance_extensions(&self) -> Vec<CString> {
  method init (line 38) | fn init(&mut self, entry: &Entry, instance: &Instance) -> Result<vk::Sur...
  method get_handle (line 47) | fn get_handle(&self) -> Option<vk::SurfaceKHR> {
  method drop (line 53) | fn drop(&mut self) {

FILE: mod/src/main/java/graphics/kiln/blaze4d/Blaze4D.java
  class Blaze4D (line 17) | public class Blaze4D implements ClientModInitializer {
    method pushUniform (line 27) | public static void pushUniform(long shaderId, B4DUniformData data) {
    method uploadImmediate (line 35) | public static Integer uploadImmediate(B4DMeshData data) {
    method drawImmediate (line 44) | public static void drawImmediate(int meshId, long shaderId) {
    method drawGlobal (line 52) | public static void drawGlobal(GlobalMesh mesh, long shaderId) {
    method onInitializeClient (line 60) | @Override

FILE: mod/src/main/java/graphics/kiln/blaze4d/Blaze4DMixinPlugin.java
  class Blaze4DMixinPlugin (line 11) | public class Blaze4DMixinPlugin implements IMixinConfigPlugin {
    method onLoad (line 15) | @Override
    method getRefMapperConfig (line 19) | @Override
    method shouldApplyMixin (line 24) | @Override
    method acceptTargets (line 33) | @Override
    method getMixins (line 37) | @Override
    method preApply (line 42) | @Override
    method postApply (line 46) | @Override

FILE: mod/src/main/java/graphics/kiln/blaze4d/Blaze4DPreLaunch.java
  class Blaze4DPreLaunch (line 9) | public class Blaze4DPreLaunch implements PreLaunchEntrypoint {
    method onPreLaunch (line 13) | @Override

FILE: mod/src/main/java/graphics/kiln/blaze4d/api/B4DShader.java
  type B4DShader (line 5) | public interface B4DShader {
    method b4dGetShaderId (line 6) | long b4dGetShaderId();

FILE: mod/src/main/java/graphics/kiln/blaze4d/api/B4DUniform.java
  type B4DUniform (line 3) | public interface B4DUniform {
    method getB4DUniform (line 4) | graphics.kiln.blaze4d.core.types.B4DUniform getB4DUniform();

FILE: mod/src/main/java/graphics/kiln/blaze4d/api/B4DVertexBuffer.java
  type B4DVertexBuffer (line 5) | public interface B4DVertexBuffer {
    method setImmediateData (line 7) | void setImmediateData(Integer data);

FILE: mod/src/main/java/graphics/kiln/blaze4d/api/Utils.java
  class Utils (line 9) | public class Utils {
    method convertVertexFormat (line 10) | public static boolean convertVertexFormat(VertexFormat src, B4DVertexF...
    method vulkanNormFormat (line 50) | public static int vulkanNormFormat(VertexFormatElement.Type type, int ...
    method vulkanF32Format (line 72) | public static int vulkanF32Format(int componentCount) {
    method vulkanU8NormFormat (line 91) | public static int vulkanU8NormFormat(int componentCount) {
    method vulkanI8NormFormat (line 110) | public static int vulkanI8NormFormat(int componentCount) {
    method vulkanU16NormFormat (line 129) | public static int vulkanU16NormFormat(int componentCount) {
    method vulkanI16NormFormat (line 148) | public static int vulkanI16NormFormat(int componentCount) {

FILE: mod/src/main/java/graphics/kiln/blaze4d/emulation/GLStateTracker.java
  class GLStateTracker (line 12) | public class GLStateTracker {
    method GLStateTracker (line 17) | public GLStateTracker() {
    method getPipelineConfiguration (line 31) | public PipelineConfiguration getPipelineConfiguration() {
    method setDepthTest (line 35) | public void setDepthTest(boolean enable) {
    method setDepthFunc (line 39) | public void setDepthFunc(int glFunc) {
    method setDepthFunc (line 43) | public void setDepthFunc(CompareOp op) {
    method setDepthMask (line 47) | public void setDepthMask(boolean enable) {
    method setBlendFunc (line 51) | public void setBlendFunc(int srcFunc, int dstFunc) {
    method setBlendFunc (line 55) | public void setBlendFunc(BlendFactor src, BlendFactor dst) {
    method setBlendFuncSeparate (line 59) | public void setBlendFuncSeparate(int colorSrcFunc, int colorDstFunc, i...
    method setBlendFuncSeparate (line 63) | public void setBlendFuncSeparate(BlendFactor colorSrc, BlendFactor col...
    method setBlendEquation (line 70) | public void setBlendEquation(int glEquation) {
    method setBlendEquation (line 74) | public void setBlendEquation(BlendOp op) {

FILE: mod/src/main/java/graphics/kiln/blaze4d/mixin/integration/FramebufferMixin.java
  class FramebufferMixin (line 10) | @Mixin(RenderTarget.class)

FILE: mod/src/main/java/graphics/kiln/blaze4d/mixin/integration/GLXMixin.java
  class GLXMixin (line 16) | @Mixin(value = GLX.class, remap = false)

FILE: mod/src/main/java/graphics/kiln/blaze4d/mixin/integration/GlDebugMixin.java
  class GlDebugMixin (line 9) | @Mixin(GlDebug.class)

FILE: mod/src/main/java/graphics/kiln/blaze4d/mixin/integration/GlStateManagerMixin.java
  class GlStateManagerMixin (line 32) | @Mixin(value = GlStateManager.class, remap = false)

FILE: mod/src/main/java/graphics/kiln/blaze4d/mixin/integration/MinecraftClientMixin.java
  class MinecraftClientMixin (line 11) | @Mixin(Minecraft.class)
    method startFrame (line 13) | @Inject(method = "runTick", at = @At("HEAD"))
    method endFrame (line 32) | @Inject(method = "runTick", at = @At("RETURN"))

FILE: mod/src/main/java/graphics/kiln/blaze4d/mixin/integration/VertexFormatMixin.java
  class VertexFormatMixin (line 7) | @Mixin(VertexFormat.IndexType.class)
    method least (line 9) | @Overwrite

FILE: mod/src/main/java/graphics/kiln/blaze4d/mixin/integration/VideoWarningManagerMixin.java
  class VideoWarningManagerMixin (line 12) | @Mixin(GpuWarnlistManager.Preparations.class)

FILE: mod/src/main/java/graphics/kiln/blaze4d/mixin/integration/WindowFramebufferMixin.java
  class WindowFramebufferMixin (line 11) | @Mixin(MainTarget.class)

FILE: mod/src/main/java/graphics/kiln/blaze4d/mixin/integration/WindowMixin.java
  class WindowMixin (line 14) | @Mixin(com.mojang.blaze3d.platform.Window.class)
    method initializeRosellaWindow (line 43) | @Inject(method = "<init>", at = @At(value = "TAIL"))

FILE: mod/src/main/java/graphics/kiln/blaze4d/mixin/render/BufferUploaderMixin.java
  class BufferUploaderMixin (line 23) | @Mixin(BufferUploader.class)
    method prepareImmediate (line 26) | @Inject(method = "upload", at = @At("RETURN"))
    method drawImmediateBuffer (line 33) | private static void drawImmediateBuffer(BufferBuilder.RenderedBuffer r...
    method generateSequentialIndices (line 77) | private static IntBuffer generateSequentialIndices(VertexFormat.Mode m...

FILE: mod/src/main/java/graphics/kiln/blaze4d/mixin/render/RenderSystemMixin.java
  class RenderSystemMixin (line 15) | @Mixin(value = RenderSystem.class, remap = false)
    method setDepthWrite (line 18) | @Inject(method="depthMask", at=@At("HEAD"))

FILE: mod/src/main/java/graphics/kiln/blaze4d/mixin/render/VertexBufferMixin.java
  class VertexBufferMixin (line 25) | @Mixin(VertexBuffer.class)
    method uploadBuffer (line 38) | @Inject(method="upload", at = @At("HEAD"))
    method generateSequentialIndices (line 80) | private static IntBuffer generateSequentialIndices(VertexFormat.Mode m...
    method draw (line 103) | @Inject(method="draw", at = @At("HEAD"))
    method close (line 135) | @Inject(method = "close", at = @At("HEAD"), cancellable = true)
    method setImmediateData (line 144) | @Override

FILE: mod/src/main/java/graphics/kiln/blaze4d/mixin/render/WorldRendererMixin.java
  class WorldRendererMixin (line 27) | @Mixin(LevelRenderer.class)
    method stopSky0 (line 35) | @Inject(method="renderSky", at = @At("HEAD"))
    method stopSky1 (line 39) | @Inject(method="renderSky", at = @At("RETURN"))

FILE: mod/src/main/java/graphics/kiln/blaze4d/mixin/shader/GlStateManagerMixin.java
  class GlStateManagerMixin (line 17) | @Mixin(value = GlStateManager.class, remap = false)

FILE: mod/src/main/java/graphics/kiln/blaze4d/mixin/shader/GlUniformMixin.java
  class GlUniformMixin (line 23) | @Mixin(Uniform.class)
    method init (line 46) | @Inject(method = "<init>", at = @At("TAIL"))
    method getB4DUniform (line 164) | public B4DUniform getB4DUniform() {
    method setVec1f (line 168) | @Inject(method = "set(F)V", at = @At("HEAD"))
    method setVec3f (line 172) | @Inject(method = "set(FFF)V", at = @At("HEAD"))
    method setVec3f (line 185) | @Inject(method = "set(Lcom/mojang/math/Vector3f;)V", at = @At("HEAD"))
    method setMat4f32 (line 198) | @Inject(method = "set(Lcom/mojang/math/Matrix4f;)V", at = @At("HEAD"))

FILE: mod/src/main/java/graphics/kiln/blaze4d/mixin/shader/RenderSystemMixin.java
  class RenderSystemMixin (line 12) | @Mixin(value = RenderSystem.class, remap = false)

FILE: mod/src/main/java/graphics/kiln/blaze4d/mixin/shader/ShaderAccessor.java
  type ShaderAccessor (line 9) | @Mixin(ShaderInstance.class)

FILE: mod/src/main/java/graphics/kiln/blaze4d/mixin/shader/ShaderMixin.java
  class ShaderMixin (line 23) | @Mixin(ShaderInstance.class)
    method initShader (line 33) | @Inject(method = "<init>", at = @At(value = "TAIL"))
    method applyShader (line 54) | @Inject(method = "apply", at = @At(value = "TAIL"))
    method destroyShader (line 60) | @Inject(method = "close", at = @At(value = "TAIL"))
    method b4dGetShaderId (line 65) | @Override

FILE: mod/src/main/java/graphics/kiln/blaze4d/mixin/texture/LightmapTextureManagerMixin.java
  class LightmapTextureManagerMixin (line 16) | @Mixin(LightTexture.class)

FILE: mod/src/main/java/graphics/kiln/blaze4d/mixin/texture/NativeImageMixin.java
  class NativeImageMixin (line 13) | @Mixin(NativeImage.class)

FILE: mod/src/main/java/graphics/kiln/blaze4d/mixin/texture/RenderSystemMixin.java
  class RenderSystemMixin (line 14) | @Mixin(value = RenderSystem.class, remap = false)

FILE: mod/src/main/java/graphics/kiln/blaze4d/mixin/texture/TextureManagerMixin.java
  class TextureManagerMixin (line 6) | @Mixin(TextureManager.class)

FILE: mod/src/main/java/graphics/kiln/blaze4d/mixin/texture/TextureUtilMixin_Development.java
  class TextureUtilMixin_Development (line 10) | @Mixin(value = TextureUtil.class, remap = false)

FILE: mod/src/main/java/graphics/kiln/blaze4d/mixin/texture/TextureUtilMixin_Runtime.java
  class TextureUtilMixin_Runtime (line 10) | @Mixin(value = TextureUtil.class, remap = false)
Condensed preview — 170 files, each showing path, character count, and a content snippet. Download the .json file or copy for the full structured content (1,065K chars).
[
  {
    "path": ".github/workflows/build.yml",
    "chars": 856,
    "preview": "name: Build\non:\n  - pull_request\n  - push\n\njobs:\n  build:\n    if: \"! contains(toJSON(github.event.commits.*.message), '["
  },
  {
    "path": ".github/workflows/publish.yml",
    "chars": 671,
    "preview": "name: Publish to hydos Maven\non:\n  push:\n    branches:\n      - master\n\njobs:\n  publish:\n    if: \"! contains(toJSON(githu"
  },
  {
    "path": ".github/workflows/test.yml",
    "chars": 1070,
    "preview": "on: [ push, pull_request ]\n\nname: Build\n\njobs:\n  build:\n    strategy:\n      matrix:\n        os: [ubuntu-latest, windows-"
  },
  {
    "path": ".gitignore",
    "chars": 199,
    "preview": "# gradle\n.gradle/\n\n# eclipse\n*.launch\n\n# idea\n.idea/\n*.iml\n*.ipr\n*.iws\n\n# vscode\n.settings/\n.vscode/\nbin/\n.classpath\n.pr"
  },
  {
    "path": "README.md",
    "chars": 2197,
    "preview": "![blaze](https://user-images.githubusercontent.com/68126718/125143247-71be4580-e0f0-11eb-88bc-070eb2838435.png)\n\n## Info"
  },
  {
    "path": "buildSrc/.gitignore",
    "chars": 28,
    "preview": "# Gradle local files\n/build/"
  },
  {
    "path": "buildSrc/build.gradle.kts",
    "chars": 133,
    "preview": "plugins {\n    kotlin(\"jvm\") version \"1.7.10\"\n}\n\nrepositories {\n    mavenCentral()\n}\n\ndependencies {\n    implementation(g"
  },
  {
    "path": "buildSrc/src/main/kotlin/graphics/kiln/blaze4d/build/assets/AssetsPlugin.kt",
    "chars": 1021,
    "preview": "package graphics.kiln.blaze4d.build.assets\n\nimport org.gradle.api.Action\nimport org.gradle.api.Plugin\nimport org.gradle."
  },
  {
    "path": "buildSrc/src/main/kotlin/graphics/kiln/blaze4d/build/assets/AssetsPluginExtension.kt",
    "chars": 401,
    "preview": "package graphics.kiln.blaze4d.build.assets\n\nimport graphics.kiln.blaze4d.build.assets.shaders.ShaderCompiler\nimport org."
  },
  {
    "path": "buildSrc/src/main/kotlin/graphics/kiln/blaze4d/build/assets/shaders/CompileShadersTask.kt",
    "chars": 665,
    "preview": "package graphics.kiln.blaze4d.build.assets.shaders\n\nimport graphics.kiln.blaze4d.build.assets.AssetsPlugin\nimport graphi"
  },
  {
    "path": "buildSrc/src/main/kotlin/graphics/kiln/blaze4d/build/assets/shaders/CompilerConfig.kt",
    "chars": 177,
    "preview": "package graphics.kiln.blaze4d.build.assets.shaders\n\nimport java.io.File\n\ndata class CompilerConfig(\n        val targetSp"
  },
  {
    "path": "buildSrc/src/main/kotlin/graphics/kiln/blaze4d/build/assets/shaders/ShaderCompiler.kt",
    "chars": 1725,
    "preview": "package graphics.kiln.blaze4d.build.assets.shaders\n\nimport org.gradle.api.Action\nimport org.gradle.api.NamedDomainObject"
  },
  {
    "path": "buildSrc/src/main/kotlin/graphics/kiln/blaze4d/build/assets/shaders/ShaderModule.kt",
    "chars": 1284,
    "preview": "package graphics.kiln.blaze4d.build.assets.shaders\n\nimport org.gradle.api.file.RelativePath\nimport org.gradle.api.provid"
  },
  {
    "path": "buildSrc/src/main/kotlin/graphics/kiln/blaze4d/build/assets/shaders/ShaderProject.kt",
    "chars": 2601,
    "preview": "package graphics.kiln.blaze4d.build.assets.shaders\n\nimport org.gradle.api.Action\nimport org.gradle.api.NamedDomainObject"
  },
  {
    "path": "buildSrc/src/main/kotlin/graphics/kiln/blaze4d/build/assets/shaders/ShaderStage.kt",
    "chars": 362,
    "preview": "package graphics.kiln.blaze4d.build.assets.shaders\n\nenum class ShaderStage(cliArg: String) {\n    VERTEX(\"-fshader-stage="
  },
  {
    "path": "buildSrc/src/main/kotlin/graphics/kiln/blaze4d/build/assets/shaders/SprivVersion.kt",
    "chars": 351,
    "preview": "package graphics.kiln.blaze4d.build.assets.shaders\n\nenum class SprivVersion(val cliArg: String) {\n    SPV_1_0(\"--target-"
  },
  {
    "path": "core/LICENSE",
    "chars": 35149,
    "preview": "                    GNU GENERAL PUBLIC LICENSE\n                       Version 3, 29 June 2007\n\n Copyright (C) 2007 Free "
  },
  {
    "path": "core/api/.gitignore",
    "chars": 28,
    "preview": "# Gradle local files\n/build/"
  },
  {
    "path": "core/api/LICENSE",
    "chars": 35149,
    "preview": "                    GNU GENERAL PUBLIC LICENSE\n                       Version 3, 29 June 2007\n\n Copyright (C) 2007 Free "
  },
  {
    "path": "core/api/build.gradle.kts",
    "chars": 887,
    "preview": "plugins {\n    id(\"java\")\n    id(\"fr.stardustenterprises.rust.importer\") version \"3.2.4\"\n}\n\ngroup = \"graphics.kiln\"\nversi"
  },
  {
    "path": "core/api/src/main/java/graphics/kiln/blaze4d/core/Blaze4DCore.java",
    "chars": 2519,
    "preview": "package graphics.kiln.blaze4d.core;\n\nimport graphics.kiln.blaze4d.core.natives.Natives;\nimport graphics.kiln.blaze4d.cor"
  },
  {
    "path": "core/api/src/main/java/graphics/kiln/blaze4d/core/Frame.java",
    "chars": 1143,
    "preview": "package graphics.kiln.blaze4d.core;\n\nimport graphics.kiln.blaze4d.core.natives.Natives;\nimport graphics.kiln.blaze4d.cor"
  },
  {
    "path": "core/api/src/main/java/graphics/kiln/blaze4d/core/GlobalImage.java",
    "chars": 666,
    "preview": "package graphics.kiln.blaze4d.core;\n\nimport graphics.kiln.blaze4d.core.natives.Natives;\nimport graphics.kiln.blaze4d.cor"
  },
  {
    "path": "core/api/src/main/java/graphics/kiln/blaze4d/core/GlobalMesh.java",
    "chars": 485,
    "preview": "package graphics.kiln.blaze4d.core;\n\nimport graphics.kiln.blaze4d.core.natives.Natives;\nimport jdk.incubator.foreign.Mem"
  },
  {
    "path": "core/api/src/main/java/graphics/kiln/blaze4d/core/natives/ImageDataNative.java",
    "chars": 2003,
    "preview": "package graphics.kiln.blaze4d.core.natives;\n\nimport jdk.incubator.foreign.MemoryLayout;\nimport jdk.incubator.foreign.Val"
  },
  {
    "path": "core/api/src/main/java/graphics/kiln/blaze4d/core/natives/Lib.java",
    "chars": 4166,
    "preview": "package graphics.kiln.blaze4d.core.natives;\n\nimport graphics.kiln.blaze4d.core.Blaze4DCore;\nimport jdk.incubator.foreign"
  },
  {
    "path": "core/api/src/main/java/graphics/kiln/blaze4d/core/natives/McUniformDataNative.java",
    "chars": 3233,
    "preview": "package graphics.kiln.blaze4d.core.natives;\n\nimport jdk.incubator.foreign.*;\n\nimport java.lang.invoke.VarHandle;\n\npublic"
  },
  {
    "path": "core/api/src/main/java/graphics/kiln/blaze4d/core/natives/MeshDataNative.java",
    "chars": 3059,
    "preview": "package graphics.kiln.blaze4d.core.natives;\n\nimport jdk.incubator.foreign.*;\n\nimport java.lang.invoke.VarHandle;\n\npublic"
  },
  {
    "path": "core/api/src/main/java/graphics/kiln/blaze4d/core/natives/Natives.java",
    "chars": 15043,
    "preview": "/**\n * Internal api to directly call native functions\n */\n\npackage graphics.kiln.blaze4d.core.natives;\n\nimport jdk.incub"
  },
  {
    "path": "core/api/src/main/java/graphics/kiln/blaze4d/core/natives/PipelineConfigurationNative.java",
    "chars": 4107,
    "preview": "package graphics.kiln.blaze4d.core.natives;\n\nimport jdk.incubator.foreign.MemoryLayout;\nimport jdk.incubator.foreign.Val"
  },
  {
    "path": "core/api/src/main/java/graphics/kiln/blaze4d/core/natives/Vec2u32Native.java",
    "chars": 298,
    "preview": "package graphics.kiln.blaze4d.core.natives;\n\nimport jdk.incubator.foreign.MemoryLayout;\nimport jdk.incubator.foreign.Val"
  },
  {
    "path": "core/api/src/main/java/graphics/kiln/blaze4d/core/natives/VertexFormatNative.java",
    "chars": 6178,
    "preview": "package graphics.kiln.blaze4d.core.natives;\n\nimport graphics.kiln.blaze4d.core.Blaze4DCore;\nimport jdk.incubator.foreign"
  },
  {
    "path": "core/api/src/main/java/graphics/kiln/blaze4d/core/types/B4DFormat.java",
    "chars": 7964,
    "preview": "package graphics.kiln.blaze4d.core.types;\n\npublic enum B4DFormat {\n    UNDEFINED(0),\n    R8_UNORM(9),\n    R8_SNORM(10),\n"
  },
  {
    "path": "core/api/src/main/java/graphics/kiln/blaze4d/core/types/B4DImageData.java",
    "chars": 1547,
    "preview": "package graphics.kiln.blaze4d.core.types;\n\nimport graphics.kiln.blaze4d.core.natives.ImageDataNative;\nimport jdk.incubat"
  },
  {
    "path": "core/api/src/main/java/graphics/kiln/blaze4d/core/types/B4DIndexType.java",
    "chars": 623,
    "preview": "package graphics.kiln.blaze4d.core.types;\n\npublic enum B4DIndexType {\n    UINT16(0),\n    UINT32(1);\n\n    private final i"
  },
  {
    "path": "core/api/src/main/java/graphics/kiln/blaze4d/core/types/B4DMeshData.java",
    "chars": 3949,
    "preview": "package graphics.kiln.blaze4d.core.types;\n\nimport graphics.kiln.blaze4d.core.natives.MeshDataNative;\nimport jdk.incubato"
  },
  {
    "path": "core/api/src/main/java/graphics/kiln/blaze4d/core/types/B4DPrimitiveTopology.java",
    "chars": 1930,
    "preview": "package graphics.kiln.blaze4d.core.types;\n\npublic enum B4DPrimitiveTopology {\n    POINT_LIST(0),\n    LINE_LIST(1),\n    L"
  },
  {
    "path": "core/api/src/main/java/graphics/kiln/blaze4d/core/types/B4DUniform.java",
    "chars": 652,
    "preview": "package graphics.kiln.blaze4d.core.types;\n\npublic enum B4DUniform {\n    MODEL_VIEW_MATRIX(1L),\n    PROJECTION_MATRIX(1L "
  },
  {
    "path": "core/api/src/main/java/graphics/kiln/blaze4d/core/types/B4DUniformData.java",
    "chars": 3560,
    "preview": "package graphics.kiln.blaze4d.core.types;\n\nimport graphics.kiln.blaze4d.core.natives.McUniformDataNative;\nimport jdk.inc"
  },
  {
    "path": "core/api/src/main/java/graphics/kiln/blaze4d/core/types/B4DVertexFormat.java",
    "chars": 7018,
    "preview": "package graphics.kiln.blaze4d.core.types;\n\nimport graphics.kiln.blaze4d.core.natives.VertexFormatNative;\nimport jdk.incu"
  },
  {
    "path": "core/api/src/main/java/graphics/kiln/blaze4d/core/types/BlendFactor.java",
    "chars": 1599,
    "preview": "package graphics.kiln.blaze4d.core.types;\n\npublic enum BlendFactor {\n    ZERO(0),\n    ONE(1),\n    SRC_COLOR(2),\n    ONE_"
  },
  {
    "path": "core/api/src/main/java/graphics/kiln/blaze4d/core/types/BlendOp.java",
    "chars": 1041,
    "preview": "package graphics.kiln.blaze4d.core.types;\n\npublic enum BlendOp {\n    ADD(0),\n    SUBTRACT(1),\n    REVERSE_SUBTRACT(2),\n "
  },
  {
    "path": "core/api/src/main/java/graphics/kiln/blaze4d/core/types/CompareOp.java",
    "chars": 1317,
    "preview": "package graphics.kiln.blaze4d.core.types;\n\npublic enum CompareOp {\n    NEVER(0),\n    LESS(1),\n    EQUAL(2),\n    LESS_OR_"
  },
  {
    "path": "core/api/src/main/java/graphics/kiln/blaze4d/core/types/PipelineConfiguration.java",
    "chars": 3992,
    "preview": "package graphics.kiln.blaze4d.core.types;\n\nimport graphics.kiln.blaze4d.core.natives.PipelineConfigurationNative;\nimport"
  },
  {
    "path": "core/api/src/main/java/module-info.java",
    "chars": 298,
    "preview": "module graphics.kiln.blaze4d.core {\n    requires jdk.incubator.foreign;\n\n    requires com.google.gson;\n    requires org."
  },
  {
    "path": "core/assets/.gitattributes",
    "chars": 154,
    "preview": "#\n# https://help.github.com/articles/dealing-with-line-endings/\n#\n# These are explicitly windows files and should use cr"
  },
  {
    "path": "core/assets/.gitignore",
    "chars": 28,
    "preview": "# Gradle local files\n/build/"
  },
  {
    "path": "core/assets/build.gradle.kts",
    "chars": 1126,
    "preview": "apply<graphics.kiln.blaze4d.build.assets.AssetsPlugin>()\n\nconfigure<graphics.kiln.blaze4d.build.assets.AssetsPluginExten"
  },
  {
    "path": "core/assets/src/debug/apply.frag",
    "chars": 233,
    "preview": "#version 450\n\nlayout(input_attachment_index=0, set=0, binding=0) uniform subpassInput overlay;\n\nlayout(location=0) out v"
  },
  {
    "path": "core/assets/src/debug/apply.vert",
    "chars": 205,
    "preview": "#version 450\n\nvec2 positions[4] = vec2[](\n    vec2(-1.0, 1.0),\n    vec2(-1.0, -1.0),\n    vec2(1.0, 1.0),\n    vec2(1.0, -"
  },
  {
    "path": "core/assets/src/debug/basic.frag",
    "chars": 135,
    "preview": "#version 450\n\nlayout(location=0) in vec2 in_uv;\n\nlayout(location=0) out vec4 color;\n\nvoid main() {\n    color = vec4(in_u"
  },
  {
    "path": "core/assets/src/debug/basic.vert",
    "chars": 328,
    "preview": "#version 450\n\nlayout(location=0) in vec3 position;\nlayout(location=1) in vec2 in_uv;\n\nlayout(location=0) out vec2 out_uv"
  },
  {
    "path": "core/assets/src/debug/font/JetBrainsMono/OFL.txt",
    "chars": 4399,
    "preview": "Copyright 2020 The JetBrains Mono Project Authors (https://github.com/JetBrains/JetBrainsMono)\n\nThis Font Software is li"
  },
  {
    "path": "core/assets/src/debug/font/JetBrainsMono/tmp_built/regular.json",
    "chars": 277650,
    "preview": "{\"atlas\":{\"type\":\"msdf\",\"distanceRange\":5,\"size\":13,\"width\":512,\"height\":512,\"yOrigin\":\"bottom\"},\"metrics\":{\"emSize\":1,\""
  },
  {
    "path": "core/assets/src/debug/font/charset.txt",
    "chars": 2021,
    "preview": "[0x20, 0x7E]\n\n[0x00A0, 0x0131] [0x0134, 0x017F] 0x018F 0x0190 0x0192 0x019B 0x01A0 0x01A1 0x01AF 0x01B0 0x01CD 0x01CE 0x"
  },
  {
    "path": "core/assets/src/debug/font/msdf_font.frag",
    "chars": 726,
    "preview": "#version 450\n\nlayout(location=0) in vec2 uv_cord;\nlayout(location=1) in vec4 color;\nlayout(location=2) flat in uint atla"
  },
  {
    "path": "core/assets/src/debug/font/msdf_font.vert",
    "chars": 920,
    "preview": "#version 450\n\nlayout(location=0) in vec2 box_offset;\nlayout(location=1) in vec2 box_size;\nlayout(location=2) in vec2 atl"
  },
  {
    "path": "core/assets/src/emulator/debug/background.frag",
    "chars": 713,
    "preview": "#version 450\n\nlayout(input_attachment_index=0, set=0, binding=0) uniform subpassInput rendered;\n\nlayout(location=0) in v"
  },
  {
    "path": "core/assets/src/emulator/debug/background.vert",
    "chars": 583,
    "preview": "#version 450\n\nvec2 positions[4] = vec2[](\n    vec2(-1.0, 1.0),\n    vec2(-1.0, -1.0),\n    vec2(1.0, 1.0),\n    vec2(1.0, -"
  },
  {
    "path": "core/assets/src/emulator/debug/color.vert",
    "chars": 325,
    "preview": "#version 450\n/**\n * A debug shader passing color data to the fragment shader.\n */\n\n#include <mc_uniforms.glsl>\n\nlayout(l"
  },
  {
    "path": "core/assets/src/emulator/debug/debug.frag",
    "chars": 133,
    "preview": "#version 450\n\nlayout(location=0) in vec4 in_color;\n\nlayout(location=0) out vec4 out_color;\n\nvoid main() {\n    out_color "
  },
  {
    "path": "core/assets/src/emulator/debug/null.vert",
    "chars": 295,
    "preview": "#version 450\n/**\n * A debug shader passing 0 to the fragment shader.\n */\n\n#include <mc_uniforms.glsl>\n\nlayout(location=0"
  },
  {
    "path": "core/assets/src/emulator/debug/position.vert",
    "chars": 304,
    "preview": "#version 450\n/**\n * A debug shader only providing the position of the vertex.\n */\n\n#include <mc_uniforms.glsl>\n\nlayout(l"
  },
  {
    "path": "core/assets/src/emulator/debug/textured.frag",
    "chars": 230,
    "preview": "#version 450\n\n#include <mc_uniforms.glsl>\n\nlayout(location=1) in vec2 in_uv;\n\nlayout(location=0) out vec4 out_color;\n\nla"
  },
  {
    "path": "core/assets/src/emulator/debug/uv.vert",
    "chars": 388,
    "preview": "#version 450\n/**\n * A debug shader passing uv data to the fragment shader.\n */\n\n#include <mc_uniforms.glsl>\n\nlayout(loca"
  },
  {
    "path": "core/assets/src/emulator/mc_uniforms.glsl",
    "chars": 2413,
    "preview": "/**\n * Defines all inputs to support minecrafts uniforms.\n */\n\nlayout(set=0, binding=1) uniform sampler2D[3] _mc_image;\n"
  },
  {
    "path": "core/assets/src/utils/blit.frag",
    "chars": 187,
    "preview": "#version 450\n\nlayout(location=0) in vec2 uv;\n\nlayout(location=0) out vec4 out_color;\n\nlayout(set=0,binding=0) uniform sa"
  },
  {
    "path": "core/assets/src/utils/full_screen_quad.vert",
    "chars": 373,
    "preview": "#version 450\n\nlayout(location=0) out vec2 uv;\n\nvec2 positions[4] = vec2[](\n    vec2(-1.0, 1.0),\n    vec2(-1.0, -1.0),\n  "
  },
  {
    "path": "core/natives/.cargo/config.toml",
    "chars": 72,
    "preview": "[env]\nB4D_RESOURCE_DIR = { value=\"../assets/build/out/\", relative=true }"
  },
  {
    "path": "core/natives/.gitignore",
    "chars": 69,
    "preview": "# Gradle local files\n/build/\n\n# Cargo local files\n/target/\nCargo.lock"
  },
  {
    "path": "core/natives/Cargo.toml",
    "chars": 824,
    "preview": "[package]\nname = \"b4d-core\"\nversion = \"0.1.0\"\nedition = \"2021\"\n\n[lib]\ncrate-type = [\"lib\", \"cdylib\"]\n\n[[example]]\nname ="
  },
  {
    "path": "core/natives/build.gradle.kts",
    "chars": 195,
    "preview": "plugins {\n    id(\"fr.stardustenterprises.rust.wrapper\") version \"3.2.5\"\n}\n\nrust {\n    release.set(true)\n\n    targets += "
  },
  {
    "path": "core/natives/build.rs",
    "chars": 315,
    "preview": "extern crate cmake;\n\n#[cfg(feature = \"docs-rs\")]\nfn main() {\n}\n\n#[cfg(not(feature = \"docs-rs\"))]\nfn main() {\n    let dst"
  },
  {
    "path": "core/natives/examples/immediate_cube.rs",
    "chars": 7268,
    "preview": "extern crate b4d_core;\n\nuse ash::vk;\nuse bytemuck::{cast_slice, Pod, Zeroable};\nuse winit::event::{Event, WindowEvent};\n"
  },
  {
    "path": "core/natives/libvma/CMakeLists.txt",
    "chars": 481,
    "preview": "project( b4d_core_vma )\ncmake_minimum_required( VERSION 3.13 )\ninclude(FetchContent)\n\nFetchContent_Declare(\n    vulkanMe"
  },
  {
    "path": "core/natives/rustfmt.toml",
    "chars": 16,
    "preview": "max_width = 140\n"
  },
  {
    "path": "core/natives/src/allocator/mod.rs",
    "chars": 12850,
    "preview": "use std::ffi::CString;\nuse std::fmt;\nuse std::ptr::NonNull;\nuse std::sync::Arc;\n\nuse ash::vk;\n\nuse crate::prelude::*;\n\nm"
  },
  {
    "path": "core/natives/src/allocator/vma.rs",
    "chars": 17351,
    "preview": "use std::os::raw::c_char;\nuse std::ffi::{c_void, CStr};\nuse ash::vk;\n\nuse crate::prelude::*;\n\n#[derive(Copy, Clone, Part"
  },
  {
    "path": "core/natives/src/b4d.rs",
    "chars": 8843,
    "preview": "use std::ffi::CString;\nuse std::sync::{Arc, Mutex};\nuse std::time::{Duration, Instant};\n\nuse ash::vk;\nuse crate::BUILD_I"
  },
  {
    "path": "core/natives/src/c_api.rs",
    "chars": 20243,
    "preview": "use std::panic::catch_unwind;\nuse std::process::exit;\nuse std::sync::Arc;\nuse ash::vk;\nuse crate::b4d::Blaze4D;\nuse crat"
  },
  {
    "path": "core/natives/src/c_log.rs",
    "chars": 1868,
    "preview": "//! Forwards rust logs to some external handler.\n\nuse std::panic::catch_unwind;\nuse std::process::exit;\nuse log::{Level,"
  },
  {
    "path": "core/natives/src/device/device.rs",
    "chars": 5907,
    "preview": "use core::panic::{UnwindSafe, RefUnwindSafe};\n\nuse std::cmp::Ordering;\nuse std::sync::{Arc, Mutex, MutexGuard};\nuse ash:"
  },
  {
    "path": "core/natives/src/device/device_utils.rs",
    "chars": 14014,
    "preview": "use std::ffi::CStr;\nuse std::iter::repeat;\nuse std::sync::{Arc, Weak};\n\nuse ash::prelude::VkResult;\nuse ash::vk;\nuse byt"
  },
  {
    "path": "core/natives/src/device/init.rs",
    "chars": 18005,
    "preview": "use std::collections::HashSet;\nuse std::ffi::{CStr, CString};\nuse std::os::raw::c_char;\nuse std::sync::Arc;\n\nuse ash::vk"
  },
  {
    "path": "core/natives/src/device/mod.rs",
    "chars": 69,
    "preview": "pub mod device;\npub mod init;\npub mod device_utils;\npub mod surface;\n"
  },
  {
    "path": "core/natives/src/device/surface.rs",
    "chars": 21604,
    "preview": "use std::fmt::{Debug, Formatter};\nuse std::ops::{BitAnd, BitOr};\nuse std::sync::{Arc, Mutex, MutexGuard, Weak};\nuse std:"
  },
  {
    "path": "core/natives/src/glfw_surface.rs",
    "chars": 3761,
    "preview": "use std::ffi::{c_void, CStr, CString};\nuse std::os::raw::c_char;\nuse std::panic::catch_unwind;\nuse std::process::exit;\nu"
  },
  {
    "path": "core/natives/src/instance/debug_messenger.rs",
    "chars": 1301,
    "preview": "use std::ffi::CStr;\nuse std::fmt::Debug;\nuse std::panic::{RefUnwindSafe, UnwindSafe};\nuse ash::vk;\n\npub trait DebugMesse"
  },
  {
    "path": "core/natives/src/instance/init.rs",
    "chars": 8276,
    "preview": "use std::collections::HashSet;\nuse std::ffi::{c_void, CStr, CString};\nuse std::fmt::{Debug, Formatter};\nuse std::str::Ut"
  },
  {
    "path": "core/natives/src/instance/instance.rs",
    "chars": 3814,
    "preview": "use core::panic::{UnwindSafe, RefUnwindSafe};\n\nuse std::cmp::Ordering;\nuse std::fmt::{Debug, Formatter};\nuse std::sync::"
  },
  {
    "path": "core/natives/src/instance/mod.rs",
    "chars": 57,
    "preview": "pub mod init;\npub mod instance;\npub mod debug_messenger;\n"
  },
  {
    "path": "core/natives/src/lib.rs",
    "chars": 2058,
    "preview": "#[macro_use]\nextern crate static_assertions;\n\nuse std::fmt::{Debug, Display, Formatter};\n\npub mod device;\npub mod instan"
  },
  {
    "path": "core/natives/src/objects/id.rs",
    "chars": 1715,
    "preview": "use std::fmt::{Debug, Formatter};\nuse std::hash::Hash;\nuse std::ops::Deref;\n\nuse ash::vk;\nuse ash::vk::Handle;\n\nuse crat"
  },
  {
    "path": "core/natives/src/objects/mod.rs",
    "chars": 113,
    "preview": "pub mod id;\npub mod sync;\n\nmod object_set;\n\npub use object_set::ObjectSetProvider;\npub use object_set::ObjectSet;"
  },
  {
    "path": "core/natives/src/objects/object_set.rs",
    "chars": 1662,
    "preview": "use std::cmp::Ordering;\nuse std::fmt::{Debug, Formatter};\nuse std::hash::{Hash, Hasher};\nuse std::sync::Arc;\n\nuse ash::v"
  },
  {
    "path": "core/natives/src/objects/sync.rs",
    "chars": 2538,
    "preview": "use std::cmp::Ordering;\nuse std::fmt::{Debug, Formatter};\nuse std::hash::{Hash, Hasher};\nuse ash::vk;\nuse ash::vk::Handl"
  },
  {
    "path": "core/natives/src/renderer/emulator/debug_pipeline.rs",
    "chars": 67911,
    "preview": "//! Provides a [`EmulatorPipeline`] implementation useful for debugging.\n\nuse std::collections::HashMap;\nuse std::ffi::C"
  },
  {
    "path": "core/natives/src/renderer/emulator/descriptors.rs",
    "chars": 3023,
    "preview": "use std::ptr::NonNull;\nuse std::sync::Arc;\n\nuse ash::vk;\nuse crate::allocator::{Allocation, HostAccess};\n\nuse crate::pre"
  },
  {
    "path": "core/natives/src/renderer/emulator/global_objects.rs",
    "chars": 15288,
    "preview": "use std::cmp::Ordering;\nuse std::collections::HashMap;\nuse std::hash::{Hash, Hasher};\nuse std::sync::{Arc, Mutex, Weak};"
  },
  {
    "path": "core/natives/src/renderer/emulator/immediate.rs",
    "chars": 8346,
    "preview": "use std::collections::VecDeque;\nuse std::panic::RefUnwindSafe;\nuse std::ptr::NonNull;\nuse std::sync::{Arc, Condvar, Mute"
  },
  {
    "path": "core/natives/src/renderer/emulator/mc_shaders.rs",
    "chars": 6299,
    "preview": "//! Structs used to process minecrafts uniforms and samplers\n\nuse std::collections::HashMap;\nuse std::fmt::Debug;\nuse st"
  },
  {
    "path": "core/natives/src/renderer/emulator/mod.rs",
    "chars": 6326,
    "preview": "//! The emulator renderer renders objects in a minecraft compatible manner.\n//!\n//! The [`EmulatorRenderer`] provides th"
  },
  {
    "path": "core/natives/src/renderer/emulator/pass.rs",
    "chars": 6399,
    "preview": "use std::collections::HashSet;\nuse std::sync::Arc;\n\nuse ash::vk;\n\nuse crate::renderer::emulator::immediate::ImmediateBuf"
  },
  {
    "path": "core/natives/src/renderer/emulator/pipeline.rs",
    "chars": 14699,
    "preview": "use std::hash::Hash;\nuse std::panic::{RefUnwindSafe, UnwindSafe};\nuse std::sync::{Arc, Weak};\nuse ash::prelude::VkResult"
  },
  {
    "path": "core/natives/src/renderer/emulator/share.rs",
    "chars": 6338,
    "preview": "use std::sync::{Arc, Condvar, Mutex};\nuse std::time::{Duration, Instant};\nuse std::panic::RefUnwindSafe;\nuse std::collec"
  },
  {
    "path": "core/natives/src/renderer/emulator/staging.rs",
    "chars": 6427,
    "preview": "use std::ptr::NonNull;\nuse std::sync::Arc;\n\nuse ash::vk;\nuse crate::allocator::{Allocation, HostAccess};\n\nuse crate::pre"
  },
  {
    "path": "core/natives/src/renderer/emulator/worker.rs",
    "chars": 45702,
    "preview": "use std::cell::RefCell;\nuse std::collections::HashMap;\nuse std::marker::PhantomData;\nuse std::rc::Rc;\nuse std::sync::Arc"
  },
  {
    "path": "core/natives/src/renderer/mod.rs",
    "chars": 18,
    "preview": "pub mod emulator;\n"
  },
  {
    "path": "core/natives/src/util/alloc.rs",
    "chars": 18032,
    "preview": "//! Utilities to support creating device memory allocators\n\nuse ash::vk;\n\n\npub fn next_aligned(base: vk::DeviceSize, ali"
  },
  {
    "path": "core/natives/src/util/format.rs",
    "chars": 25402,
    "preview": "use std::cmp::Ordering;\nuse std::fmt::{Debug, Formatter};\nuse std::hash::{Hash, Hasher};\n\nuse ash::vk;\n\n#[derive(Eq, Cop"
  },
  {
    "path": "core/natives/src/util/id.rs",
    "chars": 6428,
    "preview": "/// Utilities for globally unique identifiers.\nuse std::cell::RefCell;\n\nuse std::cmp::Ordering;\nuse std::fmt::{Debug, Fo"
  },
  {
    "path": "core/natives/src/util/mod.rs",
    "chars": 93,
    "preview": "pub mod id;\npub mod rand;\npub mod slice_splitter;\npub mod alloc;\npub mod vk;\npub mod format;\n"
  },
  {
    "path": "core/natives/src/util/rand.rs",
    "chars": 2563,
    "preview": "/// Implements the Xoshiro256++ random number algorithm.\n/// See https://prng.di.unimi.it/xoshiro256plusplus.c\n#[derive("
  },
  {
    "path": "core/natives/src/util/slice_splitter.rs",
    "chars": 947,
    "preview": "/// Enables mutable access to one element of a slice while still providing immutable access\n/// to other elements.\npub s"
  },
  {
    "path": "core/natives/src/util/vk.rs",
    "chars": 472,
    "preview": "use ash::vk;\n\nuse crate::prelude::*;\n\n#[inline]\npub fn make_full_viewport(size: Vec2u32) -> vk::Viewport {\n    vk::Viewp"
  },
  {
    "path": "core/natives/src/vk/mod.rs",
    "chars": 270,
    "preview": "//! This is a legacy module\n//!\n//! Some of the structs and functions are still used in places but the ultimate goal is "
  },
  {
    "path": "core/natives/src/vk/objects/buffer.rs",
    "chars": 1964,
    "preview": "use std::cmp::Ordering;\nuse std::fmt::{Debug, Formatter};\nuse std::hash::{Hash, Hasher};\nuse ash::vk;\nuse ash::vk::Handl"
  },
  {
    "path": "core/natives/src/vk/objects/image.rs",
    "chars": 10849,
    "preview": "use std::cmp::Ordering;\nuse std::fmt::{Debug, Formatter};\nuse std::hash::{Hash, Hasher};\n\nuse ash::vk;\nuse ash::vk::Hand"
  },
  {
    "path": "core/natives/src/vk/objects/mod.rs",
    "chars": 338,
    "preview": "pub use buffer::BufferRange;\npub use buffer::BufferSpec;\npub use crate::util::format::Format;\npub use image::ImageDescri"
  },
  {
    "path": "core/natives/src/vk/objects/surface.rs",
    "chars": 3319,
    "preview": "use std::ffi::CString;\nuse std::fmt::{Debug, Formatter};\nuse std::ops::Deref;\n\nuse ash::vk;\n\nuse crate::prelude::*;\n\n#[d"
  },
  {
    "path": "core/natives/src/vk/objects/swapchain.rs",
    "chars": 2864,
    "preview": "use crate::util::format::*;\nuse super::image::*;\n\nuse ash::vk;\n\n#[derive(Copy, Clone)]\npub struct SwapchainImageSpec {\n "
  },
  {
    "path": "core/natives/src/vk/objects/types.rs",
    "chars": 5138,
    "preview": "use std::fmt::{Debug, Formatter};\nuse std::hash::{Hash, Hasher};\nuse std::num::NonZeroU64;\nuse std::sync::atomic::{Atomi"
  },
  {
    "path": "core/natives/src/vk/test.rs",
    "chars": 1152,
    "preview": "use std::ffi::{CString};\nuse std::sync::Arc;\n\nuse ash::vk;\n\nuse crate::{B4D_CORE_VERSION_MAJOR, B4D_CORE_VERSION_MINOR, "
  },
  {
    "path": "core/natives/src/window.rs",
    "chars": 1830,
    "preview": "use std::ffi::{CStr, CString};\nuse ash::{Entry, Instance, vk};\nuse winit::dpi::LogicalSize;\nuse winit::event_loop::Event"
  },
  {
    "path": "core/natives/tests/test_common/mod.rs",
    "chars": 0,
    "preview": ""
  },
  {
    "path": "gradle/wrapper/gradle-wrapper.properties",
    "chars": 202,
    "preview": "distributionBase=GRADLE_USER_HOME\ndistributionPath=wrapper/dists\ndistributionUrl=https\\://services.gradle.org/distributi"
  },
  {
    "path": "gradle.properties",
    "chars": 25,
    "preview": "org.gradle.jvmargs=-Xmx2G"
  },
  {
    "path": "gradlew",
    "chars": 8047,
    "preview": "#!/bin/sh\n\n#\n# Copyright © 2015-2021 the original authors.\n#\n# Licensed under the Apache License, Version 2.0 (the \"Lice"
  },
  {
    "path": "gradlew.bat",
    "chars": 2674,
    "preview": "@rem\n@rem Copyright 2015 the original author or authors.\n@rem\n@rem Licensed under the Apache License, Version 2.0 (the \""
  },
  {
    "path": "mod/.gitignore",
    "chars": 61,
    "preview": "# Gradle local files\n/build/\n\n# Minecraft run directory\n/run/"
  },
  {
    "path": "mod/LICENSE",
    "chars": 7652,
    "preview": "                   GNU LESSER GENERAL PUBLIC LICENSE\n                       Version 3, 29 June 2007\n\n Copyright (C) 2007"
  },
  {
    "path": "mod/build.gradle.kts",
    "chars": 3847,
    "preview": "plugins {\n\tid(\"fabric-loom\") version \"0.12-SNAPSHOT\"\n\t//id(\"io.github.juuxel.loom-quiltflower-mini\") version \"1.2.1\"\n\t`m"
  },
  {
    "path": "mod/gradle.properties",
    "chars": 232,
    "preview": "# Fabric Properties\n# check these on https://fabricmc.net/use\nminecraft_version=1.19\nloader_version=0.14.6\n\n# Mod Proper"
  },
  {
    "path": "mod/src/main/java/graphics/kiln/blaze4d/Blaze4D.java",
    "chars": 2292,
    "preview": "package graphics.kiln.blaze4d;\n\nimport com.mojang.blaze3d.systems.RenderSystem;\nimport graphics.kiln.blaze4d.core.Blaze4"
  },
  {
    "path": "mod/src/main/java/graphics/kiln/blaze4d/Blaze4DMixinPlugin.java",
    "chars": 1397,
    "preview": "package graphics.kiln.blaze4d;\n\nimport net.fabricmc.loader.api.FabricLoader;\nimport org.objectweb.asm.tree.ClassNode;\nim"
  },
  {
    "path": "mod/src/main/java/graphics/kiln/blaze4d/Blaze4DPreLaunch.java",
    "chars": 1262,
    "preview": "package graphics.kiln.blaze4d;\n\nimport net.fabricmc.loader.api.entrypoint.PreLaunchEntrypoint;\nimport org.lwjgl.system.C"
  },
  {
    "path": "mod/src/main/java/graphics/kiln/blaze4d/api/B4DShader.java",
    "chars": 128,
    "preview": "package graphics.kiln.blaze4d.api;\n\nimport com.mojang.math.Vector3f;\n\npublic interface B4DShader {\n    long b4dGetShader"
  },
  {
    "path": "mod/src/main/java/graphics/kiln/blaze4d/api/B4DUniform.java",
    "chars": 133,
    "preview": "package graphics.kiln.blaze4d.api;\n\npublic interface B4DUniform {\n    graphics.kiln.blaze4d.core.types.B4DUniform getB4D"
  },
  {
    "path": "mod/src/main/java/graphics/kiln/blaze4d/api/B4DVertexBuffer.java",
    "chars": 169,
    "preview": "package graphics.kiln.blaze4d.api;\n\nimport graphics.kiln.blaze4d.core.types.B4DMeshData;\n\npublic interface B4DVertexBuff"
  },
  {
    "path": "mod/src/main/java/graphics/kiln/blaze4d/api/Utils.java",
    "chars": 5239,
    "preview": "package graphics.kiln.blaze4d.api;\n\nimport com.google.common.collect.ImmutableList;\nimport com.mojang.blaze3d.vertex.Ver"
  },
  {
    "path": "mod/src/main/java/graphics/kiln/blaze4d/emulation/GLStateTracker.java",
    "chars": 3161,
    "preview": "/**\n * Tracks opengl state for vulkan emulation.\n */\n\npackage graphics.kiln.blaze4d.emulation;\n\nimport graphics.kiln.bla"
  },
  {
    "path": "mod/src/main/java/graphics/kiln/blaze4d/mixin/integration/FramebufferMixin.java",
    "chars": 1272,
    "preview": "package graphics.kiln.blaze4d.mixin.integration;\n\nimport com.mojang.blaze3d.pipeline.RenderTarget;\nimport org.spongepowe"
  },
  {
    "path": "mod/src/main/java/graphics/kiln/blaze4d/mixin/integration/GLXMixin.java",
    "chars": 1048,
    "preview": "package graphics.kiln.blaze4d.mixin.integration;\n\nimport com.mojang.blaze3d.platform.GLX;\nimport com.mojang.blaze3d.plat"
  },
  {
    "path": "mod/src/main/java/graphics/kiln/blaze4d/mixin/integration/GlDebugMixin.java",
    "chars": 577,
    "preview": "package graphics.kiln.blaze4d.mixin.integration;\n\nimport com.mojang.blaze3d.platform.GlDebug;\nimport org.spongepowered.a"
  },
  {
    "path": "mod/src/main/java/graphics/kiln/blaze4d/mixin/integration/GlStateManagerMixin.java",
    "chars": 16813,
    "preview": "package graphics.kiln.blaze4d.mixin.integration;\n\nimport com.mojang.blaze3d.platform.GlStateManager;\n//import com.mojang"
  },
  {
    "path": "mod/src/main/java/graphics/kiln/blaze4d/mixin/integration/MinecraftClientMixin.java",
    "chars": 1491,
    "preview": "package graphics.kiln.blaze4d.mixin.integration;\n\nimport graphics.kiln.blaze4d.Blaze4D;\nimport net.minecraft.client.Mine"
  },
  {
    "path": "mod/src/main/java/graphics/kiln/blaze4d/mixin/integration/VertexFormatMixin.java",
    "chars": 591,
    "preview": "package graphics.kiln.blaze4d.mixin.integration;\n\nimport com.mojang.blaze3d.vertex.VertexFormat;\nimport org.spongepowere"
  },
  {
    "path": "mod/src/main/java/graphics/kiln/blaze4d/mixin/integration/VideoWarningManagerMixin.java",
    "chars": 734,
    "preview": "package graphics.kiln.blaze4d.mixin.integration;\n\nimport org.spongepowered.asm.mixin.Mixin;\nimport org.spongepowered.asm"
  },
  {
    "path": "mod/src/main/java/graphics/kiln/blaze4d/mixin/integration/WindowFramebufferMixin.java",
    "chars": 1356,
    "preview": "package graphics.kiln.blaze4d.mixin.integration;\n\nimport com.mojang.blaze3d.pipeline.MainTarget;\nimport com.mojang.blaze"
  },
  {
    "path": "mod/src/main/java/graphics/kiln/blaze4d/mixin/integration/WindowMixin.java",
    "chars": 4498,
    "preview": "package graphics.kiln.blaze4d.mixin.integration;\n\nimport com.mojang.blaze3d.platform.DisplayData;\nimport com.mojang.blaz"
  },
  {
    "path": "mod/src/main/java/graphics/kiln/blaze4d/mixin/render/BufferUploaderMixin.java",
    "chars": 4157,
    "preview": "package graphics.kiln.blaze4d.mixin.render;\n\nimport com.mojang.blaze3d.systems.RenderSystem;\nimport com.mojang.blaze3d.v"
  },
  {
    "path": "mod/src/main/java/graphics/kiln/blaze4d/mixin/render/RenderSystemMixin.java",
    "chars": 1438,
    "preview": "package graphics.kiln.blaze4d.mixin.render;\n\nimport com.mojang.blaze3d.systems.RenderSystem;\nimport com.mojang.blaze3d.v"
  },
  {
    "path": "mod/src/main/java/graphics/kiln/blaze4d/mixin/render/VertexBufferMixin.java",
    "chars": 5932,
    "preview": "package graphics.kiln.blaze4d.mixin.render;\n\nimport com.mojang.blaze3d.systems.RenderSystem;\nimport com.mojang.blaze3d.v"
  },
  {
    "path": "mod/src/main/java/graphics/kiln/blaze4d/mixin/render/WorldRendererMixin.java",
    "chars": 4809,
    "preview": "package graphics.kiln.blaze4d.mixin.render;\n\nimport com.mojang.authlib.minecraft.client.MinecraftClient;\nimport com.moja"
  },
  {
    "path": "mod/src/main/java/graphics/kiln/blaze4d/mixin/shader/GlStateManagerMixin.java",
    "chars": 10021,
    "preview": "package graphics.kiln.blaze4d.mixin.shader;\n\nimport com.mojang.blaze3d.platform.GlStateManager;\nimport com.mojang.blaze3"
  },
  {
    "path": "mod/src/main/java/graphics/kiln/blaze4d/mixin/shader/GlUniformMixin.java",
    "chars": 10645,
    "preview": "package graphics.kiln.blaze4d.mixin.shader;\n\nimport com.mojang.blaze3d.shaders.AbstractUniform;\nimport com.mojang.blaze3"
  },
  {
    "path": "mod/src/main/java/graphics/kiln/blaze4d/mixin/shader/RenderSystemMixin.java",
    "chars": 1108,
    "preview": "package graphics.kiln.blaze4d.mixin.shader;\n\nimport com.mojang.blaze3d.systems.RenderSystem;\nimport net.minecraft.client"
  },
  {
    "path": "mod/src/main/java/graphics/kiln/blaze4d/mixin/shader/ShaderAccessor.java",
    "chars": 403,
    "preview": "package graphics.kiln.blaze4d.mixin.shader;\n\nimport org.spongepowered.asm.mixin.Mixin;\nimport org.spongepowered.asm.mixi"
  },
  {
    "path": "mod/src/main/java/graphics/kiln/blaze4d/mixin/shader/ShaderMixin.java",
    "chars": 4514,
    "preview": "package graphics.kiln.blaze4d.mixin.shader;\n\nimport com.mojang.blaze3d.shaders.Uniform;\nimport com.mojang.blaze3d.system"
  },
  {
    "path": "mod/src/main/java/graphics/kiln/blaze4d/mixin/texture/LightmapTextureManagerMixin.java",
    "chars": 1382,
    "preview": "package graphics.kiln.blaze4d.mixin.texture;\n\nimport com.mojang.blaze3d.platform.GlStateManager;\nimport com.mojang.blaze"
  },
  {
    "path": "mod/src/main/java/graphics/kiln/blaze4d/mixin/texture/NativeImageMixin.java",
    "chars": 3057,
    "preview": "package graphics.kiln.blaze4d.mixin.texture;\n\nimport com.mojang.blaze3d.platform.NativeImage;\nimport org.jetbrains.annot"
  },
  {
    "path": "mod/src/main/java/graphics/kiln/blaze4d/mixin/texture/RenderSystemMixin.java",
    "chars": 2473,
    "preview": "package graphics.kiln.blaze4d.mixin.texture;\n\nimport com.mojang.blaze3d.systems.RenderSystem;\nimport net.minecraft.clien"
  },
  {
    "path": "mod/src/main/java/graphics/kiln/blaze4d/mixin/texture/TextureManagerMixin.java",
    "chars": 414,
    "preview": "package graphics.kiln.blaze4d.mixin.texture;\n\nimport net.minecraft.client.renderer.texture.TextureManager;\nimport org.sp"
  },
  {
    "path": "mod/src/main/java/graphics/kiln/blaze4d/mixin/texture/TextureUtilMixin_Development.java",
    "chars": 851,
    "preview": "package graphics.kiln.blaze4d.mixin.texture;\n\nimport com.mojang.blaze3d.platform.NativeImage;\nimport com.mojang.blaze3d."
  },
  {
    "path": "mod/src/main/java/graphics/kiln/blaze4d/mixin/texture/TextureUtilMixin_Runtime.java",
    "chars": 828,
    "preview": "package graphics.kiln.blaze4d.mixin.texture;\n\nimport com.mojang.blaze3d.platform.NativeImage;\nimport com.mojang.blaze3d."
  },
  {
    "path": "mod/src/main/resources/blaze4d.aw",
    "chars": 1379,
    "preview": "accessWidener v1 named\n\n# Make animated textures stop animating\naccessible class net/minecraft/client/renderer/texture/T"
  },
  {
    "path": "mod/src/main/resources/blaze4d.mixins.json",
    "chars": 1064,
    "preview": "{\n  \"required\": true,\n  \"minVersion\": \"0.8\",\n  \"package\": \"graphics.kiln.blaze4d.mixin\",\n  \"compatibilityLevel\": \"JAVA_1"
  },
  {
    "path": "mod/src/main/resources/fabric.mod.json",
    "chars": 820,
    "preview": "{\n  \"schemaVersion\": 1,\n  \"id\": \"blaze4d\",\n  \"version\": \"${version}\",\n  \"name\": \"Blaze 4D\",\n  \"description\": \"Blaze3D Bu"
  },
  {
    "path": "settings.gradle.kts",
    "chars": 406,
    "preview": "rootProject.name = \"blaze4d\"\n\npluginManagement {\n    repositories {\n        gradlePluginPortal()\n\n        maven {\n      "
  }
]

// ... and 1 more files (download for full content)

About this extraction

This page contains the full source code of the hYdos/Blaze4D GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 170 files (978.1 KB), approximately 283.7k tokens, and a symbol index with 1296 extracted functions, classes, methods, constants, and types. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.

Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.

Copied to clipboard!