diff --git a/.github/workflows/gradle.yml b/.github/workflows/gradle.yml index eea4f225..8c426cce 100644 --- a/.github/workflows/gradle.yml +++ b/.github/workflows/gradle.yml @@ -19,7 +19,7 @@ jobs: strategy: matrix: java: [ - 22 + 23-ea ] os: [ ubuntu-latest, windows-latest, macos-latest ] runs-on: ${{ matrix.os }} @@ -38,10 +38,15 @@ jobs: uses: gradle/actions/setup-gradle@v3 - name: Execute Gradle build run: ./gradlew build --parallel + - name: Upload build reports + uses: actions/upload-artifact@v4 + with: + name: build-reports-${{ runner.os }}-jdk${{ matrix.java }} + path: | + modules/samples/build/reports/ - name: Capture build artifacts - if: ${{ runner.os == 'Linux' && matrix.java == '22' }} uses: actions/upload-artifact@v4 with: - name: artifacts + name: artifacts-${{ runner.os }}-jdk${{ matrix.java }} path: | modules/**/build/libs/ diff --git a/.github/workflows/javadoc.yml b/.github/workflows/javadoc.yml index 6c500a84..1ea6d31c 100644 --- a/.github/workflows/javadoc.yml +++ b/.github/workflows/javadoc.yml @@ -25,7 +25,7 @@ jobs: uses: actions/setup-java@v4 with: java-version: | - 22 + 23-ea distribution: 'temurin' - name: Grant execute permission for gradlew if: ${{ runner.os != 'Windows' }} diff --git a/README.md b/README.md index 3a868f05..dc0d0730 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ ![License](https://img.shields.io/github/license/Over-Run/overrungl) -![Maven Central](https://img.shields.io/maven-central/v/io.github.over-run/overrungl) +[//]: # (![Maven Central](https://img.shields.io/maven-central/v/io.github.over-run/overrungl)) ![Sonatype Nexus (Snapshots)](https://img.shields.io/nexus/s/io.github.over-run/overrungl?server=https%3A%2F%2Fs01.oss.sonatype.org) [![Java CI with Gradle](https://github.com/Over-Run/overrungl/actions/workflows/gradle.yml/badge.svg?event=push)](https://github.com/Over-Run/overrungl/actions/workflows/gradle.yml) @@ -10,7 +10,7 @@ ## Introduction -Overrun Game Library is a high-performance library implemented with Java 22, +Overrun Game Library is a high-performance library implemented with Java 23, which enables cross-platform access to a set of C/C++ library bindings, and provides some useful utilities. ### OverrunGL vs. LWJGL @@ -29,8 +29,7 @@ the [samples](modules/samples/src/main/java/overrungl/demo). We provided a modules customizer [here](https://over-run.github.io/overrungl-gen/). -Currently, we are developing with the first version, -and it uses preview features, which prevent users from using newer JDKs, +Currently, OverrunGL uses preview features, which prevent users from using newer JDKs, so you have to use `-SNAPSHOT` version. You can import with `io.github.over-run:overrungl-bom:{the version}` and other submodules. diff --git a/build.gradle.kts b/build.gradle.kts index ec68f9f9..959b667e 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -1,5 +1,3 @@ -import org.gradle.plugins.ide.idea.model.IdeaModel - plugins { `java-platform` `maven-publish` @@ -7,113 +5,18 @@ plugins { } val projGroupId: String by project -val projArtifactId: String by project -val projName: String by project val projVersion: String by project -val projVcs: String by project -val projBranch: String by project val projLicenseYear: String by project -val projLicenseFileName: String by project -val orgName: String by project -val orgUrl: String by project val jdkVersion: String by rootProject val jdkEnablePreview: String by rootProject val jdkEarlyAccessDoc: String? by rootProject -val kotlinTargetJdkVersion: String by rootProject val targetJavaVersion = jdkVersion.toInt() group = projGroupId version = projVersion -val artifactNameMap = buildMap { - Artifact.values().forEach { put(it.subprojectName, it.artifactName) } - put(":samples", "overrungl-samples") -} - -artifactNameMap.forEach { (subprojectName, artifactName) -> - project(subprojectName) { - apply(plugin = "java-library") - apply(plugin = "idea") - - group = projGroupId - version = projVersion - - repositories { - mavenCentral() - // temporary maven repositories - maven { url = uri("https://s01.oss.sonatype.org/content/repositories/snapshots") } - maven { url = uri("https://s01.oss.sonatype.org/content/repositories/releases") } - } - - val compileOnly by configurations - dependencies { - compileOnly("org.jetbrains:annotations:24.1.0") - if (project.name != "core") { - compileOnly(project(Artifact.CORE.subprojectName)) - constraints { api("io.github.over-run:overrungl:$projVersion") } - } - } - - tasks.withType { - options.encoding = "UTF-8" - if (jdkEnablePreview.toBoolean()) options.compilerArgs.add("--enable-preview") - options.release.set(targetJavaVersion) - } - - tasks.withType { - if (jdkEnablePreview.toBoolean()) jvmArgs("--enable-preview") - } - - extensions.configure("java") { - toolchain.languageVersion.set(JavaLanguageVersion.of(targetJavaVersion)) - withJavadocJar() - withSourcesJar() - } - - tasks.named("jar") { - manifestContentCharset = "utf-8" - metadataCharset = "utf-8" - manifest.attributes( - "Specification-Title" to projName, - "Specification-Vendor" to "Overrun Organization", - "Specification-Version" to projVersion.split('.', limit = 2)[0], - "Implementation-Title" to projName, - "Implementation-Vendor" to "Overrun Organization", - "Implementation-Version" to projVersion - ) - archiveBaseName.set(artifactName) - from(rootProject.file(projLicenseFileName)).rename( - projLicenseFileName, - "${projLicenseFileName}_$artifactName" - ) - } - - tasks.named("sourcesJar") { - dependsOn(tasks["classes"]) - archiveBaseName.set(artifactName) - archiveClassifier.set("sources") - from(sourceSets["main"].allSource) - } - - tasks.named("javadocJar") { - val javadoc by tasks - dependsOn(javadoc) - archiveBaseName.set(artifactName) - archiveClassifier.set("javadoc") - from(javadoc) - } - - artifacts { - archives(tasks["sourcesJar"]) - archives(tasks["javadocJar"]) - } - - the().module.inheritOutputDirs = true - } -} - allprojects { tasks.withType { options { @@ -144,145 +47,27 @@ allprojects { ) bottom = - "Report a bug or suggest an enhancement
" + - "Copyright © 2022-$projLicenseYear Overrun Organization
" + - "$projVersion" + """Report a bug or suggest an enhancement
""" + + "Copyright © $projLicenseYear Overrun Organization
" + + "$projVersion (env ${Runtime.version()})" } } encoding = "UTF-8" locale = "en_US" windowTitle = "OverrunGL $projVersion" + jFlags("-Duser.language=en-US") } title = "OverrunGL $projVersion" isFailOnError = false } } -Artifact.values().forEach { - project(it.subprojectName) { - val javaComponent = components.findByName("java") as AdhocComponentWithVariants - // Add a different runtime variant for each platform - it.nativeBinding?.platforms?.forEach { platform -> - val nativeFileName = it.nativeFileName(platform) - val file = File("${rootProject.projectDir}/natives/$nativeFileName") - - if (file.exists()) { - val archiveTaskName = "${it.nativeBinding?.bindingName}${platform.classifier}Jar" - - val nativeJar = tasks.register(archiveTaskName) { - archiveBaseName.set(it.artifactName) - archiveClassifier.set(platform.classifier) - from(file) { into(File(nativeFileName).parent) } - } - - val nativeRuntimeElements = configurations.create(platform.classifier + "RuntimeElements") { - isCanBeConsumed = true; isCanBeResolved = false - attributes { - attribute(Category.CATEGORY_ATTRIBUTE, objects.named(Category.LIBRARY)) - attribute(Bundling.BUNDLING_ATTRIBUTE, objects.named(Bundling.EXTERNAL)) - attribute(TargetJvmVersion.TARGET_JVM_VERSION_ATTRIBUTE, targetJavaVersion) - attribute(LibraryElements.LIBRARY_ELEMENTS_ATTRIBUTE, objects.named(LibraryElements.JAR)) - attribute(Usage.USAGE_ATTRIBUTE, objects.named(Usage.JAVA_RUNTIME)) - attributes.attribute( - OperatingSystemFamily.OPERATING_SYSTEM_ATTRIBUTE, - objects.named(platform.osFamilyName) - ) - attributes.attribute(MachineArchitecture.ARCHITECTURE_ATTRIBUTE, objects.named(platform.osArch)) - } - outgoing.artifact(tasks.named("jar")) - outgoing.artifact(nativeJar) - extendsFrom(configurations["runtimeElements"]) - } - javaComponent.addVariantsFromConfiguration(nativeRuntimeElements) {} - } - } - } -} - publishing.publications { - fun MavenPom.setupPom(pomName: String, pomDescription: String, pomPackaging: String) { - name.set(pomName) - description.set(pomDescription) - url.set("https://github.com/$projVcs") - packaging = pomPackaging - licenses { - license { - name.set("MIT") - url.set("https://raw.githubusercontent.com/$projVcs/$projBranch/LICENSE") - } - } - organization { - name.set(orgName) - url.set(orgUrl) - } - developers { - developer { - id = "squid233" - url = "https://github.com/squid233" - organization = orgName - organizationUrl = orgUrl - } - } - scm { - connection.set("scm:git:https://github.com/${projVcs}.git") - developerConnection.set("scm:git:https://github.com/${projVcs}.git") - url.set("https://github.com/${projVcs}.git") - } - } - - Artifact.values().forEach { module -> - create("maven${module.name}") { - groupId = projGroupId - artifactId = module.artifactName - version = projVersion - description = module.projectDescription - from(project(module.subprojectName).components["java"]) - pom { - setupPom(module.projectName, module.projectDescription, "jar") - } - } - } - create("overrunglBOM") { from(components["javaPlatform"]) artifactId = "overrungl-bom" pom { - fun org.w3c.dom.Node.appendBOM(platform: NativePlatform?, module: Artifact) { - ownerDocument.createElement("dependency").also(::appendChild).apply { - appendChild( - ownerDocument.createElement("groupId").also(::appendChild) - .apply { textContent = "io.github.over-run" }) - appendChild( - ownerDocument.createElement("artifactId").also(::appendChild) - .apply { textContent = module.artifactName }) - appendChild( - ownerDocument.createElement("version").also(::appendChild) - .apply { textContent = projVersion }) - if (platform != null) { - appendChild( - ownerDocument.createElement("classifier").also(::appendChild) - .apply { textContent = platform.classifier }) - } - } - } - setupPom("OverrunGL BOM", "OverrunGL Bill of Materials.", "pom") - withXml { - asElement().getElementsByTagName("dependencyManagement").item(0).apply { - asElement().getElementsByTagName("dependencies").item(0).apply { - Artifact.values().forEach { module -> - if (module.nativeBinding != null) { - module.nativeBinding!!.platforms.forEach { appendBOM(it, module) } - } else { - appendBOM(null, module) - } - } - } - } - - // Workaround for https://github.com/gradle/gradle/issues/7529 - asNode() - } } } } @@ -310,9 +95,3 @@ signing { if (!projVersion.endsWith("-SNAPSHOT") && System.getProperty("gpg.signing", "true").toBoolean()) sign(publishing.publications) } - -dependencies { - constraints { - Artifact.values().forEach { api("io.github.over-run:${it.artifactName}:$projVersion") } - } -} diff --git a/buildSrc/src/main/kotlin/OverrunGLModuleExtension.kt b/buildSrc/src/main/kotlin/OverrunGLModuleExtension.kt new file mode 100644 index 00000000..dc827aa8 --- /dev/null +++ b/buildSrc/src/main/kotlin/OverrunGLModuleExtension.kt @@ -0,0 +1,12 @@ +import org.gradle.api.provider.Property +import org.gradle.api.provider.Provider + +/** + * @author squid233 + * @since 0.1.0 + */ +abstract class OverrunGLModuleExtension { + abstract val artifactName: Property + abstract val publishInfo: Property + abstract val nativeBinding: Property +} diff --git a/buildSrc/src/main/kotlin/accessors.kt b/buildSrc/src/main/kotlin/accessors.kt new file mode 100644 index 00000000..c930a6ea --- /dev/null +++ b/buildSrc/src/main/kotlin/accessors.kt @@ -0,0 +1,8 @@ +import org.gradle.api.Action +import org.gradle.api.Project + +val Project.overrunglModule: OverrunGLModuleExtension + get() = extensions.getByName("overrunglModule") as OverrunGLModuleExtension + +fun Project.overrunglModule(configure: Action) = + extensions.configure("overrunglModule", configure) diff --git a/buildSrc/src/main/kotlin/generator.java-conventions.gradle.kts b/buildSrc/src/main/kotlin/generator.conventions.gradle.kts similarity index 100% rename from buildSrc/src/main/kotlin/generator.java-conventions.gradle.kts rename to buildSrc/src/main/kotlin/generator.conventions.gradle.kts diff --git a/buildSrc/src/main/kotlin/module.conventions.gradle.kts b/buildSrc/src/main/kotlin/module.conventions.gradle.kts new file mode 100644 index 00000000..a7172cdd --- /dev/null +++ b/buildSrc/src/main/kotlin/module.conventions.gradle.kts @@ -0,0 +1,137 @@ +import org.gradle.plugins.ide.idea.model.IdeaModel + +plugins { + `java-library` + idea +} + +val overrunglModule = extensions.create("overrunglModule") + +val projGroupId: String by rootProject +val projName: String by rootProject +val projVersion: String by rootProject + +val jdkVersion: String by rootProject +val jdkEnablePreview: String by rootProject + +val targetJavaVersion = jdkVersion.toInt() + +group = projGroupId +version = projVersion + +repositories { + mavenCentral() + // temporary maven repositories + maven { url = uri("https://s01.oss.sonatype.org/content/repositories/snapshots") } + maven { url = uri("https://s01.oss.sonatype.org/content/repositories/releases") } +} + +dependencies { + compileOnly("org.jetbrains:annotations:24.1.0") +} + +tasks.withType { + options.encoding = "UTF-8" + if (jdkEnablePreview.toBoolean()) options.compilerArgs.add("--enable-preview") + options.release.set(targetJavaVersion) +} + +tasks.withType { + if (jdkEnablePreview.toBoolean()) jvmArgs("--enable-preview") +} + +extensions.configure("java") { + toolchain.languageVersion.set(JavaLanguageVersion.of(targetJavaVersion)) + withJavadocJar() + withSourcesJar() +} + +tasks.named("jar") { + manifest.attributes( + "Specification-Title" to projName, + "Specification-Vendor" to "Overrun Organization", + "Specification-Version" to projVersion.split('.', limit = 2)[0], + "Implementation-Title" to projName, + "Implementation-Vendor" to "Overrun Organization", + "Implementation-Version" to projVersion + ) + archiveBaseName.set(overrunglModule.artifactName) + from(rootProject.file("LICENSE")) { + rename { "${it}_${overrunglModule.artifactName.get()}" } + } +} + +tasks.named("sourcesJar") { + dependsOn(tasks["classes"]) + archiveBaseName.set(overrunglModule.artifactName) + archiveClassifier.set("sources") + from(sourceSets["main"].allSource) +} + +tasks.named("javadocJar") { + val javadoc by tasks + dependsOn(javadoc) + archiveBaseName.set(overrunglModule.artifactName) + archiveClassifier.set("javadoc") + from(javadoc) +} + +artifacts { + add("archives", tasks["sourcesJar"]) + add("archives", tasks["javadocJar"]) +} + +the().module.inheritOutputDirs = true + +afterEvaluate { + overrunglModule.publishInfo.orNull?.also { + rootProject.pluginManager.withPlugin("publishing") { + rootProject.extensions.configure("publishing") { + publications { + create("maven${it.name}") { + groupId = projGroupId + artifactId = overrunglModule.artifactName.get() + version = projVersion + description = it.projectDescription + from(components["java"]) + pom { + setupPom(it.projectName, it.projectDescription, "jar") + } + } + overrunglModule.nativeBinding.orNull?.platforms?.forEach { platform -> + getByName("overrunglBOM") { + pom { + withXml { + asElement().getElementsByTagName("dependencyManagement").item(0).apply { + asElement().getElementsByTagName("dependencies").item(0).apply { + ownerDocument.createElement("dependency").also(::appendChild).apply { + appendChild(ownerDocument.createElement("groupId") + .also(::appendChild) + .apply { textContent = projGroupId }) + appendChild(ownerDocument.createElement("artifactId") + .also(::appendChild) + .apply { textContent = overrunglModule.artifactName.get() }) + appendChild(ownerDocument.createElement("version") + .also(::appendChild) + .apply { textContent = projVersion }) + appendChild(ownerDocument.createElement("classifier") + .also(::appendChild) + .apply { textContent = platform.classifier }) + } + } + } + } + } + } + } + } + } + } + + rootProject.dependencies { + constraints { + api("io.github.over-run:${overrunglModule.artifactName.get()}:$projVersion") + } + } + } +} diff --git a/buildSrc/src/main/kotlin/native.conventions.gradle.kts b/buildSrc/src/main/kotlin/native.conventions.gradle.kts new file mode 100644 index 00000000..441662f7 --- /dev/null +++ b/buildSrc/src/main/kotlin/native.conventions.gradle.kts @@ -0,0 +1,42 @@ +val jdkVersion: String by rootProject +val targetJavaVersion = jdkVersion.toInt() + +val javaComponent = components["java"] as AdhocComponentWithVariants + +// Add a different runtime variant for each platform +afterEvaluate { + overrunglModule.nativeBinding.get().also { nativeBinding -> + nativeBinding.platforms.forEach { platform -> + val archiveTaskName = "${nativeBinding.bindingName}${platform.classifier}Jar" + + val nativeJar = tasks.register(archiveTaskName) { + archiveBaseName.set(overrunglModule.artifactName) + archiveClassifier.set(platform.classifier) + + val nativeFileName = nativeFileName(nativeBinding, platform) + val file = rootProject.projectDir.resolve("natives").resolve(nativeFileName) + from(file) { into(File(nativeFileName).parent) } + } + + val nativeRuntimeElements = configurations.create(platform.classifier + "RuntimeElements") { + isCanBeConsumed = true; isCanBeResolved = false + attributes { + attribute(Category.CATEGORY_ATTRIBUTE, objects.named(Category.LIBRARY)) + attribute(Bundling.BUNDLING_ATTRIBUTE, objects.named(Bundling.EXTERNAL)) + attribute(TargetJvmVersion.TARGET_JVM_VERSION_ATTRIBUTE, targetJavaVersion) + attribute(LibraryElements.LIBRARY_ELEMENTS_ATTRIBUTE, objects.named(LibraryElements.JAR)) + attribute(Usage.USAGE_ATTRIBUTE, objects.named(Usage.JAVA_RUNTIME)) + attributes.attribute( + OperatingSystemFamily.OPERATING_SYSTEM_ATTRIBUTE, + objects.named(platform.osFamilyName) + ) + attributes.attribute(MachineArchitecture.ARCHITECTURE_ATTRIBUTE, objects.named(platform.osArch)) + } + outgoing.artifact(tasks.named("jar")) + outgoing.artifact(nativeJar) + extendsFrom(configurations["runtimeElements"]) + } + javaComponent.addVariantsFromConfiguration(nativeRuntimeElements) {} + } + } +} diff --git a/buildSrc/src/main/kotlin/natives.kt b/buildSrc/src/main/kotlin/natives.kt index 27035943..8b671724 100644 --- a/buildSrc/src/main/kotlin/natives.kt +++ b/buildSrc/src/main/kotlin/natives.kt @@ -34,49 +34,45 @@ enum class NativeBinding( } enum class Artifact( - val artifactName: String, val projectName: String, val projectDescription: String, - val subprojectName: String, - val nativeBinding: NativeBinding? = null + val subprojectName: String ) { CORE( - "overrungl", "OverrunGL", + "OverrunGL", "The OverrunGL core library.", ":core" ), GLFW( - "overrungl-glfw", "OverrunGL - GLFW bindings", + "OverrunGL - GLFW bindings", "A multi-platform library for OpenGL, OpenGL ES and Vulkan development on the desktop. It provides a simple API for creating windows, contexts and surfaces, receiving input and events.", - ":glfw", NativeBinding.GLFW + ":glfw" ), JOML( - "overrungl-joml", "OverrunGL - JOML native access", + "OverrunGL - JOML native access", "A Java math library for OpenGL rendering calculations", ":joml" ), NFD( - "overrungl-nfd", "OverrunGL - Native File Dialog", + "OverrunGL - Native File Dialog", "A tiny, neat C library that portably invokes native file open and save dialogs.", - ":nfd", NativeBinding.NFD + ":nfd" ), OPENGL( - "overrungl-opengl", "OverrunGL - OpenGL bindings", + "OverrunGL - OpenGL bindings", "The most widely adopted 2D and 3D graphics API in the industry, bringing thousands of applications to a wide variety of computer platforms.", ":opengl" ), STB( - "overrungl-stb", "OverrunGL - stb bindings", + "OverrunGL - stb bindings", "Single-file public domain libraries for fonts, images, ogg vorbis files and more.", - ":stb", NativeBinding.STB + ":stb" ), // VULKAN("overrungl-vulkan", "OverrunGL - Vulkan bindings", // "A new generation graphics and compute API that provides high-efficiency, cross-platform access to modern GPUs used in a wide variety of devices from PCs and consoles to mobile phones and embedded platforms.", // ":vulkan", "Vulkan", null), - ; +} - fun nativeFileName(platform: NativePlatform): String? { - return if (nativeBinding == null) null - else "${nativeBinding.bindingName}/${platform.osFamilyName}-${platform.osArch}/${platform.nativeLibPrefix}${nativeBinding.basename}${platform.nativeLibSuffix}" - } +fun nativeFileName(nativeBinding: NativeBinding, platform: NativePlatform): String { + return "${nativeBinding.bindingName}/${platform.osFamilyName}-${platform.osArch}/${platform.nativeLibPrefix}${nativeBinding.basename}${platform.nativeLibSuffix}" } diff --git a/buildSrc/src/main/kotlin/submodule.conventions.gradle.kts b/buildSrc/src/main/kotlin/submodule.conventions.gradle.kts new file mode 100644 index 00000000..9e10dbe3 --- /dev/null +++ b/buildSrc/src/main/kotlin/submodule.conventions.gradle.kts @@ -0,0 +1,10 @@ +plugins { + `java-library` +} + +val projVersion: String by rootProject + +dependencies { + compileOnly(project(":core")) + constraints { api("io.github.over-run:overrungl:$projVersion") } +} diff --git a/buildSrc/src/main/kotlin/utils.kt b/buildSrc/src/main/kotlin/utils.kt new file mode 100644 index 00000000..88408e15 --- /dev/null +++ b/buildSrc/src/main/kotlin/utils.kt @@ -0,0 +1,31 @@ +import org.gradle.api.publish.maven.MavenPom + +fun MavenPom.setupPom(pomName: String, pomDescription: String, pomPackaging: String) { + name.set(pomName) + description.set(pomDescription) + url.set("https://github.com/Over-Run/overrungl") + packaging = pomPackaging + licenses { + license { + name.set("MIT") + url.set("https://raw.githubusercontent.com/Over-Run/overrungl/main/LICENSE") + } + } + organization { + name.set("Overrun Organization") + url.set("https://over-run.github.io") + } + developers { + developer { + id.set("squid233") + url.set("https://github.com/squid233") + organization.set("Overrun Organization") + organizationUrl.set("https://over-run.github.io") + } + } + scm { + connection.set("scm:git:https://github.com/Over-Run/overrungl.git") + developerConnection.set("scm:git:https://github.com/Over-Run/overrungl.git") + url.set("https://github.com/Over-Run/overrungl.git") + } +} diff --git a/generators/build.gradle.kts b/generators/build.gradle.kts index ee8b8ea9..03f0fb39 100644 --- a/generators/build.gradle.kts +++ b/generators/build.gradle.kts @@ -1,3 +1,3 @@ plugins { - id("generator.java-conventions") + id("generator.conventions") } diff --git a/generators/nfd/build.gradle.kts b/generators/nfd/build.gradle.kts index f29846ad..a43b520e 100644 --- a/generators/nfd/build.gradle.kts +++ b/generators/nfd/build.gradle.kts @@ -1,5 +1,5 @@ plugins { - id("generator.java-conventions") + id("generator.conventions") } dependencies { diff --git a/generators/opengl/build.gradle.kts b/generators/opengl/build.gradle.kts index 03acdcdb..b2fcfd05 100644 --- a/generators/opengl/build.gradle.kts +++ b/generators/opengl/build.gradle.kts @@ -1,5 +1,5 @@ plugins { - id("generator.java-conventions") + id("generator.conventions") } dependencies { diff --git a/generators/vulkan/build.gradle.kts b/generators/vulkan/build.gradle.kts index 7a87ec35..899a9d01 100644 --- a/generators/vulkan/build.gradle.kts +++ b/generators/vulkan/build.gradle.kts @@ -1,5 +1,5 @@ plugins { - id("generator.java-conventions") + id("generator.conventions") } dependencies { diff --git a/gradle.properties b/gradle.properties index d076e5d0..4b8e73b9 100644 --- a/gradle.properties +++ b/gradle.properties @@ -5,20 +5,14 @@ projGroupId=io.github.over-run projArtifactId=overrungl projName=overrungl projVersion=0.1.0-SNAPSHOT -projVcs=Over-Run/overrungl -projBranch=main -projLicenseYear=2024 -projLicenseFileName=LICENSE +projLicenseYear=2022-2024 -# Organization -orgName=Overrun Organization -orgUrl=https://over-run.github.io/ - -jdkVersion=22 +jdkVersion=23 jdkEnablePreview=true -#jdkEarlyAccessDoc=jdk22 +jdkEarlyAccessDoc=jdk23 kotlinTargetJdkVersion=21 -overrunMarshalVersion=0.1.0-alpha.28-jdk22 +overrunMarshalVersion=0.1.0-alpha.30-jdk23 overrunPlatformVersion=1.0.0 jomlVersion=1.10.8 +junitVersion=5.11.0 diff --git a/modules/overrungl.core/build.gradle.kts b/modules/overrungl.core/build.gradle.kts index d206fb48..5444dfe4 100644 --- a/modules/overrungl.core/build.gradle.kts +++ b/modules/overrungl.core/build.gradle.kts @@ -1,6 +1,15 @@ import java.nio.file.Files import kotlin.io.path.Path +plugins { + id("module.conventions") +} + +overrunglModule { + artifactName = "overrungl" + publishInfo = Artifact.CORE +} + val overrunMarshalVersion: String by rootProject val overrunPlatformVersion: String by rootProject diff --git a/modules/overrungl.core/src/main/java/module-info.java b/modules/overrungl.core/src/main/java/module-info.java index 2cf2348c..3633f68a 100644 --- a/modules/overrungl.core/src/main/java/module-info.java +++ b/modules/overrungl.core/src/main/java/module-info.java @@ -32,6 +32,7 @@ overrungl.vulkan; requires transitive io.github.overrun.marshal; + requires transitive io.github.overrun.memstack; requires transitive io.github.overrun.platform; requires static org.jetbrains.annotations; } diff --git a/modules/overrungl.core/src/main/java/overrungl/util/MemoryUtil.java b/modules/overrungl.core/src/main/java/overrungl/util/MemoryUtil.java index 88cbb6cd..515986a8 100644 --- a/modules/overrungl.core/src/main/java/overrungl/util/MemoryUtil.java +++ b/modules/overrungl.core/src/main/java/overrungl/util/MemoryUtil.java @@ -23,7 +23,6 @@ import java.lang.foreign.*; import java.lang.invoke.MethodHandle; -import static java.lang.foreign.FunctionDescriptor.of; import static java.lang.foreign.ValueLayout.ADDRESS; import static overrungl.internal.RuntimeHelper.SIZE_T_LONG; import static overrungl.util.PlatformLayouts.SIZE_T; @@ -38,13 +37,13 @@ public final class MemoryUtil { private static final Linker LINKER = Linker.nativeLinker(); private static final SymbolLookup LOOKUP = LINKER.defaultLookup(); private static final MethodHandle - m_malloc = downcall("malloc", of(ADDRESS, SIZE_T)), - m_calloc = downcall("calloc", of(ADDRESS, SIZE_T, SIZE_T)), - m_realloc = downcall("realloc", of(ADDRESS, ADDRESS, SIZE_T)), + m_malloc = downcall("malloc", FunctionDescriptor.of(ADDRESS, SIZE_T)), + m_calloc = downcall("calloc", FunctionDescriptor.of(ADDRESS, SIZE_T, SIZE_T)), + m_realloc = downcall("realloc", FunctionDescriptor.of(ADDRESS, ADDRESS, SIZE_T)), m_free = downcall("free", FunctionDescriptor.ofVoid(ADDRESS)), - m_memcpy = downcall("memcpy", of(ADDRESS, ADDRESS, ADDRESS, SIZE_T)), - m_memmove = downcall("memmove", of(ADDRESS, ADDRESS, ADDRESS, SIZE_T)), - m_memset = downcall("memset", of(ADDRESS, ADDRESS, ValueLayout.JAVA_INT, SIZE_T)); + m_memcpy = downcall("memcpy", FunctionDescriptor.of(ADDRESS, ADDRESS, ADDRESS, SIZE_T)), + m_memmove = downcall("memmove", FunctionDescriptor.of(ADDRESS, ADDRESS, ADDRESS, SIZE_T)), + m_memset = downcall("memset", FunctionDescriptor.of(ADDRESS, ADDRESS, ValueLayout.JAVA_INT, SIZE_T)); private static final boolean DEBUG = Configurations.DEBUG_MEM_UTIL.get(); /** * The address of {@code NULL}. @@ -52,7 +51,7 @@ public final class MemoryUtil { public static final long NULL = 0x0L; private static MethodHandle downcall(String name, FunctionDescriptor function) { - return LINKER.downcallHandle(LOOKUP.find(name).orElseThrow(), function); + return LINKER.downcallHandle(LOOKUP.findOrThrow(name), function); } private MemoryUtil() { @@ -337,7 +336,7 @@ public static SegmentAllocator allocator(Arena arena) { return (byteSize, byteAlignment) -> { checkByteSize(byteSize); checkAlignment(byteAlignment); - return calloc(1, byteSize).reinterpret(arena, MemoryUtil::free); + return calloc(byteSize, 1).reinterpret(arena, MemoryUtil::free); }; } } diff --git a/modules/overrungl.core/src/main/java/overrungl/util/value/Tuple2.java b/modules/overrungl.core/src/main/java/overrungl/util/value/Tuple2.java index d118cc4c..7dcd8abf 100644 --- a/modules/overrungl.core/src/main/java/overrungl/util/value/Tuple2.java +++ b/modules/overrungl.core/src/main/java/overrungl/util/value/Tuple2.java @@ -92,4 +92,15 @@ public record OfObjInt(T x, int y) { */ public record OfObjLong(T x, long y) { } + + /** + * A tuple of an int and a long. + * + * @param x the first value. + * @param y the second value. + * @author squid233 + * @since 0.1.0 + */ + public record OfIntLong(int x, long y) { + } } diff --git a/modules/overrungl.glfw/build.gradle.kts b/modules/overrungl.glfw/build.gradle.kts new file mode 100644 index 00000000..a45678da --- /dev/null +++ b/modules/overrungl.glfw/build.gradle.kts @@ -0,0 +1,11 @@ +plugins { + id("module.conventions") + id("submodule.conventions") + id("native.conventions") +} + +overrunglModule { + artifactName = "overrungl-glfw" + publishInfo = Artifact.GLFW + nativeBinding = NativeBinding.GLFW +} diff --git a/modules/overrungl.glfw/src/main/java/module-info.java b/modules/overrungl.glfw/src/main/java/module-info.java index ac5fb419..14b75d2e 100644 --- a/modules/overrungl.glfw/src/main/java/module-info.java +++ b/modules/overrungl.glfw/src/main/java/module-info.java @@ -25,4 +25,5 @@ requires transitive overrungl.core; requires static org.jetbrains.annotations; + requires io.github.overrun.memstack; } diff --git a/modules/overrungl.glfw/src/main/java/overrungl/glfw/GLFW.java b/modules/overrungl.glfw/src/main/java/overrungl/glfw/GLFW.java index 5144b303..90c4e2ce 100644 --- a/modules/overrungl.glfw/src/main/java/overrungl/glfw/GLFW.java +++ b/modules/overrungl.glfw/src/main/java/overrungl/glfw/GLFW.java @@ -16,12 +16,13 @@ package overrungl.glfw; +import io.github.overrun.memstack.MemoryStack; import org.jetbrains.annotations.Nullable; import overrun.marshal.DirectAccess; import overrun.marshal.Downcall; -import overrun.marshal.MemoryStack; import overrun.marshal.Unmarshal; import overrun.marshal.gen.*; +import overrun.marshal.gen.processor.ProcessorType.BoolConvert; import overrungl.internal.RuntimeHelper; import overrungl.util.value.Pair; import overrungl.util.value.Quad; @@ -34,7 +35,6 @@ import java.nio.charset.StandardCharsets; import static java.lang.foreign.ValueLayout.*; -import static overrungl.glfw.Handles.*; /** * The GLFW binding. @@ -43,11 +43,6 @@ * @since 0.1.0 */ public interface GLFW extends DirectAccess { - /** - * The instance of GLFW. - */ - GLFW INSTANCE = Downcall.load(MethodHandles.lookup(), lookup); - /** * The major version number of the GLFW header. *

@@ -1110,6 +1105,11 @@ public interface GLFW extends DirectAccess { */ int DONT_CARE = -1; + /** + * The instance of GLFW. + */ + GLFW INSTANCE = Downcall.load(MethodHandles.lookup(), Handles.lookup); + /** * Converts the given error code to a readable string. *

@@ -1235,7 +1235,7 @@ static String getPlatformString(int platformCode) { * @see #initAllocator * @see #terminate */ - @Convert(Type.INT) + @Convert(BoolConvert.INT) @Entrypoint("glfwInit") boolean init(); @@ -1361,10 +1361,10 @@ static String getPlatformString(int platformCode) { */ @Skip default Triplet.OfInt getVersion() { - try (MemoryStack stack = MemoryStack.stackPush()) { - var pMajor = stack.ints(0); - var pMinor = stack.ints(0); - var pRev = stack.ints(0); + try (MemoryStack stack = MemoryStack.pushLocal()) { + var pMajor = stack.allocate(JAVA_INT); + var pMinor = stack.allocate(JAVA_INT); + var pRev = stack.allocate(JAVA_INT); ngetVersion(pMajor, pMinor, pRev); return new Triplet.OfInt(pMajor.get(JAVA_INT, 0), pMinor.get(JAVA_INT, 0), @@ -1405,7 +1405,6 @@ default Triplet.OfInt getVersion() { * @see #ngetVersionString() ngetVersionString */ @Entrypoint("glfwGetVersionString") - @SizedSeg(Unmarshal.STR_SIZE) @StrCharset("US-ASCII") String getVersionString(); @@ -1449,7 +1448,7 @@ default Triplet.OfInt getVersion() { */ @Skip default Tuple2.OfObjInt getError() { - try (MemoryStack stack = MemoryStack.stackPush()) { + try (MemoryStack stack = MemoryStack.pushLocal()) { final MemorySegment seg = stack.allocate(ADDRESS); final int err = ngetError(seg); return new Tuple2.OfObjInt<>(Unmarshal.unmarshalStringPointer(seg), err); @@ -1528,7 +1527,7 @@ default MemorySegment setErrorCallback(@Nullable GLFWErrorFun callback) { * @glfw.thread_safety This function may be called from any thread. * @see #getPlatform */ - @Convert(Type.INT) + @Convert(BoolConvert.INT) @Entrypoint("glfwPlatformSupported") boolean platformSupported(int platform); @@ -1562,8 +1561,8 @@ default MemorySegment setErrorCallback(@Nullable GLFWErrorFun callback) { */ @Skip default MemorySegment @Nullable [] getMonitors() { - try (MemoryStack stack = MemoryStack.stackPush()) { - var pCount = stack.ints(0); + try (MemoryStack stack = MemoryStack.pushLocal()) { + var pCount = stack.allocate(JAVA_INT); var pMonitors = ngetMonitors(pCount); return Unmarshal.unmarshalAsAddressArray(pMonitors.reinterpret(ADDRESS.scale(0L, pCount.get(JAVA_INT, 0L)))); } @@ -1625,9 +1624,9 @@ default MemorySegment setErrorCallback(@Nullable GLFWErrorFun callback) { */ @Skip default Pair.OfInt getMonitorPos(MemorySegment monitor) { - try (MemoryStack stack = MemoryStack.stackPush()) { - var px = stack.ints(0); - var py = stack.ints(0); + try (MemoryStack stack = MemoryStack.pushLocal()) { + var px = stack.allocate(JAVA_INT); + var py = stack.allocate(JAVA_INT); ngetMonitorPos(monitor, px, py); return new Pair.OfInt(px.get(JAVA_INT, 0), py.get(JAVA_INT, 0)); } @@ -1680,11 +1679,11 @@ default Pair.OfInt getMonitorPos(MemorySegment monitor) { */ @Skip default Quad.OfInt getMonitorWorkarea(MemorySegment monitor) { - try (MemoryStack stack = MemoryStack.stackPush()) { - var px = stack.ints(0); - var py = stack.ints(0); - var pw = stack.ints(0); - var ph = stack.ints(0); + try (MemoryStack stack = MemoryStack.pushLocal()) { + var px = stack.allocate(JAVA_INT); + var py = stack.allocate(JAVA_INT); + var pw = stack.allocate(JAVA_INT); + var ph = stack.allocate(JAVA_INT); ngetMonitorWorkarea(monitor, px, py, pw, ph); return new Quad.OfInt(px.get(JAVA_INT, 0), py.get(JAVA_INT, 0), @@ -1742,9 +1741,9 @@ default Quad.OfInt getMonitorWorkarea(MemorySegment monitor) { */ @Skip default Pair.OfInt getMonitorPhysicalSize(MemorySegment monitor) { - try (MemoryStack stack = MemoryStack.stackPush()) { - var pw = stack.ints(0); - var ph = stack.ints(0); + try (MemoryStack stack = MemoryStack.pushLocal()) { + var pw = stack.allocate(JAVA_INT); + var ph = stack.allocate(JAVA_INT); ngetMonitorPhysicalSize(monitor, pw, ph); return new Pair.OfInt(pw.get(JAVA_INT, 0), ph.get(JAVA_INT, 0)); } @@ -1798,9 +1797,9 @@ default Pair.OfInt getMonitorPhysicalSize(MemorySegment monitor) { */ @Skip default Pair.OfFloat getMonitorContentScale(MemorySegment monitor) { - try (MemoryStack stack = MemoryStack.stackPush()) { - var px = stack.floats(0F); - var py = stack.floats(0F); + try (MemoryStack stack = MemoryStack.pushLocal()) { + var px = stack.allocate(JAVA_FLOAT); + var py = stack.allocate(JAVA_FLOAT); ngetMonitorContentScale(monitor, px, py); return new Pair.OfFloat(px.get(JAVA_FLOAT, 0), py.get(JAVA_FLOAT, 0)); } @@ -1835,7 +1834,6 @@ default Pair.OfFloat getMonitorContentScale(MemorySegment monitor) { */ @Entrypoint("glfwGetMonitorName") @Nullable - @SizedSeg(Unmarshal.STR_SIZE) String getMonitorName(MemorySegment monitor); /** @@ -1946,8 +1944,8 @@ default MemorySegment setMonitorCallback(@Nullable GLFWMonitorFun callback) { */ @Skip default @Nullable GLFWVidMode getVideoModes(MemorySegment monitor) { - try (MemoryStack stack = MemoryStack.stackPush()) { - var pCount = stack.ints(0); + try (MemoryStack stack = MemoryStack.pushLocal()) { + var pCount = stack.allocate(JAVA_INT); var pModes = ngetVideoModes(monitor, pCount); if (Unmarshal.isNullPointer(pModes)) { return null; @@ -2148,7 +2146,7 @@ default GLFWVidMode getVideoMode(MemorySegment monitor) { * @see #windowHint(int, int) */ @Entrypoint("glfwWindowHint") - void windowHint(int hint, @Convert(Type.INT) boolean value); + void windowHint(int hint, @Convert(BoolConvert.INT) boolean value); /** * Sets the specified window hint to the desired value. @@ -2395,7 +2393,7 @@ default GLFWVidMode getVideoMode(MemorySegment monitor) { * @glfw.thread_safety This function may be called from any thread. Access is not * synchronized. */ - @Convert(Type.INT) + @Convert(BoolConvert.INT) @Entrypoint("glfwWindowShouldClose") boolean windowShouldClose(MemorySegment window); @@ -2413,7 +2411,7 @@ default GLFWVidMode getVideoMode(MemorySegment monitor) { * synchronized. */ @Entrypoint("glfwSetWindowShouldClose") - void setWindowShouldClose(MemorySegment window, @Convert(Type.INT) boolean value); + void setWindowShouldClose(MemorySegment window, @Convert(BoolConvert.INT) boolean value); /** * Returns the title of the specified window. @@ -2449,7 +2447,6 @@ default GLFWVidMode getVideoMode(MemorySegment monitor) { * @see #ngetWindowTitle(MemorySegment) */ @Entrypoint("glfwGetWindowTitle") - @SizedSeg(Unmarshal.STR_SIZE) String getWindowTitle(MemorySegment window); /** @@ -2597,9 +2594,9 @@ default void setWindowIcon(MemorySegment window, @Nullable GLFWImage images) { */ @Skip default Pair.OfInt getWindowPos(MemorySegment window) { - try (MemoryStack stack = MemoryStack.stackPush()) { - var px = stack.ints(0); - var py = stack.ints(0); + try (MemoryStack stack = MemoryStack.pushLocal()) { + var px = stack.allocate(JAVA_INT); + var py = stack.allocate(JAVA_INT); ngetWindowPos(window, px, py); return new Pair.OfInt(px.get(JAVA_INT, 0), py.get(JAVA_INT, 0)); } @@ -2678,9 +2675,9 @@ default Pair.OfInt getWindowPos(MemorySegment window) { */ @Skip default Pair.OfInt getWindowSize(MemorySegment window) { - try (MemoryStack stack = MemoryStack.stackPush()) { - var pw = stack.ints(0); - var ph = stack.ints(0); + try (MemoryStack stack = MemoryStack.pushLocal()) { + var pw = stack.allocate(JAVA_INT); + var ph = stack.allocate(JAVA_INT); ngetWindowSize(window, pw, ph); return new Pair.OfInt(pw.get(JAVA_INT, 0), ph.get(JAVA_INT, 0)); } @@ -2835,9 +2832,9 @@ default Pair.OfInt getWindowSize(MemorySegment window) { */ @Skip default Pair.OfInt getFramebufferSize(MemorySegment window) { - try (MemoryStack stack = MemoryStack.stackPush()) { - var pw = stack.ints(0); - var ph = stack.ints(0); + try (MemoryStack stack = MemoryStack.pushLocal()) { + var pw = stack.allocate(JAVA_INT); + var ph = stack.allocate(JAVA_INT); ngetFramebufferSize(window, pw, ph); return new Pair.OfInt(pw.get(JAVA_INT, 0), ph.get(JAVA_INT, 0)); } @@ -2902,11 +2899,11 @@ default Pair.OfInt getFramebufferSize(MemorySegment window) { */ @Skip default Quad.OfInt getWindowFrameSize(MemorySegment window) { - try (MemoryStack stack = MemoryStack.stackPush()) { - var pl = stack.ints(0); - var pt = stack.ints(0); - var pr = stack.ints(0); - var pb = stack.ints(0); + try (MemoryStack stack = MemoryStack.pushLocal()) { + var pl = stack.allocate(JAVA_INT); + var pt = stack.allocate(JAVA_INT); + var pr = stack.allocate(JAVA_INT); + var pb = stack.allocate(JAVA_INT); ngetWindowFrameSize(window, pl, pt, pr, pb); return new Quad.OfInt(pl.get(JAVA_INT, 0), pt.get(JAVA_INT, 0), @@ -2962,9 +2959,9 @@ default Quad.OfInt getWindowFrameSize(MemorySegment window) { */ @Skip default Pair.OfFloat getWindowContentScale(MemorySegment window) { - try (MemoryStack stack = MemoryStack.stackPush()) { - var px = stack.floats(0F); - var py = stack.floats(0F); + try (MemoryStack stack = MemoryStack.pushLocal()) { + var px = stack.allocate(JAVA_FLOAT); + var py = stack.allocate(JAVA_FLOAT); ngetWindowContentScale(window, px, py); return new Pair.OfFloat(px.get(JAVA_FLOAT, 0), py.get(JAVA_FLOAT, 0)); } @@ -3297,7 +3294,7 @@ default Pair.OfFloat getWindowContentScale(MemorySegment window) { * @see #getWindowAttrib(MemorySegment, int) getWindowAttrib */ @Entrypoint("glfwSetWindowAttrib") - void setWindowAttrib(MemorySegment window, int attrib, @Convert(Type.INT) boolean value); + void setWindowAttrib(MemorySegment window, int attrib, @Convert(BoolConvert.INT) boolean value); /** * Sets the user pointer of the specified window. @@ -3902,7 +3899,7 @@ default MemorySegment setWindowContentScaleCallback(MemorySegment window, @Nulla * @glfw.thread_safety This function must only be called from the main thread. * @see #setInputMode(MemorySegment, int, int) setInputMode */ - @Convert(Type.INT) + @Convert(BoolConvert.INT) @Entrypoint("glfwRawMouseMotionSupported") boolean rawMouseMotionSupported(); @@ -4114,9 +4111,9 @@ default MemorySegment setWindowContentScaleCallback(MemorySegment window, @Nulla */ @Skip default Pair.OfDouble getCursorPos(MemorySegment window) { - try (MemoryStack stack = MemoryStack.stackPush()) { - var px = stack.doubles(0D); - var py = stack.doubles(0D); + try (MemoryStack stack = MemoryStack.pushLocal()) { + var px = stack.allocate(JAVA_DOUBLE); + var py = stack.allocate(JAVA_DOUBLE); ngetCursorPos(window, px, py); return new Pair.OfDouble(px.get(JAVA_DOUBLE, 0), py.get(JAVA_DOUBLE, 0)); } @@ -4594,7 +4591,7 @@ default MemorySegment setDropCallback(MemorySegment window, @Nullable GLFWDropFu * {@link #INVALID_ENUM} and {@link #PLATFORM_ERROR}. * @glfw.thread_safety This function must only be called from the main thread. */ - @Convert(Type.INT) + @Convert(BoolConvert.INT) @Entrypoint("glfwJoystickPresent") boolean joystickPresent(int jid); @@ -4636,8 +4633,8 @@ default MemorySegment setDropCallback(MemorySegment window, @Nullable GLFWDropFu */ @Skip default float @Nullable [] getJoystickAxes(int jid) { - try (MemoryStack stack = MemoryStack.stackPush()) { - var pCount = stack.ints(0); + try (MemoryStack stack = MemoryStack.pushLocal()) { + var pCount = stack.allocate(JAVA_INT); MemorySegment pAxes = ngetJoystickAxes(jid, pCount); final int count = pCount.get(JAVA_INT, 0); if (count == 0) return null; @@ -4688,8 +4685,8 @@ default MemorySegment setDropCallback(MemorySegment window, @Nullable GLFWDropFu */ @Skip default int @Nullable [] getJoystickButtons(int jid) { - try (MemoryStack stack = MemoryStack.stackPush()) { - var pCount = stack.ints(0); + try (MemoryStack stack = MemoryStack.pushLocal()) { + var pCount = stack.allocate(JAVA_INT); MemorySegment pButtons = ngetJoystickButtons(jid, pCount); final int count = pCount.get(JAVA_INT, 0); if (count == 0) return null; @@ -4756,8 +4753,8 @@ default MemorySegment setDropCallback(MemorySegment window, @Nullable GLFWDropFu */ @Skip default byte[] getJoystickHats(int jid) { - try (MemoryStack stack = MemoryStack.stackPush()) { - var pCount = stack.ints(0); + try (MemoryStack stack = MemoryStack.pushLocal()) { + var pCount = stack.allocate(JAVA_INT); var pHats = ngetJoystickHats(jid, pCount); return Unmarshal.unmarshalAsByteArray(pHats.reinterpret(JAVA_BYTE.scale(0L, pCount.get(JAVA_INT, 0)))); } @@ -4902,7 +4899,7 @@ default byte[] getJoystickHats(int jid) { * @glfw.thread_safety This function must only be called from the main thread. * @see #ngetGamepadState(int, MemorySegment) getGamepadState */ - @Convert(Type.INT) + @Convert(BoolConvert.INT) @Entrypoint("glfwJoystickIsGamepad") boolean joystickIsGamepad(int jid); @@ -4973,7 +4970,7 @@ default MemorySegment setJoystickCallback(@Nullable GLFWJoystickFun callback) { * @see #joystickIsGamepad(int) joystickIsGamepad * @see #ngetGamepadName(int) getGamepadName */ - @Convert(Type.INT) + @Convert(BoolConvert.INT) @Entrypoint("glfwUpdateGamepadMappings") boolean nupdateGamepadMappings(MemorySegment string); @@ -4985,7 +4982,7 @@ default MemorySegment setJoystickCallback(@Nullable GLFWJoystickFun callback) { * error occurred. * @see #nupdateGamepadMappings(MemorySegment) nupdateGamepadMappings */ - @Convert(Type.INT) + @Convert(BoolConvert.INT) @Entrypoint("glfwUpdateGamepadMappings") boolean updateGamepadMappings(String string); @@ -5056,7 +5053,7 @@ default MemorySegment setJoystickCallback(@Nullable GLFWJoystickFun callback) { * @see #nupdateGamepadMappings(MemorySegment) updateGamepadMappings * @see #joystickIsGamepad(int) joystickIsGamepad */ - @Convert(Type.INT) + @Convert(BoolConvert.INT) @Entrypoint("glfwGetGamepadState") boolean ngetGamepadState(int jid, MemorySegment state); @@ -5070,7 +5067,7 @@ default MemorySegment setJoystickCallback(@Nullable GLFWJoystickFun callback) { * occurred. * @see #ngetGamepadState(int, MemorySegment) ngetGamepadState */ - @Convert(Type.INT) + @Convert(BoolConvert.INT) @Entrypoint("glfwGetGamepadState") boolean getGamepadState(int jid, GLFWGamepadState state); @@ -5123,7 +5120,7 @@ default void nsetClipboardString(MemorySegment string) { */ @Skip default void setClipboardString(String string) { - try (MemoryStack stack = MemoryStack.stackPush()) { + try (MemoryStack stack = MemoryStack.pushLocal()) { nsetClipboardString(stack.allocateFrom(string)); } } @@ -5154,7 +5151,6 @@ default void setClipboardString(String string) { * @see #nsetClipboardString(MemorySegment) setClipboardString */ @Entrypoint("glfwGetClipboardString") - @SizedSeg(Unmarshal.STR_SIZE) MemorySegment ngetClipboardString(MemorySegment window); /** @@ -5418,7 +5414,7 @@ default String getClipboardString() { * @glfw.thread_safety This function may be called from any thread. * @see #ngetProcAddress */ - @Convert(Type.INT) + @Convert(BoolConvert.INT) @Entrypoint("glfwExtensionSupported") boolean nextensionSupported(MemorySegment extension); @@ -5430,7 +5426,7 @@ default String getClipboardString() { * otherwise. * @see #nextensionSupported(MemorySegment) nextensionSupported */ - @Convert(Type.INT) + @Convert(BoolConvert.INT) @Entrypoint("glfwExtensionSupported") boolean extensionSupported(@StrCharset("US-ASCII") String extension); @@ -5498,7 +5494,7 @@ default String getClipboardString() { * @glfw.errors Possible errors include {@link #NOT_INITIALIZED}. * @glfw.thread_safety This function may be called from any thread. */ - @Convert(Type.INT) + @Convert(BoolConvert.INT) @Entrypoint("glfwVulkanSupported") boolean vulkanSupported(); @@ -5546,8 +5542,8 @@ default String getClipboardString() { */ @Skip default String @Nullable [] getRequiredInstanceExtensions() { - try (MemoryStack stack = MemoryStack.stackPush()) { - var pCount = stack.ints(0); + try (MemoryStack stack = MemoryStack.pushLocal()) { + var pCount = stack.allocate(JAVA_INT); MemorySegment pExt = ngetRequiredInstanceExtensions(pCount); final int count = pCount.get(JAVA_INT, 0); if (count == 0) return null; diff --git a/modules/overrungl.glfw/src/main/java/overrungl/glfw/GLFWNative.java b/modules/overrungl.glfw/src/main/java/overrungl/glfw/GLFWNative.java index ad60af7b..50e79757 100644 --- a/modules/overrungl.glfw/src/main/java/overrungl/glfw/GLFWNative.java +++ b/modules/overrungl.glfw/src/main/java/overrungl/glfw/GLFWNative.java @@ -22,7 +22,7 @@ import overrun.marshal.gen.Convert; import overrun.marshal.gen.Entrypoint; import overrun.marshal.gen.Ref; -import overrun.marshal.gen.Type; +import overrun.marshal.gen.processor.ProcessorType.BoolConvert; import java.lang.foreign.MemorySegment; import java.lang.invoke.MethodHandles; @@ -455,7 +455,7 @@ default MemorySegment getEGLSurface(MemorySegment window) { * @glfw.thread_safety This function may be called from any thread. Access is not * synchronized. */ - @Convert(Type.INT) + @Convert(BoolConvert.INT) @Entrypoint("glfwGetOSMesaColorBuffer") default boolean ngetOSMesaColorBuffer(MemorySegment window, MemorySegment width, MemorySegment height, MemorySegment format, MemorySegment buffer) { return false; @@ -475,7 +475,7 @@ default boolean ngetOSMesaColorBuffer(MemorySegment window, MemorySegment width, * error occurred. * @see #ngetOSMesaColorBuffer(MemorySegment, MemorySegment, MemorySegment, MemorySegment, MemorySegment) ngetOSMesaColorBuffer */ - @Convert(Type.INT) + @Convert(BoolConvert.INT) @Entrypoint("glfwGetOSMesaColorBuffer") default boolean getOSMesaColorBuffer(MemorySegment window, @Ref int @Nullable [] width, @Ref int @Nullable [] height, @Ref int @Nullable [] format, MemorySegment buffer) { return false; @@ -497,7 +497,7 @@ default boolean getOSMesaColorBuffer(MemorySegment window, @Ref int @Nullable [] * @glfw.thread_safety This function may be called from any thread. Access is not * synchronized. */ - @Convert(Type.INT) + @Convert(BoolConvert.INT) @Entrypoint("glfwGetOSMesaDepthBuffer") default boolean ngetOSMesaDepthBuffer(MemorySegment window, MemorySegment width, MemorySegment height, MemorySegment bytesPerValue, MemorySegment buffer) { return false; @@ -517,7 +517,7 @@ default boolean ngetOSMesaDepthBuffer(MemorySegment window, MemorySegment width, * error occurred. * @see #ngetOSMesaDepthBuffer(MemorySegment, MemorySegment, MemorySegment, MemorySegment, MemorySegment) ngetOSMesaDepthBuffer */ - @Convert(Type.INT) + @Convert(BoolConvert.INT) @Entrypoint("glfwGetOSMesaDepthBuffer") default boolean getOSMesaDepthBuffer(MemorySegment window, @Ref int @Nullable [] width, @Ref int @Nullable [] height, @Ref int @Nullable [] bytesPerValue, MemorySegment buffer) { return false; diff --git a/modules/overrungl.glfw/src/main/java/overrungl/glfw/GLFWVulkan.java b/modules/overrungl.glfw/src/main/java/overrungl/glfw/GLFWVulkan.java index 119e88c4..765fb6c5 100644 --- a/modules/overrungl.glfw/src/main/java/overrungl/glfw/GLFWVulkan.java +++ b/modules/overrungl.glfw/src/main/java/overrungl/glfw/GLFWVulkan.java @@ -21,7 +21,7 @@ import overrun.marshal.gen.Convert; import overrun.marshal.gen.Entrypoint; import overrun.marshal.gen.Ref; -import overrun.marshal.gen.Type; +import overrun.marshal.gen.processor.ProcessorType.BoolConvert; import overrungl.NativeType; import java.lang.foreign.MemorySegment; @@ -149,7 +149,7 @@ public interface GLFWVulkan extends DirectAccess { * @glfw.thread_safety This function may be called from any thread. For * synchronization details of Vulkan objects, see the Vulkan specification. */ - @Convert(Type.INT) + @Convert(BoolConvert.INT) @Entrypoint("glfwGetPhysicalDevicePresentationSupport") boolean getPhysicalDevicePresentationSupport(MemorySegment instance, MemorySegment device, int queueFamily); diff --git a/modules/overrungl.glfw/src/main/java/overrungl/glfw/Handles.java b/modules/overrungl.glfw/src/main/java/overrungl/glfw/Handles.java index 7b059bea..8479545d 100644 --- a/modules/overrungl.glfw/src/main/java/overrungl/glfw/Handles.java +++ b/modules/overrungl.glfw/src/main/java/overrungl/glfw/Handles.java @@ -23,6 +23,8 @@ import java.lang.foreign.SymbolLookup; import java.util.function.Supplier; +import static overrun.marshal.gen.processor.ProcessorTypes.registerStruct; + /** * The GLFW method handles. * @@ -33,6 +35,12 @@ final class Handles { static final SymbolLookup lookup; static { + registerStruct(GLFWAllocator.class, GLFWAllocator.OF); + registerStruct(GLFWGamepadState.class, GLFWGamepadState.OF); + registerStruct(GLFWGammaRamp.class, GLFWGammaRamp.OF); + registerStruct(GLFWImage.class, GLFWImage.OF); + registerStruct(GLFWVidMode.class, GLFWVidMode.OF); + final Supplier lib = () -> RuntimeHelper.load("glfw", "glfw", OverrunGL.GLFW_VERSION); final var function = Configurations.GLFW_SYMBOL_LOOKUP.get(); lookup = function != null ? function.apply(lib) : lib.get(); diff --git a/modules/overrungl.joml/build.gradle.kts b/modules/overrungl.joml/build.gradle.kts index 48035195..557fecb6 100644 --- a/modules/overrungl.joml/build.gradle.kts +++ b/modules/overrungl.joml/build.gradle.kts @@ -1,3 +1,13 @@ +plugins { + id("module.conventions") + id("submodule.conventions") +} + +overrunglModule { + artifactName = "overrungl-joml" + publishInfo = Artifact.JOML +} + val jomlVersion: String by project dependencies { diff --git a/modules/overrungl.joml/src/main/java/module-info.java b/modules/overrungl.joml/src/main/java/module-info.java index 413eddba..cffc9288 100644 --- a/modules/overrungl.joml/src/main/java/module-info.java +++ b/modules/overrungl.joml/src/main/java/module-info.java @@ -25,4 +25,5 @@ requires transitive overrungl.core; requires transitive org.joml; + requires io.github.overrun.memstack; } diff --git a/modules/overrungl.joml/src/main/java/overrungl/joml/Matrixn.java b/modules/overrungl.joml/src/main/java/overrungl/joml/Matrixn.java index 55cab3ec..36f43f35 100644 --- a/modules/overrungl.joml/src/main/java/overrungl/joml/Matrixn.java +++ b/modules/overrungl.joml/src/main/java/overrungl/joml/Matrixn.java @@ -17,7 +17,6 @@ package overrungl.joml; import org.joml.*; -import overrun.marshal.MemoryStack; import overrungl.util.MemoryUtil; import java.lang.foreign.MemoryLayout; @@ -290,116 +289,6 @@ public static MemorySegment malloc(Matrix4dc mat) { return put(mat, MemoryUtil.malloc(MAT4D)); } - /** - * Allocates the matrix on stack. - * - * @param stack the memory stack - * @param mat the matrix - * @return the memory address - */ - public static MemorySegment malloc(MemoryStack stack, Matrix2fc mat) { - return put(mat, stack.malloc(MAT2F)); - } - - /** - * Allocates the matrix on stack. - * - * @param stack the memory stack - * @param mat the matrix - * @return the memory address - */ - public static MemorySegment malloc(MemoryStack stack, Matrix2dc mat) { - return put(mat, stack.malloc(MAT2D)); - } - - /** - * Allocates the matrix on stack. - * - * @param stack the memory stack - * @param mat the matrix - * @return the memory address - */ - public static MemorySegment malloc(MemoryStack stack, Matrix3x2fc mat) { - return put(mat, stack.malloc(MAT3X2F)); - } - - /** - * Allocates the matrix on stack. - * - * @param stack the memory stack - * @param mat the matrix - * @return the memory address - */ - public static MemorySegment malloc(MemoryStack stack, Matrix3x2dc mat) { - return put(mat, stack.malloc(MAT3X2D)); - } - - /** - * Allocates the matrix on stack. - * - * @param stack the memory stack - * @param mat the matrix - * @return the memory address - */ - public static MemorySegment malloc(MemoryStack stack, Matrix3fc mat) { - return put(mat, stack.malloc(MAT3F)); - } - - /** - * Allocates the matrix on stack. - * - * @param stack the memory stack - * @param mat the matrix - * @return the memory address - */ - public static MemorySegment malloc(MemoryStack stack, Matrix3dc mat) { - return put(mat, stack.malloc(MAT3D)); - } - - /** - * Allocates the matrix on stack. - * - * @param stack the memory stack - * @param mat the matrix - * @return the memory address - */ - public static MemorySegment malloc(MemoryStack stack, Matrix4x3fc mat) { - return put(mat, stack.malloc(MAT4X3F)); - } - - /** - * Allocates the matrix on stack. - * - * @param stack the memory stack - * @param mat the matrix - * @return the memory address - */ - public static MemorySegment malloc(MemoryStack stack, Matrix4x3dc mat) { - return put(mat, stack.malloc(MAT4X3D)); - } - - /** - * Allocates the matrix on stack. - * - * @param stack the memory stack - * @param mat the matrix - * @return the memory address - */ - public static MemorySegment malloc(MemoryStack stack, Matrix4fc mat) { - return put(mat, stack.malloc(MAT4F)); - } - - /** - * Allocates the matrix on stack. - * - * @param stack the memory stack - * @param mat the matrix - * @return the memory address - */ - public static MemorySegment malloc(MemoryStack stack, Matrix4dc mat) { - return put(mat, stack.malloc(MAT4D)); - } - /** * Puts the matrix at the given offset. * diff --git a/modules/overrungl.joml/src/main/java/overrungl/joml/Vectorn.java b/modules/overrungl.joml/src/main/java/overrungl/joml/Vectorn.java index da229136..c17d84ae 100644 --- a/modules/overrungl.joml/src/main/java/overrungl/joml/Vectorn.java +++ b/modules/overrungl.joml/src/main/java/overrungl/joml/Vectorn.java @@ -17,7 +17,6 @@ package overrungl.joml; import org.joml.*; -import overrun.marshal.MemoryStack; import overrungl.util.MemoryUtil; import java.lang.foreign.MemoryLayout; @@ -264,105 +263,6 @@ public static MemorySegment malloc(Vector4dc vec) { return put(vec, MemoryUtil.malloc(VEC4D)); } - /** - * Allocates the vector on stack. - * - * @param stack the memory stack - * @param vec the vector - * @return the memory address - */ - public static MemorySegment malloc(MemoryStack stack, Vector2ic vec) { - return put(vec, stack.malloc(VEC2I)); - } - - /** - * Allocates the vector on stack. - * - * @param stack the memory stack - * @param vec the vector - * @return the memory address - */ - public static MemorySegment malloc(MemoryStack stack, Vector2fc vec) { - return put(vec, stack.malloc(VEC2F)); - } - - /** - * Allocates the vector on stack. - * - * @param stack the memory stack - * @param vec the vector - * @return the memory address - */ - public static MemorySegment malloc(MemoryStack stack, Vector2dc vec) { - return put(vec, stack.malloc(VEC2D)); - } - - /** - * Allocates the vector on stack. - * - * @param stack the memory stack - * @param vec the vector - * @return the memory address - */ - public static MemorySegment malloc(MemoryStack stack, Vector3ic vec) { - return put(vec, stack.malloc(VEC3I)); - } - - /** - * Allocates the vector on stack. - * - * @param stack the memory stack - * @param vec the vector - * @return the memory address - */ - public static MemorySegment malloc(MemoryStack stack, Vector3fc vec) { - return put(vec, stack.malloc(VEC3F)); - } - - /** - * Allocates the vector on stack. - * - * @param stack the memory stack - * @param vec the vector - * @return the memory address - */ - public static MemorySegment malloc(MemoryStack stack, Vector3dc vec) { - return put(vec, stack.malloc(VEC3D)); - } - - /** - * Allocates the vector on stack. - * - * @param stack the memory stack - * @param vec the vector - * @return the memory address - */ - public static MemorySegment malloc(MemoryStack stack, Vector4ic vec) { - return put(vec, stack.malloc(VEC4I)); - } - - /** - * Allocates the vector on stack. - * - * @param stack the memory stack - * @param vec the vector - * @return the memory address - */ - public static MemorySegment malloc(MemoryStack stack, Vector4fc vec) { - return put(vec, stack.malloc(VEC4F)); - } - - /** - * Allocates the vector on stack. - * - * @param stack the memory stack - * @param vec the vector - * @return the memory address - */ - public static MemorySegment malloc(MemoryStack stack, Vector4dc vec) { - return put(vec, stack.malloc(VEC4D)); - } - /** * Puts the vector at the given offset. * diff --git a/modules/overrungl.nfd/build.gradle.kts b/modules/overrungl.nfd/build.gradle.kts new file mode 100644 index 00000000..60075933 --- /dev/null +++ b/modules/overrungl.nfd/build.gradle.kts @@ -0,0 +1,11 @@ +plugins { + id("module.conventions") + id("submodule.conventions") + id("native.conventions") +} + +overrunglModule { + artifactName = "overrungl-nfd" + publishInfo = Artifact.NFD + nativeBinding = NativeBinding.NFD +} diff --git a/modules/overrungl.nfd/src/main/java/overrungl/nfd/NFD.java b/modules/overrungl.nfd/src/main/java/overrungl/nfd/NFD.java index d78475f3..768c752f 100644 --- a/modules/overrungl.nfd/src/main/java/overrungl/nfd/NFD.java +++ b/modules/overrungl.nfd/src/main/java/overrungl/nfd/NFD.java @@ -16,12 +16,12 @@ package overrungl.nfd; +import io.github.overrun.memstack.MemoryStack; import overrun.marshal.DirectAccess; +import overrun.marshal.Downcall; import overrun.marshal.Marshal; -import overrun.marshal.MemoryStack; import overrun.marshal.Unmarshal; import overrun.marshal.gen.Entrypoint; -import overrun.marshal.gen.SizedSeg; import overrun.marshal.gen.Skip; import overrungl.NativeType; import overrungl.util.PlatformLayouts; @@ -30,6 +30,7 @@ import java.lang.foreign.MemorySegment; import java.lang.foreign.ValueLayout; import java.lang.invoke.MethodHandle; +import java.lang.invoke.MethodHandles; import static java.lang.foreign.ValueLayout.*; @@ -123,6 +124,18 @@ * @since 0.1.0 */ public interface NFD extends DirectAccess { + /** + * programmatic error + */ + int ERROR = 0; + /** + * user pressed okay, or successful return + */ + int OKAY = 1; + /** + * user pressed cancel + */ + int CANCEL = 2; /** * The native window handle type. */ @@ -153,7 +166,7 @@ public interface NFD extends DirectAccess { /** * The instance of NFD. */ - NFD INSTANCE = NFDInternal.instance; + NFD INSTANCE = Downcall.load(MethodHandles.lookup(), NFDInternal.LOOKUP); /** * {@return NFD_PathSet_GetPathN} @@ -192,10 +205,10 @@ public interface NFD extends DirectAccess { * @return the result */ @Entrypoint("NFD_Init") - NFDResult init(); + int init(); /** - * Call this to de-initialize NFD, if {@link #init} returned {@link NFDResult#OKAY}. + * Call this to de-initialize NFD, if {@link #init} returned {@link #OKAY}. */ @Entrypoint("NFD_Quit") void quit(); @@ -204,14 +217,14 @@ public interface NFD extends DirectAccess { * Single file open dialog * * @param outPath It is the caller's responsibility to free {@code outPath} - * via {@link #freePathN} if this function returns {@link NFDResult#OKAY} + * via {@link #freePathN} if this function returns {@link #OKAY} * @param filterList the filter list * @param filterCount If zero, filterList is ignored (you can use null). * @param defaultPath If null, the operating system will decide. * @return the result */ @Entrypoint("NFD_OpenDialogN") - NFDResult nopenDialogN(@NativeType("nfdnchar_t**") MemorySegment outPath, NFDNFilterItem filterList, int filterCount, @NativeType("const nfdnchar_t*") MemorySegment defaultPath); + int nopenDialogN(@NativeType("nfdnchar_t**") MemorySegment outPath, NFDNFilterItem filterList, int filterCount, @NativeType("const nfdnchar_t*") MemorySegment defaultPath); /** * Single file open dialog @@ -223,14 +236,14 @@ public interface NFD extends DirectAccess { * @see #nopenDialogN(MemorySegment, NFDNFilterItem, int, MemorySegment) nopenDialogN */ @Skip - default NFDResult openDialogN(String[] outPath, NFDNFilterItem filterList, String defaultPath) { - try (MemoryStack stack = MemoryStack.stackPush()) { + default int openDialogN(String[] outPath, NFDNFilterItem filterList, String defaultPath) { + try (MemoryStack stack = MemoryStack.pushLocal()) { final MemorySegment seg = Marshal.marshal(stack, outPath); - final NFDResult result = nopenDialogN(seg, + final int result = nopenDialogN(seg, filterList, filterList != null ? Math.toIntExact(filterList.elementCount()) : 0, Marshal.marshal(stack, defaultPath, NFDInternal.nfdCharset)); - if (result == NFDResult.OKAY) { + if (result == OKAY) { final MemorySegment path = seg.get(Unmarshal.STR_LAYOUT, 0L); outPath[0] = path.getString(0L, NFDInternal.nfdCharset); freePathN(path); @@ -243,14 +256,14 @@ default NFDResult openDialogN(String[] outPath, NFDNFilterItem filterList, St * Single file open dialog * * @param outPath It is the caller's responsibility to free {@code outPath} - * via {@link #freePathN} if this function returns {@link NFDResult#OKAY} + * via {@link #freePathN} if this function returns {@link #OKAY} * @param filterList the filter list * @param filterCount If zero, filterList is ignored (you can use null). * @param defaultPath If null, the operating system will decide. * @return the result */ @Entrypoint("NFD_OpenDialogU8") - NFDResult nopenDialogU8(@NativeType("nfdu8char_t**") MemorySegment outPath, NFDU8FilterItem filterList, int filterCount, @NativeType("const nfdu8char_t*") MemorySegment defaultPath); + int nopenDialogU8(@NativeType("nfdu8char_t**") MemorySegment outPath, NFDU8FilterItem filterList, int filterCount, @NativeType("const nfdu8char_t*") MemorySegment defaultPath); /** * Single file open dialog @@ -262,14 +275,14 @@ default NFDResult openDialogN(String[] outPath, NFDNFilterItem filterList, St * @see #nopenDialogU8(MemorySegment, NFDU8FilterItem, int, MemorySegment) nopenDialogU8 */ @Skip - default NFDResult openDialogU8(String[] outPath, NFDU8FilterItem filterList, String defaultPath) { - try (MemoryStack stack = MemoryStack.stackPush()) { + default int openDialogU8(String[] outPath, NFDU8FilterItem filterList, String defaultPath) { + try (MemoryStack stack = MemoryStack.pushLocal()) { final MemorySegment seg = Marshal.marshal(stack, outPath); - final NFDResult result = nopenDialogU8(seg, + final int result = nopenDialogU8(seg, filterList, filterList != null ? Math.toIntExact(filterList.elementCount()) : 0, Marshal.marshal(stack, defaultPath, NFDInternal.nfdCharset)); - if (result == NFDResult.OKAY) { + if (result == OKAY) { final MemorySegment path = seg.get(Unmarshal.STR_LAYOUT, 0L); outPath[0] = path.getString(0L, NFDInternal.nfdCharset); freePathU8(path); @@ -294,28 +307,28 @@ default NFDResult openDialogU8(String[] outPath, NFDU8FilterItem filterList, * Multiple file open dialog * * @param outPaths It is the caller's responsibility to free {@code outPaths} - * via {@link #pathSetFree} if this function returns {@link NFDResult#OKAY} + * via {@link #pathSetFree} if this function returns {@link #OKAY} * @param filterList the filter list * @param filterCount If zero, filterList is ignored (you can use null). * @param defaultPath If null, the operating system will decide. * @return the result */ @Entrypoint("NFD_OpenDialogMultipleN") - NFDResult nopenDialogMultipleN(@NativeType("const nfdpathset_t**") MemorySegment outPaths, NFDNFilterItem filterList, int filterCount, @NativeType("const nfdnchar_t*") MemorySegment defaultPath); + int nopenDialogMultipleN(@NativeType("const nfdpathset_t**") MemorySegment outPaths, NFDNFilterItem filterList, int filterCount, @NativeType("const nfdnchar_t*") MemorySegment defaultPath); /** * Multiple file open dialog * * @param outPaths It is the caller's responsibility to free {@code outPaths} - * via {@link #pathSetFree} if this function returns {@link NFDResult#OKAY} + * via {@link #pathSetFree} if this function returns {@link #OKAY} * @param filterList the filter list * @param defaultPath If null, the operating system will decide. * @return the result * @see #nopenDialogMultipleN(MemorySegment, NFDNFilterItem, int, MemorySegment) nopenDialogMultipleN */ @Skip - default NFDResult openDialogMultipleN(@NativeType("const nfdpathset_t**") MemorySegment outPaths, NFDNFilterItem filterList, String defaultPath) { - try (MemoryStack stack = MemoryStack.stackPush()) { + default int openDialogMultipleN(@NativeType("const nfdpathset_t**") MemorySegment outPaths, NFDNFilterItem filterList, String defaultPath) { + try (MemoryStack stack = MemoryStack.pushLocal()) { return nopenDialogMultipleN(outPaths, filterList, filterList != null ? Math.toIntExact(filterList.elementCount()) : 0, @@ -327,28 +340,28 @@ default NFDResult openDialogMultipleN(@NativeType("const nfdpathset_t**") Memory * Multiple file open dialog * * @param outPaths It is the caller's responsibility to free {@code outPaths} - * via {@link #pathSetFree} if this function returns {@link NFDResult#OKAY} + * via {@link #pathSetFree} if this function returns {@link #OKAY} * @param filterList the filter list * @param filterCount If zero, filterList is ignored (you can use null). * @param defaultPath If null, the operating system will decide. * @return the result */ @Entrypoint("NFD_OpenDialogMultipleU8") - NFDResult nopenDialogMultipleU8(@NativeType("const nfdpathset_t**") MemorySegment outPaths, NFDU8FilterItem filterList, int filterCount, @NativeType("const nfdu8char_t*") MemorySegment defaultPath); + int nopenDialogMultipleU8(@NativeType("const nfdpathset_t**") MemorySegment outPaths, NFDU8FilterItem filterList, int filterCount, @NativeType("const nfdu8char_t*") MemorySegment defaultPath); /** * Multiple file open dialog * * @param outPaths It is the caller's responsibility to free {@code outPaths} - * via {@link #pathSetFree} if this function returns {@link NFDResult#OKAY} + * via {@link #pathSetFree} if this function returns {@link #OKAY} * @param filterList the filter list * @param defaultPath If null, the operating system will decide. * @return the result * @see #nopenDialogMultipleU8(MemorySegment, NFDU8FilterItem, int, MemorySegment) nopenDialogMultipleU8 */ @Skip - default NFDResult openDialogMultipleU8(@NativeType("const nfdpathset_t**") MemorySegment outPaths, NFDU8FilterItem filterList, String defaultPath) { - try (MemoryStack stack = MemoryStack.stackPush()) { + default int openDialogMultipleU8(@NativeType("const nfdpathset_t**") MemorySegment outPaths, NFDU8FilterItem filterList, String defaultPath) { + try (MemoryStack stack = MemoryStack.pushLocal()) { return nopenDialogMultipleU8(outPaths, filterList, filterList != null ? Math.toIntExact(filterList.elementCount()) : 0, @@ -372,7 +385,7 @@ default NFDResult openDialogMultipleU8(@NativeType("const nfdpathset_t**") Memor * Save dialog * * @param outPath It is the caller's responsibility to free {@code outPath} - * via {@link #freePathN} if this function returns {@link NFDResult#OKAY} + * via {@link #freePathN} if this function returns {@link #OKAY} * @param filterList the filter list * @param filterCount If zero, filterList is ignored (you can use null). * @param defaultPath If null, the operating system will decide. @@ -380,7 +393,7 @@ default NFDResult openDialogMultipleU8(@NativeType("const nfdpathset_t**") Memor * @return the result */ @Entrypoint("NFD_SaveDialogN") - NFDResult nsaveDialogN(@NativeType("nfdnchar_t**") MemorySegment outPath, NFDNFilterItem filterList, int filterCount, @NativeType("const nfdnchar_t*") MemorySegment defaultPath, @NativeType("const nfdnchar_t*") MemorySegment defaultName); + int nsaveDialogN(@NativeType("nfdnchar_t**") MemorySegment outPath, NFDNFilterItem filterList, int filterCount, @NativeType("const nfdnchar_t*") MemorySegment defaultPath, @NativeType("const nfdnchar_t*") MemorySegment defaultName); /** * Save dialog @@ -393,15 +406,15 @@ default NFDResult openDialogMultipleU8(@NativeType("const nfdpathset_t**") Memor * @see #nsaveDialogN(MemorySegment, NFDNFilterItem, int, MemorySegment, MemorySegment) nsaveDialogN */ @Skip - default NFDResult saveDialogN(String[] outPath, NFDNFilterItem filterList, String defaultPath, String defaultName) { - try (MemoryStack stack = MemoryStack.stackPush()) { + default int saveDialogN(String[] outPath, NFDNFilterItem filterList, String defaultPath, String defaultName) { + try (MemoryStack stack = MemoryStack.pushLocal()) { final MemorySegment seg = Marshal.marshal(stack, outPath); - final NFDResult result = nsaveDialogN(seg, + final int result = nsaveDialogN(seg, filterList, filterList != null ? Math.toIntExact(filterList.elementCount()) : 0, Marshal.marshal(stack, defaultPath, NFDInternal.nfdCharset), Marshal.marshal(stack, defaultName, NFDInternal.nfdCharset)); - if (result == NFDResult.OKAY) { + if (result == OKAY) { final MemorySegment path = seg.get(Unmarshal.STR_LAYOUT, 0L); outPath[0] = path.getString(0L, NFDInternal.nfdCharset); freePathN(path); @@ -414,7 +427,7 @@ default NFDResult saveDialogN(String[] outPath, NFDNFilterItem filterList, St * Save dialog * * @param outPath It is the caller's responsibility to free {@code outPath} - * via {@link #freePathU8} if this function returns {@link NFDResult#OKAY} + * via {@link #freePathU8} if this function returns {@link #OKAY} * @param filterList the filter list * @param filterCount If zero, filterList is ignored (you can use null). * @param defaultPath If null, the operating system will decide. @@ -422,7 +435,7 @@ default NFDResult saveDialogN(String[] outPath, NFDNFilterItem filterList, St * @return the result */ @Entrypoint("NFD_SaveDialogU8") - NFDResult nsaveDialogU8(@NativeType("nfdu8char_t**") MemorySegment outPath, NFDU8FilterItem filterList, int filterCount, @NativeType("const nfdu8char_t*") MemorySegment defaultPath, @NativeType("const nfdu8char_t*") MemorySegment defaultName); + int nsaveDialogU8(@NativeType("nfdu8char_t**") MemorySegment outPath, NFDU8FilterItem filterList, int filterCount, @NativeType("const nfdu8char_t*") MemorySegment defaultPath, @NativeType("const nfdu8char_t*") MemorySegment defaultName); /** * Save dialog @@ -435,15 +448,15 @@ default NFDResult saveDialogN(String[] outPath, NFDNFilterItem filterList, St * @see #nsaveDialogU8(MemorySegment, NFDU8FilterItem, int, MemorySegment, MemorySegment) nsaveDialogU8 */ @Skip - default NFDResult saveDialogU8(String[] outPath, NFDU8FilterItem filterList, String defaultPath, String defaultName) { - try (MemoryStack stack = MemoryStack.stackPush()) { + default int saveDialogU8(String[] outPath, NFDU8FilterItem filterList, String defaultPath, String defaultName) { + try (MemoryStack stack = MemoryStack.pushLocal()) { final MemorySegment seg = Marshal.marshal(stack, outPath); - final NFDResult result = nsaveDialogU8(seg, + final int result = nsaveDialogU8(seg, filterList, filterList != null ? Math.toIntExact(filterList.elementCount()) : 0, Marshal.marshal(stack, defaultPath, NFDInternal.nfdCharset), Marshal.marshal(stack, defaultName, NFDInternal.nfdCharset)); - if (result == NFDResult.OKAY) { + if (result == OKAY) { final MemorySegment path = seg.get(Unmarshal.STR_LAYOUT, 0L); outPath[0] = path.getString(0L, NFDInternal.nfdCharset); freePathU8(path); @@ -468,12 +481,12 @@ default NFDResult saveDialogU8(String[] outPath, NFDU8FilterItem filterList, * Select folder dialog * * @param outPath It is the caller's responsibility to free {@code outPath} - * via {@link #freePathN} if this function returns {@link NFDResult#OKAY} + * via {@link #freePathN} if this function returns {@link #OKAY} * @param defaultPath If null, the operating system will decide. * @return the result */ @Entrypoint("NFD_PickFolderN") - NFDResult npickFolderN(@NativeType("nfdnchar_t**") MemorySegment outPath, @NativeType("const nfdnchar_t*") MemorySegment defaultPath); + int npickFolderN(@NativeType("nfdnchar_t**") MemorySegment outPath, @NativeType("const nfdnchar_t*") MemorySegment defaultPath); /** * Select folder dialog @@ -484,11 +497,11 @@ default NFDResult saveDialogU8(String[] outPath, NFDU8FilterItem filterList, * @see #npickFolderN(MemorySegment, MemorySegment) npickFolderN */ @Skip - default NFDResult pickFolderN(String[] outPath, String defaultPath) { - try (MemoryStack stack = MemoryStack.stackPush()) { + default int pickFolderN(String[] outPath, String defaultPath) { + try (MemoryStack stack = MemoryStack.pushLocal()) { final MemorySegment seg = Marshal.marshal(stack, outPath); - final NFDResult result = npickFolderN(seg, Marshal.marshal(stack, defaultPath, NFDInternal.nfdCharset)); - if (result == NFDResult.OKAY) { + final int result = npickFolderN(seg, Marshal.marshal(stack, defaultPath, NFDInternal.nfdCharset)); + if (result == OKAY) { final MemorySegment path = seg.get(Unmarshal.STR_LAYOUT, 0); outPath[0] = path.getString(0, NFDInternal.nfdCharset); freePathN(path); @@ -501,12 +514,12 @@ default NFDResult pickFolderN(String[] outPath, String defaultPath) { * Select folder dialog * * @param outPath It is the caller's responsibility to free {@code outPath} - * via {@link #freePathN} if this function returns {@link NFDResult#OKAY} + * via {@link #freePathN} if this function returns {@link #OKAY} * @param defaultPath If null, the operating system will decide. * @return the result */ @Entrypoint("NFD_PickFolderU8") - NFDResult npickFolderU8(@NativeType("nfdu8char_t**") MemorySegment outPath, @NativeType("const nfdu8char_t*") MemorySegment defaultPath); + int npickFolderU8(@NativeType("nfdu8char_t**") MemorySegment outPath, @NativeType("const nfdu8char_t*") MemorySegment defaultPath); /** * Select folder dialog @@ -517,11 +530,11 @@ default NFDResult pickFolderN(String[] outPath, String defaultPath) { * @see #npickFolderU8(MemorySegment, MemorySegment) npickFolderU8 */ @Skip - default NFDResult pickFolderU8(String[] outPath, String defaultPath) { - try (MemoryStack stack = MemoryStack.stackPush()) { + default int pickFolderU8(String[] outPath, String defaultPath) { + try (MemoryStack stack = MemoryStack.pushLocal()) { final MemorySegment seg = Marshal.marshal(stack, outPath); - final NFDResult result = npickFolderU8(seg, Marshal.marshal(stack, defaultPath, NFDInternal.nfdCharset)); - if (result == NFDResult.OKAY) { + final int result = npickFolderU8(seg, Marshal.marshal(stack, defaultPath, NFDInternal.nfdCharset)); + if (result == OKAY) { final MemorySegment path = seg.get(Unmarshal.STR_LAYOUT, 0); outPath[0] = path.getString(0, NFDInternal.nfdCharset); freePathU8(path); @@ -563,7 +576,7 @@ default NFDResult pickFolderU8(String[] outPath, String defaultPath) { /** * Get the last error *

- * This is set when a function returns {@link NFDResult#ERROR}. + * This is set when a function returns {@link #ERROR}. *

* The memory is owned by NFD and should not be freed by user code. *

@@ -579,13 +592,12 @@ default NFDResult pickFolderU8(String[] outPath, String defaultPath) { /** * Get the last error *

- * This is set when a function returns {@link NFDResult#ERROR}. + * This is set when a function returns {@link #ERROR}. * * @return The last error that was set, or null if there is no error. * @see #ngetError() ngetError */ @Entrypoint("NFD_GetError") - @SizedSeg(Unmarshal.STR_SIZE) String getError(); /** @@ -605,7 +617,7 @@ default NFDResult pickFolderU8(String[] outPath, String defaultPath) { * @return the result */ @Entrypoint("NFD_PathSet_GetCount") - NFDResult npathSetGetCount(@NativeType("const nfdpathset_t*") MemorySegment pathSet, @NativeType("nfdpathsetsize_t*") MemorySegment count); + int npathSetGetCount(@NativeType("const nfdpathset_t*") MemorySegment pathSet, @NativeType("nfdpathsetsize_t*") MemorySegment count); /** * Get the number of entries stored in pathSet. @@ -616,10 +628,10 @@ default NFDResult pickFolderU8(String[] outPath, String defaultPath) { * @see #npathSetGetCount(MemorySegment, MemorySegment) npathSetGetCount */ @Skip - default NFDResult pathSetGetCount(@NativeType("const nfdpathset_t*") MemorySegment pathSet, long[] count) { - try (MemoryStack stack = MemoryStack.stackPush()) { + default int pathSetGetCount(@NativeType("const nfdpathset_t*") MemorySegment pathSet, long[] count) { + try (MemoryStack stack = MemoryStack.pushLocal()) { final MemorySegment seg = stack.allocate(PATH_SET_SIZE); - final NFDResult result = npathSetGetCount(pathSet, seg); + final int result = npathSetGetCount(pathSet, seg); count[0] = switch (PATH_SET_SIZE) { case ValueLayout.OfLong layout -> seg.get(layout, 0); case ValueLayout.OfInt layout -> Integer.toUnsignedLong(seg.get(layout, 0)); @@ -637,11 +649,11 @@ default NFDResult pathSetGetCount(@NativeType("const nfdpathset_t*") MemorySegme * @see #npathSetGetCount(MemorySegment, MemorySegment) npathSetGetCount */ @Skip - default Tuple2.OfObjLong pathSetGetCount(@NativeType("const nfdpathset_t*") MemorySegment pathSet) { - try (MemoryStack stack = MemoryStack.stackPush()) { + default Tuple2.OfIntLong pathSetGetCount(@NativeType("const nfdpathset_t*") MemorySegment pathSet) { + try (MemoryStack stack = MemoryStack.pushLocal()) { final MemorySegment seg = stack.allocate(PATH_SET_SIZE); - final NFDResult result = npathSetGetCount(pathSet, seg); - return new Tuple2.OfObjLong<>(result, switch (PATH_SET_SIZE) { + final int result = npathSetGetCount(pathSet, seg); + return new Tuple2.OfIntLong(result, switch (PATH_SET_SIZE) { case ValueLayout.OfLong layout -> seg.get(layout, 0); case ValueLayout.OfInt layout -> Integer.toUnsignedLong(seg.get(layout, 0)); default -> throw new AssertionError("should not reach here"); @@ -655,16 +667,15 @@ default Tuple2.OfObjLong pathSetGetCount(@NativeType("const nfdpathse * @param pathSet the path-set * @param index the index * @param outPath It is the caller's responsibility to free {@code outPath} - * via {@link #pathSetFreePathN} if this function returns {@link NFDResult#OKAY} + * via {@link #pathSetFreePathN} if this function returns {@link #OKAY} * @return the result */ @Skip - default NFDResult npathSetGetPathN(@NativeType("const nfdpathset_t*") MemorySegment pathSet, long index, @NativeType("nfdnchar_t**") MemorySegment outPath) { + default int npathSetGetPathN(@NativeType("const nfdpathset_t*") MemorySegment pathSet, long index, @NativeType("nfdnchar_t**") MemorySegment outPath) { try { return switch (PATH_SET_SIZE) { - case OfLong _ -> NFDResult.of((int) NFD_PathSet_GetPathN().invokeExact(pathSet, index, outPath)); - case OfInt _ -> - NFDResult.of((int) NFD_PathSet_GetPathN().invokeExact(pathSet, Math.toIntExact(index), outPath)); + case OfLong _ -> (int) NFD_PathSet_GetPathN().invokeExact(pathSet, index, outPath); + case OfInt _ -> (int) NFD_PathSet_GetPathN().invokeExact(pathSet, Math.toIntExact(index), outPath); default -> throw new AssertionError("should not reach here"); }; } catch (Throwable e) { @@ -682,11 +693,11 @@ default NFDResult npathSetGetPathN(@NativeType("const nfdpathset_t*") MemorySegm * @see #npathSetGetPathN(MemorySegment, long, MemorySegment) npathSetGetPathN */ @Skip - default NFDResult pathSetGetPathN(@NativeType("const nfdpathset_t*") MemorySegment pathSet, long index, String[] outPath) { - try (MemoryStack stack = MemoryStack.stackPush()) { + default int pathSetGetPathN(@NativeType("const nfdpathset_t*") MemorySegment pathSet, long index, String[] outPath) { + try (MemoryStack stack = MemoryStack.pushLocal()) { final MemorySegment seg = Marshal.marshal(stack, outPath); - final NFDResult result = npathSetGetPathN(pathSet, index, seg); - if (result == NFDResult.OKAY) { + final int result = npathSetGetPathN(pathSet, index, seg); + if (result == OKAY) { final MemorySegment path = seg.get(Unmarshal.STR_LAYOUT, 0); outPath[0] = path.getString(0, NFDInternal.nfdCharset); pathSetFreePathN(path); @@ -701,16 +712,15 @@ default NFDResult pathSetGetPathN(@NativeType("const nfdpathset_t*") MemorySegme * @param pathSet the path-set * @param index the index * @param outPath It is the caller's responsibility to free {@code outPath} - * via {@link #pathSetFreePathU8} if this function returns {@link NFDResult#OKAY} + * via {@link #pathSetFreePathU8} if this function returns {@link #OKAY} * @return the result */ @Skip - default NFDResult npathSetGetPathU8(@NativeType("const nfdpathset_t*") MemorySegment pathSet, long index, @NativeType("nfdu8char_t**") MemorySegment outPath) { + default int npathSetGetPathU8(@NativeType("const nfdpathset_t*") MemorySegment pathSet, long index, @NativeType("nfdu8char_t**") MemorySegment outPath) { try { return switch (PATH_SET_SIZE) { - case OfLong _ -> NFDResult.of((int) NFD_PathSet_GetPathU8().invokeExact(pathSet, index, outPath)); - case OfInt _ -> - NFDResult.of((int) NFD_PathSet_GetPathU8().invokeExact(pathSet, Math.toIntExact(index), outPath)); + case OfLong _ -> (int) NFD_PathSet_GetPathU8().invokeExact(pathSet, index, outPath); + case OfInt _ -> (int) NFD_PathSet_GetPathU8().invokeExact(pathSet, Math.toIntExact(index), outPath); default -> throw new AssertionError("should not reach here"); }; } catch (Throwable e) { @@ -728,11 +738,11 @@ default NFDResult npathSetGetPathU8(@NativeType("const nfdpathset_t*") MemorySeg * @see #npathSetGetPathU8(MemorySegment, long, MemorySegment) npathSetGetPathU8 */ @Skip - default NFDResult pathSetGetPathU8(@NativeType("const nfdpathset_t*") MemorySegment pathSet, long index, String[] outPath) { - try (MemoryStack stack = MemoryStack.stackPush()) { + default int pathSetGetPathU8(@NativeType("const nfdpathset_t*") MemorySegment pathSet, long index, String[] outPath) { + try (MemoryStack stack = MemoryStack.pushLocal()) { final MemorySegment seg = Marshal.marshal(stack, outPath); - final NFDResult result = npathSetGetPathU8(pathSet, index, seg); - if (result == NFDResult.OKAY) { + final int result = npathSetGetPathU8(pathSet, index, seg); + if (result == OKAY) { final MemorySegment path = seg.get(Unmarshal.STR_LAYOUT, 0); outPath[0] = path.getString(0, NFDInternal.nfdCharset); pathSetFreePathU8(path); @@ -762,12 +772,12 @@ default NFDResult pathSetGetPathU8(@NativeType("const nfdpathset_t*") MemorySegm * * @param pathSet the path set * @param outEnumerator It is the caller's responsibility to free {@code enumerator} - * via {@link #pathSetFreeEnum} if this function returns {@link NFDResult#OKAY}, + * via {@link #pathSetFreeEnum} if this function returns {@link #OKAY}, * and it should be freed before freeing the path-set. * @return the result */ @Entrypoint("NFD_PathSet_GetEnum") - NFDResult pathSetGetEnum(@NativeType("const nfdpathset_t*") MemorySegment pathSet, @NativeType("nfdpathsetenum_t*") MemorySegment outEnumerator); + int pathSetGetEnum(@NativeType("const nfdpathset_t*") MemorySegment pathSet, @NativeType("nfdpathsetenum_t*") MemorySegment outEnumerator); /** * Frees an enumerator of the path set. @@ -785,12 +795,12 @@ default NFDResult pathSetGetPathU8(@NativeType("const nfdpathset_t*") MemorySegm * @param enumerator the enumerator * @param outPath It is the caller's responsibility * to free {@code *outPath} via {@link #pathSetFreePathN} - * if this function returns {@link NFDResult#OKAY} + * if this function returns {@link #OKAY} * and {@code *outPath} is not null. * @return the result */ @Entrypoint("NFD_PathSet_EnumNextN") - NFDResult npathSetEnumNextN(@NativeType("nfdpathsetenum_t*") MemorySegment enumerator, @NativeType("nfdnchar_t**") MemorySegment outPath); + int npathSetEnumNextN(@NativeType("nfdpathsetenum_t*") MemorySegment enumerator, @NativeType("nfdnchar_t**") MemorySegment outPath); /** * Gets the next item from the path set enumerator. @@ -801,11 +811,11 @@ default NFDResult pathSetGetPathU8(@NativeType("const nfdpathset_t*") MemorySegm * @see #npathSetEnumNextN(MemorySegment, MemorySegment) npathSetEnumNextN */ @Skip - default NFDResult pathSetEnumNextN(@NativeType("nfdpathsetenum_t*") MemorySegment enumerator, String[] outPath) { - try (MemoryStack stack = MemoryStack.stackPush()) { + default int pathSetEnumNextN(@NativeType("nfdpathsetenum_t*") MemorySegment enumerator, String[] outPath) { + try (MemoryStack stack = MemoryStack.pushLocal()) { final MemorySegment seg = Marshal.marshal(stack, outPath); - final NFDResult result = npathSetEnumNextN(enumerator, seg); - if (result == NFDResult.OKAY) { + final int result = npathSetEnumNextN(enumerator, seg); + if (result == OKAY) { final MemorySegment path = seg.get(Unmarshal.STR_LAYOUT, 0); if (!Unmarshal.isNullPointer(path)) { outPath[0] = path.getString(0L, NFDInternal.nfdCharset); @@ -824,12 +834,12 @@ default NFDResult pathSetEnumNextN(@NativeType("nfdpathsetenum_t*") MemorySegmen * @param enumerator the enumerator * @param outPath It is the caller's responsibility * to free {@code *outPath} via {@link #pathSetFreePathU8} - * if this function returns {@link NFDResult#OKAY} + * if this function returns {@link #OKAY} * and {@code *outPath} is not null. * @return the result */ @Entrypoint("NFD_PathSet_EnumNextU8") - NFDResult npathSetEnumNextU8(@NativeType("nfdpathsetenum_t*") MemorySegment enumerator, @NativeType("nfdu8char_t**") MemorySegment outPath); + int npathSetEnumNextU8(@NativeType("nfdpathsetenum_t*") MemorySegment enumerator, @NativeType("nfdu8char_t**") MemorySegment outPath); /** * Gets the next item from the path set enumerator. @@ -840,11 +850,11 @@ default NFDResult pathSetEnumNextN(@NativeType("nfdpathsetenum_t*") MemorySegmen * @see #npathSetEnumNextU8(MemorySegment, MemorySegment) npathSetEnumNextU8 */ @Skip - default NFDResult pathSetEnumNextU8(@NativeType("nfdpathsetenum_t*") MemorySegment enumerator, String[] outPath) { - try (MemoryStack stack = MemoryStack.stackPush()) { + default int pathSetEnumNextU8(@NativeType("nfdpathsetenum_t*") MemorySegment enumerator, String[] outPath) { + try (MemoryStack stack = MemoryStack.pushLocal()) { final MemorySegment seg = Marshal.marshal(stack, outPath); - final NFDResult result = npathSetEnumNextU8(enumerator, seg); - if (result == NFDResult.OKAY) { + final int result = npathSetEnumNextU8(enumerator, seg); + if (result == OKAY) { final MemorySegment path = seg.get(Unmarshal.STR_LAYOUT, 0); if (!Unmarshal.isNullPointer(path)) { outPath[0] = path.getString(0L, NFDInternal.nfdCharset); diff --git a/modules/overrungl.nfd/src/main/java/overrungl/nfd/NFDEnumerator.java b/modules/overrungl.nfd/src/main/java/overrungl/nfd/NFDEnumerator.java index 684ef0e2..460d35a3 100644 --- a/modules/overrungl.nfd/src/main/java/overrungl/nfd/NFDEnumerator.java +++ b/modules/overrungl.nfd/src/main/java/overrungl/nfd/NFDEnumerator.java @@ -108,23 +108,23 @@ public String next() { throw new NoSuchElementException(); } String[] s = new String[1]; - final NFDResult result = switch (kind) { + final int result = switch (kind) { case N -> nfd.pathSetEnumNextN(segment.segment(), s); case U8 -> nfd.pathSetEnumNextU8(segment.segment(), s); }; - if (result == NFDResult.ERROR) throw errorIterating(nfd); + if (result == NFD.ERROR) throw errorIterating(nfd); nextPath = s[0]; return curr; } } - private static Tuple2 fromPathSet(Kind kind, SegmentAllocator allocator, MemorySegment pathSet) { + private static Tuple2.OfObjInt fromPathSet(Kind kind, SegmentAllocator allocator, MemorySegment pathSet) { final MemorySegment seg = allocator.allocate(ADDRESS); - final NFDResult result = NFD.INSTANCE.pathSetGetEnum(pathSet, seg); - return new Tuple2<>(result, - result == NFDResult.OKAY ? + final int result = NFD.INSTANCE.pathSetGetEnum(pathSet, seg); + return new Tuple2.OfObjInt<>(result == NFD.OKAY ? new NFDEnumerator(kind, Segment.OF.of(seg)) : - null); + null, + result); } /** @@ -134,7 +134,7 @@ private static Tuple2 fromPathSet(Kind kind, SegmentAl * @param pathSet the path set. * @return the result and the enumerator. */ - public static Tuple2 fromPathSetN(SegmentAllocator allocator, MemorySegment pathSet) { + public static Tuple2.OfObjInt fromPathSetN(SegmentAllocator allocator, MemorySegment pathSet) { return fromPathSet(Kind.N, allocator, pathSet); } @@ -145,7 +145,7 @@ public static Tuple2 fromPathSetN(SegmentAllocator all * @param pathSet the path set. * @return the result and the enumerator. */ - public static Tuple2 fromPathSetU8(SegmentAllocator allocator, MemorySegment pathSet) { + public static Tuple2.OfObjInt fromPathSetU8(SegmentAllocator allocator, MemorySegment pathSet) { return fromPathSet(Kind.U8, allocator, pathSet); } @@ -158,13 +158,13 @@ private static IllegalStateException errorIterating(NFD nfd) { public Iterator iterator() { // TODO: 2023/7/6 Value object String[] s = new String[1]; - final NFDResult result = switch (kind) { + final int result = switch (kind) { case N -> nfd.pathSetEnumNextN(segment.segment(), s); case U8 -> nfd.pathSetEnumNextU8(segment.segment(), s); }; final String path = s[0]; - if (path == null || result != NFDResult.OKAY) { - if (result == NFDResult.ERROR) { + if (path == null || result != NFD.OKAY) { + if (result == NFD.ERROR) { throw errorIterating(nfd); } return EMPTY_ITERATOR; diff --git a/modules/overrungl.nfd/src/main/java/overrungl/nfd/NFDInternal.java b/modules/overrungl.nfd/src/main/java/overrungl/nfd/NFDInternal.java index ac07a9a8..09ec83f9 100644 --- a/modules/overrungl.nfd/src/main/java/overrungl/nfd/NFDInternal.java +++ b/modules/overrungl.nfd/src/main/java/overrungl/nfd/NFDInternal.java @@ -17,23 +17,16 @@ package overrungl.nfd; import io.github.overrun.platform.Platform; -import overrun.marshal.Downcall; -import overrun.marshal.DowncallOption; import overrungl.Configurations; import overrungl.OverrunGL; import overrungl.internal.RuntimeHelper; -import java.lang.foreign.FunctionDescriptor; import java.lang.foreign.SymbolLookup; -import java.lang.invoke.MethodHandles; import java.nio.charset.Charset; import java.nio.charset.StandardCharsets; -import java.util.Map; import java.util.function.Supplier; -import static java.lang.foreign.ValueLayout.ADDRESS; -import static java.lang.foreign.ValueLayout.JAVA_INT; -import static overrungl.nfd.NFD.PATH_SET_SIZE; +import static overrun.marshal.gen.processor.ProcessorTypes.registerStruct; /** * internal @@ -43,16 +36,23 @@ */ final class NFDInternal { static final SymbolLookup LOOKUP; - static final NFD instance; static { + registerStruct(NFDNFilterItem.class, NFDNFilterItem.OF); + registerStruct(NFDNFilterItem.Mutable.class, NFDNFilterItem.Mutable.OF); + registerStruct(NFDOpenDialogNArgs.class, NFDOpenDialogNArgs.OF); + registerStruct(NFDOpenDialogU8Args.class, NFDOpenDialogU8Args.OF); + registerStruct(NFDPickFolderNArgs.class, NFDPickFolderNArgs.OF); + registerStruct(NFDPickFolderU8Args.class, NFDPickFolderU8Args.OF); + registerStruct(NFDSaveDialogNArgs.class, NFDSaveDialogNArgs.OF); + registerStruct(NFDSaveDialogU8Args.class, NFDSaveDialogU8Args.OF); + registerStruct(NFDU8FilterItem.class, NFDU8FilterItem.OF); + registerStruct(NFDU8FilterItem.Mutable.class, NFDU8FilterItem.Mutable.OF); + registerStruct(NFDWindowHandle.class, NFDWindowHandle.OF); + final Supplier lib = () -> RuntimeHelper.load("nfd", "nfd", OverrunGL.NFD_VERSION); final var function = Configurations.NFD_SYMBOL_LOOKUP.get(); LOOKUP = function != null ? function.apply(lib) : lib.get(); - instance = Downcall.load(MethodHandles.lookup(), NFDInternal.LOOKUP, DowncallOption.descriptors(Map.of( - "NFD_PathSet_GetPathN", FunctionDescriptor.of(JAVA_INT, ADDRESS, PATH_SET_SIZE, ADDRESS), - "NFD_PathSet_GetPathU8", FunctionDescriptor.of(JAVA_INT, ADDRESS, PATH_SET_SIZE, ADDRESS) - ))); } static final Platform os = Platform.current(); diff --git a/modules/overrungl.nfd/src/main/java/overrungl/nfd/NFDResult.java b/modules/overrungl.nfd/src/main/java/overrungl/nfd/NFDResult.java deleted file mode 100644 index ca36e557..00000000 --- a/modules/overrungl.nfd/src/main/java/overrungl/nfd/NFDResult.java +++ /dev/null @@ -1,68 +0,0 @@ -/* - * MIT License - * - * Copyright (c) 2023-2024 Overrun Organization - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - */ - -package overrungl.nfd; - -import overrun.marshal.CEnum; - -/** - * NFD result - * - * @author squid233 - * @since 0.1.0 - */ -public enum NFDResult implements CEnum { - /** - * programmatic error - */ - ERROR(0), - /** - * user pressed okay, or successful return - */ - OKAY(1), - /** - * user pressed cancel - */ - CANCEL(2); - - private final int value; - - NFDResult(int value) { - this.value = value; - } - - /** - * Gets the {@link NFDResult} by the given integer value. - * - * @param i the value - * @return the result - * @throws IllegalArgumentException if the result is not found - */ - @Wrapper - public static NFDResult of(int i) { - return switch (i) { - case 0 -> ERROR; - case 1 -> OKAY; - case 2 -> CANCEL; - default -> throw new IllegalArgumentException("Unexpected value: " + i); - }; - } - - @Override - public int value() { - return value; - } -} diff --git a/modules/overrungl.opengl/build.gradle.kts b/modules/overrungl.opengl/build.gradle.kts new file mode 100644 index 00000000..8723d157 --- /dev/null +++ b/modules/overrungl.opengl/build.gradle.kts @@ -0,0 +1,9 @@ +plugins { + id("module.conventions") + id("submodule.conventions") +} + +overrunglModule { + artifactName = "overrungl-opengl" + publishInfo = Artifact.OPENGL +} diff --git a/modules/overrungl.opengl/src/main/java/module-info.java b/modules/overrungl.opengl/src/main/java/module-info.java index 9a87a7d3..d4634274 100644 --- a/modules/overrungl.opengl/src/main/java/module-info.java +++ b/modules/overrungl.opengl/src/main/java/module-info.java @@ -39,4 +39,5 @@ requires transitive overrungl.core; requires static org.jetbrains.annotations; + requires io.github.overrun.memstack; } diff --git a/modules/overrungl.opengl/src/main/java/overrungl/opengl/GL10.java b/modules/overrungl.opengl/src/main/java/overrungl/opengl/GL10.java index de5d92c1..24c05a5a 100644 --- a/modules/overrungl.opengl/src/main/java/overrungl/opengl/GL10.java +++ b/modules/overrungl.opengl/src/main/java/overrungl/opengl/GL10.java @@ -16,9 +16,9 @@ package overrungl.opengl; +import io.github.overrun.memstack.MemoryStack; import overrun.marshal.DirectAccess; import overrun.marshal.Marshal; -import overrun.marshal.MemoryStack; import overrun.marshal.Unmarshal; import overrun.marshal.gen.Entrypoint; import overrun.marshal.gen.Ref; @@ -508,7 +508,7 @@ default void getClipPlane(int plane, MemorySegment equation) { @Skip default double[] getClipPlane(int plane) { - try (MemoryStack stack = MemoryStack.stackPush()) { + try (MemoryStack stack = MemoryStack.pushLocal()) { var pEq = stack.allocate(JAVA_DOUBLE, 4); getClipPlane(plane, pEq); return Unmarshal.unmarshalAsDoubleArray(pEq); @@ -527,8 +527,8 @@ default void getLightfv(SegmentAllocator allocator, int light, int pname, @Ref f @Skip default float getLightfv(int light, int pname) { - try (MemoryStack stack = MemoryStack.stackPush()) { - var pParams = stack.floats(0F); + try (MemoryStack stack = MemoryStack.pushLocal()) { + var pParams = stack.allocate(JAVA_FLOAT); getLightfv(light, pname, pParams); return pParams.get(JAVA_FLOAT, 0); } @@ -546,8 +546,8 @@ default void getLightiv(SegmentAllocator allocator, int light, int pname, @Ref i @Skip default int getLightiv(int light, int pname) { - try (MemoryStack stack = MemoryStack.stackPush()) { - var pParams = stack.ints(0); + try (MemoryStack stack = MemoryStack.pushLocal()) { + var pParams = stack.allocate(JAVA_INT); getLightiv(light, pname, pParams); return pParams.get(JAVA_INT, 0); } @@ -565,8 +565,8 @@ default void getMapdv(SegmentAllocator allocator, int target, int query, @Ref do @Skip default double getMapdv(int target, int query) { - try (MemoryStack stack = MemoryStack.stackPush()) { - var pv = stack.doubles(0D); + try (MemoryStack stack = MemoryStack.pushLocal()) { + var pv = stack.allocate(JAVA_DOUBLE); getMapdv(target, query, pv); return pv.get(JAVA_DOUBLE, 0); } @@ -584,8 +584,8 @@ default void getMapfv(SegmentAllocator allocator, int target, int query, @Ref fl @Skip default float getMapfv(int target, int query) { - try (MemoryStack stack = MemoryStack.stackPush()) { - var pv = stack.floats(0F); + try (MemoryStack stack = MemoryStack.pushLocal()) { + var pv = stack.allocate(JAVA_FLOAT); getMapfv(target, query, pv); return pv.get(JAVA_FLOAT, 0); } @@ -603,8 +603,8 @@ default void getMapiv(SegmentAllocator allocator, int target, int query, @Ref in @Skip default int getMapiv(int target, int query) { - try (MemoryStack stack = MemoryStack.stackPush()) { - var pv = stack.ints(0); + try (MemoryStack stack = MemoryStack.pushLocal()) { + var pv = stack.allocate(JAVA_INT); getMapiv(target, query, pv); return pv.get(JAVA_INT, 0); } @@ -622,8 +622,8 @@ default void getMaterialfv(SegmentAllocator allocator, int face, int pname, @Ref @Skip default float getMaterialfv(int face, int pname) { - try (MemoryStack stack = MemoryStack.stackPush()) { - var pParams = stack.floats(0F); + try (MemoryStack stack = MemoryStack.pushLocal()) { + var pParams = stack.allocate(JAVA_FLOAT); getMaterialfv(face, pname, pParams); return pParams.get(JAVA_FLOAT, 0); } @@ -641,8 +641,8 @@ default void getMaterialiv(SegmentAllocator allocator, int face, int pname, @Ref @Skip default int getMaterialiv(int face, int pname) { - try (MemoryStack stack = MemoryStack.stackPush()) { - var pParams = stack.ints(0); + try (MemoryStack stack = MemoryStack.pushLocal()) { + var pParams = stack.allocate(JAVA_INT); getMaterialiv(face, pname, pParams); return pParams.get(JAVA_INT, 0); } @@ -700,8 +700,8 @@ default void getTexEnvfv(SegmentAllocator allocator, int target, int pname, @Ref @Skip default float getTexEnvfv(int target, int pname) { - try (MemoryStack stack = MemoryStack.stackPush()) { - var pParams = stack.floats(0F); + try (MemoryStack stack = MemoryStack.pushLocal()) { + var pParams = stack.allocate(JAVA_FLOAT); getTexEnvfv(target, pname, pParams); return pParams.get(JAVA_FLOAT, 0); } @@ -719,8 +719,8 @@ default void getTexEnviv(SegmentAllocator allocator, int target, int pname, @Ref @Skip default int getTexEnviv(int target, int pname) { - try (MemoryStack stack = MemoryStack.stackPush()) { - var pParams = stack.ints(0); + try (MemoryStack stack = MemoryStack.pushLocal()) { + var pParams = stack.allocate(JAVA_INT); getTexEnviv(target, pname, pParams); return pParams.get(JAVA_INT, 0); } diff --git a/modules/overrungl.opengl/src/main/java/overrungl/opengl/GL10C.java b/modules/overrungl.opengl/src/main/java/overrungl/opengl/GL10C.java index f63c78f5..6f65e5b4 100644 --- a/modules/overrungl.opengl/src/main/java/overrungl/opengl/GL10C.java +++ b/modules/overrungl.opengl/src/main/java/overrungl/opengl/GL10C.java @@ -16,13 +16,11 @@ package overrungl.opengl; +import io.github.overrun.memstack.MemoryStack; import org.jetbrains.annotations.Nullable; import overrun.marshal.DirectAccess; -import overrun.marshal.MemoryStack; -import overrun.marshal.Unmarshal; import overrun.marshal.gen.Entrypoint; import overrun.marshal.gen.Ref; -import overrun.marshal.gen.SizedSeg; import overrun.marshal.gen.Skip; import java.lang.foreign.MemorySegment; @@ -303,7 +301,7 @@ default void getBooleanv(SegmentAllocator allocator, int pname, @Ref boolean[] d @Skip default boolean getBooleanv(int pname) { - try (MemoryStack stack = MemoryStack.stackPush()) { + try (MemoryStack stack = MemoryStack.pushLocal()) { var pData = stack.allocate(JAVA_BOOLEAN); getBooleanv(pname, pData); return pData.get(JAVA_BOOLEAN, 0); @@ -322,8 +320,8 @@ default void getDoublev(SegmentAllocator allocator, int pname, @Ref double[] dat @Skip default double getDoublev(int pname) { - try (MemoryStack stack = MemoryStack.stackPush()) { - var pData = stack.doubles(0D); + try (MemoryStack stack = MemoryStack.pushLocal()) { + var pData = stack.allocate(JAVA_DOUBLE); getDoublev(pname, pData); return pData.get(JAVA_DOUBLE, 0); } @@ -346,8 +344,8 @@ default void getFloatv(SegmentAllocator allocator, int pname, @Ref float[] data) @Skip default float getFloatv(int pname) { - try (MemoryStack stack = MemoryStack.stackPush()) { - var pData = stack.floats(0F); + try (MemoryStack stack = MemoryStack.pushLocal()) { + var pData = stack.allocate(JAVA_FLOAT); getFloatv(pname, pData); return pData.get(JAVA_FLOAT, 0); } @@ -365,8 +363,8 @@ default void getIntegerv(SegmentAllocator allocator, int pname, @Ref int[] data) @Skip default int getIntegerv(int pname) { - try (MemoryStack stack = MemoryStack.stackPush()) { - var pData = stack.ints(0); + try (MemoryStack stack = MemoryStack.pushLocal()) { + var pData = stack.allocate(JAVA_INT); getIntegerv(pname, pData); return pData.get(JAVA_INT, 0); } @@ -379,7 +377,6 @@ default MemorySegment ngetString(int name) { @Entrypoint("glGetString") @Nullable - @SizedSeg(Unmarshal.STR_SIZE) default String getString(int name) { throw new ContextException(); } @@ -401,8 +398,8 @@ default void getTexLevelParameterfv(SegmentAllocator allocator, int target, int @Skip default float getTexLevelParameterfv(int target, int level, int pname) { - try (MemoryStack stack = MemoryStack.stackPush()) { - var pParams = stack.floats(0F); + try (MemoryStack stack = MemoryStack.pushLocal()) { + var pParams = stack.allocate(JAVA_FLOAT); getTexLevelParameterfv(target, level, pname, pParams); return pParams.get(JAVA_FLOAT, 0); } @@ -420,8 +417,8 @@ default void getTexLevelParameteriv(SegmentAllocator allocator, int target, int @Skip default int getTexLevelParameteriv(int target, int level, int pname) { - try (MemoryStack stack = MemoryStack.stackPush()) { - var pParams = stack.ints(0); + try (MemoryStack stack = MemoryStack.pushLocal()) { + var pParams = stack.allocate(JAVA_INT); getTexLevelParameteriv(target, level, pname, pParams); return pParams.get(JAVA_INT, 0); } @@ -439,8 +436,8 @@ default void getTexParameterfv(SegmentAllocator allocator, int target, int pname @Skip default float getTexParameterfv(int target, int pname) { - try (MemoryStack stack = MemoryStack.stackPush()) { - var pParams = stack.floats(0F); + try (MemoryStack stack = MemoryStack.pushLocal()) { + var pParams = stack.allocate(JAVA_FLOAT); getTexParameterfv(target, pname, pParams); return pParams.get(JAVA_FLOAT, 0); } @@ -458,8 +455,8 @@ default void getTexParameteriv(SegmentAllocator allocator, int target, int pname @Skip default int getTexParameteriv(int target, int pname) { - try (MemoryStack stack = MemoryStack.stackPush()) { - var pParams = stack.ints(0); + try (MemoryStack stack = MemoryStack.pushLocal()) { + var pParams = stack.allocate(JAVA_INT); getTexParameteriv(target, pname, pParams); return pParams.get(JAVA_INT, 0); } diff --git a/modules/overrungl.opengl/src/main/java/overrungl/opengl/GL11C.java b/modules/overrungl.opengl/src/main/java/overrungl/opengl/GL11C.java index a01d444c..827f4c89 100644 --- a/modules/overrungl.opengl/src/main/java/overrungl/opengl/GL11C.java +++ b/modules/overrungl.opengl/src/main/java/overrungl/opengl/GL11C.java @@ -16,9 +16,9 @@ package overrungl.opengl; +import io.github.overrun.memstack.MemoryStack; import overrun.marshal.DirectAccess; import overrun.marshal.Marshal; -import overrun.marshal.MemoryStack; import overrun.marshal.Unmarshal; import overrun.marshal.gen.Entrypoint; import overrun.marshal.gen.Ref; @@ -99,7 +99,7 @@ default void deleteTextures(int n, MemorySegment textures) { @Skip default void deleteTextures(int... textures) { - try (MemoryStack stack = MemoryStack.stackPush()) { + try (MemoryStack stack = MemoryStack.pushLocal()) { deleteTextures(textures.length, Marshal.marshal(stack, textures)); } } @@ -143,8 +143,8 @@ default void genTextures(SegmentAllocator allocator, @Ref int[] textures) { @Skip default int genTextures() { - try (MemoryStack stack = MemoryStack.stackPush()) { - var pTex = stack.ints(0); + try (MemoryStack stack = MemoryStack.pushLocal()) { + var pTex = stack.allocate(ValueLayout.JAVA_INT); genTextures(1, pTex); return pTex.get(ValueLayout.JAVA_INT, 0); } @@ -157,8 +157,8 @@ default void getPointerv(int pname, MemorySegment params) { @Skip default MemorySegment getPointer(int pname) { - try (MemoryStack stack = MemoryStack.stackPush()) { - var pParams = stack.segments(MemorySegment.NULL); + try (MemoryStack stack = MemoryStack.pushLocal()) { + var pParams = stack.allocate(ValueLayout.ADDRESS); getPointerv(pname, pParams); return pParams.get(ValueLayout.ADDRESS, 0); } diff --git a/modules/overrungl.opengl/src/main/java/overrungl/opengl/GL15C.java b/modules/overrungl.opengl/src/main/java/overrungl/opengl/GL15C.java index b1e76d17..abfb2ed4 100644 --- a/modules/overrungl.opengl/src/main/java/overrungl/opengl/GL15C.java +++ b/modules/overrungl.opengl/src/main/java/overrungl/opengl/GL15C.java @@ -16,9 +16,9 @@ package overrungl.opengl; +import io.github.overrun.memstack.MemoryStack; import overrun.marshal.DirectAccess; import overrun.marshal.Marshal; -import overrun.marshal.MemoryStack; import overrun.marshal.Unmarshal; import overrun.marshal.gen.Entrypoint; import overrun.marshal.gen.Ref; @@ -181,7 +181,7 @@ default void deleteBuffers(int n, MemorySegment buffers) { @Skip default void deleteBuffers(int... buffers) { - try (MemoryStack stack = MemoryStack.stackPush()) { + try (MemoryStack stack = MemoryStack.pushLocal()) { deleteBuffers(buffers.length, Marshal.marshal(stack, buffers)); } } @@ -193,7 +193,7 @@ default void deleteQueries(int n, MemorySegment ids) { @Skip default void deleteQueries(int... ids) { - try (MemoryStack stack = MemoryStack.stackPush()) { + try (MemoryStack stack = MemoryStack.pushLocal()) { deleteQueries(ids.length, Marshal.marshal(stack, ids)); } } @@ -217,8 +217,8 @@ default void genBuffers(SegmentAllocator allocator, @Ref int[] buffers) { @Skip default int genBuffers() { - try (MemoryStack stack = MemoryStack.stackPush()) { - var seg = stack.ints(0); + try (MemoryStack stack = MemoryStack.pushLocal()) { + var seg = stack.allocate(ValueLayout.JAVA_INT); genBuffers(1, seg); return seg.get(ValueLayout.JAVA_INT, 0); } @@ -238,8 +238,8 @@ default void genQueries(SegmentAllocator allocator, @Ref int[] ids) { @Skip default int genQueries() { - try (MemoryStack stack = MemoryStack.stackPush()) { - var seg = stack.ints(0); + try (MemoryStack stack = MemoryStack.pushLocal()) { + var seg = stack.allocate(ValueLayout.JAVA_INT); genQueries(1, seg); return seg.get(ValueLayout.JAVA_INT, 0); } @@ -252,8 +252,8 @@ default void getBufferParameteriv(int target, int pname, MemorySegment params) { @Skip default int getBufferParameteriv(int target, int pname) { - try (MemoryStack stack = MemoryStack.stackPush()) { - var seg = stack.ints(0); + try (MemoryStack stack = MemoryStack.pushLocal()) { + var seg = stack.allocate(ValueLayout.JAVA_INT); getBufferParameteriv(target, pname, seg); return seg.get(ValueLayout.JAVA_INT, 0); } @@ -266,8 +266,8 @@ default void getBufferPointerv(int target, int pname, MemorySegment params) { @Skip default MemorySegment getBufferPointerv(int target, int pname) { - try (MemoryStack stack = MemoryStack.stackPush()) { - var seg = stack.segments(MemorySegment.NULL); + try (MemoryStack stack = MemoryStack.pushLocal()) { + var seg = stack.allocate(ValueLayout.ADDRESS); getBufferPointerv(target, pname, seg); return seg.get(ValueLayout.ADDRESS, 0); } @@ -327,8 +327,8 @@ default void getQueryObjectiv(int id, int pname, MemorySegment params) { @Skip default int getQueryObjectiv(int id, int pname) { - try (MemoryStack stack = MemoryStack.stackPush()) { - var seg = stack.ints(0); + try (MemoryStack stack = MemoryStack.pushLocal()) { + var seg = stack.allocate(ValueLayout.JAVA_INT); getQueryObjectiv(id, pname, seg); return seg.get(ValueLayout.JAVA_INT, 0); } @@ -341,8 +341,8 @@ default void getQueryObjectuiv(int id, int pname, MemorySegment params) { @Skip default int getQueryObjectuiv(int id, int pname) { - try (MemoryStack stack = MemoryStack.stackPush()) { - var seg = stack.ints(0); + try (MemoryStack stack = MemoryStack.pushLocal()) { + var seg = stack.allocate(ValueLayout.JAVA_INT); getQueryObjectuiv(id, pname, seg); return seg.get(ValueLayout.JAVA_INT, 0); } @@ -355,8 +355,8 @@ default void getQueryiv(int target, int pname, MemorySegment params) { @Skip default int getQueryiv(int target, int pname) { - try (MemoryStack stack = MemoryStack.stackPush()) { - var seg = stack.ints(0); + try (MemoryStack stack = MemoryStack.pushLocal()) { + var seg = stack.allocate(ValueLayout.JAVA_INT); getQueryiv(target, pname, seg); return seg.get(ValueLayout.JAVA_INT, 0); } diff --git a/modules/overrungl.opengl/src/main/java/overrungl/opengl/GL20C.java b/modules/overrungl.opengl/src/main/java/overrungl/opengl/GL20C.java index be4e4232..aa3fdfd7 100644 --- a/modules/overrungl.opengl/src/main/java/overrungl/opengl/GL20C.java +++ b/modules/overrungl.opengl/src/main/java/overrungl/opengl/GL20C.java @@ -16,10 +16,10 @@ package overrungl.opengl; +import io.github.overrun.memstack.MemoryStack; import org.jetbrains.annotations.Nullable; import overrun.marshal.DirectAccess; import overrun.marshal.Marshal; -import overrun.marshal.MemoryStack; import overrun.marshal.Unmarshal; import overrun.marshal.gen.Entrypoint; import overrun.marshal.gen.Ref; @@ -255,7 +255,7 @@ default void getProgramInfoLog(int program, int bufSize, MemorySegment length, M @Skip default String getProgramInfoLog(int program, int bufSize, @Ref int @Nullable [] length) { - try (MemoryStack stack = MemoryStack.stackPush()) { + try (MemoryStack stack = MemoryStack.pushLocal()) { var pLen = Marshal.marshal(stack, length); var pLog = stack.allocate(JAVA_BYTE, bufSize); getProgramInfoLog(program, bufSize, pLen, pLog); @@ -281,8 +281,8 @@ default void getProgramiv(SegmentAllocator allocator, int program, int pname, @R @Skip default int getProgramiv(int program, int pname) { - try (MemoryStack stack = MemoryStack.stackPush()) { - var seg = stack.ints(0); + try (MemoryStack stack = MemoryStack.pushLocal()) { + var seg = stack.allocate(JAVA_INT); getProgramiv(program, pname, seg); return seg.get(JAVA_INT, 0); } @@ -295,7 +295,7 @@ default void getShaderInfoLog(int shader, int bufSize, MemorySegment length, Mem @Skip default String getShaderInfoLog(int shader, int bufSize, @Ref int @Nullable [] length) { - try (MemoryStack stack = MemoryStack.stackPush()) { + try (MemoryStack stack = MemoryStack.pushLocal()) { var pLen = Marshal.marshal(stack, length); var pLog = stack.allocate(JAVA_BYTE, bufSize); getShaderInfoLog(shader, bufSize, pLen, pLog); @@ -316,7 +316,7 @@ default void getShaderSource(int shader, int bufSize, MemorySegment length, Memo @Skip default String getShaderSource(int shader, int bufSize, @Ref int @Nullable [] length) { - try (MemoryStack stack = MemoryStack.stackPush()) { + try (MemoryStack stack = MemoryStack.pushLocal()) { var pLen = Marshal.marshal(stack, length); var pSrc = stack.allocate(JAVA_BYTE, bufSize); getShaderSource(shader, bufSize, pLen, pSrc); @@ -342,8 +342,8 @@ default void getShaderiv(SegmentAllocator allocator, int shader, int pname, @Ref @Skip default int getShaderiv(int shader, int pname) { - try (MemoryStack stack = MemoryStack.stackPush()) { - var seg = stack.ints(0); + try (MemoryStack stack = MemoryStack.pushLocal()) { + var seg = stack.allocate(JAVA_INT); getShaderiv(shader, pname, seg); return seg.get(JAVA_INT, 0); } @@ -371,8 +371,8 @@ default void getUniformfv(SegmentAllocator allocator, int program, int location, @Skip default float getUniformfv(int program, int location) { - try (MemoryStack stack = MemoryStack.stackPush()) { - var seg = stack.floats(0F); + try (MemoryStack stack = MemoryStack.pushLocal()) { + var seg = stack.allocate(JAVA_FLOAT); getUniformfv(program, location, seg); return seg.get(JAVA_FLOAT, 0); } @@ -390,8 +390,8 @@ default void getUniformiv(SegmentAllocator allocator, int program, int location, @Skip default int getUniformiv(int program, int location) { - try (MemoryStack stack = MemoryStack.stackPush()) { - var seg = stack.ints(0); + try (MemoryStack stack = MemoryStack.pushLocal()) { + var seg = stack.allocate(JAVA_INT); getUniformiv(program, location, seg); return seg.get(JAVA_INT, 0); } @@ -439,8 +439,8 @@ default void getVertexAttribdv(SegmentAllocator allocator, int index, int pname, @Skip default double getVertexAttribdv(int index, int pname) { - try (MemoryStack stack = MemoryStack.stackPush()) { - var seg = stack.doubles(0D); + try (MemoryStack stack = MemoryStack.pushLocal()) { + var seg = stack.allocate(JAVA_DOUBLE); getVertexAttribdv(index, pname, seg); return seg.get(JAVA_DOUBLE, 0); } @@ -458,8 +458,8 @@ default void getVertexAttribfv(SegmentAllocator allocator, int index, int pname, @Skip default float getVertexAttribfv(int index, int pname) { - try (MemoryStack stack = MemoryStack.stackPush()) { - var seg = stack.floats(0F); + try (MemoryStack stack = MemoryStack.pushLocal()) { + var seg = stack.allocate(JAVA_FLOAT); getVertexAttribfv(index, pname, seg); return seg.get(JAVA_FLOAT, 0); } @@ -477,8 +477,8 @@ default void getVertexAttribiv(SegmentAllocator allocator, int index, int pname, @Skip default int getVertexAttribiv(int index, int pname) { - try (MemoryStack stack = MemoryStack.stackPush()) { - var seg = stack.ints(0); + try (MemoryStack stack = MemoryStack.pushLocal()) { + var seg = stack.allocate(JAVA_INT); getVertexAttribiv(index, pname, seg); return seg.get(JAVA_INT, 0); } @@ -511,7 +511,7 @@ default void shaderSource(SegmentAllocator allocator, int shader, String[] strin @Skip default void shaderSource(int shader, String string) { - try (MemoryStack stack = MemoryStack.stackPush()) { + try (MemoryStack stack = MemoryStack.pushLocal()) { shaderSource(shader, 1, stack.allocateFrom(ADDRESS, Marshal.marshal(stack, string)), MemorySegment.NULL); } } diff --git a/modules/overrungl.opengl/src/main/java/overrungl/opengl/GL30C.java b/modules/overrungl.opengl/src/main/java/overrungl/opengl/GL30C.java index 01e20e10..0b0ee5da 100644 --- a/modules/overrungl.opengl/src/main/java/overrungl/opengl/GL30C.java +++ b/modules/overrungl.opengl/src/main/java/overrungl/opengl/GL30C.java @@ -16,14 +16,13 @@ package overrungl.opengl; +import io.github.overrun.memstack.MemoryStack; import org.jetbrains.annotations.Nullable; import overrun.marshal.DirectAccess; import overrun.marshal.Marshal; -import overrun.marshal.MemoryStack; import overrun.marshal.Unmarshal; import overrun.marshal.gen.Entrypoint; import overrun.marshal.gen.Ref; -import overrun.marshal.gen.SizedSeg; import overrun.marshal.gen.Skip; import overrungl.opengl.ext.arb.GLARBColorBufferFloat; import overrungl.opengl.ext.arb.GLARBTextureFloat; @@ -32,7 +31,8 @@ import java.lang.foreign.SegmentAllocator; import java.lang.invoke.MethodHandle; -import static java.lang.foreign.ValueLayout.*; +import static java.lang.foreign.ValueLayout.JAVA_BOOLEAN; +import static java.lang.foreign.ValueLayout.JAVA_INT; /** * The OpenGL 3.0 core profile functions. @@ -389,7 +389,7 @@ default void deleteFramebuffers(int n, MemorySegment framebuffers) { @Skip default void deleteFramebuffers(int... framebuffers) { - try (MemoryStack stack = MemoryStack.stackPush()) { + try (MemoryStack stack = MemoryStack.pushLocal()) { deleteFramebuffers(framebuffers.length, Marshal.marshal(stack, framebuffers)); } } @@ -401,7 +401,7 @@ default void deleteRenderbuffers(int n, MemorySegment renderbuffers) { @Skip default void deleteRenderbuffers(int... renderbuffers) { - try (MemoryStack stack = MemoryStack.stackPush()) { + try (MemoryStack stack = MemoryStack.pushLocal()) { deleteRenderbuffers(renderbuffers.length, Marshal.marshal(stack, renderbuffers)); } } @@ -413,7 +413,7 @@ default void deleteVertexArrays(int n, MemorySegment arrays) { @Skip default void deleteVertexArrays(int... arrays) { - try (MemoryStack stack = MemoryStack.stackPush()) { + try (MemoryStack stack = MemoryStack.pushLocal()) { deleteVertexArrays(arrays.length, Marshal.marshal(stack, arrays)); } } @@ -482,8 +482,8 @@ default void genFramebuffers(SegmentAllocator allocator, @Ref int[] framebuffers @Skip default int genFramebuffers() { - try (MemoryStack stack = MemoryStack.stackPush()) { - var seg = stack.ints(0); + try (MemoryStack stack = MemoryStack.pushLocal()) { + var seg = stack.allocate(JAVA_INT); genFramebuffers(1, seg); return seg.get(JAVA_INT, 0); } @@ -503,8 +503,8 @@ default void genRenderbuffers(SegmentAllocator allocator, @Ref int[] renderbuffe @Skip default int genRenderbuffers() { - try (MemoryStack stack = MemoryStack.stackPush()) { - var seg = stack.ints(0); + try (MemoryStack stack = MemoryStack.pushLocal()) { + var seg = stack.allocate(JAVA_INT); genRenderbuffers(1, seg); return seg.get(JAVA_INT, 0); } @@ -524,8 +524,8 @@ default void genVertexArrays(SegmentAllocator allocator, @Ref int[] arrays) { @Skip default int genVertexArrays() { - try (MemoryStack stack = MemoryStack.stackPush()) { - var seg = stack.ints(0); + try (MemoryStack stack = MemoryStack.pushLocal()) { + var seg = stack.allocate(JAVA_INT); genVertexArrays(1, seg); return seg.get(JAVA_INT, 0); } @@ -548,7 +548,7 @@ default void getBooleani_v(SegmentAllocator allocator, int target, int index, @R @Skip default boolean getBooleani_v(int target, int index) { - try (MemoryStack stack = MemoryStack.stackPush()) { + try (MemoryStack stack = MemoryStack.pushLocal()) { var seg = stack.allocate(JAVA_BOOLEAN); getBooleani_v(target, index, seg); return seg.get(JAVA_BOOLEAN, 0); @@ -572,8 +572,8 @@ default void getFramebufferAttachmentParameteriv(int target, int attachment, int @Skip default int getFramebufferAttachmentParameteriv(int target, int attachment, int pname) { - try (MemoryStack stack = MemoryStack.stackPush()) { - var seg = stack.ints(0); + try (MemoryStack stack = MemoryStack.pushLocal()) { + var seg = stack.allocate(JAVA_INT); getFramebufferAttachmentParameteriv(target, attachment, pname, seg); return seg.get(JAVA_INT, 0); } @@ -591,8 +591,8 @@ default void getIntegeri_v(SegmentAllocator allocator, int target, int index, @R @Skip default int getIntegeri_v(int target, int index) { - try (MemoryStack stack = MemoryStack.stackPush()) { - var seg = stack.ints(0); + try (MemoryStack stack = MemoryStack.pushLocal()) { + var seg = stack.allocate(JAVA_INT); getIntegeri_v(target, index, seg); return seg.get(JAVA_INT, 0); } @@ -610,8 +610,8 @@ default void getRenderbufferParameteriv(int target, int pname, @Ref int[] params @Skip default int getRenderbufferParameteriv(int target, int pname) { - try (MemoryStack stack = MemoryStack.stackPush()) { - var seg = stack.ints(0); + try (MemoryStack stack = MemoryStack.pushLocal()) { + var seg = stack.allocate(JAVA_INT); getRenderbufferParameteriv(target, pname, seg); return seg.get(JAVA_INT, 0); } @@ -624,7 +624,6 @@ default MemorySegment ngetStringi(int pname, int index) { @Entrypoint("glGetStringi") @Nullable - @SizedSeg(Unmarshal.STR_SIZE) default String getStringi(int pname, int index) { throw new ContextException(); } @@ -641,8 +640,8 @@ default void getTexParameterIiv(SegmentAllocator allocator, int target, int pnam @Skip default int getTexParameterIiv(int target, int pname) { - try (MemoryStack stack = MemoryStack.stackPush()) { - var seg = stack.ints(0); + try (MemoryStack stack = MemoryStack.pushLocal()) { + var seg = stack.allocate(JAVA_INT); getTexParameterIiv(target, pname, seg); return seg.get(JAVA_INT, 0); } @@ -660,8 +659,8 @@ default void getTexParameterIuiv(SegmentAllocator allocator, int target, int pna @Skip default int getTexParameterIuiv(int target, int pname) { - try (MemoryStack stack = MemoryStack.stackPush()) { - var seg = stack.ints(0); + try (MemoryStack stack = MemoryStack.pushLocal()) { + var seg = stack.allocate(JAVA_INT); getTexParameterIuiv(target, pname, seg); return seg.get(JAVA_INT, 0); } @@ -689,8 +688,8 @@ default void getUniformuiv(SegmentAllocator allocator, int program, int location @Skip default int getUniformuiv(int program, int location) { - try (MemoryStack stack = MemoryStack.stackPush()) { - var seg = stack.ints(0); + try (MemoryStack stack = MemoryStack.pushLocal()) { + var seg = stack.allocate(JAVA_INT); getUniformuiv(program, location, seg); return seg.get(JAVA_INT, 0); } @@ -708,8 +707,8 @@ default void getVertexAttribIiv(SegmentAllocator allocator, int index, int pname @Skip default int getVertexAttribIiv(int index, int pname) { - try (MemoryStack stack = MemoryStack.stackPush()) { - var seg = stack.ints(0); + try (MemoryStack stack = MemoryStack.pushLocal()) { + var seg = stack.allocate(JAVA_INT); getVertexAttribIiv(index, pname, seg); return seg.get(JAVA_INT, 0); } @@ -727,8 +726,8 @@ default void getVertexAttribIuiv(SegmentAllocator allocator, int index, int pnam @Skip default int getVertexAttribIuiv(int index, int pname) { - try (MemoryStack stack = MemoryStack.stackPush()) { - var seg = stack.ints(0); + try (MemoryStack stack = MemoryStack.pushLocal()) { + var seg = stack.allocate(JAVA_INT); getVertexAttribIuiv(index, pname, seg); return seg.get(JAVA_INT, 0); } diff --git a/modules/overrungl.opengl/src/main/java/overrungl/opengl/GL31C.java b/modules/overrungl.opengl/src/main/java/overrungl/opengl/GL31C.java index ebdd273e..422f716b 100644 --- a/modules/overrungl.opengl/src/main/java/overrungl/opengl/GL31C.java +++ b/modules/overrungl.opengl/src/main/java/overrungl/opengl/GL31C.java @@ -16,9 +16,9 @@ package overrungl.opengl; +import io.github.overrun.memstack.MemoryStack; import overrun.marshal.DirectAccess; import overrun.marshal.Marshal; -import overrun.marshal.MemoryStack; import overrun.marshal.Unmarshal; import overrun.marshal.gen.Entrypoint; import overrun.marshal.gen.Ref; @@ -142,8 +142,8 @@ default void getActiveUniformBlockName(int program, int uniformBlockIndex, int b @Skip default String getActiveUniformBlockName(int program, int uniformBlockIndex, int bufSize) { - try (MemoryStack stack = MemoryStack.stackPush()) { - final MemorySegment length = stack.ints(0); + try (MemoryStack stack = MemoryStack.pushLocal()) { + final MemorySegment length = stack.allocate(ValueLayout.JAVA_INT); var pName = stack.allocate(ValueLayout.JAVA_BYTE, bufSize); getActiveUniformBlockName(program, uniformBlockIndex, bufSize, length, pName); return Unmarshal.unmarshalAsString(pName.reinterpret(length.get(ValueLayout.JAVA_INT, 0L) + 1)); @@ -167,8 +167,8 @@ default void getActiveUniformName(int program, int uniformIndex, int bufSize, Me @Skip default String getActiveUniformName(int program, int uniformIndex, int bufSize) { - try (MemoryStack stack = MemoryStack.stackPush()) { - final MemorySegment length = stack.ints(0); + try (MemoryStack stack = MemoryStack.pushLocal()) { + final MemorySegment length = stack.allocate(ValueLayout.JAVA_INT); var pName = stack.allocate(ValueLayout.JAVA_BYTE, bufSize); getActiveUniformName(program, uniformIndex, bufSize, length, pName); return Unmarshal.unmarshalAsString(pName.reinterpret(length.get(ValueLayout.JAVA_INT, 0L) + 1)); @@ -189,9 +189,9 @@ default void getActiveUniformsiv(SegmentAllocator allocator, int program, int[] @Skip default int getActiveUniformsiv(int program, int uniformIndex, int pname) { - try (MemoryStack stack = MemoryStack.stackPush()) { - var seg = stack.ints(0); - getActiveUniformsiv(program, 1, stack.ints(uniformIndex), pname, seg); + try (MemoryStack stack = MemoryStack.pushLocal()) { + var seg = stack.allocate(ValueLayout.JAVA_INT); + getActiveUniformsiv(program, 1, stack.allocateFrom(ValueLayout.JAVA_INT, uniformIndex), pname, seg); return seg.get(ValueLayout.JAVA_INT, 0); } } @@ -220,8 +220,8 @@ default void getUniformIndices(SegmentAllocator allocator, int program, String[] @Skip default int getUniformIndices(int program, String uniformName) { - try (MemoryStack stack = MemoryStack.stackPush()) { - var seg = stack.ints(0); + try (MemoryStack stack = MemoryStack.pushLocal()) { + var seg = stack.allocate(ValueLayout.JAVA_INT); getUniformIndices(program, 1, stack.allocateFrom(uniformName), seg); return seg.get(ValueLayout.JAVA_INT, 0); } diff --git a/modules/overrungl.opengl/src/main/java/overrungl/opengl/GL32C.java b/modules/overrungl.opengl/src/main/java/overrungl/opengl/GL32C.java index bfe44bef..b78d4286 100644 --- a/modules/overrungl.opengl/src/main/java/overrungl/opengl/GL32C.java +++ b/modules/overrungl.opengl/src/main/java/overrungl/opengl/GL32C.java @@ -16,10 +16,10 @@ package overrungl.opengl; +import io.github.overrun.memstack.MemoryStack; import org.jetbrains.annotations.Nullable; import overrun.marshal.DirectAccess; import overrun.marshal.Marshal; -import overrun.marshal.MemoryStack; import overrun.marshal.Unmarshal; import overrun.marshal.gen.Entrypoint; import overrun.marshal.gen.Ref; @@ -197,8 +197,8 @@ default void getBufferParameteri64v(int target, int pname, MemorySegment params) @Skip default long getBufferParameteri64v(int target, int pname) { - try (MemoryStack stack = MemoryStack.stackPush()) { - var seg = stack.longs(0L); + try (MemoryStack stack = MemoryStack.pushLocal()) { + var seg = stack.allocate(JAVA_LONG); getBufferParameteri64v(target, pname, seg); return seg.get(JAVA_LONG, 0); } @@ -216,8 +216,8 @@ default void getInteger64i_v(SegmentAllocator allocator, int target, int index, @Skip default long getInteger64i_v(int target, int index) { - try (MemoryStack stack = MemoryStack.stackPush()) { - var seg = stack.longs(0L); + try (MemoryStack stack = MemoryStack.pushLocal()) { + var seg = stack.allocate(JAVA_LONG); getInteger64i_v(target, index, seg); return seg.get(JAVA_LONG, 0); } @@ -235,8 +235,8 @@ default void getInteger64v(SegmentAllocator allocator, int pname, @Ref long[] da @Skip default long getInteger64v(int pname) { - try (MemoryStack stack = MemoryStack.stackPush()) { - var pData = stack.longs(0L); + try (MemoryStack stack = MemoryStack.pushLocal()) { + var pData = stack.allocate(JAVA_LONG); getInteger64v(pname, pData); return pData.get(JAVA_LONG, 0); } @@ -254,7 +254,7 @@ default void getMultisamplefv(SegmentAllocator allocator, int pname, int index, @Skip default float[] getMultisamplefv(int pname, int index) { - try (MemoryStack stack = MemoryStack.stackPush()) { + try (MemoryStack stack = MemoryStack.pushLocal()) { float[] val = new float[2]; getMultisamplefv(stack, pname, index, val); return val; @@ -277,8 +277,8 @@ default void getSynciv(SegmentAllocator allocator, MemorySegment sync, int pname @Skip default int getSynciv(MemorySegment sync, int pname) { - try (MemoryStack stack = MemoryStack.stackPush()) { - var seg = stack.ints(0); + try (MemoryStack stack = MemoryStack.pushLocal()) { + var seg = stack.allocate(JAVA_INT); getSynciv(sync, pname, 1, MemorySegment.NULL, seg); return seg.get(JAVA_INT, 0); } diff --git a/modules/overrungl.opengl/src/main/java/overrungl/opengl/GL33C.java b/modules/overrungl.opengl/src/main/java/overrungl/opengl/GL33C.java index bba0e81e..d180b5a9 100644 --- a/modules/overrungl.opengl/src/main/java/overrungl/opengl/GL33C.java +++ b/modules/overrungl.opengl/src/main/java/overrungl/opengl/GL33C.java @@ -16,9 +16,9 @@ package overrungl.opengl; +import io.github.overrun.memstack.MemoryStack; import overrun.marshal.DirectAccess; import overrun.marshal.Marshal; -import overrun.marshal.MemoryStack; import overrun.marshal.Unmarshal; import overrun.marshal.gen.Entrypoint; import overrun.marshal.gen.Ref; @@ -85,7 +85,7 @@ default void deleteSamplers(int count, MemorySegment samplers) { @Skip default void deleteSamplers(int... samplers) { - try (MemoryStack stack = MemoryStack.stackPush()) { + try (MemoryStack stack = MemoryStack.pushLocal()) { deleteSamplers(samplers.length, Marshal.marshal(stack, samplers)); } } @@ -104,8 +104,8 @@ default void genSamplers(SegmentAllocator allocator, @Ref int[] samplers) { @Skip default int genSamplers() { - try (MemoryStack stack = MemoryStack.stackPush()) { - var seg = stack.ints(0); + try (MemoryStack stack = MemoryStack.pushLocal()) { + var seg = stack.allocate(JAVA_INT); genSamplers(1, seg); return seg.get(JAVA_INT, 0); } @@ -128,8 +128,8 @@ default void getQueryObjecti64v(int id, int pname, MemorySegment params) { @Skip default long getQueryObjecti64v(int id, int pname) { - try (MemoryStack stack = MemoryStack.stackPush()) { - var seg = stack.longs(0L); + try (MemoryStack stack = MemoryStack.pushLocal()) { + var seg = stack.allocate(JAVA_LONG); getQueryObjecti64v(id, pname, seg); return seg.get(JAVA_LONG, 0); } @@ -142,8 +142,8 @@ default void getQueryObjectui64v(int id, int pname, MemorySegment params) { @Skip default long getQueryObjectui64v(int id, int pname) { - try (MemoryStack stack = MemoryStack.stackPush()) { - var seg = stack.longs(0); + try (MemoryStack stack = MemoryStack.pushLocal()) { + var seg = stack.allocate(JAVA_LONG); getQueryObjectui64v(id, pname, seg); return seg.get(JAVA_LONG, 0); } @@ -161,8 +161,8 @@ default void getSamplerParameterIiv(SegmentAllocator allocator, int sampler, int @Skip default int getSamplerParameterIiv(int sampler, int pname) { - try (MemoryStack stack = MemoryStack.stackPush()) { - var seg = stack.ints(0); + try (MemoryStack stack = MemoryStack.pushLocal()) { + var seg = stack.allocate(JAVA_INT); getSamplerParameterIiv(sampler, pname, seg); return seg.get(JAVA_INT, 0); } @@ -180,8 +180,8 @@ default void getSamplerParameterIuiv(SegmentAllocator allocator, int sampler, in @Skip default int getSamplerParameterIuiv(int sampler, int pname) { - try (MemoryStack stack = MemoryStack.stackPush()) { - var seg = stack.ints(0); + try (MemoryStack stack = MemoryStack.pushLocal()) { + var seg = stack.allocate(JAVA_INT); getSamplerParameterIuiv(sampler, pname, seg); return seg.get(JAVA_INT, 0); } @@ -199,8 +199,8 @@ default void getSamplerParameterfv(SegmentAllocator allocator, int sampler, int @Skip default float getSamplerParameterf(int sampler, int pname) { - try (MemoryStack stack = MemoryStack.stackPush()) { - var seg = stack.floats(0F); + try (MemoryStack stack = MemoryStack.pushLocal()) { + var seg = stack.allocate(JAVA_FLOAT); getSamplerParameterfv(sampler, pname, seg); return seg.get(JAVA_FLOAT, 0); } @@ -218,8 +218,8 @@ default void getSamplerParameteriv(SegmentAllocator allocator, int sampler, int @Skip default int getSamplerParameteri(int sampler, int pname) { - try (MemoryStack stack = MemoryStack.stackPush()) { - var seg = stack.ints(0); + try (MemoryStack stack = MemoryStack.pushLocal()) { + var seg = stack.allocate(JAVA_INT); getSamplerParameteriv(sampler, pname, seg); return seg.get(JAVA_INT, 0); } diff --git a/modules/overrungl.opengl/src/main/java/overrungl/opengl/GL40C.java b/modules/overrungl.opengl/src/main/java/overrungl/opengl/GL40C.java index 0687281f..6c80412e 100644 --- a/modules/overrungl.opengl/src/main/java/overrungl/opengl/GL40C.java +++ b/modules/overrungl.opengl/src/main/java/overrungl/opengl/GL40C.java @@ -16,9 +16,9 @@ package overrungl.opengl; +import io.github.overrun.memstack.MemoryStack; import overrun.marshal.DirectAccess; import overrun.marshal.Marshal; -import overrun.marshal.MemoryStack; import overrun.marshal.Unmarshal; import overrun.marshal.gen.Entrypoint; import overrun.marshal.gen.Ref; @@ -169,7 +169,7 @@ default void deleteTransformFeedbacks(int n, MemorySegment ids) { @Skip default void deleteTransformFeedbacks(int... ids) { - try (MemoryStack stack = MemoryStack.stackPush()) { + try (MemoryStack stack = MemoryStack.pushLocal()) { deleteTransformFeedbacks(ids.length, Marshal.marshal(stack, ids)); } } @@ -233,8 +233,8 @@ default void genTransformFeedbacks(SegmentAllocator allocator, @Ref int[] ids) { @Skip default int genTransformFeedbacks() { - try (MemoryStack stack = MemoryStack.stackPush()) { - var seg = stack.ints(0); + try (MemoryStack stack = MemoryStack.pushLocal()) { + var seg = stack.allocate(JAVA_INT); genTransformFeedbacks(1, seg); return seg.get(JAVA_INT, 0); } @@ -247,8 +247,8 @@ default void getActiveSubroutineName(int program, int shaderType, int index, int @Skip default String getActiveSubroutineName(int program, int shaderType, int index, int bufSize) { - try (MemoryStack stack = MemoryStack.stackPush()) { - final MemorySegment length = stack.ints(0); + try (MemoryStack stack = MemoryStack.pushLocal()) { + final MemorySegment length = stack.allocate(JAVA_INT); var seg = stack.allocate(JAVA_BYTE, bufSize); getActiveSubroutineName(program, shaderType, index, bufSize, length, seg); return Unmarshal.unmarshalAsString(seg.reinterpret(length.get(JAVA_INT, 0L) + 1)); @@ -262,8 +262,8 @@ default void getActiveSubroutineUniformName(int program, int shaderType, int ind @Skip default String getActiveSubroutineUniformName(int program, int shaderType, int index, int bufSize) { - try (MemoryStack stack = MemoryStack.stackPush()) { - final MemorySegment length = stack.ints(0); + try (MemoryStack stack = MemoryStack.pushLocal()) { + final MemorySegment length = stack.allocate(JAVA_INT); var seg = stack.allocate(JAVA_BYTE, bufSize); getActiveSubroutineUniformName(program, shaderType, index, bufSize, length, seg); return Unmarshal.unmarshalAsString(seg.reinterpret(length.get(JAVA_INT, 0L) + 1)); @@ -282,8 +282,8 @@ default void getActiveSubroutineUniformiv(SegmentAllocator allocator, int progra @Skip default int getActiveSubroutineUniformiv(int program, int shaderType, int index, int pname) { - try (MemoryStack stack = MemoryStack.stackPush()) { - var seg = stack.ints(0); + try (MemoryStack stack = MemoryStack.pushLocal()) { + var seg = stack.allocate(JAVA_INT); getActiveSubroutineUniformiv(program, shaderType, index, pname, seg); return seg.get(JAVA_INT, 0); } @@ -296,8 +296,8 @@ default void getProgramStageiv(int program, int shaderType, int pname, MemorySeg @Skip default int getProgramStageiv(int program, int shaderType, int pname) { - try (MemoryStack stack = MemoryStack.stackPush()) { - var seg = stack.ints(0); + try (MemoryStack stack = MemoryStack.pushLocal()) { + var seg = stack.allocate(JAVA_INT); getProgramStageiv(program, shaderType, pname, seg); return seg.get(JAVA_INT, 0); } @@ -310,8 +310,8 @@ default void getQueryIndexediv(int target, int index, int pname, MemorySegment p @Skip default int getQueryIndexediv(int target, int index, int pname) { - try (MemoryStack stack = MemoryStack.stackPush()) { - var seg = stack.ints(0); + try (MemoryStack stack = MemoryStack.pushLocal()) { + var seg = stack.allocate(JAVA_INT); getQueryIndexediv(target, index, pname, seg); return seg.get(JAVA_INT, 0); } @@ -359,8 +359,8 @@ default void getUniformdv(SegmentAllocator allocator, int program, int location, @Skip default double getUniformd(int program, int location) { - try (MemoryStack stack = MemoryStack.stackPush()) { - var seg = stack.doubles(0D); + try (MemoryStack stack = MemoryStack.pushLocal()) { + var seg = stack.allocate(JAVA_DOUBLE); getUniformdv(program, location, seg); return seg.get(JAVA_DOUBLE, 0); } diff --git a/modules/overrungl.opengl/src/main/java/overrungl/opengl/GL41C.java b/modules/overrungl.opengl/src/main/java/overrungl/opengl/GL41C.java index 41482b31..61e03e0e 100644 --- a/modules/overrungl.opengl/src/main/java/overrungl/opengl/GL41C.java +++ b/modules/overrungl.opengl/src/main/java/overrungl/opengl/GL41C.java @@ -16,10 +16,10 @@ package overrungl.opengl; +import io.github.overrun.memstack.MemoryStack; import org.jetbrains.annotations.Nullable; import overrun.marshal.DirectAccess; import overrun.marshal.Marshal; -import overrun.marshal.MemoryStack; import overrun.marshal.Unmarshal; import overrun.marshal.gen.Entrypoint; import overrun.marshal.gen.Ref; @@ -110,7 +110,7 @@ default int createShaderProgramv(SegmentAllocator allocator, int type, String[] @Skip default int createShaderProgramv(int type, String string) { - try (MemoryStack stack = MemoryStack.stackPush()) { + try (MemoryStack stack = MemoryStack.pushLocal()) { return createShaderProgramv(type, 1, stack.allocateFrom(ADDRESS, Marshal.marshal(stack, string))); } } @@ -122,7 +122,7 @@ default void deleteProgramPipelines(int n, MemorySegment pipelines) { @Skip default void deleteProgramPipelines(int... pipelines) { - try (MemoryStack stack = MemoryStack.stackPush()) { + try (MemoryStack stack = MemoryStack.pushLocal()) { deleteProgramPipelines(pipelines.length, Marshal.marshal(stack, pipelines)); } } @@ -161,8 +161,8 @@ default void genProgramPipelines(SegmentAllocator allocator, @Ref int[] pipeline @Skip default int genProgramPipelines() { - try (MemoryStack stack = MemoryStack.stackPush()) { - var seg = stack.ints(0); + try (MemoryStack stack = MemoryStack.pushLocal()) { + var seg = stack.allocate(JAVA_INT); genProgramPipelines(1, seg); return seg.get(JAVA_INT, 0); } @@ -180,8 +180,8 @@ default void getDoublei_v(SegmentAllocator allocator, int target, int index, @Re @Skip default double getDoublei_v(int target, int index) { - try (MemoryStack stack = MemoryStack.stackPush()) { - var seg = stack.doubles(0D); + try (MemoryStack stack = MemoryStack.pushLocal()) { + var seg = stack.allocate(JAVA_DOUBLE); getDoublei_v(target, index, seg); return seg.get(JAVA_DOUBLE, 0); } @@ -199,8 +199,8 @@ default void getFloati_v(SegmentAllocator allocator, int target, int index, @Ref @Skip default float getFloati_v(int target, int index) { - try (MemoryStack stack = MemoryStack.stackPush()) { - var seg = stack.floats(0F); + try (MemoryStack stack = MemoryStack.pushLocal()) { + var seg = stack.allocate(JAVA_FLOAT); getFloati_v(target, index, seg); return seg.get(JAVA_FLOAT, 0); } @@ -250,8 +250,8 @@ default void getProgramPipelineiv(int pipeline, int pname, MemorySegment params) @Skip default int getProgramPipelineiv(int pipeline, int pname) { - try (MemoryStack stack = MemoryStack.stackPush()) { - var seg = stack.ints(0); + try (MemoryStack stack = MemoryStack.pushLocal()) { + var seg = stack.allocate(JAVA_INT); getProgramPipelineiv(pipeline, pname, seg); return seg.get(JAVA_INT, 0); } diff --git a/modules/overrungl.opengl/src/main/java/overrungl/opengl/GL42C.java b/modules/overrungl.opengl/src/main/java/overrungl/opengl/GL42C.java index 133a58f6..9e715014 100644 --- a/modules/overrungl.opengl/src/main/java/overrungl/opengl/GL42C.java +++ b/modules/overrungl.opengl/src/main/java/overrungl/opengl/GL42C.java @@ -16,9 +16,9 @@ package overrungl.opengl; +import io.github.overrun.memstack.MemoryStack; import overrun.marshal.DirectAccess; import overrun.marshal.Marshal; -import overrun.marshal.MemoryStack; import overrun.marshal.Unmarshal; import overrun.marshal.gen.Entrypoint; import overrun.marshal.gen.Ref; @@ -232,8 +232,8 @@ default void getActiveAtomicCounterBufferiv(SegmentAllocator allocator, int prog @Skip default int getActiveAtomicCounterBufferiv(int program, int bufferIndex, int pname) { - try (MemoryStack stack = MemoryStack.stackPush()) { - var seg = stack.ints(0); + try (MemoryStack stack = MemoryStack.pushLocal()) { + var seg = stack.allocate(ValueLayout.JAVA_INT); getActiveAtomicCounterBufferiv(program, bufferIndex, pname, seg); return seg.get(ValueLayout.JAVA_INT, 0); } @@ -253,8 +253,8 @@ default void getInternalformativ(SegmentAllocator allocator, int target, int int @Skip default int getInternalformativ(int target, int internalFormat, int pname) { - try (MemoryStack stack = MemoryStack.stackPush()) { - var seg = stack.ints(0); + try (MemoryStack stack = MemoryStack.pushLocal()) { + var seg = stack.allocate(ValueLayout.JAVA_INT); getInternalformativ(target, internalFormat, pname, 1, seg); return seg.get(ValueLayout.JAVA_INT, 0); } diff --git a/modules/overrungl.opengl/src/main/java/overrungl/opengl/GL43C.java b/modules/overrungl.opengl/src/main/java/overrungl/opengl/GL43C.java index dbefc237..9359a5b6 100644 --- a/modules/overrungl.opengl/src/main/java/overrungl/opengl/GL43C.java +++ b/modules/overrungl.opengl/src/main/java/overrungl/opengl/GL43C.java @@ -16,10 +16,10 @@ package overrungl.opengl; +import io.github.overrun.memstack.MemoryStack; import org.jetbrains.annotations.Nullable; import overrun.marshal.DirectAccess; import overrun.marshal.Marshal; -import overrun.marshal.MemoryStack; import overrun.marshal.Unmarshal; import overrun.marshal.gen.Entrypoint; import overrun.marshal.gen.Ref; @@ -365,7 +365,7 @@ default void debugMessageInsert(int source, int type, int id, int severity, int @Skip default void debugMessageInsert(int source, int type, int id, int severity, String buf) { - try (MemoryStack stack = MemoryStack.stackPush()) { + try (MemoryStack stack = MemoryStack.pushLocal()) { debugMessageInsert(source, type, id, severity, -1, Marshal.marshal(stack, buf)); } } @@ -420,8 +420,8 @@ default void getFramebufferParameteriv(int target, int pname, MemorySegment para @Skip default int getFramebufferParameteriv(int target, int pname) { - try (MemoryStack stack = MemoryStack.stackPush()) { - var seg = stack.ints(0); + try (MemoryStack stack = MemoryStack.pushLocal()) { + var seg = stack.allocate(JAVA_INT); getFramebufferParameteriv(target, pname, seg); return seg.get(JAVA_INT, 0); } @@ -441,8 +441,8 @@ default void getInternalformati64v(SegmentAllocator allocator, int target, int i @Skip default long getInternalformati64v(int target, int internalFormat, int pname) { - try (MemoryStack stack = MemoryStack.stackPush()) { - var seg = stack.longs(0L); + try (MemoryStack stack = MemoryStack.pushLocal()) { + var seg = stack.allocate(JAVA_LONG); getInternalformati64v(target, internalFormat, pname, 1, seg); return seg.get(JAVA_LONG, 0); } @@ -503,8 +503,8 @@ default void getProgramInterfaceiv(int program, int programInterface, int pname, @Skip default int getProgramInterfaceiv(int program, int programInterface, int pname) { - try (MemoryStack stack = MemoryStack.stackPush()) { - var seg = stack.ints(0); + try (MemoryStack stack = MemoryStack.pushLocal()) { + var seg = stack.allocate(JAVA_INT); getProgramInterfaceiv(program, programInterface, pname, seg); return seg.get(JAVA_INT, 0); } @@ -607,7 +607,7 @@ default void invalidateFramebuffer(int target, int numAttachments, MemorySegment @Skip default void invalidateFramebuffer(int target, int... attachments) { - try (MemoryStack stack = MemoryStack.stackPush()) { + try (MemoryStack stack = MemoryStack.pushLocal()) { invalidateFramebuffer(target, attachments.length, Marshal.marshal(stack, attachments)); } } @@ -624,8 +624,8 @@ default void invalidateSubFramebuffer(SegmentAllocator allocator, int target, in @Skip default void invalidateSubFramebuffer(int target, int attachment, int x, int y, int width, int height) { - try (MemoryStack stack = MemoryStack.stackPush()) { - invalidateSubFramebuffer(target, 1, stack.ints(attachment), x, y, width, height); + try (MemoryStack stack = MemoryStack.pushLocal()) { + invalidateSubFramebuffer(target, 1, stack.allocateFrom(JAVA_INT, attachment), x, y, width, height); } } @@ -666,7 +666,7 @@ default void objectLabel(int identifier, int name, int length, MemorySegment lab @Skip default void objectLabel(int identifier, int name, String label) { - try (MemoryStack stack = MemoryStack.stackPush()) { + try (MemoryStack stack = MemoryStack.pushLocal()) { objectLabel(identifier, name, -1, Marshal.marshal(stack, label)); } } @@ -678,7 +678,7 @@ default void objectPtrLabel(MemorySegment ptr, int length, MemorySegment label) @Skip default void objectPtrLabel(MemorySegment ptr, String label) { - try (MemoryStack stack = MemoryStack.stackPush()) { + try (MemoryStack stack = MemoryStack.pushLocal()) { objectPtrLabel(ptr, -1, Marshal.marshal(stack, label)); } } @@ -695,7 +695,7 @@ default void pushDebugGroup(int source, int id, int length, MemorySegment messag @Skip default void pushDebugGroup(int source, int id, String message) { - try (MemoryStack stack = MemoryStack.stackPush()) { + try (MemoryStack stack = MemoryStack.pushLocal()) { pushDebugGroup(source, id, -1, Marshal.marshal(stack, message)); } } diff --git a/modules/overrungl.opengl/src/main/java/overrungl/opengl/GL45C.java b/modules/overrungl.opengl/src/main/java/overrungl/opengl/GL45C.java index c61ee4d3..fed31739 100644 --- a/modules/overrungl.opengl/src/main/java/overrungl/opengl/GL45C.java +++ b/modules/overrungl.opengl/src/main/java/overrungl/opengl/GL45C.java @@ -16,9 +16,9 @@ package overrungl.opengl; +import io.github.overrun.memstack.MemoryStack; import overrun.marshal.DirectAccess; import overrun.marshal.Marshal; -import overrun.marshal.MemoryStack; import overrun.marshal.Unmarshal; import overrun.marshal.gen.Entrypoint; import overrun.marshal.gen.Ref; @@ -186,8 +186,8 @@ default void createBuffers(SegmentAllocator allocator, @Ref int[] buffers) { @Skip default int createBuffers() { - try (MemoryStack stack = MemoryStack.stackPush()) { - var seg = stack.ints(0); + try (MemoryStack stack = MemoryStack.pushLocal()) { + var seg = stack.allocate(JAVA_INT); createBuffers(1, seg); return seg.get(JAVA_INT, 0); } @@ -207,8 +207,8 @@ default void createFramebuffers(SegmentAllocator allocator, @Ref int[] framebuff @Skip default int createFramebuffers() { - try (MemoryStack stack = MemoryStack.stackPush()) { - var seg = stack.ints(0); + try (MemoryStack stack = MemoryStack.pushLocal()) { + var seg = stack.allocate(JAVA_INT); createFramebuffers(1, seg); return seg.get(JAVA_INT, 0); } @@ -228,8 +228,8 @@ default void createProgramPipelines(SegmentAllocator allocator, @Ref int[] pipel @Skip default int createProgramPipelines() { - try (MemoryStack stack = MemoryStack.stackPush()) { - var seg = stack.ints(0); + try (MemoryStack stack = MemoryStack.pushLocal()) { + var seg = stack.allocate(JAVA_INT); createProgramPipelines(1, seg); return seg.get(JAVA_INT, 0); } @@ -249,8 +249,8 @@ default void createQueries(SegmentAllocator allocator, int target, @Ref int[] id @Skip default int createQueries(int target) { - try (MemoryStack stack = MemoryStack.stackPush()) { - var seg = stack.ints(0); + try (MemoryStack stack = MemoryStack.pushLocal()) { + var seg = stack.allocate(JAVA_INT); createQueries(target, 1, seg); return seg.get(JAVA_INT, 0); } @@ -270,8 +270,8 @@ default void createRenderbuffers(SegmentAllocator allocator, @Ref int[] renderbu @Skip default int createRenderbuffers() { - try (MemoryStack stack = MemoryStack.stackPush()) { - var seg = stack.ints(0); + try (MemoryStack stack = MemoryStack.pushLocal()) { + var seg = stack.allocate(JAVA_INT); createRenderbuffers(1, seg); return seg.get(JAVA_INT, 0); } @@ -291,8 +291,8 @@ default void createSamplers(SegmentAllocator allocator, @Ref int[] samplers) { @Skip default int createSamplers() { - try (MemoryStack stack = MemoryStack.stackPush()) { - var seg = stack.ints(0); + try (MemoryStack stack = MemoryStack.pushLocal()) { + var seg = stack.allocate(JAVA_INT); createSamplers(1, seg); return seg.get(JAVA_INT, 0); } @@ -312,8 +312,8 @@ default void createTextures(SegmentAllocator allocator, int target, @Ref int[] t @Skip default int createTextures(int target) { - try (MemoryStack stack = MemoryStack.stackPush()) { - var pTex = stack.ints(0); + try (MemoryStack stack = MemoryStack.pushLocal()) { + var pTex = stack.allocate(JAVA_INT); createTextures(target, 1, pTex); return pTex.get(JAVA_INT, 0); } @@ -333,8 +333,8 @@ default void createTransformFeedbacks(SegmentAllocator allocator, @Ref int[] ids @Skip default int createTransformFeedbacks() { - try (MemoryStack stack = MemoryStack.stackPush()) { - var seg = stack.ints(0); + try (MemoryStack stack = MemoryStack.pushLocal()) { + var seg = stack.allocate(JAVA_INT); createTransformFeedbacks(1, seg); return seg.get(JAVA_INT, 0); } @@ -354,8 +354,8 @@ default void createVertexArrays(SegmentAllocator allocator, @Ref int[] arrays) { @Skip default int createVertexArrays() { - try (MemoryStack stack = MemoryStack.stackPush()) { - var seg = stack.ints(0); + try (MemoryStack stack = MemoryStack.pushLocal()) { + var seg = stack.allocate(JAVA_INT); createVertexArrays(1, seg); return seg.get(JAVA_INT, 0); } @@ -403,8 +403,8 @@ default void getNamedBufferParameteri64v(int buffer, int pname, MemorySegment pa @Skip default long getNamedBufferParameteri64v(int buffer, int pname) { - try (MemoryStack stack = MemoryStack.stackPush()) { - var seg = stack.longs(0L); + try (MemoryStack stack = MemoryStack.pushLocal()) { + var seg = stack.allocate(JAVA_LONG); getNamedBufferParameteri64v(buffer, pname, seg); return seg.get(JAVA_LONG, 0); } @@ -417,8 +417,8 @@ default void getNamedBufferParameteriv(int buffer, int pname, MemorySegment para @Skip default int getNamedBufferParameteriv(int buffer, int pname) { - try (MemoryStack stack = MemoryStack.stackPush()) { - var seg = stack.ints(0); + try (MemoryStack stack = MemoryStack.pushLocal()) { + var seg = stack.allocate(JAVA_INT); getNamedBufferParameteriv(buffer, pname, seg); return seg.get(JAVA_INT, 0); } @@ -431,8 +431,8 @@ default void getNamedBufferPointerv(int target, int pname, MemorySegment params) @Skip default MemorySegment getNamedBufferPointerv(int target, int pname) { - try (MemoryStack stack = MemoryStack.stackPush()) { - var seg = stack.segments(MemorySegment.NULL); + try (MemoryStack stack = MemoryStack.pushLocal()) { + var seg = stack.allocate(ADDRESS); getNamedBufferPointerv(target, pname, seg); return seg.get(ADDRESS, 0); } @@ -492,8 +492,8 @@ default void getNamedFramebufferAttachmentParameteriv(int framebuffer, int attac @Skip default int getNamedFramebufferAttachmentParameteriv(int framebuffer, int attachment, int pname) { - try (MemoryStack stack = MemoryStack.stackPush()) { - var seg = stack.ints(0); + try (MemoryStack stack = MemoryStack.pushLocal()) { + var seg = stack.allocate(JAVA_INT); getNamedFramebufferAttachmentParameteriv(framebuffer, attachment, pname, seg); return seg.get(JAVA_INT, 0); } @@ -506,8 +506,8 @@ default void getNamedFramebufferParameteriv(int framebuffer, int pname, MemorySe @Skip default int getNamedFramebufferParameteriv(int framebuffer, int pname) { - try (MemoryStack stack = MemoryStack.stackPush()) { - var seg = stack.ints(0); + try (MemoryStack stack = MemoryStack.pushLocal()) { + var seg = stack.allocate(JAVA_INT); getNamedFramebufferParameteriv(framebuffer, pname, seg); return seg.get(JAVA_INT, 0); } @@ -525,8 +525,8 @@ default void getNamedRenderbufferParameteriv(int renderbuffer, int pname, @Ref i @Skip default int getNamedRenderbufferParameteriv(int renderbuffer, int pname) { - try (MemoryStack stack = MemoryStack.stackPush()) { - var seg = stack.ints(0); + try (MemoryStack stack = MemoryStack.pushLocal()) { + var seg = stack.allocate(JAVA_INT); getNamedRenderbufferParameteriv(renderbuffer, pname, seg); return seg.get(JAVA_INT, 0); } @@ -569,8 +569,8 @@ default void getTextureLevelParameterfv(SegmentAllocator allocator, int texture, @Skip default float getTextureLevelParameterfv(int texture, int level, int pname) { - try (MemoryStack stack = MemoryStack.stackPush()) { - var pParams = stack.floats(0F); + try (MemoryStack stack = MemoryStack.pushLocal()) { + var pParams = stack.allocate(JAVA_FLOAT); getTextureLevelParameterfv(texture, level, pname, pParams); return pParams.get(JAVA_FLOAT, 0); } @@ -588,8 +588,8 @@ default void getTextureLevelParameteriv(SegmentAllocator allocator, int texture, @Skip default int getTextureLevelParameteriv(int texture, int level, int pname) { - try (MemoryStack stack = MemoryStack.stackPush()) { - var pParams = stack.ints(0); + try (MemoryStack stack = MemoryStack.pushLocal()) { + var pParams = stack.allocate(JAVA_INT); getTextureLevelParameteriv(texture, level, pname, pParams); return pParams.get(JAVA_INT, 0); } @@ -607,8 +607,8 @@ default void getTextureParameterIiv(SegmentAllocator allocator, int texture, int @Skip default int getTextureParameterIiv(int texture, int pname) { - try (MemoryStack stack = MemoryStack.stackPush()) { - var seg = stack.ints(0); + try (MemoryStack stack = MemoryStack.pushLocal()) { + var seg = stack.allocate(JAVA_INT); getTextureParameterIiv(texture, pname, seg); return seg.get(JAVA_INT, 0); } @@ -626,8 +626,8 @@ default void getTextureParameterIuiv(SegmentAllocator allocator, int texture, in @Skip default int getTextureParameterIuiv(int texture, int pname) { - try (MemoryStack stack = MemoryStack.stackPush()) { - var seg = stack.ints(0); + try (MemoryStack stack = MemoryStack.pushLocal()) { + var seg = stack.allocate(JAVA_INT); getTextureParameterIuiv(texture, pname, seg); return seg.get(JAVA_INT, 0); } @@ -645,8 +645,8 @@ default void getTextureParameterfv(SegmentAllocator allocator, int texture, int @Skip default float getTextureParameterfv(int texture, int pname) { - try (MemoryStack stack = MemoryStack.stackPush()) { - var pParams = stack.floats(0F); + try (MemoryStack stack = MemoryStack.pushLocal()) { + var pParams = stack.allocate(JAVA_FLOAT); getTextureParameterfv(texture, pname, pParams); return pParams.get(JAVA_FLOAT, 0); } @@ -664,8 +664,8 @@ default void getTextureParameteriv(SegmentAllocator allocator, int texture, int @Skip default int getTextureParameteriv(int texture, int pname) { - try (MemoryStack stack = MemoryStack.stackPush()) { - var pParams = stack.ints(0); + try (MemoryStack stack = MemoryStack.pushLocal()) { + var pParams = stack.allocate(JAVA_INT); getTextureParameteriv(texture, pname, pParams); return pParams.get(JAVA_INT, 0); } @@ -741,8 +741,8 @@ default void getVertexArrayIndexed64iv(int vaobj, int index, int pname, MemorySe @Skip default long getVertexArrayIndexed64iv(int vaobj, int index, int pname) { - try (MemoryStack stack = MemoryStack.stackPush()) { - var seg = stack.longs(0L); + try (MemoryStack stack = MemoryStack.pushLocal()) { + var seg = stack.allocate(JAVA_LONG); getVertexArrayIndexed64iv(vaobj, index, pname, seg); return seg.get(JAVA_LONG, 0); } @@ -755,8 +755,8 @@ default void getVertexArrayIndexediv(int vaobj, int index, int pname, MemorySegm @Skip default int getVertexArrayIndexediv(int vaobj, int index, int pname) { - try (MemoryStack stack = MemoryStack.stackPush()) { - var seg = stack.ints(0); + try (MemoryStack stack = MemoryStack.pushLocal()) { + var seg = stack.allocate(JAVA_INT); getVertexArrayIndexediv(vaobj, index, pname, seg); return seg.get(JAVA_INT, 0); } @@ -769,8 +769,8 @@ default void getVertexArrayiv(int vaobj, int pname, MemorySegment param) { @Skip default int getVertexArrayiv(int vaobj, int pname) { - try (MemoryStack stack = MemoryStack.stackPush()) { - var seg = stack.ints(0); + try (MemoryStack stack = MemoryStack.pushLocal()) { + var seg = stack.allocate(JAVA_INT); getVertexArrayiv(vaobj, pname, seg); return seg.get(JAVA_INT, 0); } @@ -904,8 +904,8 @@ default void invalidateNamedFramebufferData(SegmentAllocator allocator, int fram @Skip default void invalidateNamedFramebufferData(int framebuffer, int attachment) { - try (MemoryStack stack = MemoryStack.stackPush()) { - invalidateNamedFramebufferData(framebuffer, 1, stack.ints(attachment)); + try (MemoryStack stack = MemoryStack.pushLocal()) { + invalidateNamedFramebufferData(framebuffer, 1, stack.allocateFrom(JAVA_INT, attachment)); } } @@ -921,8 +921,8 @@ default void invalidateNamedFramebufferSubData(SegmentAllocator allocator, int f @Skip default void invalidateNamedFramebufferSubData(int framebuffer, int attachment, int x, int y, int width, int height) { - try (MemoryStack stack = MemoryStack.stackPush()) { - invalidateNamedFramebufferSubData(framebuffer, 1, stack.ints(attachment), x, y, width, height); + try (MemoryStack stack = MemoryStack.pushLocal()) { + invalidateNamedFramebufferSubData(framebuffer, 1, stack.allocateFrom(JAVA_INT, attachment), x, y, width, height); } } diff --git a/modules/overrungl.opengl/src/main/java/overrungl/opengl/GL46C.java b/modules/overrungl.opengl/src/main/java/overrungl/opengl/GL46C.java index e17d06ab..c1a91001 100644 --- a/modules/overrungl.opengl/src/main/java/overrungl/opengl/GL46C.java +++ b/modules/overrungl.opengl/src/main/java/overrungl/opengl/GL46C.java @@ -16,10 +16,10 @@ package overrungl.opengl; +import io.github.overrun.memstack.MemoryStack; import org.jetbrains.annotations.Nullable; import overrun.marshal.DirectAccess; import overrun.marshal.Marshal; -import overrun.marshal.MemoryStack; import overrun.marshal.gen.Entrypoint; import overrun.marshal.gen.Skip; import overrungl.opengl.ext.arb.GLARBGLSpirv; @@ -96,7 +96,7 @@ default void specializeShader(SegmentAllocator allocator, int shader, @Nullable @Skip default void specializeShader(int shader, @Nullable String pEntryPoint) { - try (MemoryStack stack = MemoryStack.stackPush()) { + try (MemoryStack stack = MemoryStack.pushLocal()) { specializeShader(shader, Marshal.marshal(stack, pEntryPoint), 0, diff --git a/modules/overrungl.opengl/src/main/java/overrungl/opengl/GLFinder.java b/modules/overrungl.opengl/src/main/java/overrungl/opengl/GLFinder.java index 4b079421..b131b215 100644 --- a/modules/overrungl.opengl/src/main/java/overrungl/opengl/GLFinder.java +++ b/modules/overrungl.opengl/src/main/java/overrungl/opengl/GLFinder.java @@ -16,7 +16,7 @@ package overrungl.opengl; -import overrun.marshal.MemoryStack; +import io.github.overrun.memstack.MemoryStack; import overrun.marshal.Unmarshal; import overrungl.util.value.Pair; @@ -109,7 +109,7 @@ static boolean getExtensions(GLLoadFunc load, // extension count int numExtsI; - try (MemoryStack stack = MemoryStack.stackPush()) { + try (MemoryStack stack = MemoryStack.pushLocal()) { final MemorySegment pNumExtsI = stack.allocate(ValueLayout.JAVA_INT); try { glGetIntegerv.invokeExact(GL.NUM_EXTENSIONS, pNumExtsI); diff --git a/modules/overrungl.opengl/src/main/java/overrungl/opengl/GLLoader.java b/modules/overrungl.opengl/src/main/java/overrungl/opengl/GLLoader.java index 41d16c2a..fc2b39c1 100644 --- a/modules/overrungl.opengl/src/main/java/overrungl/opengl/GLLoader.java +++ b/modules/overrungl.opengl/src/main/java/overrungl/opengl/GLLoader.java @@ -26,6 +26,7 @@ import java.util.Map; import static java.lang.foreign.ValueLayout.*; +import static overrun.marshal.gen.processor.ProcessorTypes.registerStruct; /** * This class must be used before any OpenGL function is called. It has the following responsibilities: @@ -54,6 +55,11 @@ public final class GLLoader { ); private static final MethodHandles.Lookup LOOKUP = MethodHandles.lookup(); + static { + registerStruct(DrawArraysIndirectCommand.class, DrawArraysIndirectCommand.OF); + registerStruct(DrawElementsIndirectCommand.class, DrawElementsIndirectCommand.OF); + } + /** * Loads OpenGL flags. * diff --git a/modules/overrungl.stb/build.gradle.kts b/modules/overrungl.stb/build.gradle.kts new file mode 100644 index 00000000..31835054 --- /dev/null +++ b/modules/overrungl.stb/build.gradle.kts @@ -0,0 +1,11 @@ +plugins { + id("module.conventions") + id("submodule.conventions") + id("native.conventions") +} + +overrunglModule { + artifactName = "overrungl-stb" + publishInfo = Artifact.STB + nativeBinding = NativeBinding.STB +} diff --git a/modules/overrungl.stb/src/main/java/module-info.java b/modules/overrungl.stb/src/main/java/module-info.java index 15fb80f2..c0d5ad2a 100644 --- a/modules/overrungl.stb/src/main/java/module-info.java +++ b/modules/overrungl.stb/src/main/java/module-info.java @@ -25,4 +25,5 @@ requires transitive overrungl.core; requires static org.jetbrains.annotations; + requires io.github.overrun.memstack; } diff --git a/modules/overrungl.stb/src/main/java/overrungl/stb/Handles.java b/modules/overrungl.stb/src/main/java/overrungl/stb/Handles.java index 676949e5..ab23e06e 100644 --- a/modules/overrungl.stb/src/main/java/overrungl/stb/Handles.java +++ b/modules/overrungl.stb/src/main/java/overrungl/stb/Handles.java @@ -25,6 +25,8 @@ import java.lang.foreign.ValueLayout; import java.util.function.Supplier; +import static overrun.marshal.gen.processor.ProcessorTypes.registerStruct; + /** * The STB method handles. * @@ -38,6 +40,22 @@ final class Handles { stbi_write_force_png_filter; static { + registerStruct(STBIIoCallbacks.class, STBIIoCallbacks.OF); + registerStruct(STBIRRESIZE.class, STBIRRESIZE.OF); + registerStruct(STBRPContext.class, STBRPContext.OF); + registerStruct(STBRPNode.class, STBRPNode.OF); + registerStruct(STBRPRect.class, STBRPRect.OF); + registerStruct(STBTTAlignedQuad.class, STBTTAlignedQuad.OF); + registerStruct(STBTTBakedChar.class, STBTTBakedChar.OF); + registerStruct(STBTTFontInfo.class, STBTTFontInfo.OF); + registerStruct(STBTTKerningEntry.class, STBTTKerningEntry.OF); + registerStruct(STBTTPackedChar.class, STBTTPackedChar.OF); + registerStruct(STBTTPackRange.class, STBTTPackRange.OF); + registerStruct(STBTTVertex.class, STBTTVertex.OF); + registerStruct(STBVorbisAlloc.class, STBVorbisAlloc.OF); + registerStruct(STBVorbisComment.class, STBVorbisComment.OF); + registerStruct(STBVorbisInfo.class, STBVorbisInfo.OF); + final Supplier lib = () -> RuntimeHelper.load("stb", "stb", OverrunGL.STB_VERSION); final var function = Configurations.STB_SYMBOL_LOOKUP.get(); lookup = function != null ? function.apply(lib) : lib.get(); @@ -48,7 +66,7 @@ final class Handles { } private static MemorySegment findIntOrThrow(String name) { - return lookup.find(name).orElseThrow().reinterpret(ValueLayout.JAVA_INT.byteSize()); + return lookup.findOrThrow(name).reinterpret(ValueLayout.JAVA_INT.byteSize()); } private Handles() { diff --git a/modules/overrungl.stb/src/main/java/overrungl/stb/STBIRDatatype.java b/modules/overrungl.stb/src/main/java/overrungl/stb/STBIRDatatype.java deleted file mode 100644 index 4280e70e..00000000 --- a/modules/overrungl.stb/src/main/java/overrungl/stb/STBIRDatatype.java +++ /dev/null @@ -1,48 +0,0 @@ -/* - * MIT License - * - * Copyright (c) 2022-2024 Overrun Organization - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - */ - -package overrungl.stb; - -import overrun.marshal.CEnum; - -/** - * The STB image resizer datatype - * - * @author squid233 - * @since 0.1.0 - */ -public enum STBIRDatatype implements CEnum { - UINT8(0), - UINT8_SRGB(1), - /** - * alpha channel, when present, should also be SRGB (this is very unusual) - */ - UINT8_SRGB_ALPHA(2), - UINT16(3), - FLOAT(4), - HALF_FLOAT(5); - - private final int value; - - STBIRDatatype(int value) { - this.value = value; - } - - @Override - public int value() { - return value; - } -} diff --git a/modules/overrungl.stb/src/main/java/overrungl/stb/STBIREdge.java b/modules/overrungl.stb/src/main/java/overrungl/stb/STBIREdge.java deleted file mode 100644 index bf412ff9..00000000 --- a/modules/overrungl.stb/src/main/java/overrungl/stb/STBIREdge.java +++ /dev/null @@ -1,46 +0,0 @@ -/* - * MIT License - * - * Copyright (c) 2022-2024 Overrun Organization - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - */ - -package overrungl.stb; - -import overrun.marshal.CEnum; - -/** - * The STB image resizer edge - * - * @author squid233 - * @since 0.1.0 - */ -public enum STBIREdge implements CEnum { - CLAMP(0), - REFLECT(1), - /** - * this edge mode is slower and uses more memory - */ - WRAP(2), - ZERO(3); - - private final int value; - - STBIREdge(int value) { - this.value = value; - } - - @Override - public int value() { - return value; - } -} diff --git a/modules/overrungl.stb/src/main/java/overrungl/stb/STBIRFilter.java b/modules/overrungl.stb/src/main/java/overrungl/stb/STBIRFilter.java deleted file mode 100644 index 4053bbda..00000000 --- a/modules/overrungl.stb/src/main/java/overrungl/stb/STBIRFilter.java +++ /dev/null @@ -1,71 +0,0 @@ -/* - * MIT License - * - * Copyright (c) 2022-2024 Overrun Organization - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - */ - -package overrungl.stb; - -import overrun.marshal.CEnum; - -/** - * The STB image resizer filter - * - * @author squid233 - * @since 0.1.0 - */ -public enum STBIRFilter implements CEnum { - /** - * use same filter type that easy-to-use API chooses - */ - DEFAULT(0), - /** - * A trapezoid w/1-pixel wide ramps, same result as box for integer scale ratios - */ - BOX(1), - /** - * On upsampling, produces same results as bilinear texture filtering - */ - TRIANGLE(2), - /** - * The cubic b-spline (aka Mitchell-Netrevalli with B=1,C=0), gaussian-esque - */ - CUBICBSPLINE(3), - /** - * An interpolating cubic spline - */ - CATMULLROM(4), - /** - * Mitchell-Netrevalli filter with B=1/3, C=1/3 - */ - MITCHELL(5), - /** - * Simple point sampling - */ - POINT_SAMPLE(6), - /** - * User callback specified - */ - OTHER(7); - - private final int value; - - STBIRFilter(int value) { - this.value = value; - } - - @Override - public int value() { - return value; - } -} diff --git a/modules/overrungl.stb/src/main/java/overrungl/stb/STBIRPixelLayout.java b/modules/overrungl.stb/src/main/java/overrungl/stb/STBIRPixelLayout.java deleted file mode 100644 index 1e697624..00000000 --- a/modules/overrungl.stb/src/main/java/overrungl/stb/STBIRPixelLayout.java +++ /dev/null @@ -1,84 +0,0 @@ -/* - * MIT License - * - * Copyright (c) 2024 Overrun Organization - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - */ - -package overrungl.stb; - -import overrun.marshal.CEnum; - -/** - * stbir_pixel_layout specifies:
- * number of channels
- * order of channels
- * whether color is premultiplied by alpha - * - * @author squid233 - * @since 0.1.0 - */ -public enum STBIRPixelLayout implements CEnum { - _1CHANNEL(1), - _2CHANNEL(2), - /** - * 3-chan, with order specified (for channel flipping) - */ - RGB(3), - /** - * 3-chan, with order specified (for channel flipping) - */ - BGR(0), - _4CHANNEL(5), - /** - * alpha formats, where alpha is NOT premultiplied into color channels - */ - RGBA(4), - BGRA(6), - ARGB(7), - ABGR(8), - RA(9), - AR(10), - /** - * alpha formats, where alpha is premultiplied into color channels - */ - RGBA_PM(11), - BGRA_PM(12), - ARGB_PM(13), - ABGR_PM(14), - RA_PM(15), - AR_PM(16), - /** - * alpha formats, where NO alpha weighting is applied at all! - * these are just synonyms for the _PM flags (which also do - * no alpha weighting). These names just make it more clear - * for some folks). - */ - RGBA_NO_AW(11), - BGRA_NO_AW(12), - ARGB_NO_AW(13), - ABGR_NO_AW(14), - RA_NO_AW(15), - AR_NO_AW(16), - ; - - private final int value; - - STBIRPixelLayout(int value) { - this.value = value; - } - - @Override - public int value() { - return value; - } -} diff --git a/modules/overrungl.stb/src/main/java/overrungl/stb/STBImage.java b/modules/overrungl.stb/src/main/java/overrungl/stb/STBImage.java index 57a89b77..f9ff5ee0 100644 --- a/modules/overrungl.stb/src/main/java/overrungl/stb/STBImage.java +++ b/modules/overrungl.stb/src/main/java/overrungl/stb/STBImage.java @@ -16,12 +16,17 @@ package overrungl.stb; +import io.github.overrun.memstack.MemoryStack; import org.jetbrains.annotations.Nullable; import overrun.marshal.DirectAccess; import overrun.marshal.Downcall; -import overrun.marshal.MemoryStack; +import overrun.marshal.Marshal; import overrun.marshal.Unmarshal; -import overrun.marshal.gen.*; +import overrun.marshal.gen.Convert; +import overrun.marshal.gen.Entrypoint; +import overrun.marshal.gen.Ref; +import overrun.marshal.gen.Skip; +import overrun.marshal.gen.processor.ProcessorType.BoolConvert; import java.lang.foreign.MemorySegment; import java.lang.foreign.SegmentAllocator; @@ -50,17 +55,16 @@ public interface STBImage extends DirectAccess { RGB_ALPHA = 4; @Entrypoint("stbi_convert_iphone_png_to_rgb") - void convertIphonePngToRgb(@Convert(Type.INT) boolean shouldConvert); + void convertIphonePngToRgb(@Convert(BoolConvert.INT) boolean shouldConvert); @Entrypoint("stbi_convert_iphone_png_to_rgb_thread") - void convertIphonePngToRgbThread(@Convert(Type.INT) boolean shouldConvert); + void convertIphonePngToRgbThread(@Convert(BoolConvert.INT) boolean shouldConvert); @Entrypoint("stbi_failure_reason") MemorySegment nfailureReason(); @Entrypoint("stbi_failure_reason") @Nullable - @SizedSeg(Unmarshal.STR_SIZE) String failureReason(); @Entrypoint("stbi_hdr_to_ldr_gamma") @@ -72,31 +76,31 @@ public interface STBImage extends DirectAccess { @Entrypoint("stbi_image_free") void free(MemorySegment retValFromLoad); - @Convert(Type.INT) + @Convert(BoolConvert.INT) @Entrypoint("stbi_info") boolean ninfo(MemorySegment filename, MemorySegment x, MemorySegment y, MemorySegment comp); - @Convert(Type.INT) + @Convert(BoolConvert.INT) @Entrypoint("stbi_info") boolean info(String filename, @Ref int[] x, @Ref int[] y, @Ref int[] comp); - @Convert(Type.INT) + @Convert(BoolConvert.INT) @Entrypoint("stbi_info_from_callbacks") boolean ninfoFromCallbacks(MemorySegment clbk, MemorySegment user, MemorySegment x, MemorySegment y, MemorySegment comp); - @Convert(Type.INT) + @Convert(BoolConvert.INT) @Entrypoint("stbi_info_from_callbacks") boolean infoFromCallbacks(STBIIoCallbacks clbk, MemorySegment user, @Ref int[] x, @Ref int[] y, @Ref int[] comp); - @Convert(Type.INT) + @Convert(BoolConvert.INT) @Entrypoint("stbi_info_from_file") boolean ninfoFromFile(MemorySegment f, MemorySegment x, MemorySegment y, MemorySegment comp); - @Convert(Type.INT) + @Convert(BoolConvert.INT) @Entrypoint("stbi_info_from_file") boolean infoFromFile(MemorySegment f, @Ref int[] x, @Ref int[] y, @Ref int[] comp); - @Convert(Type.INT) + @Convert(BoolConvert.INT) @Entrypoint("stbi_info_from_memory") boolean ninfoFromMemory(MemorySegment buffer, int len, MemorySegment x, MemorySegment y, MemorySegment comp); @@ -105,7 +109,7 @@ default boolean infoFromMemory(MemorySegment buffer, MemorySegment x, MemorySegm return ninfoFromMemory(buffer, Math.toIntExact(buffer.byteSize()), x, y, comp); } - @Convert(Type.INT) + @Convert(BoolConvert.INT) @Entrypoint("stbi_info_from_memory") boolean infoFromMemory(SegmentAllocator allocator, int len, byte[] buffer, @Ref int[] x, @Ref int[] y, @Ref int[] comp); @@ -114,27 +118,27 @@ default boolean infoFromMemory(SegmentAllocator allocator, byte[] buffer, @Ref i return infoFromMemory(allocator, buffer.length, buffer, x, y, comp); } - @Convert(Type.INT) + @Convert(BoolConvert.INT) @Entrypoint("stbi_is_16_bit") boolean nis16Bit(MemorySegment filename); - @Convert(Type.INT) + @Convert(BoolConvert.INT) @Entrypoint("stbi_is_16_bit") boolean nis16Bit(String filename); - @Convert(Type.INT) + @Convert(BoolConvert.INT) @Entrypoint("stbi_is_16_bit_from_callbacks") boolean nis16BitFromCallbacks(MemorySegment clbk, MemorySegment user); - @Convert(Type.INT) + @Convert(BoolConvert.INT) @Entrypoint("stbi_is_16_bit_from_callbacks") boolean nis16BitFromCallbacks(STBIIoCallbacks clbk, MemorySegment user); - @Convert(Type.INT) + @Convert(BoolConvert.INT) @Entrypoint("stbi_is_16_bit_from_file") boolean nis16BitFromFile(MemorySegment f); - @Convert(Type.INT) + @Convert(BoolConvert.INT) @Entrypoint("stbi_is_16_bit_from_memory") boolean nis16BitFromMemory(MemorySegment buffer, int len); @@ -143,7 +147,7 @@ default boolean is16BitFromMemory(MemorySegment buffer) { return nis16BitFromMemory(buffer, Math.toIntExact(buffer.byteSize())); } - @Convert(Type.INT) + @Convert(BoolConvert.INT) @Entrypoint("stbi_is_16_bit_from_memory") boolean is16BitFromMemory(SegmentAllocator allocator, byte[] buffer, int len); @@ -152,27 +156,27 @@ default boolean is16BitFromMemory(SegmentAllocator allocator, byte[] buffer) { return is16BitFromMemory(allocator, buffer, buffer.length); } - @Convert(Type.INT) + @Convert(BoolConvert.INT) @Entrypoint("stbi_is_hdr") boolean isHdr(MemorySegment filename); - @Convert(Type.INT) + @Convert(BoolConvert.INT) @Entrypoint("stbi_is_hdr") boolean isHdr(String filename); - @Convert(Type.INT) + @Convert(BoolConvert.INT) @Entrypoint("stbi_is_hdr_from_callbacks") boolean nisHdrFromCallbacks(MemorySegment clbk, MemorySegment user); - @Convert(Type.INT) + @Convert(BoolConvert.INT) @Entrypoint("stbi_is_hdr_from_callbacks") boolean isHdrFromCallbacks(STBIIoCallbacks clbk, MemorySegment user); - @Convert(Type.INT) + @Convert(BoolConvert.INT) @Entrypoint("stbi_is_hdr_from_file") boolean isHdrFromFile(MemorySegment f); - @Convert(Type.INT) + @Convert(BoolConvert.INT) @Entrypoint("stbi_is_hdr_from_memory") boolean nisHdrFromMemory(MemorySegment buffer, int len); @@ -181,7 +185,7 @@ default boolean isHdrFromMemory(MemorySegment buffer) { return nisHdrFromMemory(buffer, Math.toIntExact(buffer.byteSize())); } - @Convert(Type.INT) + @Convert(BoolConvert.INT) @Entrypoint("stbi_is_hdr_from_memory") boolean isHdrFromMemory(SegmentAllocator allocator, byte[] buffer, int len); @@ -274,12 +278,12 @@ default MemorySegment loadGifFromMemory(MemorySegment buffer, MemorySegment dela @Skip default MemorySegment loadGifFromMemory(SegmentAllocator allocator, byte[] buffer, @Ref int[][] delays, @Ref int[] x, @Ref int[] y, @Ref int[] z, @Ref int[] comp, int reqComp) { - try (MemoryStack stack = MemoryStack.stackPush()) { + try (MemoryStack stack = MemoryStack.pushLocal()) { var pd = stack.allocate(ValueLayout.ADDRESS); - var px = stack.ints(x); - var py = stack.ints(y); - var pz = stack.ints(z); - var pc = stack.ints(comp); + var px = Marshal.marshal(stack, x); + var py = Marshal.marshal(stack, y); + var pz = Marshal.marshal(stack, z); + var pc = Marshal.marshal(stack, comp); var addr = loadGifFromMemory(allocator.allocateFrom(ValueLayout.JAVA_BYTE, buffer), pd, px, py, pz, pc, reqComp); Unmarshal.copy(px, x); Unmarshal.copy(py, y); @@ -328,16 +332,16 @@ default MemorySegment loadfFromMemory(SegmentAllocator allocator, byte[] buffer, } @Entrypoint("stbi_set_flip_vertically_on_load") - void setFlipVerticallyOnLoad(@Convert(Type.INT) boolean shouldFlip); + void setFlipVerticallyOnLoad(@Convert(BoolConvert.INT) boolean shouldFlip); @Entrypoint("stbi_set_flip_vertically_on_load_thread") - void setFlipVerticallyOnLoadThread(@Convert(Type.INT) boolean shouldFlip); + void setFlipVerticallyOnLoadThread(@Convert(BoolConvert.INT) boolean shouldFlip); @Entrypoint("stbi_set_unpremultiply_on_load") - void nsetUnpremultiplyOnLoad(@Convert(Type.INT) boolean shouldUnpremultiply); + void nsetUnpremultiplyOnLoad(@Convert(BoolConvert.INT) boolean shouldUnpremultiply); @Entrypoint("stbi_set_unpremultiply_on_load_thread") - void nsetUnpremultiplyOnLoadThread(@Convert(Type.INT) boolean shouldUnpremultiply); + void nsetUnpremultiplyOnLoadThread(@Convert(BoolConvert.INT) boolean shouldUnpremultiply); @Entrypoint("stbi_zlib_decode_buffer") int zlibDecodeBuffer(MemorySegment obuffer, int olen, MemorySegment ibuffer, int ilen); diff --git a/modules/overrungl.stb/src/main/java/overrungl/stb/STBImageResize2.java b/modules/overrungl.stb/src/main/java/overrungl/stb/STBImageResize2.java index 7ab45d98..6aa9a51e 100644 --- a/modules/overrungl.stb/src/main/java/overrungl/stb/STBImageResize2.java +++ b/modules/overrungl.stb/src/main/java/overrungl/stb/STBImageResize2.java @@ -31,6 +31,108 @@ * @since 0.1.0 */ public interface STBImageResize2 extends DirectAccess { + /** + * {@code stbir_pixel_layout} + */ + int _1CHANNEL = 1, + _2CHANNEL = 2, + /** + * 3-chan, with order specified (for channel flipping) + */ + RGB = 3, + /** + * 3-chan, with order specified (for channel flipping) + */ + BGR = 0, + _4CHANNEL = 5, + /** + * alpha formats, where alpha is NOT premultiplied into color channels + */ + RGBA = 4, + BGRA = 6, + ARGB = 7, + ABGR = 8, + RA = 9, + AR = 10, + /** + * alpha formats, where alpha is premultiplied into color channels + */ + RGBA_PM = 11, + BGRA_PM = 12, + ARGB_PM = 13, + ABGR_PM = 14, + RA_PM = 15, + AR_PM = 16, + /** + * alpha formats, where NO alpha weighting is applied at all! + * these are just synonyms for the _PM flags (which also do + * no alpha weighting). These names just make it more clear + * for some folks). + */ + RGBA_NO_AW = 11, + BGRA_NO_AW = 12, + ARGB_NO_AW = 13, + ABGR_NO_AW = 14, + RA_NO_AW = 15, + AR_NO_AW = 16; + + /** + * {@code stbir_edge} + */ + int EDGE_CLAMP = 0, + EDGE_REFLECT = 1, + /** + * this edge mode is slower and uses more memory + */ + EDGE_WRAP = 2, + EDGE_ZERO = 3; + + /** + * use same filter type that easy-to-use API chooses + */ + int FILTER_DEFAULT = 0; + /** + * A trapezoid w/1-pixel wide ramps, same result as box for integer scale ratios + */ + int FILTER_BOX = 1; + /** + * On upsampling, produces same results as bilinear texture filtering + */ + int FILTER_TRIANGLE = 2; + /** + * The cubic b-spline (aka Mitchell-Netrevalli with B=1,C=0), gaussian-esque + */ + int FILTER_CUBICBSPLINE = 3; + /** + * An interpolating cubic spline + */ + int FILTER_CATMULLROM = 4; + /** + * Mitchell-Netrevalli filter with B=1/3, C=1/3 + */ + int FILTER_MITCHELL = 5; + /** + * Simple point sampling + */ + int FILTER_POINT_SAMPLE = 6; + /** + * User callback specified + */ + int FILTER_OTHER = 7; + + /** + * {@code stbir_datatype} + */ + int TYPE_UINT8 = 0, + TYPE_UINT8_SRGB = 1, + /** + * alpha channel, when present, should also be SRGB (this is very unusual) + */ + TYPE_UINT8_SRGB_ALPHA = 2, + TYPE_UINT16 = 3, + TYPE_FLOAT = 4, + TYPE_HALF_FLOAT = 5; + /** * The instance of STBImageResize2. */ @@ -45,19 +147,19 @@ public interface STBImageResize2 extends DirectAccess { @Entrypoint("stbir_resize_uint8_srgb") MemorySegment resizeUint8Srgb(@NativeType("const unsigned char *") MemorySegment input_pixels, int input_w, int input_h, int input_stride_in_bytes, @NativeType("unsigned char *") MemorySegment output_pixels, int output_w, int output_h, int output_stride_in_bytes, - STBIRPixelLayout pixel_type); + int pixel_type); @Entrypoint("stbir_resize_uint8_linear") @NativeType("unsigned char *") MemorySegment resizeUint8Linear(@NativeType("const unsigned char *") MemorySegment input_pixels, int input_w, int input_h, int input_stride_in_bytes, @NativeType("unsigned char *") MemorySegment output_pixels, int output_w, int output_h, int output_stride_in_bytes, - STBIRPixelLayout pixel_type); + int pixel_type); @Entrypoint("stbir_resize_uint8_linear") @NativeType("float *") MemorySegment resizeFloatLinear(@NativeType("const float *") MemorySegment input_pixels, int input_w, int input_h, int input_stride_in_bytes, @NativeType("float *") MemorySegment output_pixels, int output_w, int output_h, int output_stride_in_bytes, - STBIRPixelLayout pixel_type); + int pixel_type); //=============================================================== // Medium-complexity API @@ -74,8 +176,8 @@ MemorySegment resizeFloatLinear(@NativeType("const float *") MemorySegment input @NativeType("void *") MemorySegment resize(@NativeType("const void *") MemorySegment input_pixels, int input_w, int input_h, int input_stride_in_bytes, @NativeType("void *") MemorySegment output_pixels, int output_w, int output_h, int output_stride_in_bytes, - STBIRPixelLayout pixel_layout, STBIRDatatype data_type, - STBIREdge edge, STBIRFilter filter); + int pixel_layout, int data_type, + int edge, int filter); //=============================================================== // Extended-complexity API @@ -120,10 +222,10 @@ MemorySegment resize(@NativeType("const void *") MemorySegment input_pixels, int void resizeInit(STBIRRESIZE resize, @NativeType("const void *") MemorySegment input_pixels, int input_w, int input_h, int input_stride_in_bytes, @NativeType("void *") MemorySegment output_pixels, int output_w, int output_h, int output_stride_in_bytes, - STBIRPixelLayout pixel_layout, STBIRDatatype data_type); + int pixel_layout, int data_type); @Entrypoint("stbir_set_datatypes") - void setDatatypes(STBIRRESIZE resize, STBIRDatatype input_type, STBIRDatatype output_type); + void setDatatypes(STBIRRESIZE resize, int input_type, int output_type); /** * no callbacks by default @@ -160,7 +262,7 @@ void resizeInit(STBIRRESIZE resize, * @return int */ @Entrypoint("stbir_set_pixel_layouts") - int setPixelLayouts(STBIRRESIZE resize, STBIRPixelLayout input_pixel_layout, STBIRPixelLayout output_pixel_layout); + int setPixelLayouts(STBIRRESIZE resize, int input_pixel_layout, int output_pixel_layout); /** * CLAMP by default @@ -171,7 +273,7 @@ void resizeInit(STBIRRESIZE resize, * @return int */ @Entrypoint("stbir_set_edgemodes") - int setEdgemodes(STBIRRESIZE resize, STBIREdge horizontal_edge, STBIREdge vertical_edge); + int setEdgemodes(STBIRRESIZE resize, int horizontal_edge, int vertical_edge); /** * STBIR_DEFAULT_FILTER_UPSAMPLE/DOWNSAMPLE by default @@ -182,7 +284,7 @@ void resizeInit(STBIRRESIZE resize, * @return int */ @Entrypoint("stbir_set_filters") - int setFilters(STBIRRESIZE resize, STBIRFilter horizontal_filter, STBIRFilter vertical_filter); + int setFilters(STBIRRESIZE resize, int horizontal_filter, int vertical_filter); @Entrypoint("stbir_set_filter_callbacks") int setFilterCallbacks(STBIRRESIZE resize, STBIRKernelCallback horizontal_filter, STBIRSupportCallback horizontal_support, STBIRKernelCallback vertical_filter, STBIRSupportCallback vertical_support); diff --git a/modules/overrungl.stb/src/main/java/overrungl/stb/STBImageWrite.java b/modules/overrungl.stb/src/main/java/overrungl/stb/STBImageWrite.java index 251c1263..c63e4071 100644 --- a/modules/overrungl.stb/src/main/java/overrungl/stb/STBImageWrite.java +++ b/modules/overrungl.stb/src/main/java/overrungl/stb/STBImageWrite.java @@ -21,7 +21,7 @@ import overrun.marshal.gen.Convert; import overrun.marshal.gen.Entrypoint; import overrun.marshal.gen.Skip; -import overrun.marshal.gen.Type; +import overrun.marshal.gen.processor.ProcessorType.BoolConvert; import java.lang.foreign.Arena; import java.lang.foreign.MemorySegment; @@ -71,88 +71,88 @@ default void setWriteForcePngFilter(int filter) { Handles.stbi_write_force_png_filter.set(ValueLayout.JAVA_INT, 0L, filter); } - @Convert(Type.INT) + @Convert(BoolConvert.INT) @Entrypoint("stbi_write_png") boolean npng(MemorySegment filename, int w, int h, int comp, MemorySegment data, int strideInBytes); - @Convert(Type.INT) + @Convert(BoolConvert.INT) @Entrypoint("stbi_write_bmp") boolean nbmp(MemorySegment filename, int w, int h, int comp, MemorySegment data); - @Convert(Type.INT) + @Convert(BoolConvert.INT) @Entrypoint("stbi_write_tga") boolean ntga(MemorySegment filename, int w, int h, int comp, MemorySegment data); - @Convert(Type.INT) + @Convert(BoolConvert.INT) @Entrypoint("stbi_write_hdr") boolean nhdr(MemorySegment filename, int w, int h, int comp, MemorySegment data); - @Convert(Type.INT) + @Convert(BoolConvert.INT) @Entrypoint("stbi_write_jpg") boolean njpg(MemorySegment filename, int x, int y, int comp, MemorySegment data, int quality); - @Convert(Type.INT) + @Convert(BoolConvert.INT) @Entrypoint("stbi_write_png") boolean png(String filename, int w, int h, int comp, MemorySegment data, int strideInBytes); - @Convert(Type.INT) + @Convert(BoolConvert.INT) @Entrypoint("stbi_write_bmp") boolean bmp(String filename, int w, int h, int comp, MemorySegment data); - @Convert(Type.INT) + @Convert(BoolConvert.INT) @Entrypoint("stbi_write_tga") boolean tga(String filename, int w, int h, int comp, MemorySegment data); - @Convert(Type.INT) + @Convert(BoolConvert.INT) @Entrypoint("stbi_write_hdr") boolean hdr(SegmentAllocator allocator, String filename, int w, int h, int comp, float[] data); - @Convert(Type.INT) + @Convert(BoolConvert.INT) @Entrypoint("stbi_write_jpg") boolean jpg(String filename, int x, int y, int comp, MemorySegment data, int quality); - @Convert(Type.INT) + @Convert(BoolConvert.INT) @Entrypoint("stbi_write_png_to_func") boolean npngToFunc(MemorySegment func, MemorySegment context, int w, int h, int comp, MemorySegment data, int strideInBytes); - @Convert(Type.INT) + @Convert(BoolConvert.INT) @Entrypoint("stbi_write_bmp_to_func") boolean nbmpToFunc(MemorySegment func, MemorySegment context, int w, int h, int comp, MemorySegment data); - @Convert(Type.INT) + @Convert(BoolConvert.INT) @Entrypoint("stbi_write_tga_to_func") boolean ntgaToFunc(MemorySegment func, MemorySegment context, int w, int h, int comp, MemorySegment data); - @Convert(Type.INT) + @Convert(BoolConvert.INT) @Entrypoint("stbi_write_hdr_to_func") boolean nhdrToFunc(MemorySegment func, MemorySegment context, int w, int h, int comp, MemorySegment data); - @Convert(Type.INT) + @Convert(BoolConvert.INT) @Entrypoint("stbi_write_jpg_to_func") boolean njpgToFunc(MemorySegment func, MemorySegment context, int x, int y, int comp, MemorySegment data, int quality); - @Convert(Type.INT) + @Convert(BoolConvert.INT) @Entrypoint("stbi_write_png_to_func") boolean pngToFunc(Arena arena, STBIWriteFunc func, MemorySegment context, int w, int h, int comp, MemorySegment data, int strideInBytes); - @Convert(Type.INT) + @Convert(BoolConvert.INT) @Entrypoint("stbi_write_bmp_to_func") boolean bmpToFunc(Arena arena, STBIWriteFunc func, MemorySegment context, int w, int h, int comp, MemorySegment data); - @Convert(Type.INT) + @Convert(BoolConvert.INT) @Entrypoint("stbi_write_tga_to_func") boolean tgaToFunc(Arena arena, STBIWriteFunc func, MemorySegment context, int w, int h, int comp, MemorySegment data); - @Convert(Type.INT) + @Convert(BoolConvert.INT) @Entrypoint("stbi_write_hdr_to_func") boolean hdrToFunc(Arena arena, STBIWriteFunc func, MemorySegment context, int w, int h, int comp, float[] data); - @Convert(Type.INT) + @Convert(BoolConvert.INT) @Entrypoint("stbi_write_jpg_to_func") boolean jpgToFunc(Arena arena, STBIWriteFunc func, MemorySegment context, int x, int y, int comp, MemorySegment data, int quality); @Entrypoint("stbi_flip_vertically_on_write") - void flipVerticallyOnWrite(@Convert(Type.INT) boolean flip); + void flipVerticallyOnWrite(@Convert(BoolConvert.INT) boolean flip); @Entrypoint("stbi_write_png_to_mem") MemorySegment npngToMem(MemorySegment pixels, int strideInBytes, int x, int y, int n, MemorySegment outLen); diff --git a/modules/overrungl.stb/src/main/java/overrungl/stb/STBTrueType.java b/modules/overrungl.stb/src/main/java/overrungl/stb/STBTrueType.java index e2a42f1f..831c3903 100644 --- a/modules/overrungl.stb/src/main/java/overrungl/stb/STBTrueType.java +++ b/modules/overrungl.stb/src/main/java/overrungl/stb/STBTrueType.java @@ -20,7 +20,7 @@ import overrun.marshal.Downcall; import overrun.marshal.gen.Convert; import overrun.marshal.gen.Entrypoint; -import overrun.marshal.gen.Type; +import overrun.marshal.gen.processor.ProcessorType.BoolConvert; import overrungl.NativeType; import java.lang.foreign.MemorySegment; @@ -150,7 +150,7 @@ *

SAMPLE PROGRAMS

* Incomplete text-in-3d-api example, which draws quads properly aligned to be lossless. * {@snippet lang = java: - * import overrun.marshal.MemoryStack; + * import io.github.overrun.memstack.MemoryStack; * import java.lang.foreign.Arena; * import java.nio.channels.FileChannel; * import java.nio.file.Path; @@ -184,7 +184,7 @@ * gl.enable(GL.TEXTURE_2D); * gl.bindTexture(GL.TEXTURE_2D, ftex); * gl.begin(GL.QUADS); - * try (var stack = MemoryStack.stackPush()) { + * try (var stack = MemoryStack.pushLocal()) { * var q = STBTTAlignedQuad.OF.of(stack); * var px = stack.floats(x); * var py = stack.floats(y); @@ -205,7 +205,7 @@ *

* Complete program (this compiles): get a single bitmap, print as ASCII art * {@snippet lang = java: - * import overrun.marshal.MemoryStack; + * import io.github.overrun.memstack.MemoryStack; * import overrungl.stb.STBTTFontInfo; * import overrungl.stb.STBTrueType; * @@ -230,7 +230,7 @@ * stbtt.initFont(font, ttf_buffer, stbtt.getFontOffsetForIndex(ttf_buffer, 0)); * } * - * try (var stack = MemoryStack.stackPush()) { + * try (var stack = MemoryStack.pushLocal()) { * var pw = stack.ints(0); * var ph = stack.ints(0); * var bitmap = stbtt.getCodepointBitmap(font, 0, stbtt.scaleForPixelHeight(font, s), c, pw, ph, MemorySegment.NULL, MemorySegment.NULL); @@ -436,7 +436,7 @@ void getBakedQuad(STBTTBakedChar chardata, int pw, int ph, int char_index, @NativeType("float *") MemorySegment xpos, @NativeType("float *") MemorySegment ypos, STBTTAlignedQuad q, - @Convert(Type.INT) boolean opengl_fillrule); + @Convert(BoolConvert.INT) boolean opengl_fillrule); /** * Query the font vertical metrics without having to create a font first. @@ -573,7 +573,7 @@ int packFontRange(@NativeType("stbtt_pack_context *") MemorySegment spc, @Native * @param skip skip */ @Entrypoint("stbtt_PackSetSkipMissingCodepoints") - void packSetSkipMissingCodepoints(@NativeType("stbtt_pack_context *") MemorySegment spc, @Convert(Type.INT) boolean skip); + void packSetSkipMissingCodepoints(@NativeType("stbtt_pack_context *") MemorySegment spc, @Convert(BoolConvert.INT) boolean skip); /** * Calling these functions in sequence is roughly equivalent to calling @@ -706,7 +706,7 @@ void getPackedQuad(STBTTPackedChar chardata, int pw, int ph, * @param offset offset * @return {@code false} on failure. */ - @Convert(Type.INT) + @Convert(BoolConvert.INT) @Entrypoint("stbtt_InitFont") boolean initFont(STBTTFontInfo info, @NativeType("const unsigned char *") MemorySegment data, int offset); @@ -788,7 +788,7 @@ void getPackedQuad(STBTTPackedChar chardata, int pw, int ph, * @param typoLineGap typoLineGap * @return {@code true} on success (table present), {@code false} on failure. */ - @Convert(Type.INT) + @Convert(BoolConvert.INT) @Entrypoint("stbtt_GetFontVMetricsOS2") boolean getFontVMetricsOS2(STBTTFontInfo info, @NativeType("int *") MemorySegment typoAscent, @NativeType("int *") MemorySegment typoDescent, @NativeType("int *") MemorySegment typoLineGap); @@ -913,7 +913,7 @@ void getPackedQuad(STBTTPackedChar chardata, int pw, int ph, * @param info info * @param glyph_index glyph_index */ - @Convert(Type.INT) + @Convert(BoolConvert.INT) @Entrypoint("stbtt_IsGlyphEmpty") boolean isGlyphEmpty(STBTTFontInfo info, int glyph_index); diff --git a/modules/overrungl.vulkan/build.gradle.kts b/modules/overrungl.vulkan/build.gradle.kts new file mode 100644 index 00000000..0e3160fe --- /dev/null +++ b/modules/overrungl.vulkan/build.gradle.kts @@ -0,0 +1,8 @@ +plugins { + id("module.conventions") + id("submodule.conventions") +} + +overrunglModule { + artifactName = "overrungl-vulkan" +} diff --git a/modules/overrungl.vulkan/src/main/java/module-info.java b/modules/overrungl.vulkan/src/main/java/module-info.java deleted file mode 100644 index 0dc19d00..00000000 --- a/modules/overrungl.vulkan/src/main/java/module-info.java +++ /dev/null @@ -1,28 +0,0 @@ -/* - * MIT License - * - * Copyright (c) 2024 Overrun Organization - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - */ - -/** - * Vulkan binding - * - * @author squid233 - * @since 0.1.0 - */ -module overrungl.vulkan { - exports overrungl.vulkan; - - requires transitive overrungl.core; - requires static org.jetbrains.annotations; -} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VK10.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VK10.java deleted file mode 100644 index 1c685222..00000000 --- a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VK10.java +++ /dev/null @@ -1,59 +0,0 @@ -/* - * MIT License - * - * Copyright (c) 2022-2024 Overrun Organization - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - */ - -// This file is auto-generated. DO NOT EDIT! -package overrungl.vulkan; - -/** - * The Vulkan binding. - * @since 0.1.0 - */ -public interface VK10 extends overrun.marshal.DirectAccess { - int MAX_PHYSICAL_DEVICE_NAME_SIZE = 256; - int UUID_SIZE = 16; - int LUID_SIZE = 8; - int LUID_SIZE_KHR = LUID_SIZE; - int MAX_EXTENSION_NAME_SIZE = 256; - int MAX_DESCRIPTION_SIZE = 256; - int MAX_MEMORY_TYPES = 32; - int MAX_MEMORY_HEAPS = 16; - float LOD_CLAMP_NONE = 1000.0F; - int REMAINING_MIP_LEVELS = ~0; - int REMAINING_ARRAY_LAYERS = ~0; - int REMAINING_3D_SLICES_EXT = ~0; - long WHOLE_SIZE = ~0; - int ATTACHMENT_UNUSED = ~0; - int TRUE = 1; - int FALSE = 0; - int QUEUE_FAMILY_IGNORED = ~0; - int QUEUE_FAMILY_EXTERNAL = ~1; - int QUEUE_FAMILY_EXTERNAL_KHR = QUEUE_FAMILY_EXTERNAL; - int QUEUE_FAMILY_FOREIGN_EXT = ~2; - int SUBPASS_EXTERNAL = ~0; - int MAX_DEVICE_GROUP_SIZE = 32; - int MAX_DEVICE_GROUP_SIZE_KHR = MAX_DEVICE_GROUP_SIZE; - int MAX_DRIVER_NAME_SIZE = 256; - int MAX_DRIVER_NAME_SIZE_KHR = MAX_DRIVER_NAME_SIZE; - int MAX_DRIVER_INFO_SIZE = 256; - int MAX_DRIVER_INFO_SIZE_KHR = MAX_DRIVER_INFO_SIZE; - int SHADER_UNUSED_KHR = ~0; - int SHADER_UNUSED_NV = SHADER_UNUSED_KHR; - int MAX_GLOBAL_PRIORITY_SIZE_KHR = 16; - int MAX_GLOBAL_PRIORITY_SIZE_EXT = MAX_GLOBAL_PRIORITY_SIZE_KHR; - int MAX_SHADER_MODULE_IDENTIFIER_SIZE_EXT = 32; - int MAX_VIDEO_AV1_REFERENCES_PER_FRAME_KHR = 7; - int SHADER_INDEX_UNUSED_AMDX = ~0; -} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VkAccelerationStructureBuildTypeKHR.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VkAccelerationStructureBuildTypeKHR.java deleted file mode 100644 index 7bc9dc85..00000000 --- a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VkAccelerationStructureBuildTypeKHR.java +++ /dev/null @@ -1,28 +0,0 @@ -/* - * MIT License - * - * Copyright (c) 2022-2024 Overrun Organization - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - */ - -// This file is auto-generated. DO NOT EDIT! -package overrungl.vulkan; - -public enum VkAccelerationStructureBuildTypeKHR implements overrun.marshal.CEnum { - HOST(0), - DEVICE(1), - HOST_OR_DEVICE(2), - ; - private final int value; - VkAccelerationStructureBuildTypeKHR(int value) { this.value = value; } - @Override public int value() { return value; } -} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VkAccelerationStructureCompatibilityKHR.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VkAccelerationStructureCompatibilityKHR.java deleted file mode 100644 index 95175ea1..00000000 --- a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VkAccelerationStructureCompatibilityKHR.java +++ /dev/null @@ -1,27 +0,0 @@ -/* - * MIT License - * - * Copyright (c) 2022-2024 Overrun Organization - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - */ - -// This file is auto-generated. DO NOT EDIT! -package overrungl.vulkan; - -public enum VkAccelerationStructureCompatibilityKHR implements overrun.marshal.CEnum { - COMPATIBLE(0), - INCOMPATIBLE(1), - ; - private final int value; - VkAccelerationStructureCompatibilityKHR(int value) { this.value = value; } - @Override public int value() { return value; } -} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VkAccelerationStructureMemoryRequirementsTypeNV.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VkAccelerationStructureMemoryRequirementsTypeNV.java deleted file mode 100644 index 18df202b..00000000 --- a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VkAccelerationStructureMemoryRequirementsTypeNV.java +++ /dev/null @@ -1,28 +0,0 @@ -/* - * MIT License - * - * Copyright (c) 2022-2024 Overrun Organization - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - */ - -// This file is auto-generated. DO NOT EDIT! -package overrungl.vulkan; - -public enum VkAccelerationStructureMemoryRequirementsTypeNV implements overrun.marshal.CEnum { - OBJECT(0), - BUILD_SCRATCH(1), - UPDATE_SCRATCH(2), - ; - private final int value; - VkAccelerationStructureMemoryRequirementsTypeNV(int value) { this.value = value; } - @Override public int value() { return value; } -} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VkAccelerationStructureMotionInstanceTypeNV.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VkAccelerationStructureMotionInstanceTypeNV.java deleted file mode 100644 index 1b5a5b4c..00000000 --- a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VkAccelerationStructureMotionInstanceTypeNV.java +++ /dev/null @@ -1,28 +0,0 @@ -/* - * MIT License - * - * Copyright (c) 2022-2024 Overrun Organization - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - */ - -// This file is auto-generated. DO NOT EDIT! -package overrungl.vulkan; - -public enum VkAccelerationStructureMotionInstanceTypeNV implements overrun.marshal.CEnum { - STATIC(0), - MATRIX_MOTION(1), - SRT_MOTION(2), - ; - private final int value; - VkAccelerationStructureMotionInstanceTypeNV(int value) { this.value = value; } - @Override public int value() { return value; } -} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VkAccelerationStructureTypeKHR.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VkAccelerationStructureTypeKHR.java deleted file mode 100644 index d4350082..00000000 --- a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VkAccelerationStructureTypeKHR.java +++ /dev/null @@ -1,28 +0,0 @@ -/* - * MIT License - * - * Copyright (c) 2022-2024 Overrun Organization - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - */ - -// This file is auto-generated. DO NOT EDIT! -package overrungl.vulkan; - -public enum VkAccelerationStructureTypeKHR implements overrun.marshal.CEnum { - TOP_LEVEL(0), - BOTTOM_LEVEL(1), - GENERIC(2), - ; - private final int value; - VkAccelerationStructureTypeKHR(int value) { this.value = value; } - @Override public int value() { return value; } -} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VkAttachmentLoadOp.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VkAttachmentLoadOp.java deleted file mode 100644 index db1be5d1..00000000 --- a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VkAttachmentLoadOp.java +++ /dev/null @@ -1,28 +0,0 @@ -/* - * MIT License - * - * Copyright (c) 2022-2024 Overrun Organization - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - */ - -// This file is auto-generated. DO NOT EDIT! -package overrungl.vulkan; - -public enum VkAttachmentLoadOp implements overrun.marshal.CEnum { - LOAD(0), - CLEAR(1), - DONT_CARE(2), - ; - private final int value; - VkAttachmentLoadOp(int value) { this.value = value; } - @Override public int value() { return value; } -} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VkAttachmentStoreOp.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VkAttachmentStoreOp.java deleted file mode 100644 index 4c602755..00000000 --- a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VkAttachmentStoreOp.java +++ /dev/null @@ -1,27 +0,0 @@ -/* - * MIT License - * - * Copyright (c) 2022-2024 Overrun Organization - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - */ - -// This file is auto-generated. DO NOT EDIT! -package overrungl.vulkan; - -public enum VkAttachmentStoreOp implements overrun.marshal.CEnum { - STORE(0), - DONT_CARE(1), - ; - private final int value; - VkAttachmentStoreOp(int value) { this.value = value; } - @Override public int value() { return value; } -} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VkBlendFactor.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VkBlendFactor.java deleted file mode 100644 index 92b0a781..00000000 --- a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VkBlendFactor.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * MIT License - * - * Copyright (c) 2022-2024 Overrun Organization - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - */ - -// This file is auto-generated. DO NOT EDIT! -package overrungl.vulkan; - -public enum VkBlendFactor implements overrun.marshal.CEnum { - 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), - CONSTANT_COLOR(10), - ONE_MINUS_CONSTANT_COLOR(11), - CONSTANT_ALPHA(12), - ONE_MINUS_CONSTANT_ALPHA(13), - SRC_ALPHA_SATURATE(14), - SRC1_COLOR(15), - ONE_MINUS_SRC1_COLOR(16), - SRC1_ALPHA(17), - ONE_MINUS_SRC1_ALPHA(18), - ; - private final int value; - VkBlendFactor(int value) { this.value = value; } - @Override public int value() { return value; } -} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VkBlendOp.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VkBlendOp.java deleted file mode 100644 index 86446a3e..00000000 --- a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VkBlendOp.java +++ /dev/null @@ -1,30 +0,0 @@ -/* - * MIT License - * - * Copyright (c) 2022-2024 Overrun Organization - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - */ - -// This file is auto-generated. DO NOT EDIT! -package overrungl.vulkan; - -public enum VkBlendOp implements overrun.marshal.CEnum { - ADD(0), - SUBTRACT(1), - REVERSE_SUBTRACT(2), - MIN(3), - MAX(4), - ; - private final int value; - VkBlendOp(int value) { this.value = value; } - @Override public int value() { return value; } -} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VkBlendOverlapEXT.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VkBlendOverlapEXT.java deleted file mode 100644 index 92ed6578..00000000 --- a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VkBlendOverlapEXT.java +++ /dev/null @@ -1,28 +0,0 @@ -/* - * MIT License - * - * Copyright (c) 2022-2024 Overrun Organization - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - */ - -// This file is auto-generated. DO NOT EDIT! -package overrungl.vulkan; - -public enum VkBlendOverlapEXT implements overrun.marshal.CEnum { - UNCORRELATED(0), - DISJOINT(1), - CONJOINT(2), - ; - private final int value; - VkBlendOverlapEXT(int value) { this.value = value; } - @Override public int value() { return value; } -} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VkBlockMatchWindowCompareModeQCOM.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VkBlockMatchWindowCompareModeQCOM.java deleted file mode 100644 index 3292f39f..00000000 --- a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VkBlockMatchWindowCompareModeQCOM.java +++ /dev/null @@ -1,27 +0,0 @@ -/* - * MIT License - * - * Copyright (c) 2022-2024 Overrun Organization - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - */ - -// This file is auto-generated. DO NOT EDIT! -package overrungl.vulkan; - -public enum VkBlockMatchWindowCompareModeQCOM implements overrun.marshal.CEnum { - MIN(0), - MAX(1), - ; - private final int value; - VkBlockMatchWindowCompareModeQCOM(int value) { this.value = value; } - @Override public int value() { return value; } -} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VkBorderColor.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VkBorderColor.java deleted file mode 100644 index 819a8157..00000000 --- a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VkBorderColor.java +++ /dev/null @@ -1,31 +0,0 @@ -/* - * MIT License - * - * Copyright (c) 2022-2024 Overrun Organization - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - */ - -// This file is auto-generated. DO NOT EDIT! -package overrungl.vulkan; - -public enum VkBorderColor implements overrun.marshal.CEnum { - FLOAT_TRANSPARENT_BLACK(0), - INT_TRANSPARENT_BLACK(1), - FLOAT_OPAQUE_BLACK(2), - INT_OPAQUE_BLACK(3), - FLOAT_OPAQUE_WHITE(4), - INT_OPAQUE_WHITE(5), - ; - private final int value; - VkBorderColor(int value) { this.value = value; } - @Override public int value() { return value; } -} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VkBuildAccelerationStructureModeKHR.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VkBuildAccelerationStructureModeKHR.java deleted file mode 100644 index 28f92257..00000000 --- a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VkBuildAccelerationStructureModeKHR.java +++ /dev/null @@ -1,27 +0,0 @@ -/* - * MIT License - * - * Copyright (c) 2022-2024 Overrun Organization - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - */ - -// This file is auto-generated. DO NOT EDIT! -package overrungl.vulkan; - -public enum VkBuildAccelerationStructureModeKHR implements overrun.marshal.CEnum { - BUILD(0), - UPDATE(1), - ; - private final int value; - VkBuildAccelerationStructureModeKHR(int value) { this.value = value; } - @Override public int value() { return value; } -} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VkBuildMicromapModeEXT.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VkBuildMicromapModeEXT.java deleted file mode 100644 index 3e4b2f0b..00000000 --- a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VkBuildMicromapModeEXT.java +++ /dev/null @@ -1,26 +0,0 @@ -/* - * MIT License - * - * Copyright (c) 2022-2024 Overrun Organization - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - */ - -// This file is auto-generated. DO NOT EDIT! -package overrungl.vulkan; - -public enum VkBuildMicromapModeEXT implements overrun.marshal.CEnum { - BUILD(0), - ; - private final int value; - VkBuildMicromapModeEXT(int value) { this.value = value; } - @Override public int value() { return value; } -} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VkChromaLocation.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VkChromaLocation.java deleted file mode 100644 index e496b60c..00000000 --- a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VkChromaLocation.java +++ /dev/null @@ -1,27 +0,0 @@ -/* - * MIT License - * - * Copyright (c) 2022-2024 Overrun Organization - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - */ - -// This file is auto-generated. DO NOT EDIT! -package overrungl.vulkan; - -public enum VkChromaLocation implements overrun.marshal.CEnum { - COSITED_EVEN(0), - MIDPOINT(1), - ; - private final int value; - VkChromaLocation(int value) { this.value = value; } - @Override public int value() { return value; } -} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VkCoarseSampleOrderTypeNV.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VkCoarseSampleOrderTypeNV.java deleted file mode 100644 index 137f9893..00000000 --- a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VkCoarseSampleOrderTypeNV.java +++ /dev/null @@ -1,29 +0,0 @@ -/* - * MIT License - * - * Copyright (c) 2022-2024 Overrun Organization - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - */ - -// This file is auto-generated. DO NOT EDIT! -package overrungl.vulkan; - -public enum VkCoarseSampleOrderTypeNV implements overrun.marshal.CEnum { - DEFAULT(0), - CUSTOM(1), - PIXEL_MAJOR(2), - SAMPLE_MAJOR(3), - ; - private final int value; - VkCoarseSampleOrderTypeNV(int value) { this.value = value; } - @Override public int value() { return value; } -} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VkColorSpaceKHR.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VkColorSpaceKHR.java deleted file mode 100644 index b4c22037..00000000 --- a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VkColorSpaceKHR.java +++ /dev/null @@ -1,27 +0,0 @@ -/* - * MIT License - * - * Copyright (c) 2022-2024 Overrun Organization - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - */ - -// This file is auto-generated. DO NOT EDIT! -package overrungl.vulkan; - -public enum VkColorSpaceKHR implements overrun.marshal.CEnum { - SRGB_NONLINEAR(0), - COLORSPACE_SRGB_NONLINEAR(SRGB_NONLINEAR.value), - ; - private final int value; - VkColorSpaceKHR(int value) { this.value = value; } - @Override public int value() { return value; } -} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VkCommandBufferLevel.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VkCommandBufferLevel.java deleted file mode 100644 index ac235a21..00000000 --- a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VkCommandBufferLevel.java +++ /dev/null @@ -1,27 +0,0 @@ -/* - * MIT License - * - * Copyright (c) 2022-2024 Overrun Organization - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - */ - -// This file is auto-generated. DO NOT EDIT! -package overrungl.vulkan; - -public enum VkCommandBufferLevel implements overrun.marshal.CEnum { - PRIMARY(0), - SECONDARY(1), - ; - private final int value; - VkCommandBufferLevel(int value) { this.value = value; } - @Override public int value() { return value; } -} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VkCompareOp.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VkCompareOp.java deleted file mode 100644 index 4e56cca7..00000000 --- a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VkCompareOp.java +++ /dev/null @@ -1,33 +0,0 @@ -/* - * MIT License - * - * Copyright (c) 2022-2024 Overrun Organization - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - */ - -// This file is auto-generated. DO NOT EDIT! -package overrungl.vulkan; - -public enum VkCompareOp implements overrun.marshal.CEnum { - 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; - VkCompareOp(int value) { this.value = value; } - @Override public int value() { return value; } -} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VkComponentSwizzle.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VkComponentSwizzle.java deleted file mode 100644 index 6b728b7f..00000000 --- a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VkComponentSwizzle.java +++ /dev/null @@ -1,32 +0,0 @@ -/* - * MIT License - * - * Copyright (c) 2022-2024 Overrun Organization - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - */ - -// This file is auto-generated. DO NOT EDIT! -package overrungl.vulkan; - -public enum VkComponentSwizzle implements overrun.marshal.CEnum { - IDENTITY(0), - ZERO(1), - ONE(2), - R(3), - G(4), - B(5), - A(6), - ; - private final int value; - VkComponentSwizzle(int value) { this.value = value; } - @Override public int value() { return value; } -} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VkComponentTypeKHR.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VkComponentTypeKHR.java deleted file mode 100644 index a51e5ed7..00000000 --- a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VkComponentTypeKHR.java +++ /dev/null @@ -1,36 +0,0 @@ -/* - * MIT License - * - * Copyright (c) 2022-2024 Overrun Organization - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - */ - -// This file is auto-generated. DO NOT EDIT! -package overrungl.vulkan; - -public enum VkComponentTypeKHR implements overrun.marshal.CEnum { - FLOAT16(0), - FLOAT32(1), - FLOAT64(2), - SINT8(3), - SINT16(4), - SINT32(5), - SINT64(6), - UINT8(7), - UINT16(8), - UINT32(9), - UINT64(10), - ; - private final int value; - VkComponentTypeKHR(int value) { this.value = value; } - @Override public int value() { return value; } -} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VkConservativeRasterizationModeEXT.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VkConservativeRasterizationModeEXT.java deleted file mode 100644 index 2dde5b4a..00000000 --- a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VkConservativeRasterizationModeEXT.java +++ /dev/null @@ -1,28 +0,0 @@ -/* - * MIT License - * - * Copyright (c) 2022-2024 Overrun Organization - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - */ - -// This file is auto-generated. DO NOT EDIT! -package overrungl.vulkan; - -public enum VkConservativeRasterizationModeEXT implements overrun.marshal.CEnum { - DISABLED(0), - OVERESTIMATE(1), - UNDERESTIMATE(2), - ; - private final int value; - VkConservativeRasterizationModeEXT(int value) { this.value = value; } - @Override public int value() { return value; } -} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VkCopyAccelerationStructureModeKHR.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VkCopyAccelerationStructureModeKHR.java deleted file mode 100644 index 0e42f328..00000000 --- a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VkCopyAccelerationStructureModeKHR.java +++ /dev/null @@ -1,29 +0,0 @@ -/* - * MIT License - * - * Copyright (c) 2022-2024 Overrun Organization - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - */ - -// This file is auto-generated. DO NOT EDIT! -package overrungl.vulkan; - -public enum VkCopyAccelerationStructureModeKHR implements overrun.marshal.CEnum { - CLONE(0), - COMPACT(1), - SERIALIZE(2), - DESERIALIZE(3), - ; - private final int value; - VkCopyAccelerationStructureModeKHR(int value) { this.value = value; } - @Override public int value() { return value; } -} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VkCopyMicromapModeEXT.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VkCopyMicromapModeEXT.java deleted file mode 100644 index f03d7f23..00000000 --- a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VkCopyMicromapModeEXT.java +++ /dev/null @@ -1,29 +0,0 @@ -/* - * MIT License - * - * Copyright (c) 2022-2024 Overrun Organization - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - */ - -// This file is auto-generated. DO NOT EDIT! -package overrungl.vulkan; - -public enum VkCopyMicromapModeEXT implements overrun.marshal.CEnum { - CLONE(0), - SERIALIZE(1), - DESERIALIZE(2), - COMPACT(3), - ; - private final int value; - VkCopyMicromapModeEXT(int value) { this.value = value; } - @Override public int value() { return value; } -} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VkCoverageModulationModeNV.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VkCoverageModulationModeNV.java deleted file mode 100644 index fad15b0c..00000000 --- a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VkCoverageModulationModeNV.java +++ /dev/null @@ -1,29 +0,0 @@ -/* - * MIT License - * - * Copyright (c) 2022-2024 Overrun Organization - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - */ - -// This file is auto-generated. DO NOT EDIT! -package overrungl.vulkan; - -public enum VkCoverageModulationModeNV implements overrun.marshal.CEnum { - NONE(0), - RGB(1), - ALPHA(2), - RGBA(3), - ; - private final int value; - VkCoverageModulationModeNV(int value) { this.value = value; } - @Override public int value() { return value; } -} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VkCoverageReductionModeNV.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VkCoverageReductionModeNV.java deleted file mode 100644 index 2bab1077..00000000 --- a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VkCoverageReductionModeNV.java +++ /dev/null @@ -1,27 +0,0 @@ -/* - * MIT License - * - * Copyright (c) 2022-2024 Overrun Organization - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - */ - -// This file is auto-generated. DO NOT EDIT! -package overrungl.vulkan; - -public enum VkCoverageReductionModeNV implements overrun.marshal.CEnum { - MERGE(0), - TRUNCATE(1), - ; - private final int value; - VkCoverageReductionModeNV(int value) { this.value = value; } - @Override public int value() { return value; } -} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VkCubicFilterWeightsQCOM.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VkCubicFilterWeightsQCOM.java deleted file mode 100644 index 6228135f..00000000 --- a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VkCubicFilterWeightsQCOM.java +++ /dev/null @@ -1,29 +0,0 @@ -/* - * MIT License - * - * Copyright (c) 2022-2024 Overrun Organization - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - */ - -// This file is auto-generated. DO NOT EDIT! -package overrungl.vulkan; - -public enum VkCubicFilterWeightsQCOM implements overrun.marshal.CEnum { - CATMULL_ROM(0), - ZERO_TANGENT_CARDINAL(1), - B_SPLINE(2), - MITCHELL_NETRAVALI(3), - ; - private final int value; - VkCubicFilterWeightsQCOM(int value) { this.value = value; } - @Override public int value() { return value; } -} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VkDebugReportObjectTypeEXT.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VkDebugReportObjectTypeEXT.java deleted file mode 100644 index 1c71718f..00000000 --- a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VkDebugReportObjectTypeEXT.java +++ /dev/null @@ -1,59 +0,0 @@ -/* - * MIT License - * - * Copyright (c) 2022-2024 Overrun Organization - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - */ - -// This file is auto-generated. DO NOT EDIT! -package overrungl.vulkan; - -public enum VkDebugReportObjectTypeEXT implements overrun.marshal.CEnum { - UNKNOWN(0), - INSTANCE(1), - PHYSICAL_DEVICE(2), - DEVICE(3), - QUEUE(4), - SEMAPHORE(5), - COMMAND_BUFFER(6), - FENCE(7), - DEVICE_MEMORY(8), - BUFFER(9), - IMAGE(10), - EVENT(11), - QUERY_POOL(12), - BUFFER_VIEW(13), - IMAGE_VIEW(14), - SHADER_MODULE(15), - PIPELINE_CACHE(16), - PIPELINE_LAYOUT(17), - RENDER_PASS(18), - PIPELINE(19), - DESCRIPTOR_SET_LAYOUT(20), - SAMPLER(21), - DESCRIPTOR_POOL(22), - DESCRIPTOR_SET(23), - FRAMEBUFFER(24), - COMMAND_POOL(25), - SURFACE_KHR(26), - SWAPCHAIN_KHR(27), - DEBUG_REPORT_CALLBACK_EXT(28), - DEBUG_REPORT(DEBUG_REPORT_CALLBACK_EXT.value), - DISPLAY_KHR(29), - DISPLAY_MODE_KHR(30), - VALIDATION_CACHE_EXT(33), - VALIDATION_CACHE(VALIDATION_CACHE_EXT.value), - ; - private final int value; - VkDebugReportObjectTypeEXT(int value) { this.value = value; } - @Override public int value() { return value; } -} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VkDepthBiasRepresentationEXT.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VkDepthBiasRepresentationEXT.java deleted file mode 100644 index e9355194..00000000 --- a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VkDepthBiasRepresentationEXT.java +++ /dev/null @@ -1,28 +0,0 @@ -/* - * MIT License - * - * Copyright (c) 2022-2024 Overrun Organization - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - */ - -// This file is auto-generated. DO NOT EDIT! -package overrungl.vulkan; - -public enum VkDepthBiasRepresentationEXT implements overrun.marshal.CEnum { - LEAST_REPRESENTABLE_VALUE_FORMAT(0), - LEAST_REPRESENTABLE_VALUE_FORCE_UNORM(1), - FLOAT(2), - ; - private final int value; - VkDepthBiasRepresentationEXT(int value) { this.value = value; } - @Override public int value() { return value; } -} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VkDescriptorType.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VkDescriptorType.java deleted file mode 100644 index 779b9acd..00000000 --- a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VkDescriptorType.java +++ /dev/null @@ -1,36 +0,0 @@ -/* - * MIT License - * - * Copyright (c) 2022-2024 Overrun Organization - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - */ - -// This file is auto-generated. DO NOT EDIT! -package overrungl.vulkan; - -public enum VkDescriptorType implements overrun.marshal.CEnum { - SAMPLER(0), - COMBINED_IMAGE_SAMPLER(1), - SAMPLED_IMAGE(2), - STORAGE_IMAGE(3), - UNIFORM_TEXEL_BUFFER(4), - STORAGE_TEXEL_BUFFER(5), - UNIFORM_BUFFER(6), - STORAGE_BUFFER(7), - UNIFORM_BUFFER_DYNAMIC(8), - STORAGE_BUFFER_DYNAMIC(9), - INPUT_ATTACHMENT(10), - ; - private final int value; - VkDescriptorType(int value) { this.value = value; } - @Override public int value() { return value; } -} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VkDescriptorUpdateTemplateType.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VkDescriptorUpdateTemplateType.java deleted file mode 100644 index d04ff4c8..00000000 --- a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VkDescriptorUpdateTemplateType.java +++ /dev/null @@ -1,29 +0,0 @@ -/* - * MIT License - * - * Copyright (c) 2022-2024 Overrun Organization - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - */ - -// This file is auto-generated. DO NOT EDIT! -package overrungl.vulkan; - -public enum VkDescriptorUpdateTemplateType implements overrun.marshal.CEnum { - /** - * Create descriptor update template for descriptor set updates - */ - DESCRIPTOR_SET(0), - ; - private final int value; - VkDescriptorUpdateTemplateType(int value) { this.value = value; } - @Override public int value() { return value; } -} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VkDeviceAddressBindingTypeEXT.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VkDeviceAddressBindingTypeEXT.java deleted file mode 100644 index 9798b5f9..00000000 --- a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VkDeviceAddressBindingTypeEXT.java +++ /dev/null @@ -1,27 +0,0 @@ -/* - * MIT License - * - * Copyright (c) 2022-2024 Overrun Organization - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - */ - -// This file is auto-generated. DO NOT EDIT! -package overrungl.vulkan; - -public enum VkDeviceAddressBindingTypeEXT implements overrun.marshal.CEnum { - BIND(0), - UNBIND(1), - ; - private final int value; - VkDeviceAddressBindingTypeEXT(int value) { this.value = value; } - @Override public int value() { return value; } -} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VkDeviceEventTypeEXT.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VkDeviceEventTypeEXT.java deleted file mode 100644 index f6f33fcd..00000000 --- a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VkDeviceEventTypeEXT.java +++ /dev/null @@ -1,26 +0,0 @@ -/* - * MIT License - * - * Copyright (c) 2022-2024 Overrun Organization - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - */ - -// This file is auto-generated. DO NOT EDIT! -package overrungl.vulkan; - -public enum VkDeviceEventTypeEXT implements overrun.marshal.CEnum { - DISPLAY_HOTPLUG(0), - ; - private final int value; - VkDeviceEventTypeEXT(int value) { this.value = value; } - @Override public int value() { return value; } -} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VkDeviceFaultAddressTypeEXT.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VkDeviceFaultAddressTypeEXT.java deleted file mode 100644 index cbaf1cc9..00000000 --- a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VkDeviceFaultAddressTypeEXT.java +++ /dev/null @@ -1,35 +0,0 @@ -/* - * MIT License - * - * Copyright (c) 2022-2024 Overrun Organization - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - */ - -// This file is auto-generated. DO NOT EDIT! -package overrungl.vulkan; - -public enum VkDeviceFaultAddressTypeEXT implements overrun.marshal.CEnum { - /** - * Currently unused - */ - NONE(0), - READ_INVALID(1), - WRITE_INVALID(2), - EXECUTE_INVALID(3), - INSTRUCTION_POINTER_UNKNOWN(4), - INSTRUCTION_POINTER_INVALID(5), - INSTRUCTION_POINTER_FAULT(6), - ; - private final int value; - VkDeviceFaultAddressTypeEXT(int value) { this.value = value; } - @Override public int value() { return value; } -} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VkDeviceFaultVendorBinaryHeaderVersionEXT.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VkDeviceFaultVendorBinaryHeaderVersionEXT.java deleted file mode 100644 index 52a088c1..00000000 --- a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VkDeviceFaultVendorBinaryHeaderVersionEXT.java +++ /dev/null @@ -1,26 +0,0 @@ -/* - * MIT License - * - * Copyright (c) 2022-2024 Overrun Organization - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - */ - -// This file is auto-generated. DO NOT EDIT! -package overrungl.vulkan; - -public enum VkDeviceFaultVendorBinaryHeaderVersionEXT implements overrun.marshal.CEnum { - ONE(1), - ; - private final int value; - VkDeviceFaultVendorBinaryHeaderVersionEXT(int value) { this.value = value; } - @Override public int value() { return value; } -} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VkDeviceMemoryReportEventTypeEXT.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VkDeviceMemoryReportEventTypeEXT.java deleted file mode 100644 index 8c3b3149..00000000 --- a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VkDeviceMemoryReportEventTypeEXT.java +++ /dev/null @@ -1,30 +0,0 @@ -/* - * MIT License - * - * Copyright (c) 2022-2024 Overrun Organization - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - */ - -// This file is auto-generated. DO NOT EDIT! -package overrungl.vulkan; - -public enum VkDeviceMemoryReportEventTypeEXT implements overrun.marshal.CEnum { - ALLOCATE(0), - FREE(1), - IMPORT(2), - UNIMPORT(3), - ALLOCATION_FAILED(4), - ; - private final int value; - VkDeviceMemoryReportEventTypeEXT(int value) { this.value = value; } - @Override public int value() { return value; } -} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VkDirectDriverLoadingModeLUNARG.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VkDirectDriverLoadingModeLUNARG.java deleted file mode 100644 index b0800471..00000000 --- a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VkDirectDriverLoadingModeLUNARG.java +++ /dev/null @@ -1,27 +0,0 @@ -/* - * MIT License - * - * Copyright (c) 2022-2024 Overrun Organization - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - */ - -// This file is auto-generated. DO NOT EDIT! -package overrungl.vulkan; - -public enum VkDirectDriverLoadingModeLUNARG implements overrun.marshal.CEnum { - EXCLUSIVE(0), - INCLUSIVE(1), - ; - private final int value; - VkDirectDriverLoadingModeLUNARG(int value) { this.value = value; } - @Override public int value() { return value; } -} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VkDiscardRectangleModeEXT.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VkDiscardRectangleModeEXT.java deleted file mode 100644 index 1db9c779..00000000 --- a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VkDiscardRectangleModeEXT.java +++ /dev/null @@ -1,27 +0,0 @@ -/* - * MIT License - * - * Copyright (c) 2022-2024 Overrun Organization - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - */ - -// This file is auto-generated. DO NOT EDIT! -package overrungl.vulkan; - -public enum VkDiscardRectangleModeEXT implements overrun.marshal.CEnum { - INCLUSIVE(0), - EXCLUSIVE(1), - ; - private final int value; - VkDiscardRectangleModeEXT(int value) { this.value = value; } - @Override public int value() { return value; } -} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VkDisplacementMicromapFormatNV.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VkDisplacementMicromapFormatNV.java deleted file mode 100644 index c8c420ab..00000000 --- a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VkDisplacementMicromapFormatNV.java +++ /dev/null @@ -1,28 +0,0 @@ -/* - * MIT License - * - * Copyright (c) 2022-2024 Overrun Organization - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - */ - -// This file is auto-generated. DO NOT EDIT! -package overrungl.vulkan; - -public enum VkDisplacementMicromapFormatNV implements overrun.marshal.CEnum { - 64_TRIANGLES_64_BYTES(1), - 256_TRIANGLES_128_BYTES(2), - 1024_TRIANGLES_128_BYTES(3), - ; - private final int value; - VkDisplacementMicromapFormatNV(int value) { this.value = value; } - @Override public int value() { return value; } -} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VkDisplayEventTypeEXT.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VkDisplayEventTypeEXT.java deleted file mode 100644 index 685e8192..00000000 --- a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VkDisplayEventTypeEXT.java +++ /dev/null @@ -1,26 +0,0 @@ -/* - * MIT License - * - * Copyright (c) 2022-2024 Overrun Organization - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - */ - -// This file is auto-generated. DO NOT EDIT! -package overrungl.vulkan; - -public enum VkDisplayEventTypeEXT implements overrun.marshal.CEnum { - FIRST_PIXEL_OUT(0), - ; - private final int value; - VkDisplayEventTypeEXT(int value) { this.value = value; } - @Override public int value() { return value; } -} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VkDisplayPowerStateEXT.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VkDisplayPowerStateEXT.java deleted file mode 100644 index 179172ae..00000000 --- a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VkDisplayPowerStateEXT.java +++ /dev/null @@ -1,28 +0,0 @@ -/* - * MIT License - * - * Copyright (c) 2022-2024 Overrun Organization - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - */ - -// This file is auto-generated. DO NOT EDIT! -package overrungl.vulkan; - -public enum VkDisplayPowerStateEXT implements overrun.marshal.CEnum { - OFF(0), - SUSPEND(1), - ON(2), - ; - private final int value; - VkDisplayPowerStateEXT(int value) { this.value = value; } - @Override public int value() { return value; } -} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VkDriverId.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VkDriverId.java deleted file mode 100644 index 9f8bacb6..00000000 --- a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VkDriverId.java +++ /dev/null @@ -1,129 +0,0 @@ -/* - * MIT License - * - * Copyright (c) 2022-2024 Overrun Organization - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - */ - -// This file is auto-generated. DO NOT EDIT! -package overrungl.vulkan; - -public enum VkDriverId implements overrun.marshal.CEnum { - /** - * Advanced Micro Devices, Inc. - */ - AMD_PROPRIETARY(1), - /** - * Advanced Micro Devices, Inc. - */ - AMD_OPEN_SOURCE(2), - /** - * Mesa open source project - */ - MESA_RADV(3), - /** - * NVIDIA Corporation - */ - NVIDIA_PROPRIETARY(4), - /** - * Intel Corporation - */ - INTEL_PROPRIETARY_WINDOWS(5), - /** - * Intel Corporation - */ - INTEL_OPEN_SOURCE(6), - /** - * Imagination Technologies - */ - IMAGINATION_PROPRIETARY(7), - /** - * Qualcomm Technologies, Inc. - */ - QUALCOMM_PROPRIETARY(8), - /** - * Arm Limited - */ - ARM_PROPRIETARY(9), - /** - * Google LLC - */ - GOOGLE_SWIFTSHADER(10), - /** - * Google LLC - */ - GGP_PROPRIETARY(11), - /** - * Broadcom Inc. - */ - BROADCOM_PROPRIETARY(12), - /** - * Mesa - */ - MESA_LLVMPIPE(13), - /** - * MoltenVK - */ - MOLTENVK(14), - /** - * Core Avionics & Industrial Inc. - */ - COREAVI_PROPRIETARY(15), - /** - * Juice Technologies, Inc. - */ - JUICE_PROPRIETARY(16), - /** - * Verisilicon, Inc. - */ - VERISILICON_PROPRIETARY(17), - /** - * Mesa open source project - */ - MESA_TURNIP(18), - /** - * Mesa open source project - */ - MESA_V3DV(19), - /** - * Mesa open source project - */ - MESA_PANVK(20), - /** - * Samsung Electronics Co., Ltd. - */ - SAMSUNG_PROPRIETARY(21), - /** - * Mesa open source project - */ - MESA_VENUS(22), - /** - * Mesa open source project - */ - MESA_DOZEN(23), - /** - * Mesa open source project - */ - MESA_NVK(24), - /** - * Imagination Technologies - */ - IMAGINATION_OPEN_SOURCE(25), - /** - * Mesa open source project - */ - MESA_AGXV(26), - ; - private final int value; - VkDriverId(int value) { this.value = value; } - @Override public int value() { return value; } -} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VkDynamicState.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VkDynamicState.java deleted file mode 100644 index da0b523a..00000000 --- a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VkDynamicState.java +++ /dev/null @@ -1,34 +0,0 @@ -/* - * MIT License - * - * Copyright (c) 2022-2024 Overrun Organization - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - */ - -// This file is auto-generated. DO NOT EDIT! -package overrungl.vulkan; - -public enum VkDynamicState implements overrun.marshal.CEnum { - VIEWPORT(0), - SCISSOR(1), - LINE_WIDTH(2), - DEPTH_BIAS(3), - BLEND_CONSTANTS(4), - DEPTH_BOUNDS(5), - STENCIL_COMPARE_MASK(6), - STENCIL_WRITE_MASK(7), - STENCIL_REFERENCE(8), - ; - private final int value; - VkDynamicState(int value) { this.value = value; } - @Override public int value() { return value; } -} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VkFaultLevel.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VkFaultLevel.java deleted file mode 100644 index f90e7044..00000000 --- a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VkFaultLevel.java +++ /dev/null @@ -1,29 +0,0 @@ -/* - * MIT License - * - * Copyright (c) 2022-2024 Overrun Organization - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - */ - -// This file is auto-generated. DO NOT EDIT! -package overrungl.vulkan; - -public enum VkFaultLevel implements overrun.marshal.CEnum { - UNASSIGNED(0), - CRITICAL(1), - RECOVERABLE(2), - WARNING(3), - ; - private final int value; - VkFaultLevel(int value) { this.value = value; } - @Override public int value() { return value; } -} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VkFaultQueryBehavior.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VkFaultQueryBehavior.java deleted file mode 100644 index c9b0d22f..00000000 --- a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VkFaultQueryBehavior.java +++ /dev/null @@ -1,26 +0,0 @@ -/* - * MIT License - * - * Copyright (c) 2022-2024 Overrun Organization - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - */ - -// This file is auto-generated. DO NOT EDIT! -package overrungl.vulkan; - -public enum VkFaultQueryBehavior implements overrun.marshal.CEnum { - GET_AND_CLEAR_ALL_FAULTS(0), - ; - private final int value; - VkFaultQueryBehavior(int value) { this.value = value; } - @Override public int value() { return value; } -} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VkFaultType.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VkFaultType.java deleted file mode 100644 index 0a8d1dab..00000000 --- a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VkFaultType.java +++ /dev/null @@ -1,32 +0,0 @@ -/* - * MIT License - * - * Copyright (c) 2022-2024 Overrun Organization - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - */ - -// This file is auto-generated. DO NOT EDIT! -package overrungl.vulkan; - -public enum VkFaultType implements overrun.marshal.CEnum { - INVALID(0), - UNASSIGNED(1), - IMPLEMENTATION(2), - SYSTEM(3), - PHYSICAL_DEVICE(4), - COMMAND_BUFFER_FULL(5), - INVALID_API_USAGE(6), - ; - private final int value; - VkFaultType(int value) { this.value = value; } - @Override public int value() { return value; } -} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VkFilter.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VkFilter.java deleted file mode 100644 index 7d28e4fc..00000000 --- a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VkFilter.java +++ /dev/null @@ -1,27 +0,0 @@ -/* - * MIT License - * - * Copyright (c) 2022-2024 Overrun Organization - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - */ - -// This file is auto-generated. DO NOT EDIT! -package overrungl.vulkan; - -public enum VkFilter implements overrun.marshal.CEnum { - NEAREST(0), - LINEAR(1), - ; - private final int value; - VkFilter(int value) { this.value = value; } - @Override public int value() { return value; } -} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VkFormat.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VkFormat.java deleted file mode 100644 index 97a4ec7e..00000000 --- a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VkFormat.java +++ /dev/null @@ -1,210 +0,0 @@ -/* - * MIT License - * - * Copyright (c) 2022-2024 Overrun Organization - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - */ - -// This file is auto-generated. DO NOT EDIT! -package overrungl.vulkan; - -public enum VkFormat implements overrun.marshal.CEnum { - UNDEFINED(0), - R4G4_UNORM_PACK8(1), - R4G4B4A4_UNORM_PACK16(2), - B4G4R4A4_UNORM_PACK16(3), - R5G6B5_UNORM_PACK16(4), - B5G6R5_UNORM_PACK16(5), - R5G5B5A1_UNORM_PACK16(6), - B5G5R5A1_UNORM_PACK16(7), - A1R5G5B5_UNORM_PACK16(8), - 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), - B8G8R8_UNORM(30), - B8G8R8_SNORM(31), - B8G8R8_USCALED(32), - B8G8R8_SSCALED(33), - B8G8R8_UINT(34), - B8G8R8_SINT(35), - B8G8R8_SRGB(36), - R8G8B8A8_UNORM(37), - R8G8B8A8_SNORM(38), - R8G8B8A8_USCALED(39), - R8G8B8A8_SSCALED(40), - R8G8B8A8_UINT(41), - R8G8B8A8_SINT(42), - R8G8B8A8_SRGB(43), - B8G8R8A8_UNORM(44), - B8G8R8A8_SNORM(45), - B8G8R8A8_USCALED(46), - B8G8R8A8_SSCALED(47), - B8G8R8A8_UINT(48), - B8G8R8A8_SINT(49), - B8G8R8A8_SRGB(50), - A8B8G8R8_UNORM_PACK32(51), - A8B8G8R8_SNORM_PACK32(52), - A8B8G8R8_USCALED_PACK32(53), - A8B8G8R8_SSCALED_PACK32(54), - A8B8G8R8_UINT_PACK32(55), - A8B8G8R8_SINT_PACK32(56), - A8B8G8R8_SRGB_PACK32(57), - A2R10G10B10_UNORM_PACK32(58), - A2R10G10B10_SNORM_PACK32(59), - A2R10G10B10_USCALED_PACK32(60), - A2R10G10B10_SSCALED_PACK32(61), - A2R10G10B10_UINT_PACK32(62), - A2R10G10B10_SINT_PACK32(63), - A2B10G10R10_UNORM_PACK32(64), - A2B10G10R10_SNORM_PACK32(65), - A2B10G10R10_USCALED_PACK32(66), - A2B10G10R10_SSCALED_PACK32(67), - A2B10G10R10_UINT_PACK32(68), - A2B10G10R10_SINT_PACK32(69), - 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), - R64_UINT(110), - R64_SINT(111), - R64_SFLOAT(112), - R64G64_UINT(113), - R64G64_SINT(114), - R64G64_SFLOAT(115), - R64G64B64_UINT(116), - R64G64B64_SINT(117), - R64G64B64_SFLOAT(118), - R64G64B64A64_UINT(119), - R64G64B64A64_SINT(120), - R64G64B64A64_SFLOAT(121), - B10G11R11_UFLOAT_PACK32(122), - E5B9G9R9_UFLOAT_PACK32(123), - D16_UNORM(124), - X8_D24_UNORM_PACK32(125), - D32_SFLOAT(126), - S8_UINT(127), - D16_UNORM_S8_UINT(128), - D24_UNORM_S8_UINT(129), - D32_SFLOAT_S8_UINT(130), - BC1_RGB_UNORM_BLOCK(131), - BC1_RGB_SRGB_BLOCK(132), - BC1_RGBA_UNORM_BLOCK(133), - BC1_RGBA_SRGB_BLOCK(134), - BC2_UNORM_BLOCK(135), - BC2_SRGB_BLOCK(136), - BC3_UNORM_BLOCK(137), - BC3_SRGB_BLOCK(138), - BC4_UNORM_BLOCK(139), - BC4_SNORM_BLOCK(140), - BC5_UNORM_BLOCK(141), - BC5_SNORM_BLOCK(142), - BC6H_UFLOAT_BLOCK(143), - BC6H_SFLOAT_BLOCK(144), - BC7_UNORM_BLOCK(145), - BC7_SRGB_BLOCK(146), - ETC2_R8G8B8_UNORM_BLOCK(147), - ETC2_R8G8B8_SRGB_BLOCK(148), - ETC2_R8G8B8A1_UNORM_BLOCK(149), - ETC2_R8G8B8A1_SRGB_BLOCK(150), - ETC2_R8G8B8A8_UNORM_BLOCK(151), - ETC2_R8G8B8A8_SRGB_BLOCK(152), - EAC_R11_UNORM_BLOCK(153), - EAC_R11_SNORM_BLOCK(154), - EAC_R11G11_UNORM_BLOCK(155), - EAC_R11G11_SNORM_BLOCK(156), - ASTC_4x4_UNORM_BLOCK(157), - ASTC_4x4_SRGB_BLOCK(158), - ASTC_5x4_UNORM_BLOCK(159), - ASTC_5x4_SRGB_BLOCK(160), - ASTC_5x5_UNORM_BLOCK(161), - ASTC_5x5_SRGB_BLOCK(162), - ASTC_6x5_UNORM_BLOCK(163), - ASTC_6x5_SRGB_BLOCK(164), - ASTC_6x6_UNORM_BLOCK(165), - ASTC_6x6_SRGB_BLOCK(166), - ASTC_8x5_UNORM_BLOCK(167), - ASTC_8x5_SRGB_BLOCK(168), - ASTC_8x6_UNORM_BLOCK(169), - ASTC_8x6_SRGB_BLOCK(170), - ASTC_8x8_UNORM_BLOCK(171), - ASTC_8x8_SRGB_BLOCK(172), - ASTC_10x5_UNORM_BLOCK(173), - ASTC_10x5_SRGB_BLOCK(174), - ASTC_10x6_UNORM_BLOCK(175), - ASTC_10x6_SRGB_BLOCK(176), - ASTC_10x8_UNORM_BLOCK(177), - ASTC_10x8_SRGB_BLOCK(178), - ASTC_10x10_UNORM_BLOCK(179), - ASTC_10x10_SRGB_BLOCK(180), - ASTC_12x10_UNORM_BLOCK(181), - ASTC_12x10_SRGB_BLOCK(182), - ASTC_12x12_UNORM_BLOCK(183), - ASTC_12x12_SRGB_BLOCK(184), - ; - private final int value; - VkFormat(int value) { this.value = value; } - @Override public int value() { return value; } -} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VkFragmentShadingRateCombinerOpKHR.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VkFragmentShadingRateCombinerOpKHR.java deleted file mode 100644 index 206172f8..00000000 --- a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VkFragmentShadingRateCombinerOpKHR.java +++ /dev/null @@ -1,30 +0,0 @@ -/* - * MIT License - * - * Copyright (c) 2022-2024 Overrun Organization - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - */ - -// This file is auto-generated. DO NOT EDIT! -package overrungl.vulkan; - -public enum VkFragmentShadingRateCombinerOpKHR implements overrun.marshal.CEnum { - KEEP(0), - REPLACE(1), - MIN(2), - MAX(3), - MUL(4), - ; - private final int value; - VkFragmentShadingRateCombinerOpKHR(int value) { this.value = value; } - @Override public int value() { return value; } -} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VkFragmentShadingRateNV.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VkFragmentShadingRateNV.java deleted file mode 100644 index 4a0838a1..00000000 --- a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VkFragmentShadingRateNV.java +++ /dev/null @@ -1,37 +0,0 @@ -/* - * MIT License - * - * Copyright (c) 2022-2024 Overrun Organization - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - */ - -// This file is auto-generated. DO NOT EDIT! -package overrungl.vulkan; - -public enum VkFragmentShadingRateNV implements overrun.marshal.CEnum { - 1_INVOCATION_PER_PIXEL(0), - 1_INVOCATION_PER_1X2_PIXELS(1), - 1_INVOCATION_PER_2X1_PIXELS(4), - 1_INVOCATION_PER_2X2_PIXELS(5), - 1_INVOCATION_PER_2X4_PIXELS(6), - 1_INVOCATION_PER_4X2_PIXELS(9), - 1_INVOCATION_PER_4X4_PIXELS(10), - 2_INVOCATIONS_PER_PIXEL(11), - 4_INVOCATIONS_PER_PIXEL(12), - 8_INVOCATIONS_PER_PIXEL(13), - 16_INVOCATIONS_PER_PIXEL(14), - NO_INVOCATIONS(15), - ; - private final int value; - VkFragmentShadingRateNV(int value) { this.value = value; } - @Override public int value() { return value; } -} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VkFragmentShadingRateTypeNV.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VkFragmentShadingRateTypeNV.java deleted file mode 100644 index b557b879..00000000 --- a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VkFragmentShadingRateTypeNV.java +++ /dev/null @@ -1,27 +0,0 @@ -/* - * MIT License - * - * Copyright (c) 2022-2024 Overrun Organization - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - */ - -// This file is auto-generated. DO NOT EDIT! -package overrungl.vulkan; - -public enum VkFragmentShadingRateTypeNV implements overrun.marshal.CEnum { - FRAGMENT_SIZE(0), - ENUMS(1), - ; - private final int value; - VkFragmentShadingRateTypeNV(int value) { this.value = value; } - @Override public int value() { return value; } -} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VkFrontFace.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VkFrontFace.java deleted file mode 100644 index 1ea18a91..00000000 --- a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VkFrontFace.java +++ /dev/null @@ -1,27 +0,0 @@ -/* - * MIT License - * - * Copyright (c) 2022-2024 Overrun Organization - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - */ - -// This file is auto-generated. DO NOT EDIT! -package overrungl.vulkan; - -public enum VkFrontFace implements overrun.marshal.CEnum { - COUNTER_CLOCKWISE(0), - CLOCKWISE(1), - ; - private final int value; - VkFrontFace(int value) { this.value = value; } - @Override public int value() { return value; } -} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VkFullScreenExclusiveEXT.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VkFullScreenExclusiveEXT.java deleted file mode 100644 index 63946507..00000000 --- a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VkFullScreenExclusiveEXT.java +++ /dev/null @@ -1,29 +0,0 @@ -/* - * MIT License - * - * Copyright (c) 2022-2024 Overrun Organization - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - */ - -// This file is auto-generated. DO NOT EDIT! -package overrungl.vulkan; - -public enum VkFullScreenExclusiveEXT implements overrun.marshal.CEnum { - DEFAULT(0), - ALLOWED(1), - DISALLOWED(2), - APPLICATION_CONTROLLED(3), - ; - private final int value; - VkFullScreenExclusiveEXT(int value) { this.value = value; } - @Override public int value() { return value; } -} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VkGeometryTypeKHR.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VkGeometryTypeKHR.java deleted file mode 100644 index 761a52fd..00000000 --- a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VkGeometryTypeKHR.java +++ /dev/null @@ -1,28 +0,0 @@ -/* - * MIT License - * - * Copyright (c) 2022-2024 Overrun Organization - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - */ - -// This file is auto-generated. DO NOT EDIT! -package overrungl.vulkan; - -public enum VkGeometryTypeKHR implements overrun.marshal.CEnum { - TRIANGLES(0), - AABBS(1), - INSTANCES(2), - ; - private final int value; - VkGeometryTypeKHR(int value) { this.value = value; } - @Override public int value() { return value; } -} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VkImageLayout.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VkImageLayout.java deleted file mode 100644 index 20ec0122..00000000 --- a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VkImageLayout.java +++ /dev/null @@ -1,61 +0,0 @@ -/* - * MIT License - * - * Copyright (c) 2022-2024 Overrun Organization - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - */ - -// This file is auto-generated. DO NOT EDIT! -package overrungl.vulkan; - -public enum VkImageLayout implements overrun.marshal.CEnum { - /** - * Implicit layout an image is when its contents are undefined due to various reasons (e.g. right after creation) - */ - UNDEFINED(0), - /** - * General layout when image can be used for any kind of access - */ - GENERAL(1), - /** - * Optimal layout when image is only used for color attachment read/write - */ - COLOR_ATTACHMENT_OPTIMAL(2), - /** - * Optimal layout when image is only used for depth/stencil attachment read/write - */ - DEPTH_STENCIL_ATTACHMENT_OPTIMAL(3), - /** - * Optimal layout when image is used for read only depth/stencil attachment and shader access - */ - DEPTH_STENCIL_READ_ONLY_OPTIMAL(4), - /** - * Optimal layout when image is used for read only shader access - */ - SHADER_READ_ONLY_OPTIMAL(5), - /** - * Optimal layout when image is used only as source of transfer operations - */ - TRANSFER_SRC_OPTIMAL(6), - /** - * Optimal layout when image is used only as destination of transfer operations - */ - TRANSFER_DST_OPTIMAL(7), - /** - * Initial layout used when the data is populated by the CPU - */ - PREINITIALIZED(8), - ; - private final int value; - VkImageLayout(int value) { this.value = value; } - @Override public int value() { return value; } -} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VkImageTiling.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VkImageTiling.java deleted file mode 100644 index b23ae8c2..00000000 --- a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VkImageTiling.java +++ /dev/null @@ -1,27 +0,0 @@ -/* - * MIT License - * - * Copyright (c) 2022-2024 Overrun Organization - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - */ - -// This file is auto-generated. DO NOT EDIT! -package overrungl.vulkan; - -public enum VkImageTiling implements overrun.marshal.CEnum { - OPTIMAL(0), - LINEAR(1), - ; - private final int value; - VkImageTiling(int value) { this.value = value; } - @Override public int value() { return value; } -} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VkImageType.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VkImageType.java deleted file mode 100644 index 3b427cfe..00000000 --- a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VkImageType.java +++ /dev/null @@ -1,28 +0,0 @@ -/* - * MIT License - * - * Copyright (c) 2022-2024 Overrun Organization - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - */ - -// This file is auto-generated. DO NOT EDIT! -package overrungl.vulkan; - -public enum VkImageType implements overrun.marshal.CEnum { - 1D(0), - 2D(1), - 3D(2), - ; - private final int value; - VkImageType(int value) { this.value = value; } - @Override public int value() { return value; } -} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VkImageViewType.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VkImageViewType.java deleted file mode 100644 index cde4874e..00000000 --- a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VkImageViewType.java +++ /dev/null @@ -1,32 +0,0 @@ -/* - * MIT License - * - * Copyright (c) 2022-2024 Overrun Organization - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - */ - -// This file is auto-generated. DO NOT EDIT! -package overrungl.vulkan; - -public enum VkImageViewType implements overrun.marshal.CEnum { - 1D(0), - 2D(1), - 3D(2), - CUBE(3), - 1D_ARRAY(4), - 2D_ARRAY(5), - CUBE_ARRAY(6), - ; - private final int value; - VkImageViewType(int value) { this.value = value; } - @Override public int value() { return value; } -} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VkIndexType.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VkIndexType.java deleted file mode 100644 index 5df5b7d9..00000000 --- a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VkIndexType.java +++ /dev/null @@ -1,27 +0,0 @@ -/* - * MIT License - * - * Copyright (c) 2022-2024 Overrun Organization - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - */ - -// This file is auto-generated. DO NOT EDIT! -package overrungl.vulkan; - -public enum VkIndexType implements overrun.marshal.CEnum { - UINT16(0), - UINT32(1), - ; - private final int value; - VkIndexType(int value) { this.value = value; } - @Override public int value() { return value; } -} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VkIndirectCommandsTokenTypeNV.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VkIndirectCommandsTokenTypeNV.java deleted file mode 100644 index ccaec34d..00000000 --- a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VkIndirectCommandsTokenTypeNV.java +++ /dev/null @@ -1,33 +0,0 @@ -/* - * MIT License - * - * Copyright (c) 2022-2024 Overrun Organization - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - */ - -// This file is auto-generated. DO NOT EDIT! -package overrungl.vulkan; - -public enum VkIndirectCommandsTokenTypeNV implements overrun.marshal.CEnum { - SHADER_GROUP(0), - STATE_FLAGS(1), - INDEX_BUFFER(2), - VERTEX_BUFFER(3), - PUSH_CONSTANT(4), - DRAW_INDEXED(5), - DRAW(6), - DRAW_TASKS(7), - ; - private final int value; - VkIndirectCommandsTokenTypeNV(int value) { this.value = value; } - @Override public int value() { return value; } -} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VkInternalAllocationType.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VkInternalAllocationType.java deleted file mode 100644 index c77e8049..00000000 --- a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VkInternalAllocationType.java +++ /dev/null @@ -1,26 +0,0 @@ -/* - * MIT License - * - * Copyright (c) 2022-2024 Overrun Organization - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - */ - -// This file is auto-generated. DO NOT EDIT! -package overrungl.vulkan; - -public enum VkInternalAllocationType implements overrun.marshal.CEnum { - EXECUTABLE(0), - ; - private final int value; - VkInternalAllocationType(int value) { this.value = value; } - @Override public int value() { return value; } -} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VkLatencyMarkerNV.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VkLatencyMarkerNV.java deleted file mode 100644 index a9ceb550..00000000 --- a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VkLatencyMarkerNV.java +++ /dev/null @@ -1,37 +0,0 @@ -/* - * MIT License - * - * Copyright (c) 2022-2024 Overrun Organization - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - */ - -// This file is auto-generated. DO NOT EDIT! -package overrungl.vulkan; - -public enum VkLatencyMarkerNV implements overrun.marshal.CEnum { - SIMULATION_START(0), - SIMULATION_END(1), - RENDERSUBMIT_START(2), - RENDERSUBMIT_END(3), - PRESENT_START(4), - PRESENT_END(5), - INPUT_SAMPLE(6), - TRIGGER_FLASH(7), - OUT_OF_BAND_RENDERSUBMIT_START(8), - OUT_OF_BAND_RENDERSUBMIT_END(9), - OUT_OF_BAND_PRESENT_START(10), - OUT_OF_BAND_PRESENT_END(11), - ; - private final int value; - VkLatencyMarkerNV(int value) { this.value = value; } - @Override public int value() { return value; } -} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VkLayerSettingTypeEXT.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VkLayerSettingTypeEXT.java deleted file mode 100644 index e01aaf9b..00000000 --- a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VkLayerSettingTypeEXT.java +++ /dev/null @@ -1,33 +0,0 @@ -/* - * MIT License - * - * Copyright (c) 2022-2024 Overrun Organization - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - */ - -// This file is auto-generated. DO NOT EDIT! -package overrungl.vulkan; - -public enum VkLayerSettingTypeEXT implements overrun.marshal.CEnum { - BOOL32(0), - INT32(1), - INT64(2), - UINT32(3), - UINT64(4), - FLOAT32(5), - FLOAT64(6), - STRING(7), - ; - private final int value; - VkLayerSettingTypeEXT(int value) { this.value = value; } - @Override public int value() { return value; } -} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VkLayeredDriverUnderlyingApiMSFT.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VkLayeredDriverUnderlyingApiMSFT.java deleted file mode 100644 index e27249a5..00000000 --- a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VkLayeredDriverUnderlyingApiMSFT.java +++ /dev/null @@ -1,27 +0,0 @@ -/* - * MIT License - * - * Copyright (c) 2022-2024 Overrun Organization - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - */ - -// This file is auto-generated. DO NOT EDIT! -package overrungl.vulkan; - -public enum VkLayeredDriverUnderlyingApiMSFT implements overrun.marshal.CEnum { - NONE(0), - D3D12(1), - ; - private final int value; - VkLayeredDriverUnderlyingApiMSFT(int value) { this.value = value; } - @Override public int value() { return value; } -} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VkLineRasterizationModeKHR.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VkLineRasterizationModeKHR.java deleted file mode 100644 index 4eaf9be0..00000000 --- a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VkLineRasterizationModeKHR.java +++ /dev/null @@ -1,33 +0,0 @@ -/* - * MIT License - * - * Copyright (c) 2022-2024 Overrun Organization - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - */ - -// This file is auto-generated. DO NOT EDIT! -package overrungl.vulkan; - -public enum VkLineRasterizationModeKHR implements overrun.marshal.CEnum { - DEFAULT(0), - DEFAULT(DEFAULT.value), - RECTANGULAR(1), - RECTANGULAR(RECTANGULAR.value), - BRESENHAM(2), - BRESENHAM(BRESENHAM.value), - RECTANGULAR_SMOOTH(3), - RECTANGULAR_SMOOTH(RECTANGULAR_SMOOTH.value), - ; - private final int value; - VkLineRasterizationModeKHR(int value) { this.value = value; } - @Override public int value() { return value; } -} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VkLogicOp.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VkLogicOp.java deleted file mode 100644 index 8d65461b..00000000 --- a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VkLogicOp.java +++ /dev/null @@ -1,41 +0,0 @@ -/* - * MIT License - * - * Copyright (c) 2022-2024 Overrun Organization - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - */ - -// This file is auto-generated. DO NOT EDIT! -package overrungl.vulkan; - -public enum VkLogicOp implements overrun.marshal.CEnum { - CLEAR(0), - AND(1), - AND_REVERSE(2), - COPY(3), - AND_INVERTED(4), - NO_OP(5), - XOR(6), - OR(7), - NOR(8), - EQUIVALENT(9), - INVERT(10), - OR_REVERSE(11), - COPY_INVERTED(12), - OR_INVERTED(13), - NAND(14), - SET(15), - ; - private final int value; - VkLogicOp(int value) { this.value = value; } - @Override public int value() { return value; } -} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VkMemoryOverallocationBehaviorAMD.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VkMemoryOverallocationBehaviorAMD.java deleted file mode 100644 index f5a574b9..00000000 --- a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VkMemoryOverallocationBehaviorAMD.java +++ /dev/null @@ -1,28 +0,0 @@ -/* - * MIT License - * - * Copyright (c) 2022-2024 Overrun Organization - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - */ - -// This file is auto-generated. DO NOT EDIT! -package overrungl.vulkan; - -public enum VkMemoryOverallocationBehaviorAMD implements overrun.marshal.CEnum { - DEFAULT(0), - ALLOWED(1), - DISALLOWED(2), - ; - private final int value; - VkMemoryOverallocationBehaviorAMD(int value) { this.value = value; } - @Override public int value() { return value; } -} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VkMicromapTypeEXT.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VkMicromapTypeEXT.java deleted file mode 100644 index f261ba58..00000000 --- a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VkMicromapTypeEXT.java +++ /dev/null @@ -1,26 +0,0 @@ -/* - * MIT License - * - * Copyright (c) 2022-2024 Overrun Organization - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - */ - -// This file is auto-generated. DO NOT EDIT! -package overrungl.vulkan; - -public enum VkMicromapTypeEXT implements overrun.marshal.CEnum { - OPACITY_MICROMAP(0), - ; - private final int value; - VkMicromapTypeEXT(int value) { this.value = value; } - @Override public int value() { return value; } -} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VkObjectType.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VkObjectType.java deleted file mode 100644 index 68e9891d..00000000 --- a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VkObjectType.java +++ /dev/null @@ -1,51 +0,0 @@ -/* - * MIT License - * - * Copyright (c) 2022-2024 Overrun Organization - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - */ - -// This file is auto-generated. DO NOT EDIT! -package overrungl.vulkan; - -public enum VkObjectType implements overrun.marshal.CEnum { - UNKNOWN(0), - INSTANCE(1), - PHYSICAL_DEVICE(2), - DEVICE(3), - QUEUE(4), - SEMAPHORE(5), - COMMAND_BUFFER(6), - FENCE(7), - DEVICE_MEMORY(8), - BUFFER(9), - IMAGE(10), - EVENT(11), - QUERY_POOL(12), - BUFFER_VIEW(13), - IMAGE_VIEW(14), - SHADER_MODULE(15), - PIPELINE_CACHE(16), - PIPELINE_LAYOUT(17), - RENDER_PASS(18), - PIPELINE(19), - DESCRIPTOR_SET_LAYOUT(20), - SAMPLER(21), - DESCRIPTOR_POOL(22), - DESCRIPTOR_SET(23), - FRAMEBUFFER(24), - COMMAND_POOL(25), - ; - private final int value; - VkObjectType(int value) { this.value = value; } - @Override public int value() { return value; } -} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VkOpacityMicromapFormatEXT.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VkOpacityMicromapFormatEXT.java deleted file mode 100644 index b53e2ce5..00000000 --- a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VkOpacityMicromapFormatEXT.java +++ /dev/null @@ -1,27 +0,0 @@ -/* - * MIT License - * - * Copyright (c) 2022-2024 Overrun Organization - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - */ - -// This file is auto-generated. DO NOT EDIT! -package overrungl.vulkan; - -public enum VkOpacityMicromapFormatEXT implements overrun.marshal.CEnum { - 2_STATE(1), - 4_STATE(2), - ; - private final int value; - VkOpacityMicromapFormatEXT(int value) { this.value = value; } - @Override public int value() { return value; } -} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VkOpacityMicromapSpecialIndexEXT.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VkOpacityMicromapSpecialIndexEXT.java deleted file mode 100644 index b3206cc0..00000000 --- a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VkOpacityMicromapSpecialIndexEXT.java +++ /dev/null @@ -1,29 +0,0 @@ -/* - * MIT License - * - * Copyright (c) 2022-2024 Overrun Organization - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - */ - -// This file is auto-generated. DO NOT EDIT! -package overrungl.vulkan; - -public enum VkOpacityMicromapSpecialIndexEXT implements overrun.marshal.CEnum { - FULLY_TRANSPARENT(-1), - FULLY_OPAQUE(-2), - FULLY_UNKNOWN_TRANSPARENT(-3), - FULLY_UNKNOWN_OPAQUE(-4), - ; - private final int value; - VkOpacityMicromapSpecialIndexEXT(int value) { this.value = value; } - @Override public int value() { return value; } -} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VkOpticalFlowPerformanceLevelNV.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VkOpticalFlowPerformanceLevelNV.java deleted file mode 100644 index f96d517d..00000000 --- a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VkOpticalFlowPerformanceLevelNV.java +++ /dev/null @@ -1,29 +0,0 @@ -/* - * MIT License - * - * Copyright (c) 2022-2024 Overrun Organization - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - */ - -// This file is auto-generated. DO NOT EDIT! -package overrungl.vulkan; - -public enum VkOpticalFlowPerformanceLevelNV implements overrun.marshal.CEnum { - UNKNOWN(0), - SLOW(1), - MEDIUM(2), - FAST(3), - ; - private final int value; - VkOpticalFlowPerformanceLevelNV(int value) { this.value = value; } - @Override public int value() { return value; } -} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VkOpticalFlowSessionBindingPointNV.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VkOpticalFlowSessionBindingPointNV.java deleted file mode 100644 index 1135fc66..00000000 --- a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VkOpticalFlowSessionBindingPointNV.java +++ /dev/null @@ -1,34 +0,0 @@ -/* - * MIT License - * - * Copyright (c) 2022-2024 Overrun Organization - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - */ - -// This file is auto-generated. DO NOT EDIT! -package overrungl.vulkan; - -public enum VkOpticalFlowSessionBindingPointNV implements overrun.marshal.CEnum { - UNKNOWN(0), - INPUT(1), - REFERENCE(2), - HINT(3), - FLOW_VECTOR(4), - BACKWARD_FLOW_VECTOR(5), - COST(6), - BACKWARD_COST(7), - GLOBAL_FLOW(8), - ; - private final int value; - VkOpticalFlowSessionBindingPointNV(int value) { this.value = value; } - @Override public int value() { return value; } -} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VkOutOfBandQueueTypeNV.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VkOutOfBandQueueTypeNV.java deleted file mode 100644 index 41de6a88..00000000 --- a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VkOutOfBandQueueTypeNV.java +++ /dev/null @@ -1,27 +0,0 @@ -/* - * MIT License - * - * Copyright (c) 2022-2024 Overrun Organization - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - */ - -// This file is auto-generated. DO NOT EDIT! -package overrungl.vulkan; - -public enum VkOutOfBandQueueTypeNV implements overrun.marshal.CEnum { - RENDER(0), - PRESENT(1), - ; - private final int value; - VkOutOfBandQueueTypeNV(int value) { this.value = value; } - @Override public int value() { return value; } -} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VkPerformanceConfigurationTypeINTEL.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VkPerformanceConfigurationTypeINTEL.java deleted file mode 100644 index 63f7aafc..00000000 --- a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VkPerformanceConfigurationTypeINTEL.java +++ /dev/null @@ -1,26 +0,0 @@ -/* - * MIT License - * - * Copyright (c) 2022-2024 Overrun Organization - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - */ - -// This file is auto-generated. DO NOT EDIT! -package overrungl.vulkan; - -public enum VkPerformanceConfigurationTypeINTEL implements overrun.marshal.CEnum { - COMMAND_QUEUE_METRICS_DISCOVERY_ACTIVATED(0), - ; - private final int value; - VkPerformanceConfigurationTypeINTEL(int value) { this.value = value; } - @Override public int value() { return value; } -} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VkPerformanceCounterScopeKHR.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VkPerformanceCounterScopeKHR.java deleted file mode 100644 index 8028d61c..00000000 --- a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VkPerformanceCounterScopeKHR.java +++ /dev/null @@ -1,31 +0,0 @@ -/* - * MIT License - * - * Copyright (c) 2022-2024 Overrun Organization - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - */ - -// This file is auto-generated. DO NOT EDIT! -package overrungl.vulkan; - -public enum VkPerformanceCounterScopeKHR implements overrun.marshal.CEnum { - COMMAND_BUFFER(0), - RENDER_PASS(1), - COMMAND(2), - QUERY_SCOPE_COMMAND_BUFFER(COMMAND_BUFFER.value), - QUERY_SCOPE_RENDER_PASS(RENDER_PASS.value), - QUERY_SCOPE_COMMAND(COMMAND.value), - ; - private final int value; - VkPerformanceCounterScopeKHR(int value) { this.value = value; } - @Override public int value() { return value; } -} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VkPerformanceCounterStorageKHR.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VkPerformanceCounterStorageKHR.java deleted file mode 100644 index c994653b..00000000 --- a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VkPerformanceCounterStorageKHR.java +++ /dev/null @@ -1,31 +0,0 @@ -/* - * MIT License - * - * Copyright (c) 2022-2024 Overrun Organization - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - */ - -// This file is auto-generated. DO NOT EDIT! -package overrungl.vulkan; - -public enum VkPerformanceCounterStorageKHR implements overrun.marshal.CEnum { - INT32(0), - INT64(1), - UINT32(2), - UINT64(3), - FLOAT32(4), - FLOAT64(5), - ; - private final int value; - VkPerformanceCounterStorageKHR(int value) { this.value = value; } - @Override public int value() { return value; } -} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VkPerformanceCounterUnitKHR.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VkPerformanceCounterUnitKHR.java deleted file mode 100644 index e57d4702..00000000 --- a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VkPerformanceCounterUnitKHR.java +++ /dev/null @@ -1,36 +0,0 @@ -/* - * MIT License - * - * Copyright (c) 2022-2024 Overrun Organization - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - */ - -// This file is auto-generated. DO NOT EDIT! -package overrungl.vulkan; - -public enum VkPerformanceCounterUnitKHR implements overrun.marshal.CEnum { - GENERIC(0), - PERCENTAGE(1), - NANOSECONDS(2), - BYTES(3), - BYTES_PER_SECOND(4), - KELVIN(5), - WATTS(6), - VOLTS(7), - AMPS(8), - HERTZ(9), - CYCLES(10), - ; - private final int value; - VkPerformanceCounterUnitKHR(int value) { this.value = value; } - @Override public int value() { return value; } -} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VkPerformanceOverrideTypeINTEL.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VkPerformanceOverrideTypeINTEL.java deleted file mode 100644 index f8af2ba3..00000000 --- a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VkPerformanceOverrideTypeINTEL.java +++ /dev/null @@ -1,27 +0,0 @@ -/* - * MIT License - * - * Copyright (c) 2022-2024 Overrun Organization - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - */ - -// This file is auto-generated. DO NOT EDIT! -package overrungl.vulkan; - -public enum VkPerformanceOverrideTypeINTEL implements overrun.marshal.CEnum { - NULL_HARDWARE(0), - FLUSH_GPU_CACHES(1), - ; - private final int value; - VkPerformanceOverrideTypeINTEL(int value) { this.value = value; } - @Override public int value() { return value; } -} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VkPerformanceParameterTypeINTEL.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VkPerformanceParameterTypeINTEL.java deleted file mode 100644 index 19b288be..00000000 --- a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VkPerformanceParameterTypeINTEL.java +++ /dev/null @@ -1,27 +0,0 @@ -/* - * MIT License - * - * Copyright (c) 2022-2024 Overrun Organization - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - */ - -// This file is auto-generated. DO NOT EDIT! -package overrungl.vulkan; - -public enum VkPerformanceParameterTypeINTEL implements overrun.marshal.CEnum { - HW_COUNTERS_SUPPORTED(0), - STREAM_MARKER_VALID_BITS(1), - ; - private final int value; - VkPerformanceParameterTypeINTEL(int value) { this.value = value; } - @Override public int value() { return value; } -} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VkPerformanceValueTypeINTEL.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VkPerformanceValueTypeINTEL.java deleted file mode 100644 index 43705a43..00000000 --- a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VkPerformanceValueTypeINTEL.java +++ /dev/null @@ -1,30 +0,0 @@ -/* - * MIT License - * - * Copyright (c) 2022-2024 Overrun Organization - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - */ - -// This file is auto-generated. DO NOT EDIT! -package overrungl.vulkan; - -public enum VkPerformanceValueTypeINTEL implements overrun.marshal.CEnum { - UINT32(0), - UINT64(1), - FLOAT(2), - BOOL(3), - STRING(4), - ; - private final int value; - VkPerformanceValueTypeINTEL(int value) { this.value = value; } - @Override public int value() { return value; } -} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VkPhysicalDeviceType.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VkPhysicalDeviceType.java deleted file mode 100644 index 058c1878..00000000 --- a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VkPhysicalDeviceType.java +++ /dev/null @@ -1,30 +0,0 @@ -/* - * MIT License - * - * Copyright (c) 2022-2024 Overrun Organization - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - */ - -// This file is auto-generated. DO NOT EDIT! -package overrungl.vulkan; - -public enum VkPhysicalDeviceType implements overrun.marshal.CEnum { - OTHER(0), - INTEGRATED_GPU(1), - DISCRETE_GPU(2), - VIRTUAL_GPU(3), - CPU(4), - ; - private final int value; - VkPhysicalDeviceType(int value) { this.value = value; } - @Override public int value() { return value; } -} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VkPipelineBindPoint.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VkPipelineBindPoint.java deleted file mode 100644 index 5a12e66a..00000000 --- a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VkPipelineBindPoint.java +++ /dev/null @@ -1,27 +0,0 @@ -/* - * MIT License - * - * Copyright (c) 2022-2024 Overrun Organization - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - */ - -// This file is auto-generated. DO NOT EDIT! -package overrungl.vulkan; - -public enum VkPipelineBindPoint implements overrun.marshal.CEnum { - GRAPHICS(0), - COMPUTE(1), - ; - private final int value; - VkPipelineBindPoint(int value) { this.value = value; } - @Override public int value() { return value; } -} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VkPipelineCacheHeaderVersion.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VkPipelineCacheHeaderVersion.java deleted file mode 100644 index 4b4dca3a..00000000 --- a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VkPipelineCacheHeaderVersion.java +++ /dev/null @@ -1,26 +0,0 @@ -/* - * MIT License - * - * Copyright (c) 2022-2024 Overrun Organization - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - */ - -// This file is auto-generated. DO NOT EDIT! -package overrungl.vulkan; - -public enum VkPipelineCacheHeaderVersion implements overrun.marshal.CEnum { - ONE(1), - ; - private final int value; - VkPipelineCacheHeaderVersion(int value) { this.value = value; } - @Override public int value() { return value; } -} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VkPipelineCacheValidationVersion.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VkPipelineCacheValidationVersion.java deleted file mode 100644 index d35d6322..00000000 --- a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VkPipelineCacheValidationVersion.java +++ /dev/null @@ -1,26 +0,0 @@ -/* - * MIT License - * - * Copyright (c) 2022-2024 Overrun Organization - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - */ - -// This file is auto-generated. DO NOT EDIT! -package overrungl.vulkan; - -public enum VkPipelineCacheValidationVersion implements overrun.marshal.CEnum { - SAFETY_CRITICAL_ONE(1), - ; - private final int value; - VkPipelineCacheValidationVersion(int value) { this.value = value; } - @Override public int value() { return value; } -} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VkPipelineExecutableStatisticFormatKHR.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VkPipelineExecutableStatisticFormatKHR.java deleted file mode 100644 index 733c184a..00000000 --- a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VkPipelineExecutableStatisticFormatKHR.java +++ /dev/null @@ -1,29 +0,0 @@ -/* - * MIT License - * - * Copyright (c) 2022-2024 Overrun Organization - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - */ - -// This file is auto-generated. DO NOT EDIT! -package overrungl.vulkan; - -public enum VkPipelineExecutableStatisticFormatKHR implements overrun.marshal.CEnum { - BOOL32(0), - INT64(1), - UINT64(2), - FLOAT64(3), - ; - private final int value; - VkPipelineExecutableStatisticFormatKHR(int value) { this.value = value; } - @Override public int value() { return value; } -} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VkPipelineMatchControl.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VkPipelineMatchControl.java deleted file mode 100644 index b8d6bbef..00000000 --- a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VkPipelineMatchControl.java +++ /dev/null @@ -1,26 +0,0 @@ -/* - * MIT License - * - * Copyright (c) 2022-2024 Overrun Organization - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - */ - -// This file is auto-generated. DO NOT EDIT! -package overrungl.vulkan; - -public enum VkPipelineMatchControl implements overrun.marshal.CEnum { - APPLICATION_UUID_EXACT_MATCH(0), - ; - private final int value; - VkPipelineMatchControl(int value) { this.value = value; } - @Override public int value() { return value; } -} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VkPipelineRobustnessBufferBehaviorEXT.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VkPipelineRobustnessBufferBehaviorEXT.java deleted file mode 100644 index a05de0a5..00000000 --- a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VkPipelineRobustnessBufferBehaviorEXT.java +++ /dev/null @@ -1,29 +0,0 @@ -/* - * MIT License - * - * Copyright (c) 2022-2024 Overrun Organization - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - */ - -// This file is auto-generated. DO NOT EDIT! -package overrungl.vulkan; - -public enum VkPipelineRobustnessBufferBehaviorEXT implements overrun.marshal.CEnum { - DEVICE_DEFAULT(0), - DISABLED(1), - ROBUST_BUFFER_ACCESS(2), - ROBUST_BUFFER_ACCESS_2(3), - ; - private final int value; - VkPipelineRobustnessBufferBehaviorEXT(int value) { this.value = value; } - @Override public int value() { return value; } -} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VkPipelineRobustnessImageBehaviorEXT.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VkPipelineRobustnessImageBehaviorEXT.java deleted file mode 100644 index 860ea563..00000000 --- a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VkPipelineRobustnessImageBehaviorEXT.java +++ /dev/null @@ -1,29 +0,0 @@ -/* - * MIT License - * - * Copyright (c) 2022-2024 Overrun Organization - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - */ - -// This file is auto-generated. DO NOT EDIT! -package overrungl.vulkan; - -public enum VkPipelineRobustnessImageBehaviorEXT implements overrun.marshal.CEnum { - DEVICE_DEFAULT(0), - DISABLED(1), - ROBUST_IMAGE_ACCESS(2), - ROBUST_IMAGE_ACCESS_2(3), - ; - private final int value; - VkPipelineRobustnessImageBehaviorEXT(int value) { this.value = value; } - @Override public int value() { return value; } -} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VkPointClippingBehavior.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VkPointClippingBehavior.java deleted file mode 100644 index d371c590..00000000 --- a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VkPointClippingBehavior.java +++ /dev/null @@ -1,27 +0,0 @@ -/* - * MIT License - * - * Copyright (c) 2022-2024 Overrun Organization - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - */ - -// This file is auto-generated. DO NOT EDIT! -package overrungl.vulkan; - -public enum VkPointClippingBehavior implements overrun.marshal.CEnum { - ALL_CLIP_PLANES(0), - USER_CLIP_PLANES_ONLY(1), - ; - private final int value; - VkPointClippingBehavior(int value) { this.value = value; } - @Override public int value() { return value; } -} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VkPolygonMode.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VkPolygonMode.java deleted file mode 100644 index 17f944ce..00000000 --- a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VkPolygonMode.java +++ /dev/null @@ -1,28 +0,0 @@ -/* - * MIT License - * - * Copyright (c) 2022-2024 Overrun Organization - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - */ - -// This file is auto-generated. DO NOT EDIT! -package overrungl.vulkan; - -public enum VkPolygonMode implements overrun.marshal.CEnum { - FILL(0), - LINE(1), - POINT(2), - ; - private final int value; - VkPolygonMode(int value) { this.value = value; } - @Override public int value() { return value; } -} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VkPresentModeKHR.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VkPresentModeKHR.java deleted file mode 100644 index 8b0ddf35..00000000 --- a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VkPresentModeKHR.java +++ /dev/null @@ -1,29 +0,0 @@ -/* - * MIT License - * - * Copyright (c) 2022-2024 Overrun Organization - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - */ - -// This file is auto-generated. DO NOT EDIT! -package overrungl.vulkan; - -public enum VkPresentModeKHR implements overrun.marshal.CEnum { - IMMEDIATE(0), - MAILBOX(1), - FIFO(2), - FIFO_RELAXED(3), - ; - private final int value; - VkPresentModeKHR(int value) { this.value = value; } - @Override public int value() { return value; } -} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VkPrimitiveTopology.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VkPrimitiveTopology.java deleted file mode 100644 index 58e1c078..00000000 --- a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VkPrimitiveTopology.java +++ /dev/null @@ -1,36 +0,0 @@ -/* - * MIT License - * - * Copyright (c) 2022-2024 Overrun Organization - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - */ - -// This file is auto-generated. DO NOT EDIT! -package overrungl.vulkan; - -public enum VkPrimitiveTopology implements overrun.marshal.CEnum { - POINT_LIST(0), - LINE_LIST(1), - LINE_STRIP(2), - TRIANGLE_LIST(3), - TRIANGLE_STRIP(4), - TRIANGLE_FAN(5), - LINE_LIST_WITH_ADJACENCY(6), - LINE_STRIP_WITH_ADJACENCY(7), - TRIANGLE_LIST_WITH_ADJACENCY(8), - TRIANGLE_STRIP_WITH_ADJACENCY(9), - PATCH_LIST(10), - ; - private final int value; - VkPrimitiveTopology(int value) { this.value = value; } - @Override public int value() { return value; } -} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VkProvokingVertexModeEXT.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VkProvokingVertexModeEXT.java deleted file mode 100644 index bb3dd192..00000000 --- a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VkProvokingVertexModeEXT.java +++ /dev/null @@ -1,27 +0,0 @@ -/* - * MIT License - * - * Copyright (c) 2022-2024 Overrun Organization - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - */ - -// This file is auto-generated. DO NOT EDIT! -package overrungl.vulkan; - -public enum VkProvokingVertexModeEXT implements overrun.marshal.CEnum { - FIRST_VERTEX(0), - LAST_VERTEX(1), - ; - private final int value; - VkProvokingVertexModeEXT(int value) { this.value = value; } - @Override public int value() { return value; } -} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VkQueryPoolSamplingModeINTEL.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VkQueryPoolSamplingModeINTEL.java deleted file mode 100644 index 0737bbbd..00000000 --- a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VkQueryPoolSamplingModeINTEL.java +++ /dev/null @@ -1,26 +0,0 @@ -/* - * MIT License - * - * Copyright (c) 2022-2024 Overrun Organization - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - */ - -// This file is auto-generated. DO NOT EDIT! -package overrungl.vulkan; - -public enum VkQueryPoolSamplingModeINTEL implements overrun.marshal.CEnum { - MANUAL(0), - ; - private final int value; - VkQueryPoolSamplingModeINTEL(int value) { this.value = value; } - @Override public int value() { return value; } -} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VkQueryResultStatusKHR.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VkQueryResultStatusKHR.java deleted file mode 100644 index 39b25e67..00000000 --- a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VkQueryResultStatusKHR.java +++ /dev/null @@ -1,28 +0,0 @@ -/* - * MIT License - * - * Copyright (c) 2022-2024 Overrun Organization - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - */ - -// This file is auto-generated. DO NOT EDIT! -package overrungl.vulkan; - -public enum VkQueryResultStatusKHR implements overrun.marshal.CEnum { - ERROR(-1), - NOT_READY(0), - COMPLETE(1), - ; - private final int value; - VkQueryResultStatusKHR(int value) { this.value = value; } - @Override public int value() { return value; } -} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VkQueryType.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VkQueryType.java deleted file mode 100644 index 2f93dfe1..00000000 --- a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VkQueryType.java +++ /dev/null @@ -1,31 +0,0 @@ -/* - * MIT License - * - * Copyright (c) 2022-2024 Overrun Organization - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - */ - -// This file is auto-generated. DO NOT EDIT! -package overrungl.vulkan; - -public enum VkQueryType implements overrun.marshal.CEnum { - OCCLUSION(0), - /** - * Optional - */ - PIPELINE_STATISTICS(1), - TIMESTAMP(2), - ; - private final int value; - VkQueryType(int value) { this.value = value; } - @Override public int value() { return value; } -} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VkQueueGlobalPriorityKHR.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VkQueueGlobalPriorityKHR.java deleted file mode 100644 index 18843cba..00000000 --- a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VkQueueGlobalPriorityKHR.java +++ /dev/null @@ -1,33 +0,0 @@ -/* - * MIT License - * - * Copyright (c) 2022-2024 Overrun Organization - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - */ - -// This file is auto-generated. DO NOT EDIT! -package overrungl.vulkan; - -public enum VkQueueGlobalPriorityKHR implements overrun.marshal.CEnum { - LOW(128), - MEDIUM(256), - HIGH(512), - REALTIME(1024), - LOW(LOW.value), - MEDIUM(MEDIUM.value), - HIGH(HIGH.value), - REALTIME(REALTIME.value), - ; - private final int value; - VkQueueGlobalPriorityKHR(int value) { this.value = value; } - @Override public int value() { return value; } -} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VkRasterizationOrderAMD.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VkRasterizationOrderAMD.java deleted file mode 100644 index 1a74eadc..00000000 --- a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VkRasterizationOrderAMD.java +++ /dev/null @@ -1,27 +0,0 @@ -/* - * MIT License - * - * Copyright (c) 2022-2024 Overrun Organization - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - */ - -// This file is auto-generated. DO NOT EDIT! -package overrungl.vulkan; - -public enum VkRasterizationOrderAMD implements overrun.marshal.CEnum { - STRICT(0), - RELAXED(1), - ; - private final int value; - VkRasterizationOrderAMD(int value) { this.value = value; } - @Override public int value() { return value; } -} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VkRayTracingInvocationReorderModeNV.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VkRayTracingInvocationReorderModeNV.java deleted file mode 100644 index dddf9718..00000000 --- a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VkRayTracingInvocationReorderModeNV.java +++ /dev/null @@ -1,27 +0,0 @@ -/* - * MIT License - * - * Copyright (c) 2022-2024 Overrun Organization - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - */ - -// This file is auto-generated. DO NOT EDIT! -package overrungl.vulkan; - -public enum VkRayTracingInvocationReorderModeNV implements overrun.marshal.CEnum { - NONE(0), - REORDER(1), - ; - private final int value; - VkRayTracingInvocationReorderModeNV(int value) { this.value = value; } - @Override public int value() { return value; } -} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VkRayTracingShaderGroupTypeKHR.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VkRayTracingShaderGroupTypeKHR.java deleted file mode 100644 index 4a485c6c..00000000 --- a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VkRayTracingShaderGroupTypeKHR.java +++ /dev/null @@ -1,28 +0,0 @@ -/* - * MIT License - * - * Copyright (c) 2022-2024 Overrun Organization - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - */ - -// This file is auto-generated. DO NOT EDIT! -package overrungl.vulkan; - -public enum VkRayTracingShaderGroupTypeKHR implements overrun.marshal.CEnum { - GENERAL(0), - TRIANGLES_HIT_GROUP(1), - PROCEDURAL_HIT_GROUP(2), - ; - private final int value; - VkRayTracingShaderGroupTypeKHR(int value) { this.value = value; } - @Override public int value() { return value; } -} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VkResult.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VkResult.java deleted file mode 100644 index bda2416d..00000000 --- a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VkResult.java +++ /dev/null @@ -1,101 +0,0 @@ -/* - * MIT License - * - * Copyright (c) 2022-2024 Overrun Organization - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - */ - -// This file is auto-generated. DO NOT EDIT! -package overrungl.vulkan; - -public enum VkResult implements overrun.marshal.CEnum { - /** - * Command completed successfully - */ - SUCCESS(0), - /** - * A fence or query has not yet completed - */ - NOT_READY(1), - /** - * A wait operation has not completed in the specified time - */ - TIMEOUT(2), - /** - * An event is signaled - */ - EVENT_SET(3), - /** - * An event is unsignaled - */ - EVENT_RESET(4), - /** - * A return array was too small for the result - */ - INCOMPLETE(5), - /** - * A host memory allocation has failed - */ - ERROR_OUT_OF_HOST_MEMORY(-1), - /** - * A device memory allocation has failed - */ - ERROR_OUT_OF_DEVICE_MEMORY(-2), - /** - * Initialization of an object has failed - */ - ERROR_INITIALIZATION_FAILED(-3), - /** - * The logical device has been lost. See <> - */ - ERROR_DEVICE_LOST(-4), - /** - * Mapping of a memory object has failed - */ - ERROR_MEMORY_MAP_FAILED(-5), - /** - * Layer specified does not exist - */ - ERROR_LAYER_NOT_PRESENT(-6), - /** - * Extension specified does not exist - */ - ERROR_EXTENSION_NOT_PRESENT(-7), - /** - * Requested feature is not available on this device - */ - ERROR_FEATURE_NOT_PRESENT(-8), - /** - * Unable to find a Vulkan driver - */ - ERROR_INCOMPATIBLE_DRIVER(-9), - /** - * Too many objects of the type have already been created - */ - ERROR_TOO_MANY_OBJECTS(-10), - /** - * Requested format is not supported on this device - */ - ERROR_FORMAT_NOT_SUPPORTED(-11), - /** - * A requested pool allocation has failed due to fragmentation of the pool's memory - */ - ERROR_FRAGMENTED_POOL(-12), - /** - * An unknown error has occurred, due to an implementation or application bug - */ - ERROR_UNKNOWN(-13), - ; - private final int value; - VkResult(int value) { this.value = value; } - @Override public int value() { return value; } -} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VkSamplerAddressMode.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VkSamplerAddressMode.java deleted file mode 100644 index 085d2700..00000000 --- a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VkSamplerAddressMode.java +++ /dev/null @@ -1,29 +0,0 @@ -/* - * MIT License - * - * Copyright (c) 2022-2024 Overrun Organization - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - */ - -// This file is auto-generated. DO NOT EDIT! -package overrungl.vulkan; - -public enum VkSamplerAddressMode implements overrun.marshal.CEnum { - REPEAT(0), - MIRRORED_REPEAT(1), - CLAMP_TO_EDGE(2), - CLAMP_TO_BORDER(3), - ; - private final int value; - VkSamplerAddressMode(int value) { this.value = value; } - @Override public int value() { return value; } -} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VkSamplerMipmapMode.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VkSamplerMipmapMode.java deleted file mode 100644 index b2c4df4b..00000000 --- a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VkSamplerMipmapMode.java +++ /dev/null @@ -1,33 +0,0 @@ -/* - * MIT License - * - * Copyright (c) 2022-2024 Overrun Organization - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - */ - -// This file is auto-generated. DO NOT EDIT! -package overrungl.vulkan; - -public enum VkSamplerMipmapMode implements overrun.marshal.CEnum { - /** - * Choose nearest mip level - */ - NEAREST(0), - /** - * Linear filter between mip levels - */ - LINEAR(1), - ; - private final int value; - VkSamplerMipmapMode(int value) { this.value = value; } - @Override public int value() { return value; } -} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VkSamplerReductionMode.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VkSamplerReductionMode.java deleted file mode 100644 index cb28a2a1..00000000 --- a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VkSamplerReductionMode.java +++ /dev/null @@ -1,28 +0,0 @@ -/* - * MIT License - * - * Copyright (c) 2022-2024 Overrun Organization - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - */ - -// This file is auto-generated. DO NOT EDIT! -package overrungl.vulkan; - -public enum VkSamplerReductionMode implements overrun.marshal.CEnum { - WEIGHTED_AVERAGE(0), - MIN(1), - MAX(2), - ; - private final int value; - VkSamplerReductionMode(int value) { this.value = value; } - @Override public int value() { return value; } -} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VkSamplerYcbcrModelConversion.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VkSamplerYcbcrModelConversion.java deleted file mode 100644 index 3842ea77..00000000 --- a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VkSamplerYcbcrModelConversion.java +++ /dev/null @@ -1,42 +0,0 @@ -/* - * MIT License - * - * Copyright (c) 2022-2024 Overrun Organization - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - */ - -// This file is auto-generated. DO NOT EDIT! -package overrungl.vulkan; - -public enum VkSamplerYcbcrModelConversion implements overrun.marshal.CEnum { - RGB_IDENTITY(0), - /** - * just range expansion - */ - YCBCR_IDENTITY(1), - /** - * aka HD YUV - */ - YCBCR_709(2), - /** - * aka SD YUV - */ - YCBCR_601(3), - /** - * aka UHD YUV - */ - YCBCR_2020(4), - ; - private final int value; - VkSamplerYcbcrModelConversion(int value) { this.value = value; } - @Override public int value() { return value; } -} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VkSamplerYcbcrRange.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VkSamplerYcbcrRange.java deleted file mode 100644 index 26eaf429..00000000 --- a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VkSamplerYcbcrRange.java +++ /dev/null @@ -1,33 +0,0 @@ -/* - * MIT License - * - * Copyright (c) 2022-2024 Overrun Organization - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - */ - -// This file is auto-generated. DO NOT EDIT! -package overrungl.vulkan; - -public enum VkSamplerYcbcrRange implements overrun.marshal.CEnum { - /** - * Luma 0..1 maps to 0..255, chroma -0.5..0.5 to 1..255 (clamped) - */ - ITU_FULL(0), - /** - * Luma 0..1 maps to 16..235, chroma -0.5..0.5 to 16..240 - */ - ITU_NARROW(1), - ; - private final int value; - VkSamplerYcbcrRange(int value) { this.value = value; } - @Override public int value() { return value; } -} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VkSciSyncClientTypeNV.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VkSciSyncClientTypeNV.java deleted file mode 100644 index f1671d92..00000000 --- a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VkSciSyncClientTypeNV.java +++ /dev/null @@ -1,28 +0,0 @@ -/* - * MIT License - * - * Copyright (c) 2022-2024 Overrun Organization - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - */ - -// This file is auto-generated. DO NOT EDIT! -package overrungl.vulkan; - -public enum VkSciSyncClientTypeNV implements overrun.marshal.CEnum { - SIGNALER(0), - WAITER(1), - SIGNALER_WAITER(2), - ; - private final int value; - VkSciSyncClientTypeNV(int value) { this.value = value; } - @Override public int value() { return value; } -} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VkSciSyncPrimitiveTypeNV.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VkSciSyncPrimitiveTypeNV.java deleted file mode 100644 index e0303493..00000000 --- a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VkSciSyncPrimitiveTypeNV.java +++ /dev/null @@ -1,27 +0,0 @@ -/* - * MIT License - * - * Copyright (c) 2022-2024 Overrun Organization - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - */ - -// This file is auto-generated. DO NOT EDIT! -package overrungl.vulkan; - -public enum VkSciSyncPrimitiveTypeNV implements overrun.marshal.CEnum { - FENCE(0), - SEMAPHORE(1), - ; - private final int value; - VkSciSyncPrimitiveTypeNV(int value) { this.value = value; } - @Override public int value() { return value; } -} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VkScopeKHR.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VkScopeKHR.java deleted file mode 100644 index 9e6e27a6..00000000 --- a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VkScopeKHR.java +++ /dev/null @@ -1,29 +0,0 @@ -/* - * MIT License - * - * Copyright (c) 2022-2024 Overrun Organization - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - */ - -// This file is auto-generated. DO NOT EDIT! -package overrungl.vulkan; - -public enum VkScopeKHR implements overrun.marshal.CEnum { - DEVICE(1), - WORKGROUP(2), - SUBGROUP(3), - QUEUE_FAMILY(5), - ; - private final int value; - VkScopeKHR(int value) { this.value = value; } - @Override public int value() { return value; } -} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VkSemaphoreType.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VkSemaphoreType.java deleted file mode 100644 index 0572cf32..00000000 --- a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VkSemaphoreType.java +++ /dev/null @@ -1,27 +0,0 @@ -/* - * MIT License - * - * Copyright (c) 2022-2024 Overrun Organization - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - */ - -// This file is auto-generated. DO NOT EDIT! -package overrungl.vulkan; - -public enum VkSemaphoreType implements overrun.marshal.CEnum { - BINARY(0), - TIMELINE(1), - ; - private final int value; - VkSemaphoreType(int value) { this.value = value; } - @Override public int value() { return value; } -} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VkShaderCodeTypeEXT.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VkShaderCodeTypeEXT.java deleted file mode 100644 index beab0e6e..00000000 --- a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VkShaderCodeTypeEXT.java +++ /dev/null @@ -1,27 +0,0 @@ -/* - * MIT License - * - * Copyright (c) 2022-2024 Overrun Organization - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - */ - -// This file is auto-generated. DO NOT EDIT! -package overrungl.vulkan; - -public enum VkShaderCodeTypeEXT implements overrun.marshal.CEnum { - BINARY(0), - SPIRV(1), - ; - private final int value; - VkShaderCodeTypeEXT(int value) { this.value = value; } - @Override public int value() { return value; } -} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VkShaderFloatControlsIndependence.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VkShaderFloatControlsIndependence.java deleted file mode 100644 index f47893f2..00000000 --- a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VkShaderFloatControlsIndependence.java +++ /dev/null @@ -1,28 +0,0 @@ -/* - * MIT License - * - * Copyright (c) 2022-2024 Overrun Organization - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - */ - -// This file is auto-generated. DO NOT EDIT! -package overrungl.vulkan; - -public enum VkShaderFloatControlsIndependence implements overrun.marshal.CEnum { - 32_BIT_ONLY(0), - ALL(1), - NONE(2), - ; - private final int value; - VkShaderFloatControlsIndependence(int value) { this.value = value; } - @Override public int value() { return value; } -} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VkShaderGroupShaderKHR.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VkShaderGroupShaderKHR.java deleted file mode 100644 index cb7ea6d8..00000000 --- a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VkShaderGroupShaderKHR.java +++ /dev/null @@ -1,29 +0,0 @@ -/* - * MIT License - * - * Copyright (c) 2022-2024 Overrun Organization - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - */ - -// This file is auto-generated. DO NOT EDIT! -package overrungl.vulkan; - -public enum VkShaderGroupShaderKHR implements overrun.marshal.CEnum { - GENERAL(0), - CLOSEST_HIT(1), - ANY_HIT(2), - INTERSECTION(3), - ; - private final int value; - VkShaderGroupShaderKHR(int value) { this.value = value; } - @Override public int value() { return value; } -} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VkShaderInfoTypeAMD.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VkShaderInfoTypeAMD.java deleted file mode 100644 index 4ca367de..00000000 --- a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VkShaderInfoTypeAMD.java +++ /dev/null @@ -1,28 +0,0 @@ -/* - * MIT License - * - * Copyright (c) 2022-2024 Overrun Organization - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - */ - -// This file is auto-generated. DO NOT EDIT! -package overrungl.vulkan; - -public enum VkShaderInfoTypeAMD implements overrun.marshal.CEnum { - STATISTICS(0), - BINARY(1), - DISASSEMBLY(2), - ; - private final int value; - VkShaderInfoTypeAMD(int value) { this.value = value; } - @Override public int value() { return value; } -} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VkShadingRatePaletteEntryNV.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VkShadingRatePaletteEntryNV.java deleted file mode 100644 index 591032fe..00000000 --- a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VkShadingRatePaletteEntryNV.java +++ /dev/null @@ -1,37 +0,0 @@ -/* - * MIT License - * - * Copyright (c) 2022-2024 Overrun Organization - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - */ - -// This file is auto-generated. DO NOT EDIT! -package overrungl.vulkan; - -public enum VkShadingRatePaletteEntryNV implements overrun.marshal.CEnum { - NO_INVOCATIONS(0), - 16_INVOCATIONS_PER_PIXEL(1), - 8_INVOCATIONS_PER_PIXEL(2), - 4_INVOCATIONS_PER_PIXEL(3), - 2_INVOCATIONS_PER_PIXEL(4), - 1_INVOCATION_PER_PIXEL(5), - 1_INVOCATION_PER_2X1_PIXELS(6), - 1_INVOCATION_PER_1X2_PIXELS(7), - 1_INVOCATION_PER_2X2_PIXELS(8), - 1_INVOCATION_PER_4X2_PIXELS(9), - 1_INVOCATION_PER_2X4_PIXELS(10), - 1_INVOCATION_PER_4X4_PIXELS(11), - ; - private final int value; - VkShadingRatePaletteEntryNV(int value) { this.value = value; } - @Override public int value() { return value; } -} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VkSharingMode.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VkSharingMode.java deleted file mode 100644 index 29f10ea1..00000000 --- a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VkSharingMode.java +++ /dev/null @@ -1,27 +0,0 @@ -/* - * MIT License - * - * Copyright (c) 2022-2024 Overrun Organization - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - */ - -// This file is auto-generated. DO NOT EDIT! -package overrungl.vulkan; - -public enum VkSharingMode implements overrun.marshal.CEnum { - EXCLUSIVE(0), - CONCURRENT(1), - ; - private final int value; - VkSharingMode(int value) { this.value = value; } - @Override public int value() { return value; } -} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VkStencilOp.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VkStencilOp.java deleted file mode 100644 index 1716cd06..00000000 --- a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VkStencilOp.java +++ /dev/null @@ -1,33 +0,0 @@ -/* - * MIT License - * - * Copyright (c) 2022-2024 Overrun Organization - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - */ - -// This file is auto-generated. DO NOT EDIT! -package overrungl.vulkan; - -public enum VkStencilOp implements overrun.marshal.CEnum { - KEEP(0), - ZERO(1), - REPLACE(2), - INCREMENT_AND_CLAMP(3), - DECREMENT_AND_CLAMP(4), - INVERT(5), - INCREMENT_AND_WRAP(6), - DECREMENT_AND_WRAP(7), - ; - private final int value; - VkStencilOp(int value) { this.value = value; } - @Override public int value() { return value; } -} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VkStructureType.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VkStructureType.java deleted file mode 100644 index 75211da0..00000000 --- a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VkStructureType.java +++ /dev/null @@ -1,80 +0,0 @@ -/* - * MIT License - * - * Copyright (c) 2022-2024 Overrun Organization - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - */ - -// This file is auto-generated. DO NOT EDIT! -package overrungl.vulkan; - -public enum VkStructureType implements overrun.marshal.CEnum { - APPLICATION_INFO(0), - INSTANCE_CREATE_INFO(1), - DEVICE_QUEUE_CREATE_INFO(2), - DEVICE_CREATE_INFO(3), - SUBMIT_INFO(4), - MEMORY_ALLOCATE_INFO(5), - MAPPED_MEMORY_RANGE(6), - BIND_SPARSE_INFO(7), - FENCE_CREATE_INFO(8), - SEMAPHORE_CREATE_INFO(9), - EVENT_CREATE_INFO(10), - QUERY_POOL_CREATE_INFO(11), - BUFFER_CREATE_INFO(12), - BUFFER_VIEW_CREATE_INFO(13), - IMAGE_CREATE_INFO(14), - IMAGE_VIEW_CREATE_INFO(15), - SHADER_MODULE_CREATE_INFO(16), - PIPELINE_CACHE_CREATE_INFO(17), - PIPELINE_SHADER_STAGE_CREATE_INFO(18), - PIPELINE_VERTEX_INPUT_STATE_CREATE_INFO(19), - PIPELINE_INPUT_ASSEMBLY_STATE_CREATE_INFO(20), - PIPELINE_TESSELLATION_STATE_CREATE_INFO(21), - PIPELINE_VIEWPORT_STATE_CREATE_INFO(22), - PIPELINE_RASTERIZATION_STATE_CREATE_INFO(23), - PIPELINE_MULTISAMPLE_STATE_CREATE_INFO(24), - PIPELINE_DEPTH_STENCIL_STATE_CREATE_INFO(25), - PIPELINE_COLOR_BLEND_STATE_CREATE_INFO(26), - PIPELINE_DYNAMIC_STATE_CREATE_INFO(27), - GRAPHICS_PIPELINE_CREATE_INFO(28), - COMPUTE_PIPELINE_CREATE_INFO(29), - PIPELINE_LAYOUT_CREATE_INFO(30), - SAMPLER_CREATE_INFO(31), - DESCRIPTOR_SET_LAYOUT_CREATE_INFO(32), - DESCRIPTOR_POOL_CREATE_INFO(33), - DESCRIPTOR_SET_ALLOCATE_INFO(34), - WRITE_DESCRIPTOR_SET(35), - COPY_DESCRIPTOR_SET(36), - FRAMEBUFFER_CREATE_INFO(37), - RENDER_PASS_CREATE_INFO(38), - COMMAND_POOL_CREATE_INFO(39), - COMMAND_BUFFER_ALLOCATE_INFO(40), - COMMAND_BUFFER_INHERITANCE_INFO(41), - COMMAND_BUFFER_BEGIN_INFO(42), - RENDER_PASS_BEGIN_INFO(43), - BUFFER_MEMORY_BARRIER(44), - IMAGE_MEMORY_BARRIER(45), - MEMORY_BARRIER(46), - /** - * Reserved for internal use by the loader, layers, and ICDs - */ - LOADER_INSTANCE_CREATE_INFO(47), - /** - * Reserved for internal use by the loader, layers, and ICDs - */ - LOADER_DEVICE_CREATE_INFO(48), - ; - private final int value; - VkStructureType(int value) { this.value = value; } - @Override public int value() { return value; } -} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VkSubpassContents.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VkSubpassContents.java deleted file mode 100644 index a0aa2a97..00000000 --- a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VkSubpassContents.java +++ /dev/null @@ -1,27 +0,0 @@ -/* - * MIT License - * - * Copyright (c) 2022-2024 Overrun Organization - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - */ - -// This file is auto-generated. DO NOT EDIT! -package overrungl.vulkan; - -public enum VkSubpassContents implements overrun.marshal.CEnum { - INLINE(0), - SECONDARY_COMMAND_BUFFERS(1), - ; - private final int value; - VkSubpassContents(int value) { this.value = value; } - @Override public int value() { return value; } -} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VkSubpassMergeStatusEXT.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VkSubpassMergeStatusEXT.java deleted file mode 100644 index 9b739f5f..00000000 --- a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VkSubpassMergeStatusEXT.java +++ /dev/null @@ -1,39 +0,0 @@ -/* - * MIT License - * - * Copyright (c) 2022-2024 Overrun Organization - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - */ - -// This file is auto-generated. DO NOT EDIT! -package overrungl.vulkan; - -public enum VkSubpassMergeStatusEXT implements overrun.marshal.CEnum { - MERGED(0), - DISALLOWED(1), - NOT_MERGED_SIDE_EFFECTS(2), - NOT_MERGED_SAMPLES_MISMATCH(3), - NOT_MERGED_VIEWS_MISMATCH(4), - NOT_MERGED_ALIASING(5), - NOT_MERGED_DEPENDENCIES(6), - NOT_MERGED_INCOMPATIBLE_INPUT_ATTACHMENT(7), - NOT_MERGED_TOO_MANY_ATTACHMENTS(8), - NOT_MERGED_INSUFFICIENT_STORAGE(9), - NOT_MERGED_DEPTH_STENCIL_COUNT(10), - NOT_MERGED_RESOLVE_ATTACHMENT_REUSE(11), - NOT_MERGED_SINGLE_SUBPASS(12), - NOT_MERGED_UNSPECIFIED(13), - ; - private final int value; - VkSubpassMergeStatusEXT(int value) { this.value = value; } - @Override public int value() { return value; } -} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VkSystemAllocationScope.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VkSystemAllocationScope.java deleted file mode 100644 index 4c148b0c..00000000 --- a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VkSystemAllocationScope.java +++ /dev/null @@ -1,30 +0,0 @@ -/* - * MIT License - * - * Copyright (c) 2022-2024 Overrun Organization - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - */ - -// This file is auto-generated. DO NOT EDIT! -package overrungl.vulkan; - -public enum VkSystemAllocationScope implements overrun.marshal.CEnum { - COMMAND(0), - OBJECT(1), - CACHE(2), - DEVICE(3), - INSTANCE(4), - ; - private final int value; - VkSystemAllocationScope(int value) { this.value = value; } - @Override public int value() { return value; } -} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VkTessellationDomainOrigin.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VkTessellationDomainOrigin.java deleted file mode 100644 index d1c70a39..00000000 --- a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VkTessellationDomainOrigin.java +++ /dev/null @@ -1,27 +0,0 @@ -/* - * MIT License - * - * Copyright (c) 2022-2024 Overrun Organization - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - */ - -// This file is auto-generated. DO NOT EDIT! -package overrungl.vulkan; - -public enum VkTessellationDomainOrigin implements overrun.marshal.CEnum { - UPPER_LEFT(0), - LOWER_LEFT(1), - ; - private final int value; - VkTessellationDomainOrigin(int value) { this.value = value; } - @Override public int value() { return value; } -} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VkTimeDomainKHR.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VkTimeDomainKHR.java deleted file mode 100644 index 53190323..00000000 --- a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VkTimeDomainKHR.java +++ /dev/null @@ -1,29 +0,0 @@ -/* - * MIT License - * - * Copyright (c) 2022-2024 Overrun Organization - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - */ - -// This file is auto-generated. DO NOT EDIT! -package overrungl.vulkan; - -public enum VkTimeDomainKHR implements overrun.marshal.CEnum { - DEVICE(0), - CLOCK_MONOTONIC(1), - CLOCK_MONOTONIC_RAW(2), - QUERY_PERFORMANCE_COUNTER(3), - ; - private final int value; - VkTimeDomainKHR(int value) { this.value = value; } - @Override public int value() { return value; } -} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VkValidationCacheHeaderVersionEXT.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VkValidationCacheHeaderVersionEXT.java deleted file mode 100644 index 32759268..00000000 --- a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VkValidationCacheHeaderVersionEXT.java +++ /dev/null @@ -1,26 +0,0 @@ -/* - * MIT License - * - * Copyright (c) 2022-2024 Overrun Organization - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - */ - -// This file is auto-generated. DO NOT EDIT! -package overrungl.vulkan; - -public enum VkValidationCacheHeaderVersionEXT implements overrun.marshal.CEnum { - ONE(1), - ; - private final int value; - VkValidationCacheHeaderVersionEXT(int value) { this.value = value; } - @Override public int value() { return value; } -} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VkValidationCheckEXT.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VkValidationCheckEXT.java deleted file mode 100644 index f4c35b3c..00000000 --- a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VkValidationCheckEXT.java +++ /dev/null @@ -1,27 +0,0 @@ -/* - * MIT License - * - * Copyright (c) 2022-2024 Overrun Organization - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - */ - -// This file is auto-generated. DO NOT EDIT! -package overrungl.vulkan; - -public enum VkValidationCheckEXT implements overrun.marshal.CEnum { - ALL(0), - SHADERS(1), - ; - private final int value; - VkValidationCheckEXT(int value) { this.value = value; } - @Override public int value() { return value; } -} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VkValidationFeatureDisableEXT.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VkValidationFeatureDisableEXT.java deleted file mode 100644 index 98928b37..00000000 --- a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VkValidationFeatureDisableEXT.java +++ /dev/null @@ -1,33 +0,0 @@ -/* - * MIT License - * - * Copyright (c) 2022-2024 Overrun Organization - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - */ - -// This file is auto-generated. DO NOT EDIT! -package overrungl.vulkan; - -public enum VkValidationFeatureDisableEXT implements overrun.marshal.CEnum { - ALL(0), - SHADERS(1), - THREAD_SAFETY(2), - API_PARAMETERS(3), - OBJECT_LIFETIMES(4), - CORE_CHECKS(5), - UNIQUE_HANDLES(6), - SHADER_VALIDATION_CACHE(7), - ; - private final int value; - VkValidationFeatureDisableEXT(int value) { this.value = value; } - @Override public int value() { return value; } -} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VkValidationFeatureEnableEXT.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VkValidationFeatureEnableEXT.java deleted file mode 100644 index 90ed3abc..00000000 --- a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VkValidationFeatureEnableEXT.java +++ /dev/null @@ -1,30 +0,0 @@ -/* - * MIT License - * - * Copyright (c) 2022-2024 Overrun Organization - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - */ - -// This file is auto-generated. DO NOT EDIT! -package overrungl.vulkan; - -public enum VkValidationFeatureEnableEXT implements overrun.marshal.CEnum { - GPU_ASSISTED(0), - GPU_ASSISTED_RESERVE_BINDING_SLOT(1), - BEST_PRACTICES(2), - DEBUG_PRINTF(3), - SYNCHRONIZATION_VALIDATION(4), - ; - private final int value; - VkValidationFeatureEnableEXT(int value) { this.value = value; } - @Override public int value() { return value; } -} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VkVendorId.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VkVendorId.java deleted file mode 100644 index afc42042..00000000 --- a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VkVendorId.java +++ /dev/null @@ -1,53 +0,0 @@ -/* - * MIT License - * - * Copyright (c) 2022-2024 Overrun Organization - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - */ - -// This file is auto-generated. DO NOT EDIT! -package overrungl.vulkan; - -public enum VkVendorId implements overrun.marshal.CEnum { - /** - * Vivante vendor ID - */ - (0x10001), - /** - * VeriSilicon vendor ID - */ - (0x10002), - /** - * Kazan Software Renderer - */ - KAZAN(0x10003), - /** - * Codeplay Software Ltd. vendor ID - */ - CODEPLAY(0x10004), - /** - * Mesa vendor ID - */ - (0x10005), - /** - * PoCL vendor ID - */ - POCL(0x10006), - /** - * Mobileye vendor ID - */ - MOBILEYE(0x10007), - ; - private final int value; - VkVendorId(int value) { this.value = value; } - @Override public int value() { return value; } -} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VkVertexInputRate.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VkVertexInputRate.java deleted file mode 100644 index 725c4749..00000000 --- a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VkVertexInputRate.java +++ /dev/null @@ -1,27 +0,0 @@ -/* - * MIT License - * - * Copyright (c) 2022-2024 Overrun Organization - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - */ - -// This file is auto-generated. DO NOT EDIT! -package overrungl.vulkan; - -public enum VkVertexInputRate implements overrun.marshal.CEnum { - VERTEX(0), - INSTANCE(1), - ; - private final int value; - VkVertexInputRate(int value) { this.value = value; } - @Override public int value() { return value; } -} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VkVideoEncodeTuningModeKHR.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VkVideoEncodeTuningModeKHR.java deleted file mode 100644 index 0f6e8cbb..00000000 --- a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VkVideoEncodeTuningModeKHR.java +++ /dev/null @@ -1,30 +0,0 @@ -/* - * MIT License - * - * Copyright (c) 2022-2024 Overrun Organization - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - */ - -// This file is auto-generated. DO NOT EDIT! -package overrungl.vulkan; - -public enum VkVideoEncodeTuningModeKHR implements overrun.marshal.CEnum { - DEFAULT(0), - HIGH_QUALITY(1), - LOW_LATENCY(2), - ULTRA_LOW_LATENCY(3), - LOSSLESS(4), - ; - private final int value; - VkVideoEncodeTuningModeKHR(int value) { this.value = value; } - @Override public int value() { return value; } -} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VkViewportCoordinateSwizzleNV.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VkViewportCoordinateSwizzleNV.java deleted file mode 100644 index 1421a509..00000000 --- a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VkViewportCoordinateSwizzleNV.java +++ /dev/null @@ -1,33 +0,0 @@ -/* - * MIT License - * - * Copyright (c) 2022-2024 Overrun Organization - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - */ - -// This file is auto-generated. DO NOT EDIT! -package overrungl.vulkan; - -public enum VkViewportCoordinateSwizzleNV implements overrun.marshal.CEnum { - POSITIVE_X(0), - NEGATIVE_X(1), - POSITIVE_Y(2), - NEGATIVE_Y(3), - POSITIVE_Z(4), - NEGATIVE_Z(5), - POSITIVE_W(6), - NEGATIVE_W(7), - ; - private final int value; - VkViewportCoordinateSwizzleNV(int value) { this.value = value; } - @Override public int value() { return value; } -} diff --git a/modules/samples/build.gradle.kts b/modules/samples/build.gradle.kts index 8b4b2d50..706dcf3a 100644 --- a/modules/samples/build.gradle.kts +++ b/modules/samples/build.gradle.kts @@ -1,8 +1,14 @@ plugins { id("me.champeau.jmh") version "0.7.2" + id("module.conventions") + id("submodule.conventions") } -val projModules: String by project +overrunglModule { + artifactName = "overrungl-samples" +} + +val junitVersion: String by project dependencies { Artifact.values().forEach { @@ -11,4 +17,9 @@ dependencies { implementation("io.github.over-run:timer:0.3.0") jmh("org.openjdk.jmh:jmh-core:1.37") jmhAnnotationProcessor("org.openjdk.jmh:jmh-generator-annprocess:1.37") + testImplementation("org.junit.jupiter:junit-jupiter:$junitVersion") +} + +tasks.withType { + useJUnitPlatform() } diff --git a/modules/samples/src/jmh/java/overrungl/demo/mem/MemoryUtilTest.java b/modules/samples/src/jmh/java/overrungl/demo/mem/MemoryUtilBenchmark.java similarity index 86% rename from modules/samples/src/jmh/java/overrungl/demo/mem/MemoryUtilTest.java rename to modules/samples/src/jmh/java/overrungl/demo/mem/MemoryUtilBenchmark.java index 24998f5e..7aa49826 100644 --- a/modules/samples/src/jmh/java/overrungl/demo/mem/MemoryUtilTest.java +++ b/modules/samples/src/jmh/java/overrungl/demo/mem/MemoryUtilBenchmark.java @@ -16,13 +16,13 @@ package overrungl.demo.mem; +import io.github.overrun.memstack.MemoryStack; import org.openjdk.jmh.annotations.*; import org.openjdk.jmh.infra.Blackhole; import org.openjdk.jmh.results.format.ResultFormatType; import org.openjdk.jmh.runner.Runner; import org.openjdk.jmh.runner.RunnerException; import org.openjdk.jmh.runner.options.OptionsBuilder; -import overrun.marshal.MemoryStack; import overrungl.util.MemoryUtil; import java.lang.foreign.Arena; @@ -42,7 +42,7 @@ @Measurement(iterations = 5, time = 250, timeUnit = TimeUnit.MILLISECONDS, batchSize = 100) @Threads(Threads.MAX) @Fork(1) -public class MemoryUtilTest { +public class MemoryUtilBenchmark { @Param({"0", "1", "10", "128", "1024"}) private long size; @@ -75,16 +75,9 @@ public void measureCalloc(Blackhole bh) { } } - @Benchmark - public void measureStackMalloc(Blackhole bh) { - try (MemoryStack stack = MemoryStack.stackPush()) { - bh.consume(stack.malloc(size, 1L)); - } - } - @Benchmark public void measureStackCalloc(Blackhole bh) { - try (MemoryStack stack = MemoryStack.stackPush()) { + try (MemoryStack stack = MemoryStack.pushLocal()) { bh.consume(stack.allocate(size)); } } @@ -92,8 +85,8 @@ public void measureStackCalloc(Blackhole bh) { public static void main(String[] args) throws RunnerException { new Runner( new OptionsBuilder() - .include(MemoryUtilTest.class.getSimpleName()) - .result("MemoryUtilTest.json") + .include(MemoryUtilBenchmark.class.getSimpleName()) + .result("MemoryUtilBenchmark.json") .resultFormat(ResultFormatType.JSON) .build() ).run(); diff --git a/modules/samples/src/main/java/overrungl/demo/nfd/NFDTest.java b/modules/samples/src/main/java/overrungl/demo/nfd/NFDTest.java index 6975f29a..68ad62b3 100644 --- a/modules/samples/src/main/java/overrungl/demo/nfd/NFDTest.java +++ b/modules/samples/src/main/java/overrungl/demo/nfd/NFDTest.java @@ -16,11 +16,10 @@ package overrungl.demo.nfd; -import overrun.marshal.MemoryStack; +import io.github.overrun.memstack.MemoryStack; import overrungl.nfd.NFD; import overrungl.nfd.NFDEnumerator; import overrungl.nfd.NFDNFilterItem; -import overrungl.nfd.NFDResult; import overrungl.util.value.Pair; import java.lang.foreign.MemorySegment; @@ -40,7 +39,7 @@ private static void openDialog() { // or before/after every time you want to show a file dialog. nfd.init(); - try (MemoryStack stack = MemoryStack.stackPush()) { + try (MemoryStack stack = MemoryStack.pushLocal()) { String[] outPath = new String[1]; // prepare filters for the dialog @@ -49,12 +48,12 @@ private static void openDialog() { new Pair<>("Image file", "png,jpg")); // show the dialog - final NFDResult result = nfd.openDialogN(outPath, filterItem, null); + final int result = nfd.openDialogN(outPath, filterItem, null); switch (result) { - case ERROR -> System.err.println("Error: " + nfd.getError()); - case OKAY -> System.out.println("Success! " + outPath[0]); - case CANCEL -> System.out.println("User pressed cancel."); + case NFD.ERROR -> System.err.println("Error: " + nfd.getError()); + case NFD.OKAY -> System.out.println("Success! " + outPath[0]); + case NFD.CANCEL -> System.out.println("User pressed cancel."); } } @@ -69,8 +68,8 @@ private static void openDialogMultiple() { // or before/after every time you want to show a file dialog. nfd.init(); - try (MemoryStack stack = MemoryStack.stackPush()) { - MemorySegment pOutPaths = stack.segments(MemorySegment.NULL); + try (MemoryStack stack = MemoryStack.pushLocal()) { + MemorySegment pOutPaths = stack.allocate(ValueLayout.ADDRESS); String[] outPath = new String[1]; // prepare filters for the dialog @@ -79,12 +78,12 @@ private static void openDialogMultiple() { new Pair<>("Image file", "png,jpg")); // show the dialog - final NFDResult result = nfd.openDialogMultipleN(pOutPaths, filterItem, null); + final int result = nfd.openDialogMultipleN(pOutPaths, filterItem, null); MemorySegment outPaths = pOutPaths.get(ValueLayout.ADDRESS, 0); switch (result) { - case ERROR -> System.err.println("Error: " + nfd.getError()); - case OKAY -> { + case NFD.ERROR -> System.err.println("Error: " + nfd.getError()); + case NFD.OKAY -> { System.out.println("Success!"); for (long i = 0, numPaths = nfd.pathSetGetCount(outPaths).y(); i < numPaths; i++) { @@ -95,7 +94,7 @@ private static void openDialogMultiple() { // remember to free the path-set memory (since NFDResult::OKAY is returned) nfd.pathSetFree(outPaths); } - case CANCEL -> System.out.println("User pressed cancel."); + case NFD.CANCEL -> System.out.println("User pressed cancel."); } } @@ -110,8 +109,8 @@ private static void openDialogMultipleEnum() { // or before/after every time you want to show a file dialog. nfd.init(); - try (MemoryStack stack = MemoryStack.stackPush()) { - MemorySegment pOutPaths = stack.segments(MemorySegment.NULL); + try (MemoryStack stack = MemoryStack.pushLocal()) { + MemorySegment pOutPaths = stack.allocate(ValueLayout.ADDRESS); // prepare filters for the dialog final var filterItem = NFDNFilterItem.create(stack, @@ -119,15 +118,15 @@ private static void openDialogMultipleEnum() { new Pair<>("Image file", "png,jpg")); // show the dialog - final NFDResult result = nfd.openDialogMultipleN(pOutPaths, filterItem, null); + final int result = nfd.openDialogMultipleN(pOutPaths, filterItem, null); MemorySegment outPaths = pOutPaths.get(ValueLayout.ADDRESS, 0); switch (result) { - case ERROR -> System.err.println("Error: " + nfd.getError()); - case OKAY -> { + case NFD.ERROR -> System.err.println("Error: " + nfd.getError()); + case NFD.OKAY -> { System.out.println("Success!"); - try (NFDEnumerator enumerator = NFDEnumerator.fromPathSetN(stack, outPaths).y()) { + try (NFDEnumerator enumerator = NFDEnumerator.fromPathSetN(stack, outPaths).x()) { int i = 0; for (String path : enumerator) { System.out.println("Path " + i + ": " + path); @@ -138,7 +137,7 @@ private static void openDialogMultipleEnum() { // remember to free the path-set memory (since NFDResult::OKAY is returned) nfd.pathSetFree(outPaths); } - case CANCEL -> System.out.println("User pressed cancel."); + case NFD.CANCEL -> System.out.println("User pressed cancel."); } } @@ -156,11 +155,11 @@ private static void pickFolder() { String[] outPath = new String[1]; // show the dialog - final NFDResult result = nfd.pickFolderN(outPath, null); + final int result = nfd.pickFolderN(outPath, null); switch (result) { - case ERROR -> System.err.println("Error: " + nfd.getError()); - case OKAY -> System.out.println("Success! " + outPath[0]); - case CANCEL -> System.out.println("User pressed cancel."); + case NFD.ERROR -> System.err.println("Error: " + nfd.getError()); + case NFD.OKAY -> System.out.println("Success! " + outPath[0]); + case NFD.CANCEL -> System.out.println("User pressed cancel."); } // Quit NFD @@ -174,7 +173,7 @@ private static void saveDialog() { // or before/after every time you want to show a file dialog. nfd.init(); - try (MemoryStack stack = MemoryStack.stackPush()) { + try (MemoryStack stack = MemoryStack.pushLocal()) { String[] savePath = new String[1]; // prepare filters for the dialog @@ -183,11 +182,11 @@ private static void saveDialog() { new Pair<>("Image file", "png,jpg")); // show the dialog - final NFDResult result = nfd.saveDialogN(savePath, filterItem, null, "Untitled.java"); + final int result = nfd.saveDialogN(savePath, filterItem, null, "Untitled.java"); switch (result) { - case ERROR -> System.err.println("Error: " + nfd.getError()); - case OKAY -> System.out.println("Success! " + savePath[0]); - case CANCEL -> System.out.println("User pressed cancel."); + case NFD.ERROR -> System.err.println("Error: " + nfd.getError()); + case NFD.OKAY -> System.out.println("Success! " + savePath[0]); + case NFD.CANCEL -> System.out.println("User pressed cancel."); } } diff --git a/modules/samples/src/main/java/overrungl/demo/opengl/GL30Test.java b/modules/samples/src/main/java/overrungl/demo/opengl/GL30Test.java index fd09db64..35e69e75 100644 --- a/modules/samples/src/main/java/overrungl/demo/opengl/GL30Test.java +++ b/modules/samples/src/main/java/overrungl/demo/opengl/GL30Test.java @@ -16,7 +16,7 @@ package overrungl.demo.opengl; -import overrun.marshal.MemoryStack; +import io.github.overrun.memstack.MemoryStack; import overrun.marshal.Unmarshal; import overrungl.demo.util.IOUtil; import overrungl.glfw.GLFW; @@ -107,7 +107,7 @@ private void load(Arena arena) { gl.bindTexture(GL.TEXTURE_2D, tex); gl.texParameteri(GL.TEXTURE_2D, GL.TEXTURE_MAG_FILTER, GL.NEAREST); gl.texParameteri(GL.TEXTURE_2D, GL.TEXTURE_MIN_FILTER, GL.NEAREST); - try (MemoryStack stack = MemoryStack.stackPush()) { + try (MemoryStack stack = MemoryStack.pushLocal()) { final STBImage stbImage = STBImage.INSTANCE; var px = stack.allocate(JAVA_INT); var py = stack.allocate(JAVA_INT); diff --git a/modules/samples/src/test/java/overrungl/test/MemoryUtilTest.java b/modules/samples/src/test/java/overrungl/test/MemoryUtilTest.java new file mode 100644 index 00000000..1fc0ee40 --- /dev/null +++ b/modules/samples/src/test/java/overrungl/test/MemoryUtilTest.java @@ -0,0 +1,75 @@ +/* + * MIT License + * + * Copyright (c) 2024 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +package overrungl.test; + +import org.junit.jupiter.api.Test; +import overrungl.util.MemoryUtil; + +import java.lang.foreign.Arena; +import java.lang.foreign.MemorySegment; +import java.lang.foreign.SegmentAllocator; +import java.lang.foreign.ValueLayout; + +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertFalse; + +/** + * @author squid233 + * @since 0.1.0 + */ +public class MemoryUtilTest { + @Test + void test_malloc() { + MemorySegment segment = MemoryUtil.malloc(ValueLayout.JAVA_INT); + segment.set(ValueLayout.JAVA_INT, 0L, 42); + assertEquals(42, segment.get(ValueLayout.JAVA_INT, 0L)); + MemoryUtil.free(segment); + } + + @Test + void test_calloc() { + MemorySegment segment = MemoryUtil.calloc(1, ValueLayout.JAVA_INT); + assertEquals(0, segment.get(ValueLayout.JAVA_INT, 0L)); + segment.set(ValueLayout.JAVA_INT, 0L, 42); + assertEquals(42, segment.get(ValueLayout.JAVA_INT, 0L)); + MemoryUtil.free(segment); + } + + @Test + void test_realloc() { + MemorySegment segment = MemoryUtil.calloc(1, ValueLayout.JAVA_INT); + assertEquals(4L, segment.byteSize()); + segment = MemoryUtil.realloc(segment, ValueLayout.JAVA_INT.scale(0L, 2L)); + assertEquals(8L, segment.byteSize()); + MemoryUtil.free(segment); + } + + @Test + void test_allocator() { + MemorySegment.Scope scope; + try (Arena arena = Arena.ofConfined()) { + SegmentAllocator allocator = MemoryUtil.allocator(arena); + MemorySegment segment = allocator.allocate(ValueLayout.JAVA_INT); + scope = segment.scope(); + + assertEquals(0, segment.get(ValueLayout.JAVA_INT, 0L)); + segment.set(ValueLayout.JAVA_INT, 0L, 42); + assertEquals(42, segment.get(ValueLayout.JAVA_INT, 0L)); + } + assertFalse(scope.isAlive()); + } +} diff --git a/settings.gradle.kts b/settings.gradle.kts index de97c3d0..164c7a08 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -11,7 +11,7 @@ val projName: String by settings rootProject.name = projName -file("modules").listFiles().forEach { +file("modules").listFiles()?.forEach { val s = it.name.substringAfterLast("overrungl.") include(s) project(":$s").projectDir = it